Skip to content

Commit

Permalink
Add a PlatformIO hook to alter CXXFLAGS
Browse files Browse the repository at this point in the history
  • Loading branch information
thinkyhead committed Aug 29, 2019
1 parent 23cffb2 commit 2aef83d
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
12 changes: 12 additions & 0 deletions buildroot/share/PlatformIO/scripts/common-cxxflags.py
Original file line number Diff line number Diff line change
@@ -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"
])
2 changes: 2 additions & 0 deletions platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ default_envs = megaatmega2560

[common]
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
-g
-ggdb
Expand Down Expand Up @@ -590,6 +591,7 @@ platform = atmelsam
board = adafruit_grandcentral_m4
framework = arduino
build_flags = ${common.build_flags} -std=gnu++17
extra_scripts = ${common.extra_scripts}
build_unflags = -std=gnu++11
lib_deps = ${common.lib_deps}
lib_ignore = U8glib-HAL
Expand Down

0 comments on commit 2aef83d

Please sign in to comment.