Skip to content

Commit c36ff0f

Browse files
thesamesamgithub-actions[bot]
authored andcommitted
Automerge: [clang][cmake] Don't pass -fno-strict-aliasing for GCC
This was added a long time ago.. * to the Makefiles in 40fee63; * first to CMake in b3ce035; * then moved to only apply when building Clang with GCC in c5635a6. This shouldn't be needed these days. If an issue does arise, it really ought to be documented better and the cause will certainly be different than it was back then. The two GCC bugs cited in 40fee63 were: * https://gcc.gnu.org/PR41874 * https://gcc.gnu.org/PR41838 and both are long-fixed. Not only that, if those issues did come up again, we'd be better off doing -Wno-strict-aliasing where appropriate if there weren't a real code issue or some suppression that was tighter in scope wasn't appropriate.
2 parents 6a3928a + 4ed10db commit c36ff0f

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

clang/CMakeLists.txt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -351,9 +351,6 @@ configure_file(
351351
# Add appropriate flags for GCC
352352
if (LLVM_COMPILER_IS_GCC_COMPATIBLE)
353353
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-common -Woverloaded-virtual")
354-
if (NOT "${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")
355-
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-strict-aliasing")
356-
endif ()
357354

358355
# Enable -pedantic for Clang even if it's not enabled for LLVM.
359356
if (NOT LLVM_ENABLE_PEDANTIC)

0 commit comments

Comments
 (0)