Browse Source

Add a PlatformIO hook to alter CXXFLAGS

Scott Lahteine 5 years ago
parent
commit
2aef83ddcd
2 changed files with 14 additions and 0 deletions
  1. 12
    0
      buildroot/share/PlatformIO/scripts/common-cxxflags.py
  2. 2
    0
      platformio.ini

+ 12
- 0
buildroot/share/PlatformIO/scripts/common-cxxflags.py View File

1
+#
2
+# common-cxxflags.py
3
+# Convenience script to apply customizations to CPP flags
4
+#
5
+Import("env")
6
+env.Append(CXXFLAGS=[
7
+  "-Wno-register"
8
+  #"-Wno-incompatible-pointer-types",
9
+  #"-Wno-unused-const-variable",
10
+  #"-Wno-maybe-uninitialized",
11
+  #"-Wno-sign-compare"
12
+])

+ 2
- 0
platformio.ini View File

22
 
22
 
23
 [common]
23
 [common]
24
 default_src_filter = +<src/*> -<src/config> -<src/HAL> +<src/HAL/shared>
24
 default_src_filter = +<src/*> -<src/config> -<src/HAL> +<src/HAL/shared>
25
+extra_scripts = pre:buildroot/share/PlatformIO/scripts/common-cxxflags.py
25
 build_flags = -fmax-errors=5
26
 build_flags = -fmax-errors=5
26
   -g
27
   -g
27
   -ggdb
28
   -ggdb
590
 board         = adafruit_grandcentral_m4
591
 board         = adafruit_grandcentral_m4
591
 framework     = arduino
592
 framework     = arduino
592
 build_flags   = ${common.build_flags} -std=gnu++17
593
 build_flags   = ${common.build_flags} -std=gnu++17
594
+extra_scripts = ${common.extra_scripts}
593
 build_unflags = -std=gnu++11
595
 build_unflags = -std=gnu++11
594
 lib_deps      = ${common.lib_deps}
596
 lib_deps      = ${common.lib_deps}
595
 lib_ignore    = U8glib-HAL
597
 lib_ignore    = U8glib-HAL

Loading…
Cancel
Save