mirror of https://github.com/ARMmbed/mbed-os.git
Fix toolchain path names in Mbed 2 builds
I accidentally broke only uARM mbed 2 builds. Here is the story: When scanning for resources, toolchains look for any `TOOLCHAIN_<classname>` folders to include. These `<classname>`s mostly match the name passed in on the command line with one exception: `uARM` on the command line maps to `ARM_MICRO` the class. This would not be a problem except for the bug that I introduced in a prior commit. The bug is that the mbed2 library builds will use the name passed in on the command line to construct `TOOLCHAIN_<cli-name>`. This will not match when scanning. I fixed it by translating the `<cli-name>` into the `<classname>`.pull/3864/head
parent
51b58b1ad4
commit
a937ee00f2
|
@ -732,7 +732,8 @@ def build_library(src_paths, build_path, target, toolchain_name,
|
|||
######################
|
||||
|
||||
def mbed2_obj_path(target_name, toolchain_name):
|
||||
return join("TARGET_" + target_name, "TOOLCHAIN_" + toolchain_name)
|
||||
real_tc_name = TOOLCHAIN_CLASSES[toolchain_name].__name__
|
||||
return join("TARGET_" + target_name, "TOOLCHAIN_" + real_tc_name)
|
||||
|
||||
def build_lib(lib_id, target, toolchain_name, verbose=False,
|
||||
clean=False, macros=None, notify=None, jobs=1, silent=False,
|
||||
|
@ -955,7 +956,7 @@ def build_mbed_libs(target, toolchain_name, verbose=False,
|
|||
try:
|
||||
# Source and Build Paths
|
||||
build_target = join(MBED_LIBRARIES, "TARGET_" + target.name)
|
||||
build_toolchain = join(build_target, "TOOLCHAIN_" + toolchain_name)
|
||||
build_toolchain = join(MBED_LIBRARIES, mbed2_obj_path(target.name, toolchain_name))
|
||||
mkdir(build_toolchain)
|
||||
|
||||
# Toolchain
|
||||
|
|
Loading…
Reference in New Issue