Skip to content

Commit f4bfca3

Browse files
committed
Tests link to dynamic HPXC & use --wrap for overriding main
1 parent 43b1296 commit f4bfca3

File tree

3 files changed

+6
-12
lines changed

3 files changed

+6
-12
lines changed

openmp/CMakeLists.txt

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,8 @@ if (OPENMP_STANDALONE_BUILD OR "${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_CURRENT_S
2020
"at least 3.20.0 now to avoid issues in the future!")
2121
endif()
2222
endif()
23+
2324
option(WITH_HPXC "Use HPX threading system." OFF)
24-
if (WITH_HPXC)
25-
message("Using HPXC")
26-
set(LIBOMP_USE_STDCPPLIB TRUE)
27-
find_package(HPX REQUIRED)
28-
endif()
2925

3026
# Must go below project(..)
3127
include(GNUInstallDirs)

openmp/runtime/test/lit.cfg

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -50,12 +50,11 @@ if config.has_omit_frame_pointer_flag:
5050

5151
if config.with_hpxc:
5252
flags += " -I " + config.hpxc_header_directory + \
53-
" -L " + config.hpxc_library_directory + \
54-
" -L " + os.path.realpath(config.hpx_library_directory) + \
55-
" --include=hpxc/threads.h"
53+
" -L " + os.path.realpath(config.hpxc_library_directory) + \
54+
" --include=hpxc/threads.h --include=hpxc/util/wrap_main.h " + \
55+
" -DHPXC_HAVE_DYNAMIC_HPXC_MAIN"
5656

5757
print("with_hpxc: " + str(config.with_hpxc))
58-
print("hpx_library_directory: " + config.hpx_library_directory)
5958

6059
config.test_flags = " -I " + config.omp_header_directory + flags
6160
config.test_flags_use_compiler_omp_h = flags
@@ -68,8 +67,8 @@ if config.has_libm:
6867
if config.has_libatomic:
6968
libs += " -latomic"
7069
if (config.with_hpxc):
71-
libs += " -lhpx -lhpx_core -lhpx_hpxc -lc++"
72-
prepend_dynamic_library_path(config.hpx_library_directory)
70+
libs += " -lhpx_hpxc -lhpxc_wrap -Wl,-wrap=main"
71+
prepend_dynamic_library_path(config.hpxc_library_directory)
7372

7473
# Allow REQUIRES / UNSUPPORTED / XFAIL to work
7574
config.target_triple = [ ]

openmp/runtime/test/lit.site.cfg.in

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ config.target_arch = "@LIBOMP_ARCH@"
2323
config.with_hpxc = @WITH_HPXC@
2424
config.hpxc_header_directory = "@HPXC_DIR@/include"
2525
config.hpxc_library_directory = "@HPXC_DIR@/lib"
26-
config.hpx_library_directory = "@HPX_DIR@/../../"
2726

2827
# Let the main config do the real work.
2928
lit_config.load_config(config, "@LIBOMP_BASE_DIR@/test/lit.cfg")

0 commit comments

Comments
 (0)