From 6df903f8a6fe7299d1ca99a3b1059fdfcedc14bc Mon Sep 17 00:00:00 2001 From: Brian Daniels Date: Mon, 1 Aug 2016 18:16:48 -0500 Subject: [PATCH] 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. --- tools/build_api.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tools/build_api.py b/tools/build_api.py index b3b89388f7..228341bdc1 100644 --- a/tools/build_api.py +++ b/tools/build_api.py @@ -411,6 +411,12 @@ def build_library(src_paths, build_path, target, toolchain_name, else: tmp_path = build_path + # Clean the build directory + if clean: + if exists(tmp_path): + rmtree(tmp_path) + mkdir(tmp_path) + # Pass all params to the unified prepare_toolchain() toolchain = prepare_toolchain(src_paths, target, toolchain_name, macros=macros, options=options, clean=clean, jobs=jobs,