Skip to content

Commit 6df903f

Browse files
committed
Adding clean support back to build_library
At some point, the actual code that did the "clean" for build_library was removed. This also affected building and cleaning tests. This adds this capability back to the build API.
1 parent 4b50628 commit 6df903f

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

tools/build_api.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -411,6 +411,12 @@ def build_library(src_paths, build_path, target, toolchain_name,
411411
else:
412412
tmp_path = build_path
413413

414+
# Clean the build directory
415+
if clean:
416+
if exists(tmp_path):
417+
rmtree(tmp_path)
418+
mkdir(tmp_path)
419+
414420
# Pass all params to the unified prepare_toolchain()
415421
toolchain = prepare_toolchain(src_paths, target, toolchain_name,
416422
macros=macros, options=options, clean=clean, jobs=jobs,

0 commit comments

Comments
 (0)