mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-09 11:25:55 +00:00
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
This commit is contained in:
@@ -352,7 +352,7 @@ int llvm::GenerateNative(const std::string &OutputFilename,
|
|||||||
const sys::Path &gcc, char ** const envp,
|
const sys::Path &gcc, char ** const envp,
|
||||||
bool Shared,
|
bool Shared,
|
||||||
bool ExportAllAsDynamic,
|
bool ExportAllAsDynamic,
|
||||||
const std::string &RPath,
|
const std::vector<std::string> &RPaths,
|
||||||
const std::string &SOName,
|
const std::string &SOName,
|
||||||
bool Verbose) {
|
bool Verbose) {
|
||||||
// Remove these environment variables from the environment of the
|
// 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 (Shared) args.push_back("-shared");
|
||||||
if (ExportAllAsDynamic) args.push_back("-export-dynamic");
|
if (ExportAllAsDynamic) args.push_back("-export-dynamic");
|
||||||
if (!RPath.empty()) {
|
if (!RPaths.empty()) {
|
||||||
std::string rp = "-Wl,-rpath," + RPath;
|
for (std::vector<std::string>::const_iterator I = RPaths.begin(),
|
||||||
StringsToDelete.push_back(strdup(rp.c_str()));
|
E = RPaths.end(); I != E; I++) {
|
||||||
args.push_back(StringsToDelete.back());
|
std::string rp = "-Wl,-rpath," + *I;
|
||||||
|
StringsToDelete.push_back(strdup(rp.c_str()));
|
||||||
|
args.push_back(StringsToDelete.back());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (!SOName.empty()) {
|
if (!SOName.empty()) {
|
||||||
std::string so = "-Wl,-soname," + SOName;
|
std::string so = "-Wl,-soname," + SOName;
|
||||||
|
@@ -88,7 +88,7 @@ namespace {
|
|||||||
SaveTemps("save-temps",
|
SaveTemps("save-temps",
|
||||||
cl::desc("Do not delete temporary files"));
|
cl::desc("Do not delete temporary files"));
|
||||||
|
|
||||||
cl::opt<std::string>
|
cl::list<std::string>
|
||||||
RPath("rpath",
|
RPath("rpath",
|
||||||
cl::desc("Set runtime shared library search path (requires -native or"
|
cl::desc("Set runtime shared library search path (requires -native or"
|
||||||
" -native-cbe)"),
|
" -native-cbe)"),
|
||||||
@@ -107,6 +107,11 @@ namespace {
|
|||||||
CO5("eh-frame-hdr", cl::Hidden, cl::desc("Compatibility option: ignored"));
|
CO5("eh-frame-hdr", cl::Hidden, cl::desc("Compatibility option: ignored"));
|
||||||
cl::opt<std::string>
|
cl::opt<std::string>
|
||||||
CO6("h", cl::Hidden, cl::desc("Compatibility option: ignored"));
|
CO6("h", cl::Hidden, cl::desc("Compatibility option: ignored"));
|
||||||
|
cl::opt<bool>
|
||||||
|
CO7("start-group", cl::Hidden, cl::desc("Compatibility option: ignored"));
|
||||||
|
cl::opt<bool>
|
||||||
|
CO8("end-group", cl::Hidden, cl::desc("Compatibility option: ignored"));
|
||||||
|
|
||||||
cl::alias A0("s", cl::desc("Alias for --strip-all"),
|
cl::alias A0("s", cl::desc("Alias for --strip-all"),
|
||||||
cl::aliasopt(Strip));
|
cl::aliasopt(Strip));
|
||||||
cl::alias A1("S", cl::desc("Alias for --strip-debug"),
|
cl::alias A1("S", cl::desc("Alias for --strip-debug"),
|
||||||
|
@@ -46,7 +46,7 @@ GenerateNative (const std::string &OutputFilename,
|
|||||||
char ** const envp,
|
char ** const envp,
|
||||||
bool Shared,
|
bool Shared,
|
||||||
bool ExportAllAsDynamic,
|
bool ExportAllAsDynamic,
|
||||||
const std::string &RPath,
|
const std::vector<std::string> &RPath,
|
||||||
const std::string &SOName,
|
const std::string &SOName,
|
||||||
bool Verbose=false);
|
bool Verbose=false);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user