From f31bcc68c72371a2bf63aead9f3373a1ff2053b6 Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Sun, 6 Sep 2015 18:41:23 +0000 Subject: Import compiler-rt 3.7.0 release (r246257). --- test/asan/lit.cfg | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'test/asan/lit.cfg') diff --git a/test/asan/lit.cfg b/test/asan/lit.cfg index a6f443cfb6a5..c5164713dbe4 100644 --- a/test/asan/lit.cfg +++ b/test/asan/lit.cfg @@ -29,6 +29,9 @@ def push_dynamic_library_lookup_path(config, new_path): # Setup config name. config.name = 'AddressSanitizer' + config.name_suffix +# Setup default ASAN_OPTIONS +config.environment['ASAN_OPTIONS'] = 'symbolize_vs_style=false' + # testFormat: The test format to use to interpret tests. external_bash = (not sys.platform in ['win32']) config.test_format = lit.formats.ShTest(external_bash) @@ -135,6 +138,20 @@ config.substitutions.append( ("%libdl", libdl_flag) ) config.available_features.add("asan-" + config.bits + "-bits") +if config.host_os == 'Darwin': + config.substitutions.append( ("%ld_flags_rpath_exe", '-Wl,-rpath,@executable_path/ %dynamiclib') ) + config.substitutions.append( ("%ld_flags_rpath_so", '-install_name @rpath/`basename %dynamiclib`') ) +elif config.host_os == 'FreeBSD': + config.substitutions.append( ("%ld_flags_rpath_exe", "-Wl,-z,origin -Wl,-rpath,\$ORIGIN -L%T -l%xdynamiclib_namespec") ) + config.substitutions.append( ("%ld_flags_rpath_so", '') ) +elif config.host_os == 'Linux': + config.substitutions.append( ("%ld_flags_rpath_exe", "-Wl,-rpath,\$ORIGIN -L%T -l%xdynamiclib_namespec") ) + config.substitutions.append( ("%ld_flags_rpath_so", '') ) + +# Must be defined after the substitutions that use %dynamiclib. +config.substitutions.append( ("%dynamiclib", '%T/lib%xdynamiclib_namespec.so') ) +config.substitutions.append( ("%xdynamiclib_namespec", '$(basename %t).dynamic') ) + # Allow tests to use REQUIRES=stable-runtime. For use when you cannot use XFAIL # because the test hangs. if config.target_arch != 'arm': -- cgit v1.2.3