diff --git a/posix.mak b/posix.mak index d8deb9a8eb..1491587988 100644 --- a/posix.mak +++ b/posix.mak @@ -76,3 +76,8 @@ style: $(QUIET)$(MAKE) -C src -f posix.mak style .DELETE_ON_ERROR: # GNU Make directive (delete output files on error) + +# Dont run targets in parallel because this makefile is just a thin wrapper +# for build.d and multiple invocations might stomp on each other. +# (build.d employs it's own parallelization) +.NOTPARALLEL: diff --git a/src/posix.mak b/src/posix.mak index f51c8145a2..96495b8354 100644 --- a/src/posix.mak +++ b/src/posix.mak @@ -92,8 +92,7 @@ ifeq (,$(HOST_DMD_PATH)) endif HOST_DMD_RUN:=$(HOST_DMD) -RUN_BUILD = $(GENERATED)/build HOST_DMD="$(HOST_DMD)" CXX="$(HOST_CXX)" OS=$(OS) BUILD=$(BUILD) MODEL=$(MODEL) AUTO_BOOTSTRAP="$(AUTO_BOOTSTRAP)" DOCDIR="$(DOCDIR)" STDDOC="$(STDDOC)" DOC_OUTPUT_DIR="$(DOC_OUTPUT_DIR)" MAKE="$(MAKE)" --called-from-make - +RUN_BUILD = $(GENERATED)/build HOST_DMD="$(HOST_DMD)" CXX="$(HOST_CXX)" OS=$(OS) BUILD=$(BUILD) MODEL=$(MODEL) AUTO_BOOTSTRAP="$(AUTO_BOOTSTRAP)" DOCDIR="$(DOCDIR)" STDDOC="$(STDDOC)" DOC_OUTPUT_DIR="$(DOC_OUTPUT_DIR)" MAKE="$(MAKE)" ######## Begin build targets all: dmd @@ -200,4 +199,9 @@ endif .DELETE_ON_ERROR: # GNU Make directive (delete output files on error) +# Dont run targets in parallel because this makefile is just a thin wrapper +# for build.d and multiple invocations might stomp on each other. +# (build.d employs it's own parallelization) +.NOTPARALLEL: + endif