diff --git a/Makefile.template b/Makefile.template index b26aee38018..5608f3e9ce9 100644 --- a/Makefile.template +++ b/Makefile.template @@ -4,7 +4,7 @@ BUILD_TYPE?=Debug CROSS_BUILD?=0 HOST_OS?=linux TARGET_OS?=linux -PARALLEL_BUILD?=1 +PARALLEL_BUILD?=1 # TODO Rename to `ALL_PROCESSOR_BUILD` or remove this COVERAGE_BUILD?=0 BENCHMARK_ACL_BUILD?=0 OPTIONS?= @@ -139,7 +139,7 @@ endif touch $(TIMESTAMP_CONFIGURE) build_internal: $(BUILD_FOLDER) - NNFW_WORKSPACE="$(WORKSPACE)" NPROCS="$(NPROCS)" PARALLEL_BUILD="1" ./nnfw build + NNFW_WORKSPACE="$(WORKSPACE)" NPROCS="$(NPROCS)" PARALLEL_BUILD="$(PARALLEL_BUILD)" ./nnfw build rm -rf $(BUILD_ALIAS) ln -s $(BUILD_FOLDER) $(BUILD_ALIAS) touch $(TIMESTAMP_BUILD) diff --git a/infra/nnfw/cmake/packages/ARMComputeConfig.cmake b/infra/nnfw/cmake/packages/ARMComputeConfig.cmake index 4ee0351c6e9..67f6ef8a2da 100644 --- a/infra/nnfw/cmake/packages/ARMComputeConfig.cmake +++ b/infra/nnfw/cmake/packages/ARMComputeConfig.cmake @@ -136,8 +136,14 @@ function(_ARMCompute_Build ARMCompute_INSTALL_PREFIX) list(APPEND SCONS_OPTIONS "examples=0") list(APPEND SCONS_OPTIONS "Werror=0") list(APPEND SCONS_OPTIONS "os=${TARGET_OS}") - include(ProcessorCount) - ProcessorCount(N) + + if(DEFINED ACL_BUILD_THREADS) + set(N ${ACL_BUILD_THREADS}) + else(DEFINED ACL_BUILD_THREADS) + include(ProcessorCount) + ProcessorCount(N) + endif(DEFINED ACL_BUILD_THREADS) + if((NOT N EQUAL 0) AND BUILD_EXT_MULTITHREAD) list(APPEND SCONS_OPTIONS -j${N}) endif() diff --git a/infra/nnfw/command/build b/infra/nnfw/command/build index 8e59f66f2fe..82b8374e363 100644 --- a/infra/nnfw/command/build +++ b/infra/nnfw/command/build @@ -2,6 +2,8 @@ import "build.configuration" +set -x + if [[ ! -d "${BUILD_PATH}" ]]; then echo "[ERROR] '${BUILD_PATH}' does not exist. Please run 'configure' first" exit 255