Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.
/ corefx Public archive

Commit

Permalink
Fix corefx to build on clang 10
Browse files Browse the repository at this point in the history
Clang 10 adds/enables new warnings, some of which is affecting the
corefx code. Disable them.

This is a "backport" of dotnet/runtime#33734 to corefx.

After this commit, I can build all of corefx with Clang 10.
  • Loading branch information
omajid committed Apr 14, 2020
1 parent 76dff3b commit 827913e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Native/Unix/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ add_compile_options(-I${CMAKE_CURRENT_SOURCE_DIR}/Common)
add_compile_options(-I${CMAKE_CURRENT_BINARY_DIR}/Common)
add_compile_options(-g)
if(CMAKE_C_COMPILER_ID STREQUAL Clang)
if (CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL 10)
add_compile_options(-Wno-alloca)
add_compile_options(-Wno-implicit-int-float-conversion)
endif()
add_compile_options(-Wthread-safety)
add_compile_options(-Wno-thread-safety-analysis)
endif()
Expand Down

0 comments on commit 827913e

Please sign in to comment.