]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
cmake: work around xxhash 'inlining failed' errors in debug builds 58429/head
authorCasey Bodley <cbodley@redhat.com>
Wed, 26 Jun 2024 22:17:13 +0000 (18:17 -0400)
committerCasey Bodley <cbodley@redhat.com>
Thu, 4 Jul 2024 16:28:22 +0000 (12:28 -0400)
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 <cbodley@redhat.com>
src/rgw/CMakeLists.txt

index bcbde72d8aaba38388a3f2ee860d2e3f35784476..25151fb24fb0a6bbe07f38d82cdb2ce806d45baa 100644 (file)
@@ -312,6 +312,11 @@ target_include_directories(rgw_common
   PUBLIC "${CMAKE_SOURCE_DIR}/src/rgw"
   PUBLIC "${LUA_INCLUDE_DIR}")
 
+# work around https://github.com/Cyan4973/xxHash/issues/943 for debug builds
+target_compile_definitions(rgw_common PUBLIC
+  $<$<CONFIG:Debug>:XXH_NO_INLINE_HINTS=1>
+  $<$<CONFIG:RelWithDebInfo>:XXH_NO_INLINE_HINTS=1>)
+
 if(WITH_RADOSGW_KAFKA_ENDPOINT)
   # used by rgw_kafka.cc
   target_link_libraries(rgw_common