Merge pull request #2991 from c1728p9/fix_small_default_lib

Properly set flags for default_lib = small
pull/3016/head
Sam Grove 2016-10-13 11:13:30 -05:00 committed by GitHub
commit 9f74038036
1 changed files with 11 additions and 0 deletions

View File

@ -35,6 +35,17 @@ class GCC(mbedToolchain):
extra_verbose=extra_verbose,
build_profile=build_profile)
# Add flags for current size setting
default_lib = "std"
if hasattr(target, "default_lib"):
default_lib = target.default_lib
elif hasattr(target, "default_build"): # Legacy
default_lib = target.default_build
if default_lib == "small":
self.flags["common"].append("-DMBED_RTOS_SINGLE_THREAD")
self.flags["ld"].append("--specs=nano.specs")
if target.core == "Cortex-M0+":
cpu = "cortex-m0plus"
elif target.core == "Cortex-M4F":