1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-04-21 10:26:06 +03:00

Dynamically configure exceptions support (#7834)

This commit is contained in:
Valerii Koval 2021-01-22 17:08:45 +02:00 committed by GitHub
parent 2402958208
commit 11a2fb3872
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -75,7 +75,6 @@ env.Append(
"-U__STRICT_ANSI__",
"-ffunction-sections",
"-fdata-sections",
"-fno-exceptions",
"-Wall"
],
@ -130,7 +129,7 @@ env.Append(
LIBS=[
"hal", "phy", "pp", "net80211", "wpa", "crypto", "main",
"wps", "bearssl", "espnow", "smartconfig", "airkiss", "wpa2",
"stdc++", "m", "c", "gcc"
"m", "c", "gcc"
],
LIBSOURCE_DIRS=[
@ -250,6 +249,20 @@ if "PIO_FRAMEWORK_ARDUINO_WAVEFORM_LOCKED_PHASE" in flatten_cppdefines:
env.Append(CPPDEFINES=[("WAVEFORM_LOCKED_PHASE", 1)])
# PIO_FRAMEWORK_ARDUINO_WAVEFORM_LOCKED_PWM will be used by default
#
# Exceptions
#
if "PIO_FRAMEWORK_ARDUINO_ENABLE_EXCEPTIONS" in flatten_cppdefines:
env.Append(
CXXFLAGS=["-fexceptions"],
LIBS=["stdc++-exc"]
)
else:
env.Append(
CXXFLAGS=["-fno-exceptions"],
LIBS=["stdc++"]
)
#
# VTables
#