Index: test/lit.common.cfg =================================================================== --- test/lit.common.cfg +++ test/lit.common.cfg @@ -75,10 +75,19 @@ if name in config.environment: del config.environment[name] +path = config.environment['PATH'] + # Tweak PATH to include llvm tools dir. if (not config.llvm_tools_dir) or (not os.path.exists(config.llvm_tools_dir)): lit_config.fatal("Invalid llvm_tools_dir config attribute: %r" % config.llvm_tools_dir) -path = os.path.pathsep.join((config.llvm_tools_dir, config.environment['PATH'])) +path = os.path.pathsep.join((config.llvm_tools_dir, path)) + +# Tweak PATH to include lit tools dir if specified. +if config.lit_tools_dir: + if not os.path.exists(config.lit_tools_dir): + lit_config.fatal("Invalid lit_tools_dir config attribute: %r" % config.lit_tools_dir) + path = os.path.pathsep.join((config.lit_tools_dir, path)) + config.environment['PATH'] = path # Help MSVS link.exe find the standard libraries. Index: test/lit.common.configured.in =================================================================== --- test/lit.common.configured.in +++ test/lit.common.configured.in @@ -18,6 +18,7 @@ set_default("compiler_rt_obj_root", "@COMPILER_RT_BINARY_DIR@") set_default("llvm_tools_dir", "@LLVM_TOOLS_DIR@") set_default("llvm_shlib_dir", "@LLVM_LIBRARY_OUTPUT_INTDIR@") +set_default("lit_tools_dir", "@LLVM_LIT_TOOLS_DIR@") set_default("gold_executable", "@GOLD_EXECUTABLE@") set_default("clang", "@COMPILER_RT_RESOLVED_TEST_COMPILER@") set_default("compiler_id", "@COMPILER_RT_TEST_COMPILER_ID@")