mirror of
https://github.com/esp8266/Arduino.git
synced 2025-04-19 23:22:16 +03:00
Keep custom user flags passed via build_flags
, such as a custom LD script (#4680)
This commit is contained in:
parent
d582cab938
commit
a0d1c64af8
@ -84,23 +84,23 @@ env.Append(
|
||||
|
||||
LIBSOURCE_DIRS=[
|
||||
join(FRAMEWORK_DIR, "libraries")
|
||||
],
|
||||
|
||||
LINKFLAGS=[
|
||||
"-Wl,-wrap,system_restart_local",
|
||||
"-Wl,-wrap,spi_flash_read",
|
||||
"-u", "app_entry"
|
||||
]
|
||||
)
|
||||
|
||||
env.Replace(
|
||||
LINKFLAGS=[
|
||||
"-Os",
|
||||
"-nostdlib",
|
||||
"-Wl,--no-check-sections",
|
||||
"-Wl,-static",
|
||||
"-Wl,--gc-sections",
|
||||
"-Wl,-wrap,system_restart_local",
|
||||
"-Wl,-wrap,spi_flash_read",
|
||||
"-u", "app_entry",
|
||||
"-u", "_printf_float",
|
||||
"-u", "_scanf_float"
|
||||
]
|
||||
)
|
||||
# remove LINKFLAGS defined in main.py and keep user custom flags
|
||||
try:
|
||||
index = env['LINKFLAGS'].index("call_user_start")
|
||||
if index > 0 and env['LINKFLAGS'][index - 1] == "-u":
|
||||
del env['LINKFLAGS'][index - 1]
|
||||
env['LINKFLAGS'].remove("call_user_start")
|
||||
except IndexError:
|
||||
pass
|
||||
|
||||
flatten_cppdefines = env.Flatten(env['CPPDEFINES'])
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user