[PATCH] D42733: [ELF] - Use InitTargetOptionsFromCodeGenFlags/ParseCommandLineOptions for parsing LTO options.

Rafael Avila de Espindola via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 1 15:50:52 PST 2018


George Rimar <grimar at accesssoftek.com> writes:

>>> @@ -685,6 +679,7 @@
>>>    Config->ZWxneeded = hasZOption(Args, "wxneeded");
>>>
>>>    // Parse LTO plugin-related options for compatibility with gold.
>>> +  std::vector<const char *> LTOOptions({Argv0});
>>
>>Do we need to pass a real argv0? If not, it is probably better to use
>>"<lld>" or something like that to simplify the code.
>>
>>Cheers,
>>Rafael
>
> Currently output is:
> lld.exe: Unknown command line argument '-data-sectionssss'.  Try: 'D:\...long path here...\Debug\bin\lld.exe -help'
> lld.exe: Did you mean '-data-sections'?
>
> With  "<lld>" it becomes:
> <lld>: Unknown command line argument '-data-sectionssss'.  Try: '<lld> -help'
> <lld>: Did you mean '-data-sections'?

I see. Passing a real argv0 is important then.

Thanks,
Rafael


More information about the llvm-commits mailing list