[llvm-commits] [llvm] r59568 - /llvm/trunk/CMakeLists.txt

Oscar Fuentes ofv at wanadoo.es
Tue Nov 18 16:10:39 PST 2008


Author: ofv
Date: Tue Nov 18 18:10:39 2008
New Revision: 59568

URL: http://llvm.org/viewvc/llvm-project?rev=59568&view=rev
Log:
CMake: Support for building 32 bits shared libraries on 64 bits GNU
systems. BUILD_32_BITS option renamed to LLVM_BUILD_32_BITS.

Modified:
    llvm/trunk/CMakeLists.txt

Modified: llvm/trunk/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/CMakeLists.txt?rev=59568&r1=59567&r2=59568&view=diff

==============================================================================
--- llvm/trunk/CMakeLists.txt (original)
+++ llvm/trunk/CMakeLists.txt Tue Nov 18 18:10:39 2008
@@ -118,14 +118,14 @@
 
 if( CMAKE_SIZEOF_VOID_P EQUAL 8 AND NOT WIN32 )
   # TODO: support other platforms and toolchains.
-  option(BUILD_32_BITS "Build 32 bits executables and libraries." OFF)
-  if( BUILD_32_BITS )
+  option(LLVM_BUILD_32_BITS "Build 32 bits executables and libraries." OFF)
+  if( LLVM_BUILD_32_BITS )
     message(STATUS "Building 32 bits executables and libraries.")
     add_definitions( -m32 )
-    set( CMAKE_EXE_LINKER_FLAGS "-m32 ${CMAKE_EXE_LINKER_FLAGS}" )
-    set( CMAKE_LINK_LIBRARY_FLAG "-m32 ${CMAKE_LINK_LIBRARY_FLAG}" )
+    list(APPEND CMAKE_EXE_LINKER_FLAGS -m32)
+    list(APPEND CMAKE_SHARED_LINKER_FLAGS -m32)
     set( LLVM_PLO_FLAGS -melf_i386 ${LLVM_PLO_FLAGS} )
-  endif( BUILD_32_BITS )
+  endif( LLVM_BUILD_32_BITS )
 endif( CMAKE_SIZEOF_VOID_P EQUAL 8 AND NOT WIN32 )
 
 if( MSVC )





More information about the llvm-commits mailing list