[compiler-rt] [sanitizer][test] Unify LD_LIBRARY_PATH handling (PR #111498)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 8 01:25:47 PDT 2024
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {darker}-->
:warning: Python code formatter, darker found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
darker --check --diff -r a3a253d3c7780977077dd46493917b1949c0166d...2f35de6675746ac94e742e0925f61ffd20abe500 compiler-rt/test/lit.common.cfg.py
``````````
</details>
<details>
<summary>
View the diff from darker here.
</summary>
``````````diff
--- lit.common.cfg.py 2024-10-08 08:20:42.000000 +0000
+++ lit.common.cfg.py 2024-10-08 08:25:19.371346 +0000
@@ -163,18 +163,26 @@
# config.compiler_rt_libdir (COMPILER_RT_RESOLVED_LIBRARY_OUTPUT_DIR) has the
# host triple as the trailing path component. The value is incorrect for 32-bit
# tests on 64-bit hosts and vice versa. Adjust config.compiler_rt_libdir
# accordingly.
if config.enable_per_target_runtime_dir:
- if config.target_arch == 'i386':
- config.compiler_rt_libdir = re.sub(r'/x86_64(?=-[^/]+$)', '/i386', config.compiler_rt_libdir)
- elif config.target_arch == 'x86_64':
- config.compiler_rt_libdir = re.sub(r'/i386(?=-[^/]+$)', '/x86_64', config.compiler_rt_libdir)
- if config.target_arch == 'sparc':
- config.compiler_rt_libdir = re.sub(r'/sparcv9(?=-[^/]+$)', '/sparc', config.compiler_rt_libdir)
- elif config.target_arch == 'sparcv9':
- config.compiler_rt_libdir = re.sub(r'/sparc(?=-[^/]+$)', '/sparcv9', config.compiler_rt_libdir)
+ if config.target_arch == "i386":
+ config.compiler_rt_libdir = re.sub(
+ r"/x86_64(?=-[^/]+$)", "/i386", config.compiler_rt_libdir
+ )
+ elif config.target_arch == "x86_64":
+ config.compiler_rt_libdir = re.sub(
+ r"/i386(?=-[^/]+$)", "/x86_64", config.compiler_rt_libdir
+ )
+ if config.target_arch == "sparc":
+ config.compiler_rt_libdir = re.sub(
+ r"/sparcv9(?=-[^/]+$)", "/sparc", config.compiler_rt_libdir
+ )
+ elif config.target_arch == "sparcv9":
+ config.compiler_rt_libdir = re.sub(
+ r"/sparc(?=-[^/]+$)", "/sparcv9", config.compiler_rt_libdir
+ )
# Check if the test compiler resource dir matches the local build directory
# (which happens with -DLLVM_ENABLE_PROJECTS=clang;compiler-rt) or if we are
# using an installed clang to test compiler-rt standalone. In the latter case
# we may need to override the resource dir to match the path of the just-built
``````````
</details>
https://github.com/llvm/llvm-project/pull/111498
More information about the llvm-commits
mailing list