Index: build/toolchain/gcc_toolchain.gni |
diff --git a/build/toolchain/gcc_toolchain.gni b/build/toolchain/gcc_toolchain.gni |
index 4a4ef4552b12f839b99ef9422b30b88f411b0f1c..cec9b08d89ac06a1b92580172c5e3e86cffc5ffa 100644 |
--- a/build/toolchain/gcc_toolchain.gni |
+++ b/build/toolchain/gcc_toolchain.gni |
@@ -84,33 +84,33 @@ template("gcc_toolchain") { |
tool("cc") { |
depfile = "{{output}}.d" |
- command = |
- "$cc -MMD -MF $depfile {{defines}} {{include_dirs}} {{cflags}} {{cflags_c}} -c {{source}} -o {{output}}" |
+ command = "$cc -MMD -MF $depfile {{defines}} {{include_dirs}} {{cflags}} {{cflags_c}} -c {{source}} -o {{output}}" |
depsformat = "gcc" |
description = "CC {{output}}" |
- outputs = |
- [ "{{source_out_dir}}/{{target_output_name}}.{{source_name_part}}.o" ] |
+ outputs = [ |
+ "{{source_out_dir}}/{{target_output_name}}.{{source_name_part}}.o", |
+ ] |
} |
tool("cxx") { |
depfile = "{{output}}.d" |
- command = |
- "$cxx -MMD -MF $depfile {{defines}} {{include_dirs}} {{cflags}} {{cflags_cc}} -c {{source}} -o {{output}}" |
+ command = "$cxx -MMD -MF $depfile {{defines}} {{include_dirs}} {{cflags}} {{cflags_cc}} -c {{source}} -o {{output}}" |
depsformat = "gcc" |
description = "CXX {{output}}" |
- outputs = |
- [ "{{source_out_dir}}/{{target_output_name}}.{{source_name_part}}.o" ] |
+ outputs = [ |
+ "{{source_out_dir}}/{{target_output_name}}.{{source_name_part}}.o", |
+ ] |
} |
tool("asm") { |
# For GCC we can just use the C compiler to compile assembly. |
depfile = "{{output}}.d" |
- command = |
- "$cc -MMD -MF $depfile {{defines}} {{include_dirs}} {{cflags}} {{cflags_c}} -c {{source}} -o {{output}}" |
+ command = "$cc -MMD -MF $depfile {{defines}} {{include_dirs}} {{cflags}} {{cflags_c}} -c {{source}} -o {{output}}" |
depsformat = "gcc" |
description = "ASM {{output}}" |
- outputs = |
- [ "{{source_out_dir}}/{{target_output_name}}.{{source_name_part}}.o" ] |
+ outputs = [ |
+ "{{source_out_dir}}/{{target_output_name}}.{{source_name_part}}.o", |
+ ] |
} |
tool("alink") { |
@@ -118,8 +118,9 @@ template("gcc_toolchain") { |
command = "rm -f {{output}} && $ar rcs {{output}} @$rspfile" |
description = "AR {{output}}" |
rspfile_content = "{{inputs}}" |
- outputs = |
- [ "{{target_out_dir}}/{{target_output_name}}{{output_extension}}" ] |
+ outputs = [ |
+ "{{target_out_dir}}/{{target_output_name}}{{output_extension}}", |
+ ] |
default_output_extension = ".a" |
output_prefix = "lib" |
} |
@@ -137,17 +138,14 @@ template("gcc_toolchain") { |
temporary_tocname = sofile + ".tmp" |
link_command = |
"$ld -shared {{ldflags}} -o $sofile -Wl,-soname=$soname @$rspfile" |
- toc_command = |
- "{ readelf -d $sofile | grep SONAME ; nm -gD -f p $soname | cut -f1-2 -d' '; } > $temporary_tocname" |
- replace_command = |
- "if ! cmp -s $temporary_tocname $tocfile; then mv $temporary_tocname $tocfile; fi" |
+ toc_command = "{ readelf -d $sofile | grep SONAME ; nm -gD -f p $soname | cut -f1-2 -d' '; } > $temporary_tocname" |
+ replace_command = "if ! cmp -s $temporary_tocname $tocfile; then mv $temporary_tocname $tocfile; fi" |
command = "$link_command && $toc_command && $replace_command" |
if (defined(invoker.postsolink)) { |
command += " && " + invoker.postsolink |
} |
- rspfile_content = |
- "-Wl,--whole-archive {{inputs}} {{solibs}} -Wl,--no-whole-archive $solink_libs_section_prefix {{libs}} $solink_libs_section_postfix" |
+ rspfile_content = "-Wl,--whole-archive {{inputs}} {{solibs}} -Wl,--no-whole-archive $solink_libs_section_prefix {{libs}} $solink_libs_section_postfix" |
description = "SOLINK $sofile" |
@@ -179,14 +177,15 @@ template("gcc_toolchain") { |
tool("link") { |
outfile = "{{root_out_dir}}/{{target_output_name}}{{output_extension}}" |
rspfile = "$outfile.rsp" |
- command = |
- "$ld {{ldflags}} -o $outfile -Wl,--start-group @$rspfile {{solibs}} -Wl,--end-group $libs_section_prefix {{libs}} $libs_section_postfix" |
+ command = "$ld {{ldflags}} -o $outfile -Wl,--start-group @$rspfile {{solibs}} -Wl,--end-group $libs_section_prefix {{libs}} $libs_section_postfix" |
if (defined(invoker.postlink)) { |
command += " && " + invoker.postlink |
} |
description = "LINK $outfile" |
rspfile_content = "{{inputs}}" |
- outputs = [ outfile ] |
+ outputs = [ |
+ outfile, |
+ ] |
if (defined(invoker.link_outputs)) { |
outputs += invoker.link_outputs |
} |
@@ -198,8 +197,7 @@ template("gcc_toolchain") { |
} |
tool("copy") { |
- command = |
- "ln -f {{source}} {{output}} 2>/dev/null || (rm -rf {{output}} && cp -af {{source}} {{output}})" |
+ command = "ln -f {{source}} {{output}} 2>/dev/null || (rm -rf {{output}} && cp -af {{source}} {{output}})" |
description = "COPY {{source}} {{output}}" |
} |