From 92d86192aa21130f719c028a101237626c00f9da Mon Sep 17 00:00:00 2001 From: Ivan Kravets Date: Fri, 18 Oct 2019 15:05:11 +0300 Subject: [PATCH] Substitute LDSCRIPT with real value --- platformio/builder/tools/platformio.py | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/platformio/builder/tools/platformio.py b/platformio/builder/tools/platformio.py index 5c967d19..ae4625e7 100644 --- a/platformio/builder/tools/platformio.py +++ b/platformio/builder/tools/platformio.py @@ -129,14 +129,7 @@ def BuildProgram(env): # 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", - env["LDSCRIPT_PATH"] - if os.path.isfile(env["LDSCRIPT_PATH"]) - else "$LDSCRIPT_PATH", - ] - ) + env.Prepend(LINKFLAGS=["-T", env.subst("$LDSCRIPT_PATH")]) # enable "cyclic reference" for linker if env.get("LIBS") and env.GetCompilerType() == "gcc":