[llvm-commits] [llvm] r158195 - /llvm/trunk/cmake/modules/HandleLLVMOptions.cmake

Tobias Grosser grosser at fim.uni-passau.de
Fri Jun 8 02:41:23 PDT 2012


Author: grosser
Date: Fri Jun  8 04:41:23 2012
New Revision: 158195

URL: http://llvm.org/viewvc/llvm-project?rev=158195&view=rev
Log:
cmake: Pass the -m32 flag to modules if LLVM_BUILD_32_BITS is enabled

This was previously only done for executables and shared libraries, but not
for modules. As modules are essentially shared libraries (that need to be
dlopened explicitly), threating them the same as shared libraries seems
reasonable. This fixes the LLVM_BUILD_32_BITS build of Polly.

Contributed by: Ondra Hosek  <ondra.hosek at gmail.com>

Modified:
    llvm/trunk/cmake/modules/HandleLLVMOptions.cmake

Modified: llvm/trunk/cmake/modules/HandleLLVMOptions.cmake
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/cmake/modules/HandleLLVMOptions.cmake?rev=158195&r1=158194&r2=158195&view=diff
==============================================================================
--- llvm/trunk/cmake/modules/HandleLLVMOptions.cmake (original)
+++ llvm/trunk/cmake/modules/HandleLLVMOptions.cmake Fri Jun  8 04:41:23 2012
@@ -107,6 +107,7 @@
     add_llvm_definitions( -m32 )
     set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -m32")
     set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -m32")
+    set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -m32")
   endif( LLVM_BUILD_32_BITS )
 endif( CMAKE_SIZEOF_VOID_P EQUAL 8 AND NOT WIN32 )
 





More information about the llvm-commits mailing list