-
-
Notifications
You must be signed in to change notification settings - Fork 183
Open
Labels
bugSomething isn't workingSomething isn't workingneed: discussionNeeds a proper discussion around the problem.Needs a proper discussion around the problem.
Description
_maybe_wrap_launcher_for_windows
selects wrapper based on target platform.
By using ctx.target_platform_has_constraint(ctx.attr._windows_constraint[platform_common.ConstraintValueInfo])
, the bat wrapper is added when targeting windows and not when executing actions on Windows.
This breaks in two cases:
- When cross compiling on Windows, the wrapper is not added (since the target platform is linux)
- When targeting windows on Linux (with transitions), the bat wrapper is added and fails
I feel like this should use a different mechanism to select the correct wrapper based on the execution platform.
EDIT: I'm not sure if I understand all of the nuance here but I think we could either add an attribute to rules:
_is_windows = select({
"@bazel_tools//src/conditions:host_windows": True,
"//conditions:default": False,
}),
... or do the wrapping as part of a toolchain. What do you think?
3u13r, katexochen and thomasten
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingneed: discussionNeeds a proper discussion around the problem.Needs a proper discussion around the problem.