[PATCH] D19530: ModuleLinker: Import linkonce even when they have no use
    Rafael Ávila de Espíndola via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Tue Apr 26 07:56:00 PDT 2016
    
    
  
rafael added a comment.
So, I assume this is because of a mixed (MachO + BC) lto, right?
If so it seems the lib/LTO version of https://llvm.org/bugs/show_bug.cgi?id=19901.
This change as is would probably be undesirable for some users. I see two ways of solving a pr19901 like problem that are a bit more light weight:
- Add a new API to lib/LTO where the linker is required to pass *all* necessary symbols is a separate list. Pass that as GlobalsToImport.
- Add a flag that say that instead of the current "if and only if" handling of GlobalsToImport, it should be just "if". That is, anything in GlobalsToImport is imported, but so is anything that would be imported by the current logic. This should not require a new lib/LTO api.
http://reviews.llvm.org/D19530
    
    
More information about the llvm-commits
mailing list