GN: compiler_prefix -> cc_wrapper

I was a bit mixed up thinking Chrome called this feature compiler_prefix.
They actually call it cc_wrapper.  So let's switch to their name before we
get too used to this.

No bots are affected.

BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2355003002
DOCS_PREVIEW= https://skia.org/?cl=2355003002

NOTREECHECKS=true

Review-Url: https://codereview.chromium.org/2355003002
This commit is contained in:
mtklein 2016-09-20 12:09:12 -07:00 committed by Commit bot
parent 1905098bc4
commit 60b7ab7a8e
2 changed files with 12 additions and 13 deletions

View File

@ -21,7 +21,7 @@ declare_args() {
extra_cflags_cc = ""
extra_ldflags = ""
compiler_prefix = ""
cc_wrapper = ""
}
config("default") {
@ -296,34 +296,34 @@ toolchain("gcc_like") {
tool("cc") {
depfile = "{{output}}.d"
command = "$compiler_prefix $cc -MMD -MF $depfile {{defines}} {{include_dirs}} {{cflags}} {{cflags_c}} $extra_cflags $extra_cflags_c -c {{source}} -o {{output}}"
command = "$cc_wrapper $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 =
"$compiler_prefix $cc ... $extra_cflags $extra_cflags_c -o {{output}}"
"$cc_wrapper $cc ... $extra_cflags $extra_cflags_c -o {{output}}"
}
tool("cxx") {
depfile = "{{output}}.d"
command = "$compiler_prefix $cxx -MMD -MF $depfile {{defines}} {{include_dirs}} {{cflags}} {{cflags_cc}} $extra_cflags $extra_cflags_cc -c {{source}} -o {{output}}"
command = "$cc_wrapper $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 =
"$compiler_prefix $cxx ... $extra_cflags $extra_cflags_cc -o {{output}}"
"$cc_wrapper $cxx ... $extra_cflags $extra_cflags_cc -o {{output}}"
}
tool("asm") {
depfile = "{{output}}.d"
command = "$compiler_prefix $cc -MMD -MF $depfile {{defines}} {{include_dirs}} {{asmflags}} -c {{source}} -o {{output}}"
command = "$cc_wrapper $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 = "$compiler_prefix $cc ... -o {{output}}"
description = "$cc_wrapper $cc ... -o {{output}}"
}
tool("alink") {
@ -344,22 +344,21 @@ toolchain("gcc_like") {
rpath = "-Wl,-install_name,@rpath/$soname"
}
command = "$compiler_prefix $cxx -shared {{ldflags}} {{inputs}} {{solibs}} {{libs}} $rpath $extra_ldflags -o {{output}}"
command = "$cc_wrapper $cxx -shared {{ldflags}} {{inputs}} {{solibs}} {{libs}} $rpath $extra_ldflags -o {{output}}"
outputs = [
"{{root_out_dir}}/$soname",
]
output_prefix = "lib"
default_output_extension = ".so"
description =
"$compiler_prefix $cxx -shared ... $extra_ldflags -o {{output}}"
description = "$cc_wrapper $cxx -shared ... $extra_ldflags -o {{output}}"
}
tool("link") {
command = "$compiler_prefix $cxx {{ldflags}} {{inputs}} {{solibs}} {{libs}} $extra_ldflags -o {{output}}"
command = "$cc_wrapper $cxx {{ldflags}} {{inputs}} {{solibs}} {{libs}} $extra_ldflags -o {{output}}"
outputs = [
"{{root_out_dir}}/{{target_output_name}}{{output_extension}}",
]
description = "$compiler_prefix $cxx ... $extra_ldflags -o {{output}}"
description = "$cc_wrapper $cxx ... $extra_ldflags -o {{output}}"
}
tool("stamp") {

View File

@ -35,7 +35,7 @@ guides. We diverge where they'd first run some command with "gyp" in it.
gn gen out/Debug
gn gen out/Release --args='is_debug=false'
gn gen out/Clang --args='cc="clang" cxx="clang++"'
gn gen out/Cached --args='compiler_prefix="ccache"'
gn gen out/Cached --args='cc_wrapper="ccache"'
gn gen out/RTTI --args='extra_cflags_cc="-frtti"'
# To see all the current GN arguments, run