--- gn/toolchain/BUILD.gn 2026-04-29 04:15:59.000000000 +0800 +++ gn/toolchain/BUILD.gn 2026-05-08 06:57:56.000000000 +0800 @@ -30,9 +30,9 @@ # dsymutil seems to kill the machine when too many processes are run in # parallel, so we need to use a pool to limit the concurrency when passing # large -j to Ninja (e.g. Goma build). Unfortunately this is also one of the - # slowest steps in a build, so we don't want to limit too much. Use the number - # of CPUs as a default. - dlsymutil_pool_depth = exec_script("num_cpus.py", [], "value") + # slowest steps in a build, so we don't want to limit too much. + # Hardcode a reasonable default to avoid exec_script python dependency. + dlsymutil_pool_depth = 4 # Too many linkers running at once causes issues for some builders. Allow # such builders to limit the number of concurrent link steps. @@ -58,13 +58,9 @@ pool("dsymutil_pool") { depth = dlsymutil_pool_depth } - if (0 <= link_pool_depth) { + if (0 < link_pool_depth) { pool("link_pool") { - if (link_pool_depth == 0) { - depth = exec_script("num_cpus.py", [], "value") - } else { - depth = link_pool_depth - } + depth = link_pool_depth } } } @@ -307,7 +303,7 @@ tool("alink") { if (current_os == "mac" || current_os == "ios" || current_os == "tvos") { - command = "libtool -static -o {{output}} -no_warning_for_no_symbols {{inputs}}" + command = "libtool -static -o {{output}} {{inputs}}" } else { rspfile = "{{output}}.rsp" rspfile_content = "{{inputs}}"