Skip to content

Commit 4d8465e

Browse files
Default to single-threaded shader compilation on macOS (#18506)
Differential Revision: D98195392 Pull Request resolved: #18506
1 parent a951e1b commit 4d8465e

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

backends/vulkan/targets.bzl

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,10 @@ def vulkan_spv_shader_lib(name, spv_filegroups, is_fbcode = False, no_volk = Fal
9797
for target, subpath in spv_filegroups.items():
9898
glsl_paths.append("$(location {})/{}".format(target, subpath))
9999

100-
nthreads = read_config("etvk", "shader_compile_nthreads", "-1")
100+
# Default to single-threaded shader compilation on macOS to avoid
101+
# multiprocessing issues with the local build toolchain.
102+
default_nthreads = "1" if host_info().os.is_macos else "-1"
103+
nthreads = read_config("etvk", "shader_compile_nthreads", default_nthreads)
101104

102105
genrule_cmd = (
103106
"$(exe {}) ".format(gen_vulkan_spv_target) +

0 commit comments

Comments
 (0)