mirror of
https://github.com/platformio/platformio-core.git
synced 2025-07-29 17:47:14 +02:00
Append a main LD script at the beginning
This commit is contained in:
@ -108,9 +108,10 @@ def BuildProgram(env):
|
||||
# build project with dependencies
|
||||
_build_project_deps(env)
|
||||
|
||||
# append specified LD_SCRIPT
|
||||
if "LDSCRIPT_PATH" in env and not any("-T" in f for f in env['LINKFLAGS']):
|
||||
env.Append(LINKFLAGS=["-T", "$LDSCRIPT_PATH"])
|
||||
# append into the beginning a main LD script
|
||||
if (env.get("LDSCRIPT_PATH")
|
||||
and not any("-Wl,-T" in f for f in env['LINKFLAGS'])):
|
||||
env.Prepend(LINKFLAGS=["-T", "$LDSCRIPT_PATH"])
|
||||
|
||||
# enable "cyclic reference" for linker
|
||||
if env.get("LIBS") and env.GetCompilerType() == "gcc":
|
||||
|
Reference in New Issue
Block a user