From e43e7d9c1705dc2969b06bcd83e2ec00cc74d3f5 Mon Sep 17 00:00:00 2001 From: youben11 Date: Fri, 11 Mar 2022 10:23:15 +0100 Subject: [PATCH] fix: link runtime lib with dfruntime there is no symbol referenced in the runtime lib that is in dfruntime, but it is needed during execution when code gets generated using dfruntime functions --- compiler/lib/Runtime/CMakeLists.txt | 14 ++++++++++++-- compiler/tests/Support/CMakeLists.txt | 1 - 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/compiler/lib/Runtime/CMakeLists.txt b/compiler/lib/Runtime/CMakeLists.txt index 5925b7df9..b58956b12 100644 --- a/compiler/lib/Runtime/CMakeLists.txt +++ b/compiler/lib/Runtime/CMakeLists.txt @@ -10,10 +10,20 @@ if(CONCRETELANG_PARALLEL_EXECUTION_ENABLED) install(TARGETS DFRuntime EXPORT DFRuntime) install(EXPORT DFRuntime DESTINATION "./") - target_link_libraries(ConcretelangRuntime Concrete pthread m dl HPX::hpx $) + + target_link_libraries(ConcretelangRuntime + Concrete + pthread + m + dl + $ + -Wl,--no-as-needed + DFRuntime + omp + ) else() target_link_libraries(ConcretelangRuntime Concrete pthread m dl $) endif() -install(TARGETS ConcretelangRuntime EXPORT ConcretelangRuntime) +install(TARGETS ConcretelangRuntime omp EXPORT ConcretelangRuntime) install(EXPORT ConcretelangRuntime DESTINATION "./") diff --git a/compiler/tests/Support/CMakeLists.txt b/compiler/tests/Support/CMakeLists.txt index de52743c8..973064f8e 100644 --- a/compiler/tests/Support/CMakeLists.txt +++ b/compiler/tests/Support/CMakeLists.txt @@ -17,7 +17,6 @@ target_link_libraries( support_unit_test gtest_main ConcretelangClientLib - ConcretelangSupport ) include(GoogleTest)