Index: build/toolchain/mac/BUILD.gn |
diff --git a/build/toolchain/mac/BUILD.gn b/build/toolchain/mac/BUILD.gn |
index 2b7ee74215464439c1d65aac1f82347ca82599a6..82eacab28eba0fb0596b1ec649ae3dc20ee422c0 100644 |
--- a/build/toolchain/mac/BUILD.gn |
+++ b/build/toolchain/mac/BUILD.gn |
@@ -138,12 +138,11 @@ template("mac_toolchain") { |
does_reexport_command = "[ ! -e \"$dylib\" -o ! -e \"$tocname\" ] || otool -l \"$dylib\" | grep -q LC_REEXPORT_DYLIB" |
- link_command = |
- "$ld -shared {{ldflags}} -o \"$dylib\" -Wl,-filelist,\"$rspfile\"" |
+ link_command = "$ld -shared " |
if (is_component_build) { |
- link_command += " -Wl,-install_name,@rpath/{{target_output_name}}{{output_extension}}" |
+ link_command += " -Wl,-install_name,@rpath/\"{{target_output_name}}{{output_extension}}\" " |
} |
- link_command += " {{solibs}} {{libs}}" |
+ link_command += "{{ldflags}} -o \"$dylib\" -Wl,-filelist,\"$rspfile\" {{libs}} {{solibs}}" |
replace_command = "if ! cmp -s \"$temporary_tocname\" \"$tocname\"; then mv \"$temporary_tocname\" \"$tocname\"" |
extract_toc_command = "{ otool -l \"$dylib\" | grep LC_ID_DYLIB -A 5; nm -gP \"$dylib\" | cut -f1-2 -d' ' | grep -v U\$\$; true; }" |