diff options
author | Bill Wendling <isanbard@gmail.com> | 2012-12-10 21:33:45 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2012-12-10 21:33:45 +0000 |
commit | 50f318384c4db1419f9c48d85af350260c4976b8 (patch) | |
tree | a9f2289117d1c965701ec5d7bcb55f96466dc248 /tools/lto/LTOCodeGenerator.cpp | |
parent | e1dee8a06e93f38f81f09887361045367a810436 (diff) | |
download | llvm-50f318384c4db1419f9c48d85af350260c4976b8.tar.gz llvm-50f318384c4db1419f9c48d85af350260c4976b8.tar.bz2 llvm-50f318384c4db1419f9c48d85af350260c4976b8.tar.xz |
Revert r169656.
The linker will call `lto_codegen_add_must_preserve_symbol' on all globals that
should be kept around. The linker will pretend that a dylib is being created.
<rdar://problem/12528059>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169770 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/lto/LTOCodeGenerator.cpp')
-rw-r--r-- | tools/lto/LTOCodeGenerator.cpp | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/tools/lto/LTOCodeGenerator.cpp b/tools/lto/LTOCodeGenerator.cpp index dfd8858cd8..cfaaf863b2 100644 --- a/tools/lto/LTOCodeGenerator.cpp +++ b/tools/lto/LTOCodeGenerator.cpp @@ -66,7 +66,7 @@ LTOCodeGenerator::LTOCodeGenerator() : _context(getGlobalContext()), _linker("LinkTimeOptimizer", "ld-temp.o", _context), _target(NULL), _emitDwarfDebugInfo(false), _scopeRestrictionsDone(false), - _exportDynamic(false), _codeModel(LTO_CODEGEN_PIC_MODEL_DYNAMIC), + _codeModel(LTO_CODEGEN_PIC_MODEL_DYNAMIC), _nativeObjectFile(NULL) { InitializeAllTargets(); InitializeAllTargetMCs(); @@ -339,8 +339,7 @@ void LTOCodeGenerator::applyScopeRestrictions() { LLVMCompilerUsed->setSection("llvm.metadata"); - if (!_exportDynamic) - passes.add(createInternalizePass(mustPreserveList)); + passes.add(createInternalizePass(mustPreserveList)); // apply scope restrictions passes.run(*mergedModule); @@ -379,12 +378,7 @@ bool LTOCodeGenerator::generateObjectFile(raw_ostream &out, // keeps only main if it exists and does nothing for libraries. Instead // we create the pass ourselves with the symbol list provided by the linker. PassManagerBuilder().populateLTOPassManager(passes, - /*Internalize=*/ - // FIXME: remove 'false' once - // Darwin linker can pass this - // option. - // <rdar://problem/12839986> - false /*!_exportDynamic*/, + /*Internalize=*/false, !DisableInline, DisableGVNLoadPRE); |