Skip to content

Commit eca4d07

Browse files
sarnexjsjiclaude
authored
[XPTIFW] Suppress deprecation warnings from parallel-hashmap on macOS (#22600)
parallel-hashmap uses std::allocator::pointer which is deprecated in C++17+ and causes build failures on macOS when -Werror is enabled. With this fix we can undo the workaround in the Mac build CI. Co-authored-by: Jinsong Ji <jinsong.ji@intel.com> Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
1 parent 328217f commit eca4d07

2 files changed

Lines changed: 7 additions & 2 deletions

File tree

.github/workflows/sycl-macos-build-and-test.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@ jobs:
5252
--ci-defaults --use-zstd $ARGS \
5353
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
5454
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
55-
-DLLVM_INSTALL_UTILS=ON \
56-
-DXPTI_ENABLE_WERROR=OFF
55+
-DLLVM_INSTALL_UTILS=ON
5756
- name: Compile
5857
run: cmake --build $GITHUB_WORKSPACE/build --target deploy-sycl-toolchain

xptifw/src/CMakeLists.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,12 @@ function(add_xpti_library LIB_NAME)
7171
$<BUILD_INTERFACE:${XPTIFW_PARALLEL_HASHMAP_HEADERS}>
7272
)
7373

74+
# Suppress deprecation warnings from parallel-hashmap on macOS
75+
# parallel-hashmap uses std::allocator::pointer which is deprecated in C++17+
76+
if(APPLE)
77+
target_compile_options(${LIB_NAME} PRIVATE -Wno-deprecated-declarations)
78+
endif()
79+
7480
add_dependencies(${LIB_NAME} xpti)
7581

7682
target_link_libraries(${LIB_NAME} PUBLIC $<BUILD_INTERFACE:emhash::emhash>)

0 commit comments

Comments
 (0)