diff --git a/openmp/libomptarget/CMakeLists.txt b/openmp/libomptarget/CMakeLists.txt index 0414b1d911523..5f592f46c8ffa 100644 --- a/openmp/libomptarget/CMakeLists.txt +++ b/openmp/libomptarget/CMakeLists.txt @@ -96,15 +96,6 @@ if("libc" IN_LIST LLVM_ENABLE_RUNTIMES AND (LIBC_GPU_BUILD OR set(LIBC_GPU_SUPPORT TRUE) endif() -# Find the path of the GPU libc static library. -find_library(GPU_LIBC_PATH NAMES cgpu - PATHS ${LIBOMPTARGET_LLVM_LIBRARY_DIR} NO_DEFAULT_PATH) -if((NOT GPU_LIBC_PATH) OR (NOT LIBC_GPU_SUPPORT)) - set(GPU_LIBC_PATH "") -endif() - -set(LIBOMPTARGET_GPU_LIBC_PATH ${GPU_LIBC_PATH} CACHE STRING - "Location of the 'libcgpu.a' library ") set(LIBOMPTARGET_GPU_LIBC_SUPPORT ${LIBC_GPU_SUPPORT} CACHE BOOL "Libomptarget support for the GPU libc") pythonize_bool(LIBOMPTARGET_GPU_LIBC_SUPPORT) diff --git a/openmp/libomptarget/test/lit.cfg b/openmp/libomptarget/test/lit.cfg index 323a5b58a2652..80a3c10d3a949 100644 --- a/openmp/libomptarget/test/lit.cfg +++ b/openmp/libomptarget/test/lit.cfg @@ -153,8 +153,10 @@ def remove_suffix_if_present(name): return name def add_libraries(source): - return source + " " + config.libomptarget_libc_path + " " + \ - config.library_dir + "/libomptarget.devicertl.a" + if config.libomptarget_has_libc: + return source + " " + config.llvm_library_dir + "/libcgpu.a " + \ + config.library_dir + "/libomptarget.devicertl.a" + return source + " " + config.library_dir + "/libomptarget.devicertl.a" # substitutions # - for targets that exist in the system create the actual command. diff --git a/openmp/libomptarget/test/lit.site.cfg.in b/openmp/libomptarget/test/lit.site.cfg.in index 3d345d3012ec3..2c6b90ad46019 100644 --- a/openmp/libomptarget/test/lit.site.cfg.in +++ b/openmp/libomptarget/test/lit.site.cfg.in @@ -12,6 +12,7 @@ config.cuda_libdir = "@CUDA_LIBDIR@" config.cuda_test_arch = "@LIBOMPTARGET_DEP_CUDA_ARCH@" config.libomptarget_obj_root = "@CMAKE_CURRENT_BINARY_DIR@/@CURRENT_TARGET@" config.library_dir = "@LIBOMPTARGET_LIBRARY_DIR@" +config.llvm_library_dir = "@LIBOMPTARGET_LLVM_LIBRARY_DIR@" config.omp_header_directory = "@LIBOMPTARGET_OPENMP_HEADER_FOLDER@" config.omp_host_rtl_directory = "@LIBOMPTARGET_OPENMP_HOST_RTL_FOLDER@" config.llvm_lib_directory = "@LIBOMPTARGET_LLVM_LIBRARY_DIR@" @@ -23,7 +24,6 @@ config.libomptarget_not = "@OPENMP_NOT_EXECUTABLE@" config.libomptarget_debug = @LIBOMPTARGET_DEBUG@ config.has_libomptarget_ompt = @LIBOMPTARGET_OMPT_SUPPORT@ config.libomptarget_has_libc = @LIBOMPTARGET_GPU_LIBC_SUPPORT@ -config.libomptarget_libc_path = "@LIBOMPTARGET_GPU_LIBC_PATH@" # Let the main config do the real work. lit_config.load_config(config, "@CMAKE_CURRENT_SOURCE_DIR@/lit.cfg")