diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2013-10-02 14:36:23 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2013-10-02 14:36:23 +0000 |
commit | 0e95b3aba9b2039ae3af617e681aacca2ff81f79 (patch) | |
tree | 4e646da3d82ad3e5c3eed95dd76687befca04b7a /lib/LTO | |
parent | 1a1d7c4f4c68d64ae5d96ba45270cfcf46421ca0 (diff) | |
download | llvm-0e95b3aba9b2039ae3af617e681aacca2ff81f79.tar.gz llvm-0e95b3aba9b2039ae3af617e681aacca2ff81f79.tar.bz2 llvm-0e95b3aba9b2039ae3af617e681aacca2ff81f79.tar.xz |
Fix option parsing in the gold plugin.
This was broken when options were moved up in r191680. No test because this is
specific LLVMgold.so/libLTO.so.
Patch by Tom Roeder!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@191829 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/LTO')
-rw-r--r-- | lib/LTO/LTOCodeGenerator.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/lib/LTO/LTOCodeGenerator.cpp b/lib/LTO/LTOCodeGenerator.cpp index faa55bbf2b..3abb6238b3 100644 --- a/lib/LTO/LTOCodeGenerator.cpp +++ b/lib/LTO/LTOCodeGenerator.cpp @@ -264,11 +264,6 @@ bool LTOCodeGenerator::determineTarget(std::string &errMsg) { if (TargetMach != NULL) return true; - // if options were requested, set them - if (!CodegenOptions.empty()) - cl::ParseCommandLineOptions(CodegenOptions.size(), - const_cast<char **>(&CodegenOptions[0])); - std::string TripleStr = Linker.getModule()->getTargetTriple(); if (TripleStr.empty()) TripleStr = sys::getDefaultTargetTriple(); @@ -473,3 +468,10 @@ void LTOCodeGenerator::setCodeGenDebugOptions(const char *options) { CodegenOptions.push_back(strdup(o.first.str().c_str())); } } + +void LTOCodeGenerator::parseCodeGenDebugOptions() { + // if options were requested, set them + if (!CodegenOptions.empty()) + cl::ParseCommandLineOptions(CodegenOptions.size(), + const_cast<char **>(&CodegenOptions[0])); +} |