Skip to content

Commit

Permalink
8339335: set number of parallel jobs when building webkit
Browse files Browse the repository at this point in the history
8339505: Enable parallel compilation of native code on macOS

Reviewed-by: angorya, kcr
  • Loading branch information
Johan Vos committed Sep 4, 2024
1 parent 6115b39 commit 4647367
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -618,13 +618,8 @@ ext.DO_JCOV = Boolean.parseBoolean(JCOV)
defineProperty("USE_CYGWIN", "true")
ext.IS_USE_CYGWIN = Boolean.parseBoolean(USE_CYGWIN)

// Define the number of threads to use when compiling (specifically for native compilation)
// On Mac we limit it to 1 by default due to problems running gcc in parallel
if (IS_MAC) {
defineProperty("NUM_COMPILE_THREADS", "1")
} else {
defineProperty("NUM_COMPILE_THREADS", "${Runtime.runtime.availableProcessors()}")
}
// Define the number of threads to use when compiling (specifically for native compilation, including webkit)
defineProperty("NUM_COMPILE_THREADS", "${Runtime.runtime.availableProcessors()}")

//
// The next three sections of properties are used to generate the
Expand Down Expand Up @@ -3724,6 +3719,7 @@ project(":web") {
exec {
workingDir("$webkitOutputDir")
def cmakeArgs = "-DENABLE_TOOLS=1"
def makeArgs = "-j $NUM_COMPILE_THREADS"
if (IS_STATIC_BUILD) {
cmakeArgs = " $cmakeArgs -DSTATIC_BUILD=1 -DUSE_THIN_ARCHIVES=OFF";
}
Expand Down Expand Up @@ -3794,6 +3790,7 @@ project(":web") {
cmakeArgs += " -DJAVAFX_RELEASE_VERSION=${jfxReleaseMajorVersion}"
commandLine("perl", "$projectDir/src/main/native/Tools/Scripts/build-webkit",
"--java", "--icu-unicode", targetCpuBitDepthSwitch,
"--makeArgs=${makeArgs}",
"--no-experimental-features", "--cmakeargs=${cmakeArgs}")
}
}
Expand Down

0 comments on commit 4647367

Please sign in to comment.