This is an automated email from the ASF dual-hosted git repository.

bneradt pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git


The following commit(s) were added to refs/heads/master by this push:
     new 63d7c41b3e -fno-strict-aliasing (#11303)
63d7c41b3e is described below

commit 63d7c41b3ebd308fb6a6b1c612c75e4b290e2bfb
Author: Brian Neradt <[email protected]>
AuthorDate: Wed May 1 09:23:27 2024 -0500

    -fno-strict-aliasing (#11303)
    
    Our ATS 9.x builds via Automake generally built with
    -fno-strict-aliasing. This updates our CMake configuration to do the
    same. This can avoid hard to debug runtime bugs from optimization.
---
 CMakeLists.txt | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 9f5325ee23..8453384dfe 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -579,7 +579,9 @@ add_subdirectory(lib)
 # there are warnings, we can't do anything about it.
 # Note: -DCMAKE_COMPILE_WARNING_AS_ERROR=ON will turn warnings into errors.
 add_compile_options(-pipe -Wall -Wextra -Wno-unused-parameter)
-add_compile_options("$<$<COMPILE_LANGUAGE:CXX>:-Wno-noexcept-type;-Wsuggest-override;-Wno-vla-extension>")
+add_compile_options(
+  
"$<$<COMPILE_LANGUAGE:CXX>:-Wno-noexcept-type;-Wsuggest-override;-Wno-vla-extension;-fno-strict-aliasing>"
+)
 
add_compile_options("$<$<CXX_COMPILER_ID:GNU>:-Wno-format-truncation;-Wno-stringop-overflow>")
 
 if(NOT EXTERNAL_YAML_CPP)

Reply via email to