[PATCH] D109873: Add use_default_shell_env = True to ctx.actions.run

Alexander Grund via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 16 03:26:50 PDT 2021


Flamefire created this revision.
Flamefire added a reviewer: GMNGeoffrey.
Herald added subscribers: wenzhicui, wrengr, Chia-hungDuan, dcaballe, cota, teijeong, rdzhabarov, tatianashp, msifontes, jurahul, Kayjukh, grosul1, Joonsoo, liufengdb, aartbik, lucyrfox, mgester, arpith-jacob, antiagainst, shauheen, rriddle, mehdi_amini.
Flamefire requested review of this revision.
Herald added subscribers: llvm-commits, stephenneuendorffer, nicolasvasilache.
Herald added a project: LLVM.

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 https://github.com/google/jax/issues/7842 for this issue and https://github.com/tensorflow/tensorflow/pull/44549 for related fix in TF


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D109873

Files:
  utils/bazel/llvm-project-overlay/mlir/tblgen.bzl


Index: utils/bazel/llvm-project-overlay/mlir/tblgen.bzl
===================================================================
--- utils/bazel/llvm-project-overlay/mlir/tblgen.bzl
+++ utils/bazel/llvm-project-overlay/mlir/tblgen.bzl
@@ -169,6 +169,7 @@
         inputs = trans_srcs,
         executable = ctx.executable.tblgen,
         arguments = [args],
+        use_default_shell_env = True,
         mnemonic = "TdGenerate",
     )
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D109873.372890.patch
Type: text/x-patch
Size: 436 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210916/5a40a435/attachment.bin>


More information about the llvm-commits mailing list