Enable "cyclic reference" for GCC linker only for the embedded dev-platforms // Resolve #3570

This commit is contained in:
Ivan Kravets committed 2020-08-16 20:26:59 +03:00
1 parent 808852f4cc
commit 74e27a2edc
2 files changed
+6 -1

No files matched your search

+5 -1
View File
@@ -66,7 +66,11 @@ def BuildProgram(env):
env.Prepend(LINKFLAGS=["-T", env.subst("$LDSCRIPT_PATH")])
# enable "cyclic reference" for linker
if env.get("LIBS") and env.GetCompilerType() == "gcc":
if (
env.get("LIBS")
and env.GetCompilerType() == "gcc"
and env.PioPlatform().is_embedded()
):
env.Prepend(_LIBFLAGS="-Wl,--start-group ")
env.Append(_LIBFLAGS=" -Wl,--end-group")