In my project I have multiple combinations of parameters that should result in the same select decision. However I have not been able to find a way to combine this. Is it somehow possible to either combine multiple config labels in one select option or to combine multiple combinations of command line parameters in config_setting?
An example:
config_setting(
name = "macos",
values = { "cpu": "darwin" },
)
config_setting(
name = "ios_arm",
values = { "cpu": "ios_arm64" },
)
config_setting(
name = "ios_x86",
values = { "cpu": "ios_x86_64" },
)
config_setting(
name = "linux",
values = { "cpu": "K8" },
)
config_setting(
name = "android",
values = < some android values >,
)
cc_library(
name = "MyLib",
srcs = select({
":macos": [ "darwin sources" ],
":ios_arm": [ "darwin sources" ],
":ios_x86": [ "darwin sources" ],
":linux": [ "linux sources" ],
":android": [ "android sources" ],
)
For the darwin sources there can be a lot of repetition (5 in my project). Similar for linux for both 32 and 64 bits, etc. The only way I currently know how to fix this is by using define_value and put these on the command-line.
Is there another way to combine this?
Kind regards,
Rob
--
You received this message because you are subscribed to the Google Groups "bazel-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bazel-discus...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/bazel-discuss/1c3dbbd6-63eb-481c-93ad-cec2b8f4ee74%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.