Add a PlatformIO hook to alter CXXFLAGS

This commit is contained in:
Scott Lahteine 2019-08-27 20:28:42 -05:00
parent 23cffb2c21
commit 2aef83ddcd
2 changed files with 14 additions and 0 deletions

View file

@ -0,0 +1,12 @@
#
# common-cxxflags.py
# Convenience script to apply customizations to CPP flags
#
Import("env")
env.Append(CXXFLAGS=[
"-Wno-register"
#"-Wno-incompatible-pointer-types",
#"-Wno-unused-const-variable",
#"-Wno-maybe-uninitialized",
#"-Wno-sign-compare"
])

View file

@ -22,6 +22,7 @@ default_envs = megaatmega2560
[common] [common]
default_src_filter = +<src/*> -<src/config> -<src/HAL> +<src/HAL/shared> default_src_filter = +<src/*> -<src/config> -<src/HAL> +<src/HAL/shared>
extra_scripts = pre:buildroot/share/PlatformIO/scripts/common-cxxflags.py
build_flags = -fmax-errors=5 build_flags = -fmax-errors=5
-g -g
-ggdb -ggdb
@ -590,6 +591,7 @@ platform = atmelsam
board = adafruit_grandcentral_m4 board = adafruit_grandcentral_m4
framework = arduino framework = arduino
build_flags = ${common.build_flags} -std=gnu++17 build_flags = ${common.build_flags} -std=gnu++17
extra_scripts = ${common.extra_scripts}
build_unflags = -std=gnu++11 build_unflags = -std=gnu++11
lib_deps = ${common.lib_deps} lib_deps = ${common.lib_deps}
lib_ignore = U8glib-HAL lib_ignore = U8glib-HAL