extra_cflags_cc = ""
extra_ldflags = ""
- compiler_prefix = ""
+ cc_wrapper = ""
}
config("default") {
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") {
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") {
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