[llvm-branch-commits] [llvm] 4c33252 - Set LLVM_FORCE_USE_OLD_TOOLCHAIN to disable VS2019 checks

Muhammad Omair Javaid via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Thu Feb 10 20:23:56 PST 2022


Author: Muhammad Omair Javaid
Date: 2022-02-11T09:23:05+05:00
New Revision: 4c33252b7d9ad1b52c7faa66fafeb816ab53f964

URL: https://github.com/llvm/llvm-project/commit/4c33252b7d9ad1b52c7faa66fafeb816ab53f964
DIFF: https://github.com/llvm/llvm-project/commit/4c33252b7d9ad1b52c7faa66fafeb816ab53f964.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 f3317049524f3..80b2dfaec4273 100644
--- a/llvm/include/llvm/Support/Compiler.h
+++ b/llvm/include/llvm/Support/Compiler.h
@@ -90,9 +90,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-branch-commits mailing list