From f0004fa69051a4dca4ec2fb15dbbf1720b138b9a Mon Sep 17 00:00:00 2001 From: Andrew Kaster Date: Fri, 9 May 2025 21:07:37 -0600 Subject: [PATCH] AK+CMake: Remove workaround for swiftc mishandling [[no_unique_address]] --- AK/Platform.h | 10 +++------- Meta/CMake/common_compile_options.cmake | 5 ----- 2 files changed, 3 insertions(+), 12 deletions(-) diff --git a/AK/Platform.h b/AK/Platform.h index 707d7ba1c2d..f8fcaa3d6cb 100644 --- a/AK/Platform.h +++ b/AK/Platform.h @@ -243,14 +243,10 @@ #ifdef NO_UNIQUE_ADDRESS # undef NO_UNIQUE_ADDRESS #endif -#if defined(AK_DISABLE_NO_UNIQUE_ADDRESS) -# define NO_UNIQUE_ADDRESS +#if defined(AK_OS_WINDOWS) +# define NO_UNIQUE_ADDRESS [[msvc::no_unique_address]] #else -# if defined(AK_OS_WINDOWS) -# define NO_UNIQUE_ADDRESS [[msvc::no_unique_address]] -# else -# define NO_UNIQUE_ADDRESS [[no_unique_address]] -# endif +# define NO_UNIQUE_ADDRESS [[no_unique_address]] #endif // GCC doesn't have __has_feature but clang does diff --git a/Meta/CMake/common_compile_options.cmake b/Meta/CMake/common_compile_options.cmake index 34a1830850b..e05d25277c3 100644 --- a/Meta/CMake/common_compile_options.cmake +++ b/Meta/CMake/common_compile_options.cmake @@ -138,8 +138,3 @@ endif() if (NOT MSVC) add_cxx_compile_options(-fstrict-flex-arrays=2) endif() - -# FIXME: https://github.com/swiftlang/swift/issues/80764 -if (CMAKE_Swift_COMPILER_LOADED) - add_cxx_compile_definitions(AK_DISABLE_NO_UNIQUE_ADDRESS) -endif()