[llvm-commits] [PATCH] Cross-building for 32-bits from CMake

Michael Spencer bigcheesegs at gmail.com
Tue May 22 12:43:46 PDT 2012


On Tue, May 22, 2012 at 1:49 AM, Tim Northover <t.p.northover at gmail.com> wrote:
>> CMake is supposed to support -DLLVM_BUILD_32_BITS to build a 32-bit
>> version of LLVM from a 64-bit system. However, it implements the flag
>> like this:
>>
>> list(APPEND CMAKE_EXE_LINKER_FLAGS -m32)
>>
>> the problem is that CMAKE_EXE_LINKER_FLAGS (and _SHARED_) aren't
>> actually lists in the CMake sense (separated by ';'), so this can give
>> you a linker command containing the argument ";-m32" which goes
>> horribly wrong.
>>
>> I assume the variable was empty when this feature was implemented so
>> no semicolon was needed. The attached patch fixes this issue.
>>
>> Ok to commit?
>
> Ping?
>
> Tim.

looks good to me.

- Michael Spencer



More information about the llvm-commits mailing list