[llvm] r309177 - Set a different var for checking I686, because LLVM_NATIVE_ARCH is

Eric Beckmann via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 26 14:03:55 PDT 2017


Author: ecbeckmann
Date: Wed Jul 26 14:03:55 2017
New Revision: 309177

URL: http://llvm.org/viewvc/llvm-project?rev=309177&view=rev
Log:
Set a different var for checking I686, because LLVM_NATIVE_ARCH is
overwritten.

Modified:
    llvm/trunk/cmake/config-ix.cmake

Modified: llvm/trunk/cmake/config-ix.cmake
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/cmake/config-ix.cmake?rev=309177&r1=309176&r2=309177&view=diff
==============================================================================
--- llvm/trunk/cmake/config-ix.cmake (original)
+++ llvm/trunk/cmake/config-ix.cmake Wed Jul 26 14:03:55 2017
@@ -159,7 +159,7 @@ if( NOT PURE_WINDOWS AND NOT LLVM_USE_SA
   find_library(ICONV_LIBRARY_PATH NAMES iconv libiconv libiconv-2 c)
   set(LLVM_LIBXML2_ENABLED 0)
   set(LIBXML2_FOUND 0)
-  if((LLVM_ENABLE_LIBXML2) AND (CMAKE_SYSTEM_NAME MATCHES "Linux") AND (ICONV_LIBRARY_PATH) AND (NOT LLVM_NATIVE_ARCH MATCHES "i686"))
+  if((LLVM_ENABLE_LIBXML2) AND (CMAKE_SYSTEM_NAME MATCHES "Linux") AND (ICONV_LIBRARY_PATH) AND (NOT LLVM_ARCH_I686))
     find_package(LibXml2)
     if (LIBXML2_FOUND)
       set(LLVM_LIBXML2_ENABLED 1)
@@ -383,6 +383,10 @@ if( LLVM_NATIVE_ARCH STREQUAL "host" )
   string(REGEX MATCH "^[^-]*" LLVM_NATIVE_ARCH ${LLVM_HOST_TRIPLE})
 endif ()
 
+set(LLVM_ARCH_I686 0)
+if (LLVM_NATIVE_ARCH MATCHES "i686")
+  set(LLVM_ARCH_I686 1)
+
 if (LLVM_NATIVE_ARCH MATCHES "i[2-6]86")
   set(LLVM_NATIVE_ARCH X86)
 elseif (LLVM_NATIVE_ARCH STREQUAL "x86")




More information about the llvm-commits mailing list