8389209: Add sccache support to the build - #32059
Open
raneashay wants to merge 1 commit into
Open
Conversation
This patch enables the `--enable-sccache` flag to enable build caching
using sccache. Specifically, if the toolchain is one among gcc, clang,
or MSVC and if the sccache version is 0.10 and above, then the build
prefixes all compiler invocations with the path to the sccache binary.
Since sccache is incompatible with ccache and precompiled headers, this
patch makes the build fail if either ccache or precompiled headers are
enabled in addition to sccache at the same time.
Validated this patch on {Linux, Windows, macOS} x {x64, aarch64}
machines. In the best-case scenario (i.e. when there are no changes to
the source files), the time required to run the "make images" step is
roughly cut in half. Side note: the individual machines have very
different configurations, so build times _across_ machines aren't
comparable.
- Windows/x64: 2,107s -> 848s
- Windows/ARM64: 1,264s -> 748s
- macOS/x64: 808s -> 243s
- macOS/AArch64: 480s -> 142s
- Linux/x64: 225s -> 111s
- Linux/AArch64: 364s -> 246s
|
👋 Welcome back arane! A progress list of the required criteria for merging this PR into |
|
❗ This change is not yet ready to be integrated. |
|
@raneashay The following label will be automatically applied to this pull request:
When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing list. If you would like to change these labels, use the /label pull request command. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This patch enables the
--enable-sccacheflag to enable build cachingusing sccache. Specifically, if the toolchain is one among gcc, clang,
or MSVC and if the sccache version is 0.10 and above, then the build
prefixes all compiler invocations with the path to the sccache binary.
Since sccache is incompatible with ccache and precompiled headers, this
patch makes the build fail if either ccache or precompiled headers are
enabled in addition to sccache at the same time.
Validated this patch on {Linux, Windows, macOS} x {x64, aarch64}
machines. In the best-case scenario (i.e. when there are no changes to
the source files), the time required to run the "make images" step is
roughly cut in half. Side note: the individual machines have very
different configurations, so build times across machines aren't
comparable.
Progress
Issue
Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/32059/head:pull/32059$ git checkout pull/32059Update a local copy of the PR:
$ git checkout pull/32059$ git pull https://git.openjdk.org/jdk.git pull/32059/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 32059View PR using the GUI difftool:
$ git pr show -t 32059Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/32059.diff
Using Webrev
Link to Webrev Comment