25 lines
915 B
Diff
25 lines
915 B
Diff
diff --git a/tools/polly/test/lit.cfg b/tools/polly/test/lit.cfg
|
|
index 41e3a589c61e..09f3b17498b0 100644
|
|
--- a/tools/polly/test/lit.cfg
|
|
+++ b/tools/polly/test/lit.cfg
|
|
@@ -36,9 +36,17 @@ base_paths = [config.llvm_tools_dir, config.environment['PATH']]
|
|
path = os.path.pathsep.join(base_paths + config.extra_paths)
|
|
config.environment['PATH'] = path
|
|
|
|
+# (Copied from polly/test/Unit/lit.cfg)
|
|
+if platform.system() == 'Darwin':
|
|
+ shlibpath_var = 'DYLD_LIBRARY_PATH'
|
|
+elif platform.system() == 'Windows':
|
|
+ shlibpath_var = 'PATH'
|
|
+else:
|
|
+ shlibpath_var = 'LD_LIBRARY_PATH'
|
|
+
|
|
path = os.path.pathsep.join((config.llvm_libs_dir,
|
|
- config.environment.get('LD_LIBRARY_PATH','')))
|
|
-config.environment['LD_LIBRARY_PATH'] = path
|
|
+ config.environment.get(shlibpath_var,'')))
|
|
+config.environment[shlibpath_var] = path
|
|
|
|
llvm_config.use_default_substitutions()
|
|
|