Skip to content
9 changes: 2 additions & 7 deletions libc/cmake/modules/LLVMLibCTestRules.cmake
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
function(_get_common_test_compile_options output_var c_test flags)
_get_compile_options_from_flags(compile_flags ${flags})

# Remove -fno-math-errno if it was added.
if(LIBC_ADD_FNO_MATH_ERRNO)
list(REMOVE_ITEM compile_options "-fno-math-errno")
endif()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you intend to remove this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IIRFC yes, Oh I just realized that's removing -fno-math-error

let me revert that change


set(compile_options
${LIBC_COMPILE_OPTIONS_DEFAULT}
${LIBC_TEST_COMPILE_OPTIONS_DEFAULT}
Expand Down Expand Up @@ -39,9 +34,7 @@ function(_get_common_test_compile_options output_var c_test flags)
# list(APPEND compile_options "-Wconversion")
# list(APPEND compile_options "-Wno-sign-conversion")
list(APPEND compile_options "-Wimplicit-fallthrough")
list(APPEND compile_options "-Wstrict-prototypes")
list(APPEND compile_options "-Wwrite-strings")
list(APPEND compile_options "-Wextra-semi")
# Silence this warning because _Complex is a part of C99.
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
if(NOT c_test)
Expand All @@ -53,6 +46,8 @@ function(_get_common_test_compile_options output_var c_test flags)
endif()
list(APPEND compile_options "-Wno-pedantic")
if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
list(APPEND compile_options "-Wstrict-prototypes")
list(APPEND compile_options "-Wextra-semi")
list(APPEND compile_options "-Wnewline-eof")
list(APPEND compile_options "-Wnonportable-system-include-path")
list(APPEND compile_options "-Wthread-safety")
Expand Down
Loading