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

Unified Diff: gn/BUILD.gn

Issue 2281163002: GN: support compiler_prefix, use it for ccache on bots. (Closed)
Patch Set: Created 4 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 | infra/bots/recipe_modules/flavor/gn_flavor.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gn/BUILD.gn
diff --git a/gn/BUILD.gn b/gn/BUILD.gn
index fc518ffc594267e7fab65ec66b522125e78efda4..da627d730498790927fcaf01e0d8088abe596136 100644
--- a/gn/BUILD.gn
+++ b/gn/BUILD.gn
@@ -17,6 +17,8 @@ declare_args() {
extra_cflags = ""
extra_cflags_c = ""
extra_cflags_cc = ""
+
+ compiler_prefix = ""
}
config("no_rtti") {
@@ -125,32 +127,34 @@ toolchain("gcc_like") {
tool("cc") {
depfile = "{{output}}.d"
- command = "$cc -MMD -MF $depfile {{defines}} {{include_dirs}} {{cflags}} {{cflags_c}} $extra_cflags $extra_cflags_c -c {{source}} -o {{output}}"
+ command = "$compiler_prefix $cc -MMD -MF $depfile {{defines}} {{include_dirs}} {{cflags}} {{cflags_c}} $extra_cflags $extra_cflags_c -c {{source}} -o {{output}}"
depsformat = "gcc"
outputs = [
"{{source_out_dir}}/{{target_output_name}}.{{source_name_part}}.o",
]
- description = "$cc ... $extra_cflags $extra_cflags_c -o {{output}}"
+ description =
+ "$compiler_prefix $cc ... $extra_cflags $extra_cflags_c -o {{output}}"
}
tool("cxx") {
depfile = "{{output}}.d"
- command = "$cxx -MMD -MF $depfile {{defines}} {{include_dirs}} {{cflags}} {{cflags_cc}} $extra_cflags $extra_cflags_cc -c {{source}} -o {{output}}"
+ command = "$compiler_prefix $cxx -MMD -MF $depfile {{defines}} {{include_dirs}} {{cflags}} {{cflags_cc}} $extra_cflags $extra_cflags_cc -c {{source}} -o {{output}}"
depsformat = "gcc"
outputs = [
"{{source_out_dir}}/{{target_output_name}}.{{source_name_part}}.o",
]
- description = "$cxx ... $extra_cflags $extra_cflags_cc -o {{output}}"
+ description =
+ "$compiler_prefix $cxx ... $extra_cflags $extra_cflags_cc -o {{output}}"
}
tool("asm") {
depfile = "{{output}}.d"
- command = "$cc -MMD -MF $depfile {{defines}} {{include_dirs}} {{asmflags}} -c {{source}} -o {{output}}"
+ command = "$compiler_prefix $cc -MMD -MF $depfile {{defines}} {{include_dirs}} {{asmflags}} -c {{source}} -o {{output}}"
depsformat = "gcc"
outputs = [
"{{source_out_dir}}/{{target_output_name}}.{{source_name_part}}.o",
]
- description = "$cc ... -o {{output}}"
+ description = "$compiler_prefix $cc ... -o {{output}}"
}
tool("alink") {
@@ -171,22 +175,22 @@ toolchain("gcc_like") {
rpath = "-Wl,-install_name,@rpath/$soname"
}
- command = "$cxx -shared {{ldflags}} {{inputs}} {{solibs}} {{libs}} $rpath -o {{output}}"
+ command = "$compiler_prefix $cxx -shared {{ldflags}} {{inputs}} {{solibs}} {{libs}} $rpath -o {{output}}"
outputs = [
"{{root_out_dir}}/$soname",
]
output_prefix = "lib"
default_output_extension = ".so"
- description = "$cxx -shared ... -o {{output}}"
+ description = "$compiler_prefix $cxx -shared ... -o {{output}}"
pool = ":link_pool"
}
tool("link") {
- command = "$cxx {{ldflags}} {{inputs}} {{solibs}} {{libs}} -o {{output}}"
+ command = "$compiler_prefix $cxx {{ldflags}} {{inputs}} {{solibs}} {{libs}} -o {{output}}"
outputs = [
"{{root_out_dir}}/{{target_output_name}}{{output_extension}}",
]
- description = "$cxx ... -o {{output}}"
+ description = "$compiler_prefix $cxx ... -o {{output}}"
pool = ":link_pool"
}
« no previous file with comments | « no previous file | infra/bots/recipe_modules/flavor/gn_flavor.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698