Procházet zdrojové kódy

Add a PlatformIO hook to alter CXXFLAGS

Scott Lahteine před 5 roky
rodič
revize
2aef83ddcd

+ 12
- 0
buildroot/share/PlatformIO/scripts/common-cxxflags.py Zobrazit soubor

@@ -0,0 +1,12 @@
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 Zobrazit soubor

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

Loading…
Zrušit
Uložit