[patch][cmake] Fix -static build

Rafael EspĂ­ndola rafael.espindola at gmail.com
Tue Nov 4 10:58:20 PST 2014

What about the attached patches adding and using LLVM_BUILD_STATIC?

On 4 November 2014 09:08, NAKAMURA Takumi <geek4civic at gmail.com> wrote:
> Rafael,
> I suppose LIBCLANG_BUILD_STATIC is an option to build *extra* libclang.a.
> Then I'd like to use libclang.so regardless of LIBCLANG_BUILD_STATIC.
> FYI, I am enabling LIBCLANG_BUILD_STATIC in my local build tree.
> I suggest options;
>   - Change "libclang and libclang_static" <=> "libclang_shared and
> libclang" according to CMAKE_EXE_LINKER_FLAGS (to scan it).
>   -  Introduce another option like LLVM_BUILD_STATIC.
>      With this, do you think libclang.so could be built with explicit
> target? (like "ninja libclang_shared")
> 2014-11-04 0:22 GMT+09:00 Rafael EspĂ­ndola <rafael.espindola at gmail.com>:
>> A build with -static currently fails when trying to link c-index-test.
>> The attached patch fixes it.
>> Cheers,
>> Rafael
-------------- next part --------------
A non-text attachment was scrubbed...
Name: llvm.patch
Type: text/x-patch
Size: 601 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20141104/6e63c375/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: clang.patch
Type: text/x-patch
Size: 503 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20141104/6e63c375/attachment-0001.bin>

More information about the cfe-commits mailing list