File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -475,7 +475,7 @@ void ArgsBuilder::addCppStdlibLinkFlags(const llvm::Triple &triple) {
475
475
void ArgsBuilder::addObjcStdlibLinkFlags (const llvm::Triple &triple) {
476
476
if (linkNoObjc)
477
477
return ;
478
-
478
+
479
479
args.push_back (" -lobjc" );
480
480
}
481
481
@@ -613,7 +613,8 @@ void ArgsBuilder::build(llvm::StringRef outputPath,
613
613
}
614
614
615
615
// -rpath if linking against shared default libs or ldc-jit
616
- if (linkAgainstSharedDefaultLibs () || opts::enableDynamicCompile) {
616
+ if ((linkAgainstSharedDefaultLibs () || opts::enableDynamicCompile)
617
+ && !triple.isOSBinFormatWasm ()) { // wasm-ld doesn't recognize -rpath
617
618
llvm::StringRef rpath = ConfigFile::instance.rpath ();
618
619
if (!rpath.empty ())
619
620
addLdFlag (" -rpath" , rpath);
@@ -745,7 +746,7 @@ void ArgsBuilder::addDefaultPlatformLibs() {
745
746
}
746
747
747
748
if (triple.isOSDarwin ()) {
748
-
749
+
749
750
// libobjc is more or less required, so we link against it here.
750
751
// This could be prettier, though.
751
752
addObjcStdlibLinkFlags (triple);
You can’t perform that action at this time.
0 commit comments