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 77set (CLANG_TOOLS_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR} /.." )
88set (CLANG_TOOLS_BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR} /.." )
99
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+
1018configure_lit_site_cfg(
1119 ${CMAKE_CURRENT_SOURCE_DIR} /lit.site.cfg.in
1220 ${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:
7979
8080# Tweak the PATH to include the tools dir and the scripts dir.
8181if 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!' )
8285 llvm_tools_dir = getattr (config , 'llvm_tools_dir' , None )
8386 if not llvm_tools_dir :
8487 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' ]))
8690 config .environment ['PATH' ] = path
8791
8892 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@"
88config.llvm_libs_dir = "@LLVM_LIBS_DIR@"
99config.lit_tools_dir = "@LLVM_LIT_TOOLS_DIR@"
1010config.clang_tools_binary_dir = "@CLANG_TOOLS_BINARY_DIR@"
11+ config.clang_tools_dir = "@CLANG_TOOLS_DIR@"
1112config.target_triple = "@TARGET_TRIPLE@"
1213config.have_libedit = "@HAVE_LIBEDIT@"
1314
You can’t perform that action at this time.
0 commit comments