Question about environment variable in toolchain

413 views Asked by At

I am trying to develop a toolchain for wllvm (whole program LLVM) on bazel 3.7 following the tutorial (link to the tutorial). A problem I have is I have to pass an environment variable (LLVM_COMPILER) to wllvm. Can you possibly provide more details here or a concrete example? Is it possible to directly configure the environment variable in .bazelrc?

Thanks a lot!

1

There are 1 answers

0
slsy On

If it is ok to set an environment variable for each Bazel action, then use --action-env flag

# .bazelrc
build --action_env=LLVM_COMPILER=wllvm