[clang] [clang][perf-training] Fix profiling with -DCLANG_BOLT=perf (PR #119117)
Tom Stellard via cfe-commits
cfe-commits at lists.llvm.org
Fri Dec 13 08:06:02 PST 2024
================
@@ -20,9 +21,13 @@ elif clang_bolt_mode == "perf":
else:
assert 0, "Unsupported CLANG_BOLT_MODE variable"
-config.clang = perf_wrapper + os.path.realpath(
+clang_nowrapper = os.path.realpath(
lit.util.which(clang_binary, config.clang_tools_dir)
).replace("\\", "/")
+config.clang = perf_wrapper + clang_nowrapper
+config.cmake_compiler_args = "-DCMAKE_C_COMPILER='{0}' -DCMAKE_CXX_COMPILER='{0};--driver-mode=g++'".format(
+ re.sub(r"\s+", ";", clang_nowrapper)
+)
----------------
tstellar wrote:
@aaupov Here we are using clang_nowrapper as the compiler, so we don't end up with nested perf calls.
https://github.com/llvm/llvm-project/pull/119117
More information about the cfe-commits
mailing list