Skip to content

[libc] Also add -Wno-pedantic when building with clang. #112286

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 14, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions libc/cmake/modules/LLVMLibCCompileOptionRules.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -155,11 +155,11 @@ function(_get_common_compile_options output_var flags)
# Silence this warning because _Complex is a part of C99.
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
list(APPEND compile_options "-fext-numeric-literals")
list(APPEND compile_options "-Wno-pedantic")
else()
list(APPEND compile_options "-Wno-c99-extensions")
list(APPEND compile_options "-Wno-gnu-imaginary-constant")
endif()
list(APPEND compile_options "-Wno-pedantic")
list(APPEND compile_options "-Wimplicit-fallthrough")
list(APPEND compile_options "-Wwrite-strings")
list(APPEND compile_options "-Wextra-semi")
Expand Down Expand Up @@ -239,12 +239,12 @@ function(_get_common_test_compile_options output_var c_test flags)
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
if(NOT c_test)
list(APPEND compile_options "-fext-numeric-literals")
list(APPEND compile_options "-Wno-pedantic")
endif()
else()
list(APPEND compile_options "-Wno-c99-extensions")
list(APPEND compile_options "-Wno-gnu-imaginary-constant")
endif()
list(APPEND compile_options "-Wno-pedantic")
# if(NOT CMAKE_COMPILER_IS_GNUCXX)
# list(APPEND compile_options "-Wnewline-eof")
# list(APPEND compile_options "-Wnonportable-system-include-path")
Expand Down
Loading