From 0ef48c1bf8ef4be5dde0953cf10a8d1974a32e1d Mon Sep 17 00:00:00 2001 From: chakrabot Date: Thu, 3 Aug 2017 03:02:25 -0700 Subject: [PATCH] [Merge Microsoft/Chakracore@ff22ab8fa5] [MERGE #3456 @obastemur] xplat: fix multi-thread builds for node-chakracore Merge pull request #3456 from obastemur:faster_make Previously node-chakracore build process was failing if -j was used for multi-threaded builds. As a result, build was slow or failing. --- deps/chakrashim/core/build.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/deps/chakrashim/core/build.sh b/deps/chakrashim/core/build.sh index 63426bbea7c..472825b3cbe 100644 --- a/deps/chakrashim/core/build.sh +++ b/deps/chakrashim/core/build.sh @@ -604,7 +604,13 @@ cmake $CMAKE_GEN $CC_PREFIX $ICU_PATH $LTO $STATIC_LIBRARY $ARCH $TARGET_OS \ _RET=$? if [[ $? == 0 ]]; then if [[ $MAKE != 0 ]]; then - $MAKE $MULTICORE_BUILD $_VERBOSE $WB_TARGET 2>&1 | tee build.log + # $MFLAGS comes from host `make` process. Sub `make` process needs this (recursional make runs) + TEST_MFLAGS="${MFLAGS}*!" + if [[ $TEST_MFLAGS != "*!" ]]; then + # Get -j flag from the host + MULTICORE_BUILD="" + fi + $MAKE $MFLAGS $MULTICORE_BUILD $_VERBOSE $WB_TARGET 2>&1 | tee build.log _RET=${PIPESTATUS[0]} else echo "Visit given folder above for xcode project file ----^"