Skip to content

Commit 14dc4ca

Browse files
committed
Introduce -fno-coro-aligned-allocation for clang20
Coroutines has problems with over aligned objects but the standard just don't care about it.
1 parent ab5ab2e commit 14dc4ca

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,11 @@ else()
8282
list(APPEND CXX_FLAGS -Wno-maybe-uninitialized)
8383
list(APPEND CXX_FLAGS -Wno-uninitialized)
8484
endif()
85+
86+
if(CMAKE_CXX_COMPILER_ID MATCHES "Clang" AND
87+
CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL "20")
88+
list(APPEND CXX_FLAGS -fno-coro-aligned-allocation)
89+
endif()
8590
endif()
8691

8792
set(IS_ACC OFF CACHE INTERNAL "Whether the current compiler is ACC")

0 commit comments

Comments
 (0)