Changeset View
Changeset View
Standalone View
Standalone View
openmp/libomptarget/test/lit.cfg
Show First 20 Lines • Show All 58 Lines • ▼ Show 20 Lines | |||||
# Setup environment to find dynamic library at runtime | # Setup environment to find dynamic library at runtime | ||||
if config.operating_system == 'Windows': | if config.operating_system == 'Windows': | ||||
append_dynamic_library_path('PATH', config.library_dir, ";") | append_dynamic_library_path('PATH', config.library_dir, ";") | ||||
append_dynamic_library_path('PATH', config.omp_host_rtl_directory, ";") | append_dynamic_library_path('PATH', config.omp_host_rtl_directory, ";") | ||||
elif config.operating_system == 'Darwin': | elif config.operating_system == 'Darwin': | ||||
append_dynamic_library_path('DYLD_LIBRARY_PATH', config.library_dir, ":") | append_dynamic_library_path('DYLD_LIBRARY_PATH', config.library_dir, ":") | ||||
append_dynamic_library_path('DYLD_LIBRARY_PATH', \ | append_dynamic_library_path('DYLD_LIBRARY_PATH', \ | ||||
config.omp_host_rtl_directory, ";") | config.omp_host_rtl_directory, ";") | ||||
protze.joachim: Unrelated to this patch, but why are different separators used for Darwin? | |||||
config.test_flags += " -Wl,-rpath," + config.library_dir | config.test_flags += " -Wl,-rpath," + config.library_dir | ||||
config.test_flags += " -Wl,-rpath," + config.omp_host_rtl_directory | config.test_flags += " -Wl,-rpath," + config.omp_host_rtl_directory | ||||
else: # Unices | else: # Unices | ||||
append_dynamic_library_path('LD_LIBRARY_PATH', config.library_dir, ":") | append_dynamic_library_path('LD_LIBRARY_PATH', config.library_dir, ":") | ||||
append_dynamic_library_path('LD_LIBRARY_PATH', \ | append_dynamic_library_path('LD_LIBRARY_PATH', \ | ||||
config.omp_host_rtl_directory, ":") | config.omp_host_rtl_directory, ":") | ||||
append_dynamic_library_path('LIBRARY_PATH', config.library_dir, ":") | append_dynamic_library_path('LIBRARY_PATH', config.library_dir, ":") | ||||
append_dynamic_library_path('LIBRARY_PATH', \ | append_dynamic_library_path('LIBRARY_PATH', \ | ||||
config.omp_host_rtl_directory, ":") | config.omp_host_rtl_directory, ":") | ||||
# Target specific flags | |||||
target_flags = {} | |||||
target_flags['ve-unknown-linux-unknown'] = "-Xopenmp-target \"-L " + \ | |||||
config.omp_host_rtl_directory + "\"" | |||||
# substitutions | # substitutions | ||||
Not Done ReplyInline ActionsI think, this should only be set for the specific device RUN-lines. I suggest to include the flags and export of the environment variable in the definition of %libomptarget-compile-ve-unknown-linux-unknown. protze.joachim: I think, this should only be set for the specific device RUN-lines. I suggest to include the… | |||||
# - for targets that exist in the system create the actual command. | # - for targets that exist in the system create the actual command. | ||||
# - for valid targets that do not exist in the system, return false, so that the | # - for valid targets that do not exist in the system, return false, so that the | ||||
# same test can be used for different targets. | # same test can be used for different targets. | ||||
# Scan all the valid targets. | # Scan all the valid targets. | ||||
for libomptarget_target in config.libomptarget_all_targets: | for libomptarget_target in config.libomptarget_all_targets: | ||||
# Is this target in the current system? If so create a compile, run and test | # Is this target in the current system? If so create a compile, run and test | ||||
# command. Otherwise create command that return false. | # command. Otherwise create command that return false. | ||||
Show All 24 Lines | if libomptarget_target in config.libomptarget_system_targets: | ||||
libomptarget_target)) | libomptarget_target)) | ||||
config.substitutions.append(("%libomptarget-run-" + \ | config.substitutions.append(("%libomptarget-run-" + \ | ||||
libomptarget_target, \ | libomptarget_target, \ | ||||
"%t-" + libomptarget_target)) | "%t-" + libomptarget_target)) | ||||
config.substitutions.append(("%libomptarget-run-fail-" + \ | config.substitutions.append(("%libomptarget-run-fail-" + \ | ||||
libomptarget_target, \ | libomptarget_target, \ | ||||
"%not --crash %t-" + libomptarget_target)) | "%not --crash %t-" + libomptarget_target)) | ||||
config.substitutions.append(("%clangxx-" + libomptarget_target, \ | config.substitutions.append(("%clangxx-" + libomptarget_target, \ | ||||
"%clangxx %openmp_flags %flags -fopenmp-targets=" + libomptarget_target)) | "%clangxx %openmp_flags %flags-" + libomptarget_target + \ | ||||
" -fopenmp-targets=" + libomptarget_target)) | |||||
config.substitutions.append(("%clang-" + libomptarget_target, \ | config.substitutions.append(("%clang-" + libomptarget_target, \ | ||||
"%clang %openmp_flags %flags -fopenmp-targets=" + libomptarget_target)) | "%clang %openmp_flags %flags-" + libomptarget_target + \ | ||||
" -fopenmp-targets=" + libomptarget_target)) | |||||
config.substitutions.append(("%flags-" + libomptarget_target, \ | |||||
"%flags " + target_flags.get(libomptarget_target, ""))) | |||||
config.substitutions.append(("%fcheck-" + libomptarget_target, \ | config.substitutions.append(("%fcheck-" + libomptarget_target, \ | ||||
config.libomptarget_filecheck + " %s")) | config.libomptarget_filecheck + " %s")) | ||||
else: | else: | ||||
config.substitutions.append(("%libomptarget-compile-run-and-check-" + \ | config.substitutions.append(("%libomptarget-compile-run-and-check-" + \ | ||||
libomptarget_target, \ | libomptarget_target, \ | ||||
"echo ignored-command")) | "echo ignored-command")) | ||||
config.substitutions.append(("%libomptarget-compilexx-run-and-check-" + \ | config.substitutions.append(("%libomptarget-compilexx-run-and-check-" + \ | ||||
libomptarget_target, \ | libomptarget_target, \ | ||||
Show All 22 Lines | else: | ||||
"echo ignored-command")) | "echo ignored-command")) | ||||
config.substitutions.append(("%fcheck-" + libomptarget_target, \ | config.substitutions.append(("%fcheck-" + libomptarget_target, \ | ||||
"echo ignored-command")) | "echo ignored-command")) | ||||
config.substitutions.append(("%clangxx", config.test_cxx_compiler)) | config.substitutions.append(("%clangxx", config.test_cxx_compiler)) | ||||
config.substitutions.append(("%clang", config.test_c_compiler)) | config.substitutions.append(("%clang", config.test_c_compiler)) | ||||
config.substitutions.append(("%openmp_flags", config.test_openmp_flags)) | config.substitutions.append(("%openmp_flags", config.test_openmp_flags)) | ||||
config.substitutions.append(("%flags", config.test_flags)) | config.substitutions.append(("%flags", config.test_flags)) | ||||
config.substitutions.append(("%host-rtl-dir", config.omp_host_rtl_directory)) | |||||
config.substitutions.append(("%not", config.libomptarget_not)) | config.substitutions.append(("%not", config.libomptarget_not)) |
Unrelated to this patch, but why are different separators used for Darwin?