mirror of https://github.com/ARMmbed/mbed-os.git
Merge pull request #2417 from ARMmbed/config_for_build_mbed_libs
build_mbed_libs is now aware of the configurationpull/2423/head
commit
002865f3d0
|
@ -28,7 +28,7 @@ from time import time
|
||||||
import fnmatch
|
import fnmatch
|
||||||
|
|
||||||
from tools.utils import mkdir, run_cmd, run_cmd_ext, NotSupportedException, ToolException, InvalidReleaseTargetException
|
from tools.utils import mkdir, run_cmd, run_cmd_ext, NotSupportedException, ToolException, InvalidReleaseTargetException
|
||||||
from tools.paths import MBED_TARGETS_PATH, MBED_LIBRARIES, MBED_API, MBED_HAL, MBED_COMMON
|
from tools.paths import MBED_TARGETS_PATH, MBED_LIBRARIES, MBED_API, MBED_HAL, MBED_COMMON, MBED_CONFIG_FILE
|
||||||
from tools.targets import TARGET_NAMES, TARGET_MAP
|
from tools.targets import TARGET_NAMES, TARGET_MAP
|
||||||
from tools.libraries import Library
|
from tools.libraries import Library
|
||||||
from tools.toolchains import TOOLCHAIN_CLASSES
|
from tools.toolchains import TOOLCHAIN_CLASSES
|
||||||
|
@ -674,6 +674,12 @@ def build_mbed_libs(target, toolchain_name, options=None, verbose=False, clean=F
|
||||||
toolchain.jobs = jobs
|
toolchain.jobs = jobs
|
||||||
toolchain.build_all = clean
|
toolchain.build_all = clean
|
||||||
|
|
||||||
|
# Take into account the library configuration (MBED_CONFIG_FILE)
|
||||||
|
config = Config(target)
|
||||||
|
toolchain.config = config
|
||||||
|
config.add_config_files([MBED_CONFIG_FILE])
|
||||||
|
toolchain.set_config_data(toolchain.config.get_config_data())
|
||||||
|
|
||||||
# Source and Build Paths
|
# Source and Build Paths
|
||||||
BUILD_TARGET = join(MBED_LIBRARIES, "TARGET_" + target.name)
|
BUILD_TARGET = join(MBED_LIBRARIES, "TARGET_" + target.name)
|
||||||
BUILD_TOOLCHAIN = join(BUILD_TARGET, "TOOLCHAIN_" + toolchain.name)
|
BUILD_TOOLCHAIN = join(BUILD_TARGET, "TOOLCHAIN_" + toolchain.name)
|
||||||
|
|
|
@ -40,6 +40,8 @@ MBED_TARGETS_PATH = join(MBED_BASE, "targets")
|
||||||
|
|
||||||
MBED_LIBRARIES = join(BUILD_DIR, "mbed")
|
MBED_LIBRARIES = join(BUILD_DIR, "mbed")
|
||||||
|
|
||||||
|
MBED_CONFIG_FILE = join(ROOT, "mbed_lib.json")
|
||||||
|
|
||||||
# Tests
|
# Tests
|
||||||
TEST_DIR = join(LIB_DIR, "tests")
|
TEST_DIR = join(LIB_DIR, "tests")
|
||||||
HOST_TESTS = join(ROOT, "tools", "host_tests")
|
HOST_TESTS = join(ROOT, "tools", "host_tests")
|
||||||
|
|
Loading…
Reference in New Issue