mirror of
https://github.com/esp8266/Arduino.git
synced 2025-04-19 23:22:16 +03:00
pio: use CCFLAGS for -Werror (#8175)
Also adds some comments referencing SCons documentation
This commit is contained in:
parent
d2a3cbeb6f
commit
019fab4e02
@ -22,6 +22,9 @@ kinds of creative coding, interactive objects, spaces or physical experiences.
|
|||||||
https://arduino.cc/en/Reference/HomePage
|
https://arduino.cc/en/Reference/HomePage
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
# For SCons documentation, see:
|
||||||
|
# https://scons.org/doc/latest
|
||||||
|
|
||||||
# Extends: https://github.com/platformio/platform-espressif8266/blob/develop/builder/main.py
|
# Extends: https://github.com/platformio/platform-espressif8266/blob/develop/builder/main.py
|
||||||
|
|
||||||
from os.path import isdir, join
|
from os.path import isdir, join
|
||||||
@ -58,16 +61,17 @@ if gzip_fw:
|
|||||||
env.Append(
|
env.Append(
|
||||||
ASFLAGS=["-x", "assembler-with-cpp"],
|
ASFLAGS=["-x", "assembler-with-cpp"],
|
||||||
|
|
||||||
|
# General options that are passed to the C compiler (C only; not C++)
|
||||||
CFLAGS=[
|
CFLAGS=[
|
||||||
"-std=gnu17",
|
"-std=gnu17",
|
||||||
"-Wpointer-arith",
|
"-Wpointer-arith",
|
||||||
"-Wno-implicit-function-declaration",
|
"-Wno-implicit-function-declaration",
|
||||||
"-Werror=return-type",
|
|
||||||
"-Wl,-EL",
|
"-Wl,-EL",
|
||||||
"-fno-inline-functions",
|
"-fno-inline-functions",
|
||||||
"-nostdlib"
|
"-nostdlib"
|
||||||
],
|
],
|
||||||
|
|
||||||
|
# General options that are passed to the C and C++ compilers
|
||||||
CCFLAGS=[
|
CCFLAGS=[
|
||||||
"-Os", # optimize for size
|
"-Os", # optimize for size
|
||||||
"-mlongcalls",
|
"-mlongcalls",
|
||||||
@ -78,15 +82,18 @@ env.Append(
|
|||||||
"-ffunction-sections",
|
"-ffunction-sections",
|
||||||
"-fdata-sections",
|
"-fdata-sections",
|
||||||
"-Wall",
|
"-Wall",
|
||||||
|
"-Werror=return-type",
|
||||||
"-free",
|
"-free",
|
||||||
"-fipa-pta"
|
"-fipa-pta"
|
||||||
],
|
],
|
||||||
|
|
||||||
|
# General options that are passed to the C++ compiler
|
||||||
CXXFLAGS=[
|
CXXFLAGS=[
|
||||||
"-fno-rtti",
|
"-fno-rtti",
|
||||||
"-std=gnu++17"
|
"-std=gnu++17"
|
||||||
],
|
],
|
||||||
|
|
||||||
|
# General user options passed to the linker
|
||||||
LINKFLAGS=[
|
LINKFLAGS=[
|
||||||
"-Os",
|
"-Os",
|
||||||
"-nostdlib",
|
"-nostdlib",
|
||||||
@ -105,6 +112,9 @@ env.Append(
|
|||||||
"-u", "_UserExceptionVector"
|
"-u", "_UserExceptionVector"
|
||||||
],
|
],
|
||||||
|
|
||||||
|
# A platform independent specification of C preprocessor definitions as either:
|
||||||
|
# - -DFLAG as "FLAG"
|
||||||
|
# - -DFLAG=VALUE as ("FLAG", "VALUE")
|
||||||
CPPDEFINES=[
|
CPPDEFINES=[
|
||||||
("F_CPU", "$BOARD_F_CPU"),
|
("F_CPU", "$BOARD_F_CPU"),
|
||||||
"__ets__",
|
"__ets__",
|
||||||
@ -115,18 +125,21 @@ env.Append(
|
|||||||
"LWIP_OPEN_SRC"
|
"LWIP_OPEN_SRC"
|
||||||
],
|
],
|
||||||
|
|
||||||
|
# The list of directories that the C preprocessor will search for include directories
|
||||||
CPPPATH=[
|
CPPPATH=[
|
||||||
join(FRAMEWORK_DIR, "tools", "sdk", "include"),
|
join(FRAMEWORK_DIR, "tools", "sdk", "include"),
|
||||||
join(FRAMEWORK_DIR, "cores", env.BoardConfig().get("build.core")),
|
join(FRAMEWORK_DIR, "cores", env.BoardConfig().get("build.core")),
|
||||||
join(platform.get_package_dir("toolchain-xtensa"), "include")
|
join(platform.get_package_dir("toolchain-xtensa"), "include")
|
||||||
],
|
],
|
||||||
|
|
||||||
|
# The list of directories that will be searched for libraries
|
||||||
LIBPATH=[
|
LIBPATH=[
|
||||||
join("$BUILD_DIR", "ld"), # eagle.app.v6.common.ld
|
join("$BUILD_DIR", "ld"), # eagle.app.v6.common.ld
|
||||||
join(FRAMEWORK_DIR, "tools", "sdk", "lib"),
|
join(FRAMEWORK_DIR, "tools", "sdk", "lib"),
|
||||||
join(FRAMEWORK_DIR, "tools", "sdk", "ld")
|
join(FRAMEWORK_DIR, "tools", "sdk", "ld")
|
||||||
],
|
],
|
||||||
|
|
||||||
|
# A list of one or more libraries that will be linked with any executable programs created by this environment
|
||||||
LIBS=[
|
LIBS=[
|
||||||
"hal", "phy", "pp", "net80211", "wpa", "crypto", "main",
|
"hal", "phy", "pp", "net80211", "wpa", "crypto", "main",
|
||||||
"wps", "bearssl", "espnow", "smartconfig", "airkiss", "wpa2",
|
"wps", "bearssl", "espnow", "smartconfig", "airkiss", "wpa2",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user