[PATCH] D32721: Accept archive files with no symbol table instad of warning on them.

Davide Italiano via llvm-commits llvm-commits at lists.llvm.org
Thu May 4 22:06:29 PDT 2017


On Thu, May 4, 2017 at 9:56 PM, Rui Ueyama <ruiu at google.com> wrote:
> On Thu, May 4, 2017 at 9:40 PM, Davide Italiano <davide at freebsd.org> wrote:
>>
>> On Thu, May 4, 2017 at 4:30 PM, Rui Ueyama <ruiu at google.com> wrote:
>> > Then maybe -DCMAKE_RANLIB=/usr/bin/true does magic? (This conversation
>> > is an
>> > instance why I think this feature is useful :)
>> >
>>
>> Replying to both of you together.
>>
>> Sean, my cmake version is 3.6. IIRC I tried this also with 3.4 in the
>> golden days, but I'm not 100% sure.
>>
>> Rui, no magic here, I think. Setting RANLIB=/usr/bin/true is just an
>> optimization as the work by ranlib is actually done by llvm-ar. People
>> may want to set this to a real ranlib with older versions of ar(1)
>> from GNU binutils, but even with llvm, setting RANLIB to be
>> llvm-ranlib shouldn't change anything.
>
>
> That explains it. I think RANLIB=/bin/true is actually a key.
>
> If you forget to specify RANLIB, generated make/ninja files run
> /usr/bin/ranlib on archive files. That strips symbol tables from archive
> files containing bitcode because ranlib reconstructs symbol tables and it
> doesn't know anything about LLVM bitcode files.
>

Oh, I meant *either* you specify that to /bin/true or llvm-ranlib (or
if you use GNU binutils, ranlib + plugin). So, yes, if you don't
specify RANLIB at all it won't work.


More information about the llvm-commits mailing list