[llvm] r191343 - Move LTO support library to a component, allowing it to be tested

Tom Roeder tmroeder at google.com
Fri Sep 27 13:37:19 PDT 2013


Hi Richard,

Thanks for catching that. The LTO library code was including
llvm/CodeGen/CommandFlags.h, which was also getting included in
binaries like llc, hence the multiple definitions.

The attached patch fixes this by refactoring the flags out of lib/LTO
and up into the tools (llvm-lto and lto) that use them.

Tom

On Thu, Sep 26, 2013 at 8:09 AM, Richard Sandiford
<rsandifo at linux.vnet.ibm.com> wrote:
> Peter Collingbourne <peter-/58mv8DLUhBaa/9Udqfwiw at public.gmane.org> writes:
>> Move LTO support library to a component, allowing it to be tested
>> more reliably across platforms.  Patch by Tom Roeder!
>
> This might already have been reported, sorry, but this seems to cause
> problems when using shared libraries.  Building with:
>
>    ..../configure --enable-shared
>    make -jN
>
> and then running:
>
>    make -C test
>
> prints:
>
> <premain>: CommandLine Error: Argument 'use-init-array' defined more than once!
> <premain>: CommandLine Error: Argument 'segmented-stacks' defined more than once!
> <premain>: CommandLine Error: Argument 'enable-pie' defined more than once!
> <premain>: CommandLine Error: Argument 'trap-func' defined more than once!
> <premain>: CommandLine Error: Argument 'stack-alignment' defined more than once!
> <premain>: CommandLine Error: Argument 'disable-tail-calls' defined more than once!
> <premain>: CommandLine Error: Argument 'tailcallopt' defined more than once!
> <premain>: CommandLine Error: Argument 'nozero-initialized-in-bss' defined more than once!
> <premain>: CommandLine Error: Argument 'fp-contract' defined more than once!
> <premain>: CommandLine Error: Argument 'float-abi' defined more than once!
> <premain>: CommandLine Error: Argument 'soft-float' defined more than once!
> <premain>: CommandLine Error: Argument 'enable-sign-dependent-rounding-fp-math' defined more than once!
> <premain>: CommandLine Error: Argument 'enable-no-nans-fp-math' defined more than once!
> <premain>: CommandLine Error: Argument 'enable-no-infs-fp-math' defined more than once!
> <premain>: CommandLine Error: Argument 'enable-unsafe-fp-math' defined more than once!
> <premain>: CommandLine Error: Argument 'disable-fp-elim' defined more than once!
> <premain>: CommandLine Error: Argument 'enable-fp-mad' defined more than once!
> llc: CommandLine Error: Argument 'use-init-array' defined more than once!
> llc: CommandLine Error: Argument 'segmented-stacks' defined more than once!
> llc: CommandLine Error: Argument 'enable-pie' defined more than once!
> llc: CommandLine Error: Argument 'trap-func' defined more than once!
> llc: CommandLine Error: Argument 'stack-alignment' defined more than once!
> llc: CommandLine Error: Argument 'disable-tail-calls' defined more than once!
> llc: CommandLine Error: Argument 'tailcallopt' defined more than once!
> llc: CommandLine Error: Argument 'nozero-initialized-in-bss' defined more than once!
> llc: CommandLine Error: Argument 'fp-contract' defined more than once!
> llc: CommandLine Error: Argument 'float-abi' defined more than once!
> llc: CommandLine Error: Argument 'soft-float' defined more than once!
> llc: CommandLine Error: Argument 'enable-sign-dependent-rounding-fp-math' defined more than once!
> llc: CommandLine Error: Argument 'enable-no-nans-fp-math' defined more than once!
> llc: CommandLine Error: Argument 'enable-no-infs-fp-math' defined more than once!
> llc: CommandLine Error: Argument 'enable-unsafe-fp-math' defined more than once!
> llc: CommandLine Error: Argument 'disable-fp-elim' defined more than once!
> llc: CommandLine Error: Argument 'enable-fp-mad' defined more than once!
>
> maybe because of a clash between the CodeGen and LTO definitions of these
> options.
>
> Thanks,
> Richard
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
-------------- next part --------------
A non-text attachment was scrubbed...
Name: lto_options.patch
Type: application/octet-stream
Size: 26608 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130927/48097aa1/attachment.obj>


More information about the llvm-commits mailing list