r197576 - check-clang: Introduce clang_tools_dir in lit.site.cfg, for clang separated from llvm.
NAKAMURA Takumi
geek4civic at gmail.com
Wed Dec 18 07:08:56 PST 2013
Author: chapuni
Date: Wed Dec 18 09:08:56 2013
New Revision: 197576
URL: http://llvm.org/viewvc/llvm-project?rev=197576&view=rev
Log:
check-clang: Introduce clang_tools_dir in lit.site.cfg, for clang separated from llvm.
Modified:
cfe/trunk/test/CMakeLists.txt
cfe/trunk/test/Makefile
cfe/trunk/test/lit.cfg
cfe/trunk/test/lit.site.cfg.in
Modified: cfe/trunk/test/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CMakeLists.txt?rev=197576&r1=197575&r2=197576&view=diff
==============================================================================
--- cfe/trunk/test/CMakeLists.txt (original)
+++ cfe/trunk/test/CMakeLists.txt Wed Dec 18 09:08:56 2013
@@ -10,6 +10,7 @@ else ()
set(LLVM_BUILD_MODE "%(build_mode)s")
endif ()
+string(REPLACE ${CMAKE_CFG_INTDIR} ${LLVM_BUILD_MODE} CLANG_TOOLS_DIR ${CLANG_RUNTIME_OUTPUT_INTDIR})
string(REPLACE ${CMAKE_CFG_INTDIR} ${LLVM_BUILD_MODE} LLVM_TOOLS_DIR ${LLVM_RUNTIME_OUTPUT_INTDIR})
string(REPLACE ${CMAKE_CFG_INTDIR} ${LLVM_BUILD_MODE} LLVM_LIBS_DIR ${LLVM_LIBRARY_OUTPUT_INTDIR})
Modified: cfe/trunk/test/Makefile
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Makefile?rev=197576&r1=197575&r2=197576&view=diff
==============================================================================
--- cfe/trunk/test/Makefile (original)
+++ cfe/trunk/test/Makefile Wed Dec 18 09:08:56 2013
@@ -44,6 +44,7 @@ lit.site.cfg: FORCE
@$(ECHOPATH) s=@LLVM_LIBS_DIR@=$(LibDir)=g >> lit.tmp
@$(ECHOPATH) s=@CLANG_SOURCE_DIR@=$(PROJ_SRC_DIR)/..=g >> lit.tmp
@$(ECHOPATH) s=@CLANG_BINARY_DIR@=$(PROJ_OBJ_DIR)/..=g >> lit.tmp
+ @$(ECHOPATH) s=@CLANG_TOOLS_DIR@=$(ToolDir)=g >> lit.tmp
@$(ECHOPATH) s=@TARGET_TRIPLE@=$(TARGET_TRIPLE)=g >> lit.tmp
@$(ECHOPATH) s=@ENABLE_CLANG_ARCMT@=$(ENABLE_CLANG_ARCMT)=g >> lit.tmp
@$(ECHOPATH) s=@ENABLE_CLANG_REWRITER@=$(ENABLE_CLANG_REWRITER)=g >> lit.tmp
Modified: cfe/trunk/test/lit.cfg
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/lit.cfg?rev=197576&r1=197575&r2=197576&view=diff
==============================================================================
--- cfe/trunk/test/lit.cfg (original)
+++ cfe/trunk/test/lit.cfg Wed Dec 18 09:08:56 2013
@@ -94,10 +94,14 @@ for name in possibly_dangerous_env_vars:
# Tweak the PATH to include the tools dir and the scripts dir.
if clang_obj_root is not None:
+ clang_tools_dir = getattr(config, 'clang_tools_dir', None)
+ if not clang_tools_dir:
+ lit_config.fatal('No Clang tools dir set!')
llvm_tools_dir = getattr(config, 'llvm_tools_dir', None)
if not llvm_tools_dir:
lit_config.fatal('No LLVM tools dir set!')
- path = os.path.pathsep.join((llvm_tools_dir, config.environment['PATH']))
+ path = os.path.pathsep.join((
+ clang_tools_dir, llvm_tools_dir, config.environment['PATH']))
config.environment['PATH'] = path
llvm_libs_dir = getattr(config, 'llvm_libs_dir', None)
if not llvm_libs_dir:
Modified: cfe/trunk/test/lit.site.cfg.in
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/lit.site.cfg.in?rev=197576&r1=197575&r2=197576&view=diff
==============================================================================
--- cfe/trunk/test/lit.site.cfg.in (original)
+++ cfe/trunk/test/lit.site.cfg.in Wed Dec 18 09:08:56 2013
@@ -8,6 +8,7 @@ config.llvm_tools_dir = "@LLVM_TOOLS_DIR
config.llvm_libs_dir = "@LLVM_LIBS_DIR@"
config.lit_tools_dir = "@LLVM_LIT_TOOLS_DIR@"
config.clang_obj_root = "@CLANG_BINARY_DIR@"
+config.clang_tools_dir = "@CLANG_TOOLS_DIR@"
config.target_triple = "@TARGET_TRIPLE@"
config.llvm_use_sanitizer = "@LLVM_USE_SANITIZER@"
config.clang_arcmt = @ENABLE_CLANG_ARCMT@
More information about the cfe-commits
mailing list