luffy-zh commented on code in PR #2342:
URL: https://github.com/apache/orc/pull/2342#discussion_r2276045614


##########
CMakeLists.txt:
##########
@@ -181,15 +181,23 @@ endif()
 
 # Configure Undefined Behavior Sanitizer if enabled
 if (ENABLE_UBSAN)
-  if (CMAKE_CXX_COMPILER_ID MATCHES "Clang")
-    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=undefined 
-fno-sanitize=alignment,vptr,function  -fno-sanitize-recover=all")
-    set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fsanitize=undefined 
-fno-sanitize=alignment,vptr,function  -fno-sanitize-recover=all")
+  if (CMAKE_CXX_COMPILER_ID MATCHES "GNU|Clang")
+    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=undefined 
-fno-sanitize=alignment,vptr -fno-sanitize-recover=all")
+    set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fsanitize=undefined 
-fno-sanitize=alignment,vptr -fno-sanitize-recover=all")
     message(STATUS "Undefined Behavior Sanitizer enabled")
   else()
     message(WARNING "Undefined Behavior Sanitizer is only supported for GCC 
and Clang compilers")
   endif()
 endif()
 
+if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")

Review Comment:
   I wondered the same :), but it turns out the GNU Action job needs to be 
linked with pthread.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to