From 2563ad294fb27baaef2ef12f7829b8289c6925ae Mon Sep 17 00:00:00 2001 From: Tobias Grosser Date: Fri, 8 Jun 2012 09:41:23 +0000 Subject: 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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158195 91177308-0d34-0410-b5e6-96231b3b80d8 --- cmake/modules/HandleLLVMOptions.cmake | 1 + 1 file changed, 1 insertion(+) diff --git a/cmake/modules/HandleLLVMOptions.cmake b/cmake/modules/HandleLLVMOptions.cmake index 34d2d415d1..b5f96e8f71 100644 --- a/cmake/modules/HandleLLVMOptions.cmake +++ b/cmake/modules/HandleLLVMOptions.cmake @@ -107,6 +107,7 @@ if( CMAKE_SIZEOF_VOID_P EQUAL 8 AND NOT WIN32 ) 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 ) -- cgit v1.2.3