File tree Expand file tree Collapse file tree 3 files changed +14
-1
lines changed Expand file tree Collapse file tree 3 files changed +14
-1
lines changed Original file line number Diff line number Diff line change 7
7
set (CLANG_TOOLS_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR} /.." )
8
8
set (CLANG_TOOLS_BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR} /.." )
9
9
10
+ if (CMAKE_CFG_INTDIR STREQUAL "." )
11
+ set (LLVM_BUILD_MODE "." )
12
+ else ()
13
+ set (LLVM_BUILD_MODE "%(build_mode)s" )
14
+ endif ()
15
+
16
+ string (REPLACE ${CMAKE_CFG_INTDIR} ${LLVM_BUILD_MODE} CLANG_TOOLS_DIR ${CLANG_RUNTIME_OUTPUT_INTDIR} )
17
+
10
18
configure_lit_site_cfg (
11
19
${CMAKE_CURRENT_SOURCE_DIR} /lit.site.cfg.in
12
20
${CMAKE_CURRENT_BINARY_DIR} /lit.site.cfg
Original file line number Diff line number Diff line change @@ -79,10 +79,14 @@ for name in possibly_dangerous_env_vars:
79
79
80
80
# Tweak the PATH to include the tools dir and the scripts dir.
81
81
if clang_tools_binary_dir is not None :
82
+ clang_tools_dir = getattr (config , 'clang_tools_dir' , None )
83
+ if not clang_tools_dir :
84
+ lit_config .fatal ('No Clang tools dir set!' )
82
85
llvm_tools_dir = getattr (config , 'llvm_tools_dir' , None )
83
86
if not llvm_tools_dir :
84
87
lit_config .fatal ('No LLVM tools dir set!' )
85
- path = os .path .pathsep .join ((llvm_tools_dir , config .environment ['PATH' ]))
88
+ path = os .path .pathsep .join ((
89
+ clang_tools_dir , llvm_tools_dir , config .environment ['PATH' ]))
86
90
config .environment ['PATH' ] = path
87
91
88
92
llvm_libs_dir = getattr (config , 'llvm_libs_dir' , None )
Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ config.llvm_tools_dir = "@LLVM_TOOLS_DIR@"
8
8
config.llvm_libs_dir = "@LLVM_LIBS_DIR@"
9
9
config.lit_tools_dir = "@LLVM_LIT_TOOLS_DIR@"
10
10
config.clang_tools_binary_dir = "@CLANG_TOOLS_BINARY_DIR@"
11
+ config.clang_tools_dir = "@CLANG_TOOLS_DIR@"
11
12
config.target_triple = "@TARGET_TRIPLE@"
12
13
config.have_libedit = "@HAVE_LIBEDIT@"
13
14
You can’t perform that action at this time.
0 commit comments