From 102fa6534e5400f82190a1563bf4b01f87508e09 Mon Sep 17 00:00:00 2001 From: "Yu-Hsiang M. Tsai" Date: Sun, 10 Nov 2024 23:35:03 +0100 Subject: [PATCH] add --allow-shlib-undefined in link options --- .github/workflows/msys.yml | 8 ++++---- cmake/build_helpers.cmake | 1 + 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/msys.yml b/.github/workflows/msys.yml index 7b9d87aabec..253408aee4a 100644 --- a/.github/workflows/msys.yml +++ b/.github/workflows/msys.yml @@ -73,8 +73,8 @@ jobs: run: | If (Test-Path "C:\_") { rm -r -fo "C:\_" } Copy-Item -Path ".\temp" -Destination "C:\_" -Recurse - - name: Debug over SSH (tmate) - uses: mxschmitt/action-tmate@v3.5 + # - name: Debug over SSH (tmate) + # uses: mxschmitt/action-tmate@v3.5 - name: CI-Build shell: msys2 {0} id: build @@ -83,8 +83,8 @@ jobs: unset VCPKG_ROOT mkdir build cd build - cmake -G Ninja -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=ON -DGINKGO_BUILD_HWLOC=OFF -DGINKGO_BUILD_EXAMPLES=OFF -DGINKGO_BUILD_TESTS=OFF -DGINKGO_BUILD_BENCHMARKS=OFF -DCMAKE_CXX_FLAGS="-Wl,--allow-shlib-undefined" .. - cmake --build --verbose . + cmake -G Ninja -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=ON -DGINKGO_BUILD_HWLOC=OFF -DGINKGO_BUILD_EXAMPLES=OFF -DGINKGO_BUILD_TESTS=OFF -DGINKGO_BUILD_BENCHMARKS=OFF .. + cmake --build . --verbose - name: "Clean up runner" if: ${{ always() }} diff --git a/cmake/build_helpers.cmake b/cmake/build_helpers.cmake index 0985f089382..661d07102b8 100644 --- a/cmake/build_helpers.cmake +++ b/cmake/build_helpers.cmake @@ -45,6 +45,7 @@ function(ginkgo_compile_features name) if (GINKGO_CHECK_CIRCULAR_DEPS) target_link_libraries("${name}" PRIVATE "${GINKGO_CIRCULAR_DEPS_FLAGS}") endif() + target_link_options("${name}" PRIVATE "--allow-shlib-undefined") set_target_properties("${name}" PROPERTIES POSITION_INDEPENDENT_CODE ON) endfunction()