Skip to content

Commit 7fc524f

Browse files
committed
[ctx_profile] Pass lib path into test
Fixes build after cfe9deb on https://lab.llvm.org/buildbot/#/builders/37/builds/34828
1 parent 689bba1 commit 7fc524f

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

compiler-rt/test/ctx_profile/TestCases/generate-context.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
// RUN: cp %llvm_src/include/llvm/ProfileData/CtxInstrContextNode.h %t_include/
66
//
77
// Compile with ctx instrumentation "on". We treat "theRoot" as callgraph root.
8-
// RUN: %clangxx %s -lclang_rt.ctx_profile -I%t_include -O2 -o %t.bin -mllvm -profile-context-root=theRoot
8+
// RUN: %clangxx %s %ctxprofilelib -I%t_include -O2 -o %t.bin -mllvm -profile-context-root=theRoot
99
//
1010
// Run the binary, and observe the profile fetch handler's output.
1111
// RUN: %t.bin | FileCheck %s

compiler-rt/test/ctx_profile/lit.cfg.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,3 +33,10 @@ def get_required_attr(config, attr_name):
3333
config.substitutions.append(
3434
("%clangxx ", " ".join([config.clang] + config.cxx_mode_flags) + " -ldl -lpthread ")
3535
)
36+
37+
config.substitutions.append(
38+
(
39+
"%ctxprofilelib",
40+
"-L%s -lclang_rt.ctx_profile%s" % (config.compiler_rt_libdir, config.target_suffix)
41+
)
42+
)

0 commit comments

Comments
 (0)