Index: build/toolchain/mac/BUILD.gn |
diff --git a/build/toolchain/mac/BUILD.gn b/build/toolchain/mac/BUILD.gn |
index 052e76c2054ce48780f62de25d83ee39f58be0e4..26ad8650f9f96304c3268b6891875859dc26a871 100644 |
--- a/build/toolchain/mac/BUILD.gn |
+++ b/build/toolchain/mac/BUILD.gn |
@@ -57,61 +57,61 @@ template("mac_clang_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("objc") { |
depfile = "{{output}}.d" |
- command = |
- "$cxx -MMD -MF $depfile {{defines}} {{include_dirs}} {{cflags}} {{cflags_c}} {{cflags_objc}} -c {{source}} -o {{output}}" |
+ command = "$cxx -MMD -MF $depfile {{defines}} {{include_dirs}} {{cflags}} {{cflags_c}} {{cflags_objc}} -c {{source}} -o {{output}}" |
depsformat = "gcc" |
description = "OBJC {{output}}" |
- outputs = |
- [ "{{source_out_dir}}/{{target_output_name}}.{{source_name_part}}.o" ] |
+ outputs = [ |
+ "{{source_out_dir}}/{{target_output_name}}.{{source_name_part}}.o", |
+ ] |
} |
tool("objcxx") { |
depfile = "{{output}}.d" |
- command = |
- "$cxx -MMD -MF $depfile {{defines}} {{include_dirs}} {{cflags}} {{cflags_cc}} {{cflags_objcc}} -c {{source}} -o {{output}}" |
+ command = "$cxx -MMD -MF $depfile {{defines}} {{include_dirs}} {{cflags}} {{cflags_cc}} {{cflags_objcc}} -c {{source}} -o {{output}}" |
depsformat = "gcc" |
description = "OBJCXX {{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") { |
- command = |
- "rm -f {{output}} && ./gyp-mac-tool filter-libtool libtool -static -o {{output}} {{inputs}}" |
+ 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}}" ] |
+ outputs = [ |
+ "{{target_out_dir}}/{{target_output_name}}{{output_extension}}", |
+ ] |
default_output_extension = ".a" |
output_prefix = "lib" |
} |
@@ -131,17 +131,12 @@ template("mac_clang_toolchain") { |
tocname = dylib + ".TOC" |
temporary_tocname = dylib + ".tmp" |
- does_reexport_command = |
- "[ ! -e $dylib -o ! -e $tocname ] || otool -l $dylib | grep -q LC_REEXPORT_DYLIB" |
- link_command = |
- "$ld -shared {{ldflags}} -o $dylib -Wl,-filelist,$rspfile {{solibs}} {{libs}}" |
- replace_command = |
- "if ! cmp -s $temporary_tocname $tocname; then mv $temporary_tocname $tocname" |
- extract_toc_command = |
- "{ otool -l $dylib | grep LC_ID_DYLIB -A 5; nm -gP $dylib | cut -f1-2 -d' ' | grep -v U\$\$; true; }" |
+ does_reexport_command = "[ ! -e $dylib -o ! -e $tocname ] || otool -l $dylib | grep -q LC_REEXPORT_DYLIB" |
+ link_command = "$ld -shared {{ldflags}} -o $dylib -Wl,-filelist,$rspfile {{solibs}} {{libs}}" |
+ replace_command = "if ! cmp -s $temporary_tocname $tocname; then mv $temporary_tocname $tocname" |
+ extract_toc_command = "{ otool -l $dylib | grep LC_ID_DYLIB -A 5; nm -gP $dylib | cut -f1-2 -d' ' | grep -v U\$\$; true; }" |
- command = |
- "if $does_reexport_command ; then $link_command && $extract_toc_command > $tocname; else $link_command && $extract_toc_command > $temporary_tocname && $replace_command ; fi; fi" |
+ command = "if $does_reexport_command ; then $link_command && $extract_toc_command > $tocname; else $link_command && $extract_toc_command > $temporary_tocname && $replace_command ; fi; fi" |
rspfile_content = "{{inputs_newline}}" |
@@ -172,11 +167,12 @@ template("mac_clang_toolchain") { |
tool("link") { |
outfile = "{{root_out_dir}}/{{target_output_name}}{{output_extension}}" |
rspfile = "$outfile.rsp" |
- command = |
- "$ld {{ldflags}} -o $outfile -Wl,-filelist,$rspfile {{solibs}} {{libs}}" |
+ command = "$ld {{ldflags}} -o $outfile -Wl,-filelist,$rspfile {{solibs}} {{libs}}" |
description = "LINK $outfile" |
rspfile_content = "{{inputs_newline}}" |
- outputs = [ outfile ] |
+ outputs = [ |
+ outfile, |
+ ] |
} |
tool("stamp") { |
@@ -185,8 +181,7 @@ template("mac_clang_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}}" |
} |