[compiler-rt] r224018 - Fix check-asan on Windows by putting lib/clang/... onto PATH (PR21880)
Timur Iskhodzhanov
timurrrr at google.com
Thu Dec 11 06:04:57 PST 2014
Author: timurrrr
Date: Thu Dec 11 08:04:57 2014
New Revision: 224018
URL: http://llvm.org/viewvc/llvm-project?rev=224018&view=rev
Log:
Fix check-asan on Windows by putting lib/clang/... onto PATH (PR21880)
Modified:
compiler-rt/trunk/test/asan/lit.cfg
Modified: compiler-rt/trunk/test/asan/lit.cfg
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/asan/lit.cfg?rev=224018&r1=224017&r2=224018&view=diff
==============================================================================
--- compiler-rt/trunk/test/asan/lit.cfg (original)
+++ compiler-rt/trunk/test/asan/lit.cfg Thu Dec 11 08:04:57 2014
@@ -12,10 +12,15 @@ def get_required_attr(config, attr_name)
"to lit.site.cfg " % attr_name)
return attr_value
-def push_ld_library_path(config, new_path):
+def push_dynamic_library_lookup_path(config, new_path):
+ if platform.system() == 'Windows':
+ dynamic_library_lookup_var = 'PATH'
+ else:
+ dynamic_library_lookup_var = 'LD_LIBRARY_PATH'
+
new_ld_library_path = os.path.pathsep.join(
- (new_path, config.environment['LD_LIBRARY_PATH']))
- config.environment['LD_LIBRARY_PATH'] = new_ld_library_path
+ (new_path, config.environment[dynamic_library_lookup_var]))
+ config.environment[dynamic_library_lookup_var] = new_ld_library_path
# Setup config name.
config.name = 'AddressSanitizer' + config.name_suffix
@@ -128,13 +133,13 @@ if config.host_os == 'Linux' and config.
config.available_features.add('leak-detection')
# Set LD_LIBRARY_PATH to pick dynamic runtime up properly.
-push_ld_library_path(config, config.compiler_rt_libdir)
+push_dynamic_library_lookup_path(config, config.compiler_rt_libdir)
# GCC-ASan uses dynamic runtime by default.
if config.compiler_id == 'GNU':
gcc_dir = os.path.dirname(config.clang)
libasan_dir = os.path.join(gcc_dir, "..", "lib" + config.bits)
- push_ld_library_path(config, libasan_dir)
+ push_dynamic_library_lookup_path(config, libasan_dir)
# Default test suffixes.
config.suffixes = ['.c', '.cc', '.cpp']
More information about the llvm-commits
mailing list