Skip to content
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

chore: Conservatively raise the minimum supported clang version in CMakeList #2023

Merged
merged 3 commits into from
Sep 6, 2023
Merged
Changes from 1 commit
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
17 changes: 9 additions & 8 deletions circuits/cpp/barretenberg/cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ if(FUZZING)
endif()

if(UNDEFINED_BEHAVIOUR_SANITIZER)
set(SANITIZER_OPTIONS ${SANITIZER_OPTIONS} -fsanitize=undefined -fno-sanitize=alignment)
set(SANITIZER_OPTIONS ${SANITIZER_OPTIONS} -fsanitize=undefined -fno-sanitize=alignment)
endif()

add_compile_options(-fsanitize=fuzzer-no-link ${SANITIZER_OPTIONS})
Expand Down Expand Up @@ -81,15 +81,15 @@ set(CMAKE_CXX_STANDARD_REQUIRED TRUE)
set(CMAKE_CXX_EXTENSIONS ON)

if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS "10")
message(WARNING "Clang <10 is not supported")
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS "16")
message(WARNING "Clang <16 is not supported")
kevaundray marked this conversation as resolved.
Show resolved Hide resolved
endif()
elseif(CMAKE_CXX_COMPILER_ID MATCHES "GNU")
if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS "10")
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS "10")
message(WARNING "GCC <10 is not supported")
endif()
else()
message(WARNING "Unsuported compiler, use Clang >10 or GCC >10")
message(WARNING "Unsuported compiler, use Clang >16 or GCC >10")
kevaundray marked this conversation as resolved.
Show resolved Hide resolved
endif()

if(COVERAGE)
Expand All @@ -105,13 +105,15 @@ if(COVERAGE)
# Find llvm-profdata
set(PROFDATA_EXECUTABLE_NAME "llvm-profdata-${CLANG_VERSION_MAJOR}")
find_program(PROFDATA_EXECUTABLE ${PROFDATA_EXECUTABLE_NAME})

kevaundray marked this conversation as resolved.
Show resolved Hide resolved
if(PROFDATA_EXECUTABLE MATCHES "NOTFOUND")
message(FATAL_ERROR "Couldn't find ${PROFDATA_EXECUTABLE_NAME}")
endif()

# Find llvm-cov
set(COV_EXECUTABLE_NAME "llvm-cov-${CLANG_VERSION_MAJOR}")
find_program(COV_EXECUTABLE ${COV_EXECUTABLE_NAME})

if(COV_EXECUTABLE MATCHES "NOTFOUND")
message(FATAL_ERROR "Couldn't find ${COV_EXECUTABLE_NAME}")
endif()
Expand All @@ -121,12 +123,11 @@ if(COVERAGE)

# Add a custom target for creating the report
add_custom_target(create_full_coverage_report
COMMAND "${CMAKE_SOURCE_DIR}/scripts/collect_coverage_information.sh" ${PROFDATA_EXECUTABLE} ${COV_EXECUTABLE}
VERBATIM
COMMAND "${CMAKE_SOURCE_DIR}/scripts/collect_coverage_information.sh" ${PROFDATA_EXECUTABLE} ${COV_EXECUTABLE}
VERBATIM
)
endif()


include(cmake/build.cmake)
include(GNUInstallDirs)
include(cmake/arch.cmake)
Expand Down