[llvm-commits] [llvm] r166239 - in /llvm/trunk/test/BugPoint: crash-narrowfunctiontest.ll metadata.ll remove_arguments_test.ll

Bob Wilson bob.wilson at apple.com
Fri Oct 19 21:56:36 PDT 2012


On Oct 19, 2012, at 9:47 AM, Rafael EspĂ­ndola <rafael.espindola at gmail.com> wrote:

>> The LTO Internalize pass is hiding symbols needed by the bugpoint-passes
>> plug-in.  We need to add a flag to control whether Internalize should be run.
>> This is a temporary workaround to make these tests pass in the meantime.
> 
> I don't understand. Why isn't lto_codegen_add_must_preserve_symbol
> preventing the symbol from being internalized? The linker should tell
> the internalize pass which symbols must be kept, including because
> they show up in a symbol table used by plugins.
> 
> This works on ELF:
> ----------------------------------------------------
> $ cat test.c
> void func_func_plugin(void) {
> }
> int main() {
>  return 0;
> }
> $ ./build/bin/clang -Os -c -emit-llvm test.c -o test.o
> $ ./build/bin/clang -flto test.o -o no-plugins
> $ ./build/bin/clang -Wl,--export-dynamic -flto test.o -o plugins
> $ nm plugins  | grep func000000000040076c T func_func_plugin
> $ nm no-plugins  | grep func
> -----------------------------------------------------
> 
> Not how the presence of a symbol table for plugin (because of the
> --export-dynamic option) causes LTO to not remove the symbol.
> 
> Is this failing on MachO? Could you at least make this hack MachO only?

Yes, it is failing for Mach-O.  Since it's a temporary workaround, and since it is only XFAILed when building bugpoint with LTO, it didn't seem necessary to also restrict this to be for Mach-O only.  Are you OK with that until we get LTO fixed?



More information about the llvm-commits mailing list