Enable sccache for Android builds

RESOLVED FIXED in mozilla30

Status

defect
RESOLVED FIXED
5 years ago
Last year

People

(Reporter: mshal, Assigned: mshal)

Tracking

unspecified
mozilla30
All
Android
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(2 attachments, 1 obsolete attachment)

Assignee

Description

5 years ago
Now that we have bug 940788, we should also enable sccache for Android builds.
Assignee

Comment 1

5 years ago
Posted file setup.sh
Setup script for tooltool. This merges the sccache changes into the Android setup.sh
Attachment #8377959 - Flags: review?(rail)
Comment on attachment 8377959 [details]
setup.sh

LGTM. This will work only for Try until bug 966301 is fixed, JFYI.
Attachment #8377959 - Flags: review?(rail) → review+
Assignee

Comment 3

5 years ago
Comment on attachment 8377959 [details]
setup.sh

Uploaded:
size: 292
sha512: 974584133bcee7648bfca4bf95145239926ece2ab788a9b9850d3ad77c390af6efcf4d888c5f9654201262d9c8b8ecf16022ada0182854dc8a89ecf14649193e
Attachment #8377959 - Flags: checkin+
Assignee

Comment 4

5 years ago
Posted patch 0001-Android-sccache.patch (obsolete) — Splinter Review
try results: https://tbpl.mozilla.org/?tree=Try&rev=d77388d2eee2
Attachment #8378494 - Flags: review?(mh+mozilla)
Comment on attachment 8378494 [details] [diff] [review]
0001-Android-sccache.patch

Review of attachment 8378494 [details] [diff] [review]:
-----------------------------------------------------------------

::: build/mozconfig.cache
@@ +21,5 @@
>  else
>      mk_add_options "export SCCACHE_BUCKET=$bucket"
>      mk_add_options "export SCCACHE_NAMESERVER=169.254.169.253"
> +    mk_add_options "export CC_WRAPPER=python2.7 $topsrcdir/sccache/sccache.py"
> +    mk_add_options "export CXX_WRAPPER=python2.7 $topsrcdir/sccache/sccache.py"

This removes use of sccache for nspr, nss, ffi and, icu. I'd rather not go there.

::: mobile/android/config/mozconfigs/android-noion/nightly
@@ +31,5 @@
>  # Treat warnings as errors in directories with FAIL_ON_WARNINGS.
>  ac_add_options --enable-warnings-as-errors
>  
>  # Use ccache
> +. "$topsrcdir/build/mozconfig.cache"

huh. how did i miss those?
Attachment #8378494 - Flags: review?(mh+mozilla) → review-
Assignee

Comment 6

5 years ago
Per IRC - this uses --with-compiler-wrapper and modifies _SUBDIR_C* and _ac_cv_prog_C* to pass the wrapper to sub-configures.

try: https://tbpl.mozilla.org/?tree=Try&rev=c1f22fbe36c1
Attachment #8378494 - Attachment is obsolete: true
Attachment #8379874 - Flags: review?(mh+mozilla)
Comment on attachment 8379874 [details] [diff] [review]
0001-Bug-974205-Enable-sccache-for-Android-builds.patch

Review of attachment 8379874 [details] [diff] [review]:
-----------------------------------------------------------------

I'll land this for you and will split the tooltool manifest changes out.
Attachment #8379874 - Flags: review?(mh+mozilla) → review+
Comment on attachment 8379874 [details] [diff] [review]
0001-Bug-974205-Enable-sccache-for-Android-builds.patch

Review of attachment 8379874 [details] [diff] [review]:
-----------------------------------------------------------------

Actually there is something fishy. nspr still doesn't inherit it, and somehow the first compiler test in both main and js/src configure still don't show the wrapper, despite it appearing in autoconf.mk...
Attachment #8379874 - Flags: review+ → review-
(In reply to Mike Hommey [:glandium] from comment #8)
> Comment on attachment 8379874 [details] [diff] [review]
> 0001-Bug-974205-Enable-sccache-for-Android-builds.patch
> 
> Review of attachment 8379874 [details] [diff] [review]:
> -----------------------------------------------------------------
> 
> Actually there is something fishy. nspr still doesn't inherit it, and
> somehow the first compiler test in both main and js/src configure still
> don't show the wrapper, despite it appearing in autoconf.mk...

... because i wasn't looking at the right tree... sigh. But there still is a problem, though. CC and CXX end up having a double wrapping in js.
Blocks: 988774
Depends on: 1007931

Updated

Last year
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.