Chromium Code Reviews| Index: build/toolchain/mac/BUILD.gn |
| diff --git a/build/toolchain/mac/BUILD.gn b/build/toolchain/mac/BUILD.gn |
| index 2ef06d569fa37b90522e598f0a0d693f8bbfffcb..7b6d2cd2aa553a3d65e6f0db88408a4329e3dabc 100644 |
| --- a/build/toolchain/mac/BUILD.gn |
| +++ b/build/toolchain/mac/BUILD.gn |
| @@ -117,7 +117,7 @@ template("mac_toolchain") { |
| # These variables are not built into GN but are helpers that implement |
| # (1) linking to produce a .so, (2) extracting the symbols from that file |
| # to a temporary file, (3) if the temporary file has differences from the |
| - # existing .TOC file, overwrite it, oterwise, don't change it. |
| + # existing .TOC file, overwrite it, otherwise, don't change it. |
| # |
| # As a special case, if the library reexports symbols from other dynamic |
| # libraries, we always update the .TOC and skip the temporary file and |
| @@ -127,6 +127,9 @@ 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 {{solibs}} {{libs}}" |
| + if (is_component_build) { |
| + link_command = "$ld -shared {{ldflags}} -Wl,-install_name,@rpath/{{target_output_name}}{{output_extension}} -o $dylib -Wl,-filelist,$rspfile {{solibs}} {{libs}}" |
|
Mark Mentovai
2015/08/18 16:20:25
Does gn let you build up strings with +=? Or can y
Dirk Pranke
2015/08/18 19:23:57
Yes, GN supports string concatenation
Bons
2015/08/18 20:20:55
Done.
|
| + } |
| 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; }" |