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) {
475475void ArgsBuilder::addObjcStdlibLinkFlags (const llvm::Triple &triple) {
476476 if (linkNoObjc)
477477 return ;
478-
478+
479479 args.push_back (" -lobjc" );
480480}
481481
@@ -613,7 +613,8 @@ void ArgsBuilder::build(llvm::StringRef outputPath,
613613 }
614614
615615 // -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
617618 llvm::StringRef rpath = ConfigFile::instance.rpath ();
618619 if (!rpath.empty ())
619620 addLdFlag (" -rpath" , rpath);
@@ -745,7 +746,7 @@ void ArgsBuilder::addDefaultPlatformLibs() {
745746 }
746747
747748 if (triple.isOSDarwin ()) {
748-
749+
749750 // libobjc is more or less required, so we link against it here.
750751 // This could be prettier, though.
751752 addObjcStdlibLinkFlags (triple);
You can’t perform that action at this time.
0 commit comments