-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
73 additions
and
2 deletions.
There are no files selected for viewing
2 changes: 1 addition & 1 deletion
2
patches/personal/platform_build/0001-Remove-su-from-vanilla-builds.patch
This file contains 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
2 changes: 1 addition & 1 deletion
2
patches/personal/platform_build/0002-Build-with-release-keys.patch
This file contains 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
40 changes: 40 additions & 0 deletions
40
...s/personal/platform_build/0003-Automatically-set-CCACHE_EXEC-to-the-system-s-ccache.patch
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
From 57cb5ea561e40950f346c2f3e26d21ba620f56c3 Mon Sep 17 00:00:00 2001 | ||
From: ganeshi4u <ganeshvarmai4u@gmail.com> | ||
Date: Fri, 6 Sep 2019 18:31:15 +0200 | ||
Subject: [PATCH 3/3] Automatically set CCACHE_EXEC to the system's ccache | ||
|
||
* Check for ccache tool and set its path in CCACHE_EXEC if it hasn't been set already | ||
|
||
* Enable ccache and compression by default | ||
|
||
Change-Id: Ife9d0a723cb90b89392ee288ebe6e7e9f2be7eef | ||
--- | ||
envsetup.sh | 15 +++++++++++++++ | ||
1 file changed, 15 insertions(+) | ||
|
||
diff --git a/envsetup.sh b/envsetup.sh | ||
index 905635c890..d7b785a042 100644 | ||
--- a/envsetup.sh | ||
+++ b/envsetup.sh | ||
@@ -2085,3 +2085,18 @@ set_global_paths | ||
source_vendorsetup | ||
addcompletions | ||
|
||
+# check and set ccache path on envsetup | ||
+if [ -z ${CCACHE_EXEC} ]; then | ||
+ ccache_path=$(which ccache) | ||
+ if [ ! -z "$ccache_path" ]; then | ||
+ export USE_CCACHE=1 | ||
+ export CCACHE_EXEC="$ccache_path" | ||
+ if [ -z ${CCACHE_DIR} ]; then | ||
+ export CCACHE_DIR=${HOME}/.ccache | ||
+ fi | ||
+ $ccache_path -o compression=true | ||
+ echo -e "ccache enabled and CCACHE_EXEC has been set to : $ccache_path" | ||
+ else | ||
+ echo -e "ccache not found installed!" | ||
+ fi | ||
+fi | ||
-- | ||
2.34.1 | ||
|
31 changes: 31 additions & 0 deletions
31
.../personal/platform_build_soong/0001-sandbox_linux-set-CCACHE_DIR-as-a-writable-path.patch
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
From a965fe2c8adea0b20b210816aaadbfd58f405d37 Mon Sep 17 00:00:00 2001 | ||
From: daniml3 <danimoral1001@gmail.com> | ||
Date: Mon, 11 Oct 2021 14:12:34 +0200 | ||
Subject: [PATCH] sandbox_linux: set CCACHE_DIR as a writable path | ||
|
||
fixes Read-only dir issue when using ccache | ||
|
||
Signed-off-by: daniml3 <danimoral1001@gmail.com> | ||
Change-Id: I99afe644c8ee0e0b881c1643fef0cb31b83bcd17 | ||
--- | ||
ui/build/sandbox_linux.go | 4 ++++ | ||
1 file changed, 4 insertions(+) | ||
|
||
diff --git a/ui/build/sandbox_linux.go b/ui/build/sandbox_linux.go | ||
index edb3b66d4..386dc552e 100644 | ||
--- a/ui/build/sandbox_linux.go | ||
+++ b/ui/build/sandbox_linux.go | ||
@@ -228,6 +228,10 @@ func (c *Cmd) wrapSandbox() { | ||
sandboxArgs = append(sandboxArgs, "-N") | ||
} | ||
|
||
+ if ccacheDir := os.Getenv("CCACHE_DIR"); ccacheDir != "" { | ||
+ sandboxArgs = append(sandboxArgs, "-B", ccacheDir) | ||
+ } | ||
+ | ||
// Stop nsjail from parsing arguments | ||
sandboxArgs = append(sandboxArgs, "--") | ||
|
||
-- | ||
2.34.1 | ||
|