-
Notifications
You must be signed in to change notification settings - Fork 5
Description
Ideally Bazel would have native support for this, see bazelbuild/bazel#13048.
Until then one can work around this by detecting a tool configuration as motivated in bazelbuild/bazel#14444 (comment) using the approach described in the Bazel code base here in the settings
rule and switch between separate mode
and exec_mode
flags.
However, such a workaround breaks config_setting
s such as defined here. As they cannot determine whether we're in a target or exec configuration and cannot switch to the appropriate flag accordingly. One workaround to that would be to split the config_setting
s into target_debug
and exec_debug
, etc. However, this means that downstream users would have to know which setting to switch on, which doesn't work for targets used in both an exec and a target configuration.
Until a concrete need arises, it's best to wait for Bazel to have builtin support for this feature.