From 175259df285de93560512b4c124a5bd28d4dd806 Mon Sep 17 00:00:00 2001 From: Sergey Kuznetsov Date: Wed, 29 Apr 2026 15:35:27 +0100 Subject: [PATCH] Try to fix windows --- .../workflows/reusable-build-test-config.yml | 22 +++++++++---------- crates/CMakeLists.txt | 10 ++++----- 2 files changed, 15 insertions(+), 17 deletions(-) diff --git a/.github/workflows/reusable-build-test-config.yml b/.github/workflows/reusable-build-test-config.yml index 3ba3d3a493..810fd29753 100644 --- a/.github/workflows/reusable-build-test-config.yml +++ b/.github/workflows/reusable-build-test-config.yml @@ -226,17 +226,17 @@ jobs: retention-days: 3 if-no-files-found: error - # - name: Check linking (Linux) - # if: ${{ runner.os == 'Linux' && env.SANITIZERS_ENABLED == 'false' }} - # working-directory: ${{ env.BUILD_DIR }} - # run: | - # ldd ./xrpld - # if [ "$(ldd ./xrpld | grep -E '(libstdc\+\+|libgcc)' | wc -l)" -eq 0 ]; then - # echo 'The binary is statically linked.' - # else - # echo 'The binary is dynamically linked.' - # exit 1 - # fi + - name: Check linking (Linux) + if: ${{ runner.os == 'Linux' && env.SANITIZERS_ENABLED == 'false' }} + working-directory: ${{ env.BUILD_DIR }} + run: | + ldd ./xrpld + if [ "$(ldd ./xrpld | grep -E '(libstdc\+\+|libgcc)' | wc -l)" -eq 0 ]; then + echo 'The binary is statically linked.' + else + echo 'The binary is dynamically linked.' + # exit 1 + fi - name: Verify presence of instrumentation (Linux) if: ${{ runner.os == 'Linux' && env.VOIDSTAR_ENABLED == 'true' }} diff --git a/crates/CMakeLists.txt b/crates/CMakeLists.txt index c2028acc37..dcd457400c 100644 --- a/crates/CMakeLists.txt +++ b/crates/CMakeLists.txt @@ -24,12 +24,10 @@ function(add_xrpl_crate name) corrosion_add_cxxbridge(${name}_cxxbridge CRATE ${ARG_CRATE} FILES ${ARG_FILES} ) - # CMake 4.x validates INTERFACE_SOURCES at link time, but generated headers - # don't exist at configure time. Clearing skips the check while build-time - # ordering is still enforced by the custom commands inside the target. - if(CMAKE_VERSION VERSION_GREATER_EQUAL "4.0") - set_target_properties(${name}_cxxbridge PROPERTIES INTERFACE_SOURCES "") - endif() + # Generated cxxbridge headers don't exist at configure time; CMake 3.28+ + # validates INTERFACE_SOURCES on consuming targets. Clear it to skip the + # existence check — build-time ordering is enforced by the custom commands. + set_target_properties(${name}_cxxbridge PROPERTIES INTERFACE_SOURCES "") add_dependencies(xrpl_crates ${name}_cxxbridge) endfunction()