@@ -6,10 +6,10 @@ assert(host_os == "mac")
66
77import (" //build/config/darwin/darwin_sdk.gni" )
88import (" //build/config/sysroot.gni" )
9+ import (" //build/toolchain/ccache.gni" )
910import (" //build/toolchain/clang.gni" )
1011import (" //build/toolchain/clang_static_analyzer.gni" )
1112import (" //build/toolchain/rbe.gni" )
12- import (" //build/toolchain/ccache.gni" )
1313import (" //build/toolchain/toolchain.gni" )
1414
1515declare_args () {
@@ -45,7 +45,7 @@ if (swift_whole_module_optimization == -1) {
4545# would be to have inputs to tools (https://crbug.com/621119).
4646get_tool_mtime = rebase_path (" //build/toolchain/darwin/get_tool_mtime.py" )
4747tool_versions = exec_script (
48- get_tool_mtime , # "get_tool_mtime.py",
48+ get_tool_mtime , # "get_tool_mtime.py",
4949 rebase_path (
5050 [
5151 " //build/toolchain/darwin/swift_const_gather_protocols.json" ,
@@ -73,13 +73,15 @@ if (use_ccache) {
7373 local_wrapper =
7474 rebase_path (" //flutter/build/rbe/local_wrapper.sh" , root_build_dir )
7575 compiler_args = rewrapper_command + [
76- " --remote_wrapper=$remote_wrapper " ,
77- " --local_wrapper=$local_wrapper " ,
78- " --labels=type=compile,compiler=clang,lang=cpp " ,
79- ]
76+ " --remote_wrapper=$remote_wrapper " ,
77+ " --local_wrapper=$local_wrapper " ,
78+ " --labels=type=compile,compiler=clang,lang=cpp " ,
79+ ]
8080 cxx_prefix = string_join (" " , compiler_args )
81+
8182 # RBE does not support objc out of the box.
8283 objc_prefix = " "
84+
8385 # Remote links time out without reporting an actionable error.
8486 link_prefix = " "
8587} else {
@@ -95,7 +97,8 @@ template("mac_toolchain") {
9597 assert (defined (invoker .asm ), " mac_toolchain() must specify a \" asm\" value" )
9698 assert (defined (invoker .cc ), " mac_toolchain() must specify a \" cc\" value" )
9799 assert (defined (invoker .cxx ), " mac_toolchain() must specify a \" cxx\" value" )
98- assert (defined (invoker .objc ), " mac_toolchain() must specify a \" objc\" value" )
100+ assert (defined (invoker .objc ),
101+ " mac_toolchain() must specify a \" objc\" value" )
99102 assert (defined (invoker .ld ), " mac_toolchain() must specify a \" ld\" value" )
100103 assert (defined (invoker .ar ), " mac_toolchain() must specify a \" ar\" value" )
101104 assert (defined (invoker .toolchain_cpu ),
@@ -160,7 +163,9 @@ template("mac_toolchain") {
160163 command = " $cxx -MMD -MF $depfile {{defines}} {{include_dirs}} {{cflags}} {{cflags_cc}} {{module_deps_no_self}} -fmodule-name={{label_name}} -c -x c++ -Xclang -emit-module {{source}} -o {{output}}"
161164 depsformat = " gcc"
162165 description = " CXX_MODULE {{output}}"
163- outputs = [ " {{source_out_dir}}/{{target_output_name}}.{{source_name_part}}.pcm" ]
166+ outputs = [
167+ " {{source_out_dir}}/{{target_output_name}}.{{source_name_part}}.pcm" ,
168+ ]
164169 }
165170
166171 tool (" asm" ) {
@@ -199,7 +204,8 @@ template("mac_toolchain") {
199204 depfile = " {{target_out_dir}}/{{module_name}}.d"
200205 depsformat = " gcc"
201206
202- _header_path = " {{target_gen_dir}}/{{target_output_name}}/{{target_output_name}}.h"
207+ _header_path =
208+ " {{target_gen_dir}}/{{target_output_name}}/{{target_output_name}}.h"
203209 _output_dir = " {{target_out_dir}}/{{label_name}}"
204210
205211 outputs = [
@@ -433,7 +439,8 @@ if (is_ios) {
433439 is_clang = true
434440
435441 sysroot_rel = rebase_path (ios_sdk_path , root_build_dir )
436- sysroot_flags = " -isysroot $sysroot_rel -miphoneos-version-min=$ios_deployment_target "
442+ sysroot_flags =
443+ " -isysroot $sysroot_rel -miphoneos-version-min=$ios_deployment_target "
437444 }
438445
439446 # Toolchain used for iOS simulator targets (arm64).
0 commit comments