RFR: 8339335: set number of parallel jobs when building webkit

Johan Vos jvos at openjdk.org
Tue Sep 3 16:55:23 UTC 2024


On Mon, 2 Sep 2024 07:20:50 GMT, Johan Vos <jvos at openjdk.org> wrote:

> When building webkit, the perl script in `modules/javafx.web/src/main/native/Tools/Scripts/build-webkit` will check for a `-j` argument in `$makeArgs`. If that doesn't exist, it will default to `numberOfCPUs()`.
> This PR passes the `NUM_COMPILE_THREADS` from `build.gradle` to the `build-webkit` script. When not setting `NUM_COMPILE_THREADS` explicitly,it will default to the number of CPU's as well, hence it will have the same behavior as without this PR.
> When setting `NUM_COMPILE_THREADS` explicitly, the provided number will be used by cmake as well now.

I see 4 options:
1. the current approach in this PR. Drawback: huge increase in build time on mac
2. a separate option for the number of parallel jobs for webkit. Drawbacks: not elegant because
* we don't know why there are no issues compiling webkit with parallel jobs while there are issues compiling JavaFX native code with parallel jobs.
* adding another property increases complexity
3. Finding and fixing the cause for the parallel compilation issues on mac (JDK-8089417). Drawback: finding the cause may take a very long time -- if it is even still possible to reproduce
4. Removing the 1-thread restriction for mac. Drawback: unless we do (3), we don't know if this is not going to cause issues.

I'm ok with either approach. I consider option 3 the most elegant one, and option 2 the most pragmatic one (but also the least elegant).

-------------

PR Comment: https://git.openjdk.org/jfx/pull/1554#issuecomment-2327003871


More information about the openjfx-dev mailing list