[compiler-rt] [compiler-rt] Add clang_rt library path to LIB env var for profile lit (PR #217189)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 18 18:49:49 PDT 2026
llvmorg-github-actions[bot] wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-pgo
Author: jinge90
<details>
<summary>Changes</summary>
When trying to add more tests to compiler-rt profile lit test suite on Windows, we encountered linker error complaining profile lib couldn't be found. This PR followed asan lit.cfg.py approach to add compiler-rt path to LIB env var.
---
Full diff: https://github.com/llvm/llvm-project/pull/217189.diff
1 Files Affected:
- (modified) compiler-rt/test/profile/lit.cfg.py (+5)
``````````diff
diff --git a/compiler-rt/test/profile/lit.cfg.py b/compiler-rt/test/profile/lit.cfg.py
index a6168cc4c4ceb..c7109747b85e5 100644
--- a/compiler-rt/test/profile/lit.cfg.py
+++ b/compiler-rt/test/profile/lit.cfg.py
@@ -32,6 +32,11 @@ def get_required_attr(config, attr_name):
target_is_msvc = bool(re.match(r".*-windows-msvc$", config.target_triple))
+if target_is_msvc:
+ config.environment["LIB"] = os.path.pathsep.join(
+ [config.compiler_rt_libdir, config.environment.get("LIB", "")]
+ )
+
if config.target_os in ["Linux"]:
extra_link_flags = ["-ldl"]
elif target_is_msvc:
``````````
</details>
https://github.com/llvm/llvm-project/pull/217189
More information about the llvm-commits
mailing list