mirror of https://github.com/ARMmbed/mbed-os.git
Merge pull request #2423 from ARMmbed/config_for_build_lib
Add config data to build_lib in build_api.pypull/2430/merge
commit
f6f5c531cb
|
|
@ -574,6 +574,11 @@ def build_lib(lib_id, target, toolchain_name, options=None, verbose=False, clean
|
|||
|
||||
toolchain.info("Building library %s (%s, %s)" % (name.upper(), target.name, toolchain_name))
|
||||
|
||||
# Take into account the library configuration (MBED_CONFIG_FILE)
|
||||
config = Config(target)
|
||||
toolchain.config = config
|
||||
config.add_config_files([MBED_CONFIG_FILE])
|
||||
|
||||
# Scan Resources
|
||||
resources = []
|
||||
for src_path in src_paths:
|
||||
|
|
@ -596,6 +601,11 @@ def build_lib(lib_id, target, toolchain_name, options=None, verbose=False, clean
|
|||
if inc_dirs:
|
||||
dependencies_include_dir.extend(inc_dirs)
|
||||
|
||||
# Add other discovered configuration data to the configuration object
|
||||
for r in resources:
|
||||
config.load_resources(r)
|
||||
toolchain.set_config_data(toolchain.config.get_config_data())
|
||||
|
||||
# Create the desired build directory structure
|
||||
bin_path = join(build_path, toolchain.obj_path)
|
||||
mkdir(bin_path)
|
||||
|
|
|
|||
Loading…
Reference in New Issue