diff --git a/compiler-rt/test/asan/Unit/lit.site.cfg.py.in b/compiler-rt/test/asan/Unit/lit.site.cfg.py.in --- a/compiler-rt/test/asan/Unit/lit.site.cfg.py.in +++ b/compiler-rt/test/asan/Unit/lit.site.cfg.py.in @@ -16,6 +16,15 @@ (new_path, config.environment.get('LD_32_LIBRARY_PATH', ''))) config.environment['LD_32_LIBRARY_PATH'] = new_ld_32_library_path + if platform.system() == 'SunOS': + new_ld_library_path_32 = os.path.pathsep.join( + (new_path, config.environment.get('LD_LIBRARY_PATH_32', ''))) + config.environment['LD_32_LIBRARY_PATH'] = new_ld_library_path_32 + + new_ld_library_path_64 = os.path.pathsep.join( + (new_path, config.environment.get('LD_LIBRARY_PATH_64', ''))) + config.environment['LD_64_LIBRARY_PATH'] = new_ld_library_path_64 + # Setup config name. config.name = 'AddressSanitizer-Unit' diff --git a/compiler-rt/test/asan/lit.cfg.py b/compiler-rt/test/asan/lit.cfg.py --- a/compiler-rt/test/asan/lit.cfg.py +++ b/compiler-rt/test/asan/lit.cfg.py @@ -42,6 +42,17 @@ (new_path, config.environment.get(dynamic_library_lookup_var, ''))) config.environment[dynamic_library_lookup_var] = new_ld_32_library_path + if platform.system() == 'SunOS': + dynamic_library_lookup_var = 'LD_LIBRARY_PATH_32' + new_ld_library_path_32 = os.path.pathsep.join( + (new_path, config.environment.get(dynamic_library_lookup_var, ''))) + config.environment[dynamic_library_lookup_var] = new_ld_library_path_32 + + dynamic_library_lookup_var = 'LD_LIBRARY_PATH_64' + new_ld_library_path_64 = os.path.pathsep.join( + (new_path, config.environment.get(dynamic_library_lookup_var, ''))) + config.environment[dynamic_library_lookup_var] = new_ld_library_path_64 + # Setup config name. config.name = 'AddressSanitizer' + config.name_suffix