[llvm] a1862d7 - Set LLVM_FORCE_USE_OLD_TOOLCHAIN to disable VS2019 checks

Muhammad Omair Javaid via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 9 01:40:21 PST 2022


Author: Muhammad Omair Javaid
Date: 2022-02-09T14:31:37+05:00
New Revision: a1862d78eb4502405fa2c25b100168b66c6d071a

URL: https://github.com/llvm/llvm-project/commit/a1862d78eb4502405fa2c25b100168b66c6d071a
DIFF: https://github.com/llvm/llvm-project/commit/a1862d78eb4502405fa2c25b100168b66c6d071a.diff

LOG: Set LLVM_FORCE_USE_OLD_TOOLCHAIN to disable VS2019 checks

VS2019 version 1920 in now the default and get tested in
llvm/include/llvm/Support/Compiler.h. This patch propagates
LLVM_FORCE_USE_OLD_TOOLCHAIN macro to disable testing for VS2019.

Differential Revision: https://reviews.llvm.org/D114639

Added: 
    

Modified: 
    llvm/include/llvm/Config/llvm-config.h.cmake
    llvm/include/llvm/Support/Compiler.h

Removed: 
    


################################################################################
diff  --git a/llvm/include/llvm/Config/llvm-config.h.cmake b/llvm/include/llvm/Config/llvm-config.h.cmake
index 839a1c7c1984f..e8a8c20c7c7ad 100644
--- a/llvm/include/llvm/Config/llvm-config.h.cmake
+++ b/llvm/include/llvm/Config/llvm-config.h.cmake
@@ -109,4 +109,7 @@
 /* Define if building LLVM with BUILD_SHARED_LIBS */
 #cmakedefine LLVM_BUILD_SHARED_LIBS
 
+/* Define if building LLVM with LLVM_FORCE_USE_OLD_TOOLCHAIN_LIBS */
+#cmakedefine LLVM_FORCE_USE_OLD_TOOLCHAIN $(LLVM_FORCE_USE_OLD_TOOLCHAIN)
+
 #endif

diff  --git a/llvm/include/llvm/Support/Compiler.h b/llvm/include/llvm/Support/Compiler.h
index 63f49b3af8ff4..e97da6bd4ef05 100644
--- a/llvm/include/llvm/Support/Compiler.h
+++ b/llvm/include/llvm/Support/Compiler.h
@@ -94,9 +94,11 @@
 #define LLVM_MSC_PREREQ(version) (_MSC_VER >= (version))
 
 // We require at least VS 2019.
+#if !defined(LLVM_FORCE_USE_OLD_TOOLCHAIN)
 #if !LLVM_MSC_PREREQ(1920)
 #error LLVM requires at least VS 2019.
 #endif
+#endif
 
 #else
 #define LLVM_MSC_PREREQ(version) 0


        


More information about the llvm-commits mailing list