Skip to content

Commit

Permalink
[ctx_profile] Pass lib path into test
Browse files Browse the repository at this point in the history
  • Loading branch information
vitalybuka committed May 19, 2024
1 parent 689bba1 commit 7fc524f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
// RUN: cp %llvm_src/include/llvm/ProfileData/CtxInstrContextNode.h %t_include/
//
// Compile with ctx instrumentation "on". We treat "theRoot" as callgraph root.
// RUN: %clangxx %s -lclang_rt.ctx_profile -I%t_include -O2 -o %t.bin -mllvm -profile-context-root=theRoot
// RUN: %clangxx %s %ctxprofilelib -I%t_include -O2 -o %t.bin -mllvm -profile-context-root=theRoot
//
// Run the binary, and observe the profile fetch handler's output.
// RUN: %t.bin | FileCheck %s
Expand Down
7 changes: 7 additions & 0 deletions compiler-rt/test/ctx_profile/lit.cfg.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,10 @@ def get_required_attr(config, attr_name):
config.substitutions.append(
("%clangxx ", " ".join([config.clang] + config.cxx_mode_flags) + " -ldl -lpthread ")
)

config.substitutions.append(
(
"%ctxprofilelib",
"-L%s -lclang_rt.ctx_profile%s" % (config.compiler_rt_libdir, config.target_suffix)
)
)

0 comments on commit 7fc524f

Please sign in to comment.