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

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

Issue 1886813003: [Mac/iOS/GN] Allow targets to override the output directory. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@gn-patch
Patch Set: Rebase Created 4 years, 8 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 | « build/config/mac/rules.gni ('k') | 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 d19829972d4125bc26972f6ab9fd282b06a6cde6..eb83248a70f6678a6ee07279886dc23ef142e4f0 100644
--- a/build/toolchain/mac/BUILD.gn
+++ b/build/toolchain/mac/BUILD.gn
@@ -114,14 +114,15 @@ template("mac_toolchain") {
command = "rm -f {{output}} && ./gyp-mac-tool filter-libtool libtool -static -o {{output}} {{inputs}}"
description = "LIBTOOL-STATIC {{output}}"
outputs = [
- "{{target_out_dir}}/{{target_output_name}}{{output_extension}}",
+ "{{output_dir}}/{{target_output_name}}{{output_extension}}",
]
+ default_output_dir = "{{target_out_dir}}"
default_output_extension = ".a"
output_prefix = "lib"
}
tool("solink") {
- dylib = "{{root_out_dir}}/{{target_output_name}}{{output_extension}}" # eg "./libfoo.dylib"
+ dylib = "{{output_dir}}/{{target_output_name}}{{output_extension}}" # eg "./libfoo.dylib"
rspfile = dylib + ".rsp"
# These variables are not built into GN but are helpers that implement
@@ -156,6 +157,7 @@ template("mac_toolchain") {
# Use this for {{output_extension}} expansions unless a target manually
# overrides it (in which case {{output_extension}} will be what the target
# specifies).
+ default_output_dir = "{{root_out_dir}}"
default_output_extension = ".dylib"
output_prefix = "lib"
@@ -176,7 +178,7 @@ template("mac_toolchain") {
}
tool("solink_module") {
- sofile = "{{root_out_dir}}/{{target_output_name}}{{output_extension}}" # eg "./libfoo.so"
+ sofile = "{{output_dir}}/{{target_output_name}}{{output_extension}}" # eg "./libfoo.so"
rspfile = sofile + ".rsp"
link_command =
@@ -194,6 +196,7 @@ template("mac_toolchain") {
# Use this for {{output_extension}} expansions unless a target manually
# overrides it (in which case {{output_extension}} will be what the target
# specifies).
+ default_output_dir = "{{root_out_dir}}"
default_output_extension = ".so"
outputs = [
@@ -202,7 +205,7 @@ template("mac_toolchain") {
}
tool("link") {
- outfile = "{{root_out_dir}}/{{target_output_name}}{{output_extension}}"
+ outfile = "{{output_dir}}/{{target_output_name}}{{output_extension}}"
rspfile = "$outfile.rsp"
# Note about --filelist: Apple's linker reads the file list file and
@@ -219,6 +222,8 @@ template("mac_toolchain") {
outputs = [
outfile,
]
+
+ default_output_dir = "{{root_out_dir}}"
}
# These two are really entirely generic, but have to be repeated in
« no previous file with comments | « build/config/mac/rules.gni ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698