Skip to content

Commit

Permalink
Add use_default_shell_env = True to ctx.actions.run
Browse files Browse the repository at this point in the history
When building a tool in a non-standard environment (e.g. custom compiler path -> LD_LIBRARY_PATH set) then `use_default_shell_env = True` is required to run that tool in the same environment or otherwise the build will fail due to missing symbols.
See jax-ml/jax#7842 for this issue and tensorflow/tensorflow#44549 for related fix in TF
  • Loading branch information
Flamefire authored Sep 16, 2021
1 parent 005fc11 commit d85bed7
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions utils/bazel/llvm-project-overlay/mlir/tblgen.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@ def _gentbl_rule_impl(ctx):
inputs = trans_srcs,
executable = ctx.executable.tblgen,
arguments = [args],
use_default_shell_env = True,
mnemonic = "TdGenerate",
)

Expand Down

0 comments on commit d85bed7

Please sign in to comment.