From 278e471074167602d65e3882168541fe93c88b37 Mon Sep 17 00:00:00 2001 From: EllipticEllipsis <73679967+EllipticEllipsis@users.noreply.github.com> Date: Mon, 3 May 2021 18:37:54 +0100 Subject: [PATCH] Delete `-j` from `make setup` and document use of `-jN` and `-j` in readme (#804) * Add nproc to make setup * Add cross-platform nproc equivalents * Scrap that, just ditch -j in makefile altogether * Clarified thread advice --- Makefile | 2 +- README.md | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index e0b058df00..f90e5e6a52 100644 --- a/Makefile +++ b/Makefile @@ -203,7 +203,7 @@ distclean: clean $(MAKE) -C tools distclean setup: - $(MAKE) -C tools -j + $(MAKE) -C tools python3 fixbaserom.py python3 extract_baserom.py python3 extract_assets.py diff --git a/README.md b/README.md index 585597c1a1..137661716a 100644 --- a/README.md +++ b/README.md @@ -151,6 +151,13 @@ md5sum: WARNING: 1 computed checksum did NOT match This means that the built ROM isn't the same as the base one, so something went wrong or some part of the code doesn't match. +**NOTE:** to speed up the build, you can either: +* pass `-jN` to `make setup` and `make`, where N is the number of threads to use in the build. The generally-accepted wisdom is to use the number of virtual cores your computer has. +* pass `-j` to `make setup` and `make`, to use as many threads as possible, but beware that this can use too much memory on lower-end systems. + +Both of these have the disadvantage that the ordering of the terminal output is scrambled, so for debugging it is best to stick to one thread (i.e. not pass `-j` or `-jN`). + + ### Cygwin If you want to use Cygwin, you will need to: