[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:06 PDT 2026
https://github.com/jinge90 created https://github.com/llvm/llvm-project/pull/217189
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.
>From a54f3b626ae80ccd6e7bde78e8c6493ee469b1d6 Mon Sep 17 00:00:00 2001
From: jinge90 <ge.jin at intel.com>
Date: Wed, 19 Aug 2026 09:42:05 +0800
Subject: [PATCH] [compiler-rt] Add clang_rt library path to LIB env var for
profile lit
Signed-off-by: jinge90 <ge.jin at intel.com>
---
compiler-rt/test/profile/lit.cfg.py | 5 +++++
1 file changed, 5 insertions(+)
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:
More information about the llvm-commits
mailing list