Skip to content

Commit 9f5e287

Browse files
committed
[clang][perf-training] Fix training when path to cmake has spaces in it
I uncovered this problem while trying to build release binaries on Windows with PGO.
1 parent 3af43e3 commit 9f5e287

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

clang/utils/perf-training/lit.site.cfg.in

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
@LIT_SITE_CFG_IN_HEADER@
22

33
import sys
4+
import shlex
45

56
config.clang_tools_dir = lit_config.substitute("@CURRENT_TOOLS_DIR@")
67
config.perf_helper_dir = "@CMAKE_CURRENT_SOURCE_DIR@"
78
config.test_exec_root = "@CMAKE_CURRENT_BINARY_DIR@"
89
config.test_source_root = "@CLANG_PGO_TRAINING_DATA@"
910
config.target_triple = "@LLVM_TARGET_TRIPLE@"
1011
config.python_exe = "@Python3_EXECUTABLE@"
11-
config.cmake_exe = "@CMAKE_COMMAND@"
12+
config.cmake_exe = shlex.quote("@CMAKE_COMMAND@")
1213
config.llvm_src_dir ="@CMAKE_SOURCE_DIR@"
1314
config.cmake_generator ="@CMAKE_GENERATOR@"
1415
config.use_llvm_build = @CLANG_PGO_TRAINING_USE_LLVM_BUILD@

0 commit comments

Comments
 (0)