Skip to content

Commit 6d5751a

Browse files
committed
cmake: work around xxhash 'inlining failed' errors in debug builds
rgw enables the XXH_INLINE_ALL define, but this causes debug builds to fail with errors like "inlining failed in call to ‘always_inline’" for build types Debug and RelWithDebInfo, add extra define XXH_NO_INLINE_HINTS to remove the always_inline hints causing this error Signed-off-by: Casey Bodley <[email protected]>
1 parent ebfbbc4 commit 6d5751a

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/rgw/CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -312,6 +312,11 @@ target_include_directories(rgw_common
312312
PUBLIC "${CMAKE_SOURCE_DIR}/src/rgw"
313313
PUBLIC "${LUA_INCLUDE_DIR}")
314314

315+
# work around https://github.com/Cyan4973/xxHash/issues/943 for debug builds
316+
target_compile_definitions(rgw_common PUBLIC
317+
$<$<CONFIG:Debug>:XXH_NO_INLINE_HINTS=1>
318+
$<$<CONFIG:RelWithDebInfo>:XXH_NO_INLINE_HINTS=1>)
319+
315320
if(WITH_RADOSGW_KAFKA_ENDPOINT)
316321
# used by rgw_kafka.cc
317322
target_link_libraries(rgw_common

0 commit comments

Comments
 (0)