bazelbuild / rules_closure

Closure rules for Bazel
https://developers.google.com/closure
Apache License 2.0
152 stars 114 forks source link

Passing defs-define at commandline #560

Closed nanarito closed 2 years ago

nanarito commented 2 years ago

This may end up being a better question on bazel itself, but is there a way to get bazel to pass defs in the bazel build command itself? I know you can have a BUILDfile with a rule and defs=['--define=X=y'] . I also know you can finnick with the bazel --define and then write a select() in the BUILDfile . Is there a way to just directly set this without changing the build, or to set up the build to pull the define from the environment?

gkdn commented 2 years ago

I am not aware of such feature but you can double check with Bazel folks.