mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-25 17:25:20 +03:00
Bump clang version
This commit is contained in:
parent
ef9285239d
commit
d9ac2ab3aa
5 changed files with 14 additions and 15 deletions
|
@ -461,8 +461,8 @@ GTEST_DIR = ../../lib/test/gtest
|
|||
|
||||
# Use clang/clang++ by default
|
||||
|
||||
CC := clang-10
|
||||
CXX := clang++-10
|
||||
CC := clang-12
|
||||
CXX := clang++-12
|
||||
ifeq ($(shell which $(CC) 2>/dev/null),)
|
||||
$(info Falling back to 'clang'.)
|
||||
CC := clang
|
||||
|
@ -472,7 +472,7 @@ endif
|
|||
#CC := gcc
|
||||
#CXX := g++
|
||||
|
||||
# These flags are needed for clang 10 (linux / MacOS) to make test work:
|
||||
# These flags are needed for clang > 10 (linux / MacOS) to make test work:
|
||||
# -Wno-c99-extensions
|
||||
# -Wno-reorder
|
||||
|
||||
|
@ -495,11 +495,11 @@ CXX_VERSION = $(shell $(CXX) -dumpversion)
|
|||
|
||||
ifeq ($(shell $(CC) -v 2>&1 | grep -q "clang version" && echo "clang"),clang)
|
||||
|
||||
# Please revisit versions when new clang version arrive. Supported versions: { Linux / OSX: 7 - 13 }
|
||||
# Please revisit versions when new clang version arrive. Supported versions: { Linux / OSX: 7 - 14 }
|
||||
# Travis reports CC_VERSION of 4.2.1
|
||||
CC_VERSION_MAJOR := $(firstword $(subst ., ,$(CC_VERSION)))
|
||||
CC_VERSION_CHECK_MIN := 7
|
||||
CC_VERSION_CHECK_MAX := 13
|
||||
CC_VERSION_CHECK_MAX := 14
|
||||
|
||||
# Added flags for clang 11 - 13 are not backwards compatible
|
||||
ifeq ($(shell expr $(CC_VERSION_MAJOR) \> 10 \& $(CC_VERSION_MAJOR) \< 14), 1)
|
||||
|
@ -509,7 +509,7 @@ COMMON_FLAGS += \
|
|||
endif
|
||||
|
||||
ifeq ($(shell expr $(CC_VERSION_MAJOR) \< $(CC_VERSION_CHECK_MIN) \| $(CC_VERSION_MAJOR) \> $(CC_VERSION_CHECK_MAX)),1)
|
||||
$(error $(CC) $(CC_VERSION) is not supported. The officially supported version of clang is 'clang-10'. If this is not found, 'clang' is used as a fallback. The version of the compiler must be between $(CC_VERSION_CHECK_MIN) and $(CC_VERSION_CHECK_MAX).)
|
||||
$(error $(CC) $(CC_VERSION) is not supported. The officially supported version of clang is 'clang-12'. If this is not found, 'clang' is used as a fallback. The version of the compiler must be between $(CC_VERSION_CHECK_MIN) and $(CC_VERSION_CHECK_MAX).)
|
||||
endif
|
||||
|
||||
COMMON_FLAGS += -fblocks
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue