Skip to content

Commit c914a9e

Browse files
committed
fixup! fix(toolchain): do not force users to depend on optional toolchains
1 parent 7db60b1 commit c914a9e

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

python/private/py_toolchain_suite.bzl

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -100,16 +100,17 @@ def py_toolchain_suite(*, prefix, user_repository_name, python_version, set_pyth
100100
**kwargs
101101
)
102102

103+
is_precompile_enabled = Label("//python/config_settings:is_precompile_enabled")
103104
native.toolchain(
104105
name = "{prefix}_py_exec_tools_toolchain".format(prefix = prefix),
105106
toolchain = "@{user_repository_name}//:py_exec_tools_toolchain".format(
106107
user_repository_name = user_repository_name,
107108
),
108109
toolchain_type = EXEC_TOOLS_TOOLCHAIN_TYPE,
109-
# The target settings capture the Python version
110110
target_settings = select({
111-
Label("//python/config_settings:is_precompile_enabled"): target_settings,
112-
"//conditions:default": [Label("//python/config_settings:is_precompile_enabled")],
111+
# NOTE: this is equivalent to (is_precompile_enabled AND target_settings)
112+
is_precompile_enabled: target_settings,
113+
"//conditions:default": [is_precompile_enabled],
113114
}),
114115
exec_compatible_with = kwargs.get("target_compatible_with"),
115116
)

0 commit comments

Comments
 (0)