diff --git a/utils/bazel/llvm-project-overlay/mlir/tblgen.bzl b/utils/bazel/llvm-project-overlay/mlir/tblgen.bzl --- a/utils/bazel/llvm-project-overlay/mlir/tblgen.bzl +++ b/utils/bazel/llvm-project-overlay/mlir/tblgen.bzl @@ -169,6 +169,10 @@ inputs = trans_srcs, executable = ctx.executable.tblgen, arguments = [args], + # Make sure action_env settings are honored so the env is the same as + # when the tool was built. Important for locating shared libraries with + # a custom LD_LIBRARY_PATH. + use_default_shell_env = True, mnemonic = "TdGenerate", )