aboutsummaryrefslogtreecommitdiff
path: root/test/asan/lit.cfg
diff options
context:
space:
mode:
Diffstat (limited to 'test/asan/lit.cfg')
-rw-r--r--test/asan/lit.cfg17
1 files changed, 17 insertions, 0 deletions
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':