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

Kevin Rushforth kcr at openjdk.org
Tue Sep 3 17:13: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.

As you say, option 3 is the cleanest, however I believe it will very quickly morph into option 4. I am reasonably certain that [JDK-8089417](https://bugs.openjdk.org/browse/JDK-8089417) can be closed as "Cannot reproduce" because:

* The font T2K code that was hitting the failure is no longer part of our repo; T2K was a closed-source font rasterizer that we removed in JDK 10 via [JDK-8187147](https://bugs.openjdk.org/browse/JDK-8187147).
* Xcode switched from gcc to clang by default several years ago
 
I will locally remove the workaround, and then run the following in a loop a few hundred times to check whether we see any issues:


$ gradle cleanNative sdk


I did it a few times on my MacBook M1 and the only impact I see of removing the workaround is that a rebuild of the SDK without media or WebKit (so just rebuilding the graphics / glass native code) goes from 27 seconds to 12 seconds. :)

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

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


More information about the openjfx-dev mailing list