[PATCH] D46264: Stop setting LLVM_ON_WIN32 in config.h and llvm-config.h.

Nico Weber via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 30 06:27:12 PDT 2018


thakis created this revision.
thakis added a reviewer: rnk.
Herald added a subscriber: mgorny.

See thread "Replacing LLVM_ON_WIN32 with just _WIN32" on llvm-dev and cfe-dev.

I replaced all uses of LLVM_ON_WIN32 with _WIN32 in r331127 (llvm), r331069 (clang), r329697 (lldb), r329696 (lld), r329696 (clang-tools-extra).

If your out-of-tree program used LLVM_ON_WIN32, just use _WIN32 instead, which is set at exactly the same time to exactly the same value.


https://reviews.llvm.org/D46264

Files:
  cmake/modules/LLVMConfig.cmake.in
  docs/ReleaseNotes.rst
  include/llvm/Config/config.h.cmake
  include/llvm/Config/llvm-config.h.cmake


Index: include/llvm/Config/llvm-config.h.cmake
===================================================================
--- include/llvm/Config/llvm-config.h.cmake
+++ include/llvm/Config/llvm-config.h.cmake
@@ -56,9 +56,6 @@
 /* Define if this is Unixish platform */
 #cmakedefine LLVM_ON_UNIX ${LLVM_ON_UNIX}
 
-/* Define if this is Win32ish platform */
-#cmakedefine LLVM_ON_WIN32 ${LLVM_ON_WIN32}
-
 /* Define if we have the Intel JIT API runtime support library */
 #cmakedefine01 LLVM_USE_INTEL_JITEVENTS
 
Index: include/llvm/Config/config.h.cmake
===================================================================
--- include/llvm/Config/config.h.cmake
+++ include/llvm/Config/config.h.cmake
@@ -311,9 +311,6 @@
 /* Define if this is Unixish platform */
 #cmakedefine LLVM_ON_UNIX ${LLVM_ON_UNIX}
 
-/* Define if this is Win32ish platform */
-#cmakedefine LLVM_ON_WIN32 ${LLVM_ON_WIN32}
-
 /* Define if overriding target triple is enabled */
 #cmakedefine LLVM_TARGET_TRIPLE_ENV "${LLVM_TARGET_TRIPLE_ENV}"
 
Index: docs/ReleaseNotes.rst
===================================================================
--- docs/ReleaseNotes.rst
+++ docs/ReleaseNotes.rst
@@ -84,6 +84,9 @@
     ftrunc.c:5:15: runtime error: 4.29497e+09 is outside the range of representable values of type 'int'
     junk in the ftrunc: 0.000000
 
+* ``LLVM_ON_WIN32`` is no longer set by ``llvm/Config/config.h`` and
+  ``llvm/Config/llvm-config.h``.  If you used this macro, use the compiler-set
+  ``_WIN32`` instead which is set exactly when ``LLVM_ON_WIN32`` used to be set.
 
 * Note..
 
Index: cmake/modules/LLVMConfig.cmake.in
===================================================================
--- cmake/modules/LLVMConfig.cmake.in
+++ cmake/modules/LLVMConfig.cmake.in
@@ -58,7 +58,6 @@
 set(LLVM_PLUGIN_EXT @LLVM_PLUGIN_EXT@)
 
 set(LLVM_ON_UNIX @LLVM_ON_UNIX@)
-set(LLVM_ON_WIN32 @LLVM_ON_WIN32@)
 
 set(LLVM_LIBDIR_SUFFIX @LLVM_LIBDIR_SUFFIX@)
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D46264.144546.patch
Type: text/x-patch
Size: 1933 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180430/07be77ae/attachment.bin>


More information about the llvm-commits mailing list