[llvm] 22b0fe3 - [SystemZ][z/OS]: fix lit tmp_dir to use - instead of _
Muiez Ahmed via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 24 14:48:07 PST 2022
Author: Nancy Wang
Date: 2022-01-24T17:47:48-05:00
New Revision: 22b0fe3fd9d404f0aa96b42fe0eeb899e90ad487
URL: https://github.com/llvm/llvm-project/commit/22b0fe3fd9d404f0aa96b42fe0eeb899e90ad487
DIFF: https://github.com/llvm/llvm-project/commit/22b0fe3fd9d404f0aa96b42fe0eeb899e90ad487.diff
LOG: [SystemZ][z/OS]: fix lit tmp_dir to use - instead of _
Latest upstream change in https://reviews.llvm.org/D117179 causes lit regressions on z/OS, when TMPDIR is exported and contains _, ld linker fails, it doesnt recognize _ specified in SYSLIN. this seems a limitation on z/OS. we need to fix lit.
Differential Revision: https://reviews.llvm.org/D118071
Added:
Modified:
llvm/utils/lit/lit/main.py
Removed:
################################################################################
diff --git a/llvm/utils/lit/lit/main.py b/llvm/utils/lit/lit/main.py
index 99777eef8ec02..41f124a27ad7f 100755
--- a/llvm/utils/lit/lit/main.py
+++ b/llvm/utils/lit/lit/main.py
@@ -245,7 +245,8 @@ def execute_in_tmp_dir(run, lit_config):
tmp_dir = None
if 'LIT_PRESERVES_TMP' not in os.environ:
import tempfile
- tmp_dir = tempfile.mkdtemp(prefix='lit_tmp_')
+ # z/OS linker does not support '_' in paths, so use '-'.
+ tmp_dir = tempfile.mkdtemp(prefix='lit-tmp-')
tmp_dir_envs = {k: tmp_dir for k in ['TMP', 'TMPDIR', 'TEMP', 'TEMPDIR']}
os.environ.update(tmp_dir_envs)
for cfg in {t.config for t in run.tests}:
More information about the llvm-commits
mailing list