From 4b68d0330274ce1242d575a1f1acdcc3842a81ce Mon Sep 17 00:00:00 2001 From: Rustam Gamidov Date: Wed, 4 Mar 2026 13:10:03 +0200 Subject: [PATCH] Build with OLP_SDK_NO_EXCEPTION=ON using clang It appeared that Clang and GCC complains on different lines at least in case of Boost codebase Relates-To: MINOR Signed-off-by: Rustam Gamidov --- .github/workflows/psv_pipelines.yml | 4 +-- .../boost/boost_182_json_noexceptions.diff | 26 +++++++++++++++++++ 2 files changed, 28 insertions(+), 2 deletions(-) diff --git a/.github/workflows/psv_pipelines.yml b/.github/workflows/psv_pipelines.yml index 4232600dc..48a43135d 100644 --- a/.github/workflows/psv_pipelines.yml +++ b/.github/workflows/psv_pipelines.yml @@ -174,14 +174,14 @@ jobs: shell: bash psv-linux-22-04-clang-hidden-build: - name: PSV.Linux.22.04.clang.hidden + name: PSV.Linux.22.04.clang.hidden.OLP_SDK_NO_EXCEPTION=ON runs-on: ubuntu-22.04 env: BUILD_TYPE: RelWithDebInfo CC: clang-11 CXX: clang++-11 CXXFLAGS: -Wno-deprecated-copy - EXTRA_CMAKE_OPTIONS: -DCMAKE_CXX_VISIBILITY_PRESET=hidden -DOLP_SDK_ENABLE_TESTING=OFF + EXTRA_CMAKE_OPTIONS: -DCMAKE_CXX_VISIBILITY_PRESET=hidden -DOLP_SDK_ENABLE_TESTING=OFF -DOLP_SDK_NO_EXCEPTION=ON steps: - name: Check out repository uses: actions/checkout@v4 diff --git a/external/boost/boost_182_json_noexceptions.diff b/external/boost/boost_182_json_noexceptions.diff index 507e3cecf..a0defe5eb 100644 --- a/external/boost/boost_182_json_noexceptions.diff +++ b/external/boost/boost_182_json_noexceptions.diff @@ -1,3 +1,29 @@ +diff --git a/libs/json/include/boost/json/detail/value_to.hpp b/libs/json/include/boost/json/detail/value_to.hpp +index 7cb779e..6df1c9d 100644 +--- a/libs/json/include/boost/json/detail/value_to.hpp ++++ b/libs/json/include/boost/json/detail/value_to.hpp +@@ -652,10 +652,13 @@ value_to_impl( + value const& jv, + user_conversion_tag) + { ++#ifndef BOOST_NO_EXCEPTIONS + try + { ++#endif // BOOST_NO_EXCEPTIONS + return { + boost::system::in_place_value, tag_invoke(value_to_tag(), jv)}; ++#ifndef BOOST_NO_EXCEPTIONS + } + catch( std::bad_alloc const&) + { +@@ -671,6 +674,7 @@ value_to_impl( + BOOST_JSON_FAIL(ec, error::exception); + return {boost::system::in_place_error, ec}; + } ++#endif // BOOST_NO_EXCEPTIONS + } + + // no suitable conversion implementation diff --git a/libs/json/include/boost/json/impl/value.ipp b/libs/json/include/boost/json/impl/value.ipp index 7460c02..7513b38 100644 --- a/libs/json/include/boost/json/impl/value.ipp