Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3501)

Unified Diff: build/toolchain/mac/BUILD.gn

Issue 1288863005: Specify -install_name of target within solink. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: string concatenation Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/toolchain/mac/BUILD.gn
diff --git a/build/toolchain/mac/BUILD.gn b/build/toolchain/mac/BUILD.gn
index 2ef06d569fa37b90522e598f0a0d693f8bbfffcb..e8fe8040600e9bca16b5a52187ba16dec1ce881b 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
@@ -126,7 +126,13 @@ template("mac_toolchain") {
temporary_tocname = dylib + ".tmp"
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}}"
+
+ link_command = "$ld -shared {{ldflags}} -o $dylib -Wl,-filelist,$rspfile"
+ if (is_component_build) {
+ link_command += " -Wl,-install_name,@rpath/{{target_output_name}}{{output_extension}}"
+ }
+ link_command += " {{solibs}} {{libs}}"
+
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; }"
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698