aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavide Grohmann <davide.grohmann@arm.com>2021-08-11 13:35:14 +0200
committerKristofer Jonsson <kristofer.jonsson@arm.com>2021-08-13 09:55:03 +0000
commit03e19e2ab37bf1d34ac03e5a71c3b243898d2223 (patch)
tree7b8da5fe86b92e568c2ce5d1e8b5c822e63d5eff
parentedaf2f8cb3ed557c655ef414f135f4a4a9f50526 (diff)
downloadethos-u-core-platform-03e19e2ab37bf1d34ac03e5a71c3b243898d2223.tar.gz
Ensure same flags are used for both GCC and ARMClang21.08-rc1
Change-Id: Ib37930e7efb0663e9c39bb6c39af8cc62cf3f37c
-rw-r--r--cmake/toolchain/arm-none-eabi-gcc.cmake5
-rw-r--r--cmake/toolchain/armclang.cmake1
2 files changed, 4 insertions, 2 deletions
diff --git a/cmake/toolchain/arm-none-eabi-gcc.cmake b/cmake/toolchain/arm-none-eabi-gcc.cmake
index 701824f..11a1191 100644
--- a/cmake/toolchain/arm-none-eabi-gcc.cmake
+++ b/cmake/toolchain/arm-none-eabi-gcc.cmake
@@ -44,6 +44,7 @@ set(CMAKE_CXX_STANDARD 14)
add_compile_options(
-mcpu=${TARGET_CPU}
-mthumb
+ "$<$<CONFIG:DEBUG>:-gdwarf-3>"
"$<$<COMPILE_LANGUAGE:CXX>:-fno-unwind-tables;-fno-rtti;-fno-exceptions>")
# Compile defines
@@ -80,11 +81,11 @@ add_compile_options(
-Wsign-compare
-Wunused
-Wswitch-default
-# -Wformat
+ -Wformat
-Wdouble-promotion
-Wredundant-decls
-Wshadow
-# -Wcast-align
+ -Wcast-align
-Wnull-dereference
-Wno-format-extra-args
-Wno-unused-function
diff --git a/cmake/toolchain/armclang.cmake b/cmake/toolchain/armclang.cmake
index 25c510c..257c2a8 100644
--- a/cmake/toolchain/armclang.cmake
+++ b/cmake/toolchain/armclang.cmake
@@ -84,6 +84,7 @@ add_compile_options(
-Wnull-dereference
-Wno-format-extra-args
-Wno-unused-function
+ -Wno-unused-parameter
-Wno-unused-label
-Wno-missing-field-initializers
-Wno-return-type)