The linker's PreserveSource mode is broken. Should we fix or delete it?

Rafael EspĂ­ndola rafael.espindola at gmail.com
Mon Oct 27 15:35:27 PDT 2014


On 27 October 2014 14:36, Duncan P. N. Exon Smith <dexonsmith at apple.com> wrote:
>
>> On 2014-Oct-26, at 20:03, Rafael EspĂ­ndola <rafael.espindola at gmail.com> wrote:
>>
>> Forcing PreserveSource causes these tests to fail:
>>
>>    LLVM :: Linker/metadata-a.ll
>>    LLVM :: Linker/prefixdata.ll
>>    LLVM :: Linker/type-unique-odr-a.ll
>>    LLVM :: Linker/type-unique-simple-a.ll
>>    LLVM :: Linker/type-unique-simple2-a.ll
>>    LLVM :: Linker/type-unique-simple2.ll
>>    LLVM :: Linker/type-unique-type-array-a.ll
>>    LLVM :: Linker/unnamed-addr1-a.ll
>>    LLVM :: Linker/visibility1.ll
>>
>> It is sure to become even worse as new features are added and not
>> tested in that mode.
>>
>> The attached patch simply deletes the feature.
>
> +1
>
>> If it is still needed I
>> can try to figure out what is broken, add a -preserve-source option to
>> llvm-link and use it in the tests to make sure it keeps working.
>
> I don't see a need for it.
>
> Note that it's exposed by the C API and ocaml and go bindings:

With the change LLVMLinkModules just ignores the mode. Since it is
currently broken, I assume there are not that many users.

Do you think it would be better to introduce a LLVMLinkModules2,
deprecate LLVMLinkModules and remove the feature afterwards?

Cheers,
Rafael




More information about the llvm-commits mailing list