Skip to content

Commit 002865f

Browse files
authored
Merge pull request #2417 from ARMmbed/config_for_build_mbed_libs
build_mbed_libs is now aware of the configuration
2 parents fca16f8 + 4f6eaaa commit 002865f

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

tools/build_api.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
import fnmatch
2929

3030
from tools.utils import mkdir, run_cmd, run_cmd_ext, NotSupportedException, ToolException, InvalidReleaseTargetException
31-
from tools.paths import MBED_TARGETS_PATH, MBED_LIBRARIES, MBED_API, MBED_HAL, MBED_COMMON
31+
from tools.paths import MBED_TARGETS_PATH, MBED_LIBRARIES, MBED_API, MBED_HAL, MBED_COMMON, MBED_CONFIG_FILE
3232
from tools.targets import TARGET_NAMES, TARGET_MAP
3333
from tools.libraries import Library
3434
from tools.toolchains import TOOLCHAIN_CLASSES
@@ -674,6 +674,12 @@ def build_mbed_libs(target, toolchain_name, options=None, verbose=False, clean=F
674674
toolchain.jobs = jobs
675675
toolchain.build_all = clean
676676

677+
# Take into account the library configuration (MBED_CONFIG_FILE)
678+
config = Config(target)
679+
toolchain.config = config
680+
config.add_config_files([MBED_CONFIG_FILE])
681+
toolchain.set_config_data(toolchain.config.get_config_data())
682+
677683
# Source and Build Paths
678684
BUILD_TARGET = join(MBED_LIBRARIES, "TARGET_" + target.name)
679685
BUILD_TOOLCHAIN = join(BUILD_TARGET, "TOOLCHAIN_" + toolchain.name)

tools/paths.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@
4040

4141
MBED_LIBRARIES = join(BUILD_DIR, "mbed")
4242

43+
MBED_CONFIG_FILE = join(ROOT, "mbed_lib.json")
44+
4345
# Tests
4446
TEST_DIR = join(LIB_DIR, "tests")
4547
HOST_TESTS = join(ROOT, "tools", "host_tests")

0 commit comments

Comments
 (0)