summaryrefslogtreecommitdiffstats
path: root/lld/lib/Driver/DarwinLdDriver.cpp
diff options
context:
space:
mode:
authorTim Northover <tnorthover@apple.com>2014-07-01 08:41:45 +0000
committerTim Northover <tnorthover@apple.com>2014-07-01 08:41:45 +0000
commit9bdf90e5c29032cc2a74c32167d1e5b0b9a8d5f5 (patch)
tree091910445e3d81e7742a0b50e9094dc0171b7739 /lld/lib/Driver/DarwinLdDriver.cpp
parent301c4e690a84d262125674f34d4b23a09649fdec (diff)
downloadbcm5719-llvm-9bdf90e5c29032cc2a74c32167d1e5b0b9a8d5f5.tar.gz
bcm5719-llvm-9bdf90e5c29032cc2a74c32167d1e5b0b9a8d5f5.zip
[mach-o]: make the default dylib install-name the output filename.
llvm-svn: 212094
Diffstat (limited to 'lld/lib/Driver/DarwinLdDriver.cpp')
-rw-r--r--lld/lib/Driver/DarwinLdDriver.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/lld/lib/Driver/DarwinLdDriver.cpp b/lld/lib/Driver/DarwinLdDriver.cpp
index c6678408768..6686caf14f7 100644
--- a/lld/lib/Driver/DarwinLdDriver.cpp
+++ b/lld/lib/Driver/DarwinLdDriver.cpp
@@ -191,6 +191,8 @@ bool DarwinLdDriver::parse(int argc, const char *argv[],
// Handle -o xxx
if (llvm::opt::Arg *outpath = parsedArgs->getLastArg(OPT_output))
ctx.setOutputPath(outpath->getValue());
+ else
+ ctx.setOutputPath("a.out");
// Handle -dead_strip
if (parsedArgs->getLastArg(OPT_dead_strip))
@@ -203,6 +205,8 @@ bool DarwinLdDriver::parse(int argc, const char *argv[],
// Handle -install_name
if (llvm::opt::Arg *installName = parsedArgs->getLastArg(OPT_install_name))
ctx.setInstallName(installName->getValue());
+ else
+ ctx.setInstallName(ctx.outputPath());
// Handle -mark_dead_strippable_dylib
if (parsedArgs->getLastArg(OPT_mark_dead_strippable_dylib))
OpenPOWER on IntegriCloud