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

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

Issue 1999513002: [Mac/GN] Implement dSYM generation and stripping. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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
Index: build/toolchain/mac/BUILD.gn
diff --git a/build/toolchain/mac/BUILD.gn b/build/toolchain/mac/BUILD.gn
index 82eacab28eba0fb0596b1ec649ae3dc20ee422c0..befb234ba5c3049c88654d712a4b1c33ca756d72 100644
--- a/build/toolchain/mac/BUILD.gn
+++ b/build/toolchain/mac/BUILD.gn
@@ -46,6 +46,9 @@ template("mac_toolchain") {
cxx = invoker.cxx
ld = invoker.ld
+ linker_driver =
+ rebase_path("//build/toolchain/mac/linker_driver.py", root_build_dir)
+
# Make these apply to all tools below.
lib_switch = "-l"
lib_dir_switch = "-L"
@@ -138,7 +141,7 @@ template("mac_toolchain") {
does_reexport_command = "[ ! -e \"$dylib\" -o ! -e \"$tocname\" ] || otool -l \"$dylib\" | grep -q LC_REEXPORT_DYLIB"
- link_command = "$ld -shared "
+ link_command = "$linker_driver $ld -shared "
if (is_component_build) {
link_command += " -Wl,-install_name,@rpath/\"{{target_output_name}}{{output_extension}}\" "
}
@@ -180,8 +183,7 @@ template("mac_toolchain") {
sofile = "{{output_dir}}/{{target_output_name}}{{output_extension}}" # eg "./libfoo.so"
rspfile = sofile + ".rsp"
- link_command =
- "$ld -bundle {{ldflags}} -o \"$sofile\" -Wl,-filelist,\"$rspfile\""
+ link_command = "$linker_driver $ld -bundle {{ldflags}} -o \"$sofile\" -Wl,-filelist,\"$rspfile\""
if (is_component_build) {
link_command += " -Wl,-install_name,@rpath/{{target_output_name}}{{output_extension}}"
}
@@ -215,7 +217,7 @@ template("mac_toolchain") {
# do for command-line arguments. Thus any source names with spaces, or
# label names with spaces (which GN bases the output paths on) will be
# corrupted by this process. Don't use spaces for source files or labels.
- command = "$ld {{ldflags}} -o \"$outfile\" -Wl,-filelist,\"$rspfile\" {{solibs}} {{libs}}"
+ command = "$linker_driver $ld {{ldflags}} -o \"$outfile\" -Wl,-filelist,\"$rspfile\" {{solibs}} {{libs}}"
description = "LINK $outfile"
rspfile_content = "{{inputs_newline}}"
outputs = [

Powered by Google App Engine
This is Rietveld 408576698