diff options
author | Reid Spencer <rspencer@reidspencer.com> | 2005-12-22 01:50:56 +0000 |
---|---|---|
committer | Reid Spencer <rspencer@reidspencer.com> | 2005-12-22 01:50:56 +0000 |
commit | 156aa35eb57a25582b2a07501ed64cafb4a90e59 (patch) | |
tree | ded872c02fa963c68702ade99865929ca388013e /tools/gccld/GenerateCode.cpp | |
parent | 0b4e244a054921d6317a7c55d0e49767b57f58f8 (diff) |
Implement PR679:
* Changed the -rpath option from cl::opt to cl::list
* Changed the interface to GenerateNative to take a std::vector<std::string>
instead of just a std::string
* Changed GenerateNative to generate multiple -Wl,-rpath, options to be
passed to gcc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24930 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/gccld/GenerateCode.cpp')
-rw-r--r-- | tools/gccld/GenerateCode.cpp | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/tools/gccld/GenerateCode.cpp b/tools/gccld/GenerateCode.cpp index 3b5d2b2b05..9dffe332e4 100644 --- a/tools/gccld/GenerateCode.cpp +++ b/tools/gccld/GenerateCode.cpp @@ -352,7 +352,7 @@ int llvm::GenerateNative(const std::string &OutputFilename, const sys::Path &gcc, char ** const envp, bool Shared, bool ExportAllAsDynamic, - const std::string &RPath, + const std::vector<std::string> &RPaths, const std::string &SOName, bool Verbose) { // Remove these environment variables from the environment of the @@ -394,10 +394,13 @@ int llvm::GenerateNative(const std::string &OutputFilename, if (Shared) args.push_back("-shared"); if (ExportAllAsDynamic) args.push_back("-export-dynamic"); - if (!RPath.empty()) { - std::string rp = "-Wl,-rpath," + RPath; - StringsToDelete.push_back(strdup(rp.c_str())); - args.push_back(StringsToDelete.back()); + if (!RPaths.empty()) { + for (std::vector<std::string>::const_iterator I = RPaths.begin(), + E = RPaths.end(); I != E; I++) { + std::string rp = "-Wl,-rpath," + *I; + StringsToDelete.push_back(strdup(rp.c_str())); + args.push_back(StringsToDelete.back()); + } } if (!SOName.empty()) { std::string so = "-Wl,-soname," + SOName; |