aboutsummaryrefslogtreecommitdiff
path: root/compiler_wrapper/README.md
diff options
context:
space:
mode:
authorAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2021-10-07 16:57:17 +0000
committerAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2021-10-07 16:57:17 +0000
commit2186a2d2b9783318bc8226b3eff1fd114f03a8c4 (patch)
tree73936aba47fe1dc71e9cc05af9747036e935608c /compiler_wrapper/README.md
parentb75f321fc8978b92ce3db6886ccb966768f0c7a8 (diff)
parent4e4201457e5f51a132101c611c79ccff9f713c8b (diff)
downloadtoolchain-utils-2186a2d2b9783318bc8226b3eff1fd114f03a8c4.tar.gz
Snap for 7803083 from 4e4201457e5f51a132101c611c79ccff9f713c8b to mainline-tzdata2-release
Change-Id: Ieb8296d6a0f3cf9fb563235068187caa6778cddd
Diffstat (limited to 'compiler_wrapper/README.md')
-rw-r--r--compiler_wrapper/README.md53
1 files changed, 50 insertions, 3 deletions
diff --git a/compiler_wrapper/README.md b/compiler_wrapper/README.md
index 794e1635..e55bb669 100644
--- a/compiler_wrapper/README.md
+++ b/compiler_wrapper/README.md
@@ -12,16 +12,63 @@ package, including the build script, and then
build from there without a dependency on toolchain-utils
itself.
-## Update Chrome OS
+## Testing Inside the Chroot
-Copy over sources and `build.py` to Chrome OS:
+To test updates to the wrapper locally:
+
+Run `install_compiler_wrapper.sh` to install the new wrapper in the chroot:
+```
+(chroot) ~/trunk/src/third_party/toolchain-utils/compiler_wrapper/install_compiler_wrapper.sh
+```
+
+Then perform the tests, e.g. build with the new compiler.
+
+
+## Updating the Wrapper for Chrome OS
+
+To update the wrapper for everyone, the new wrapper configuration must be copied
+into chromiumos-overlay, and new revisions of the gcc and llvm ebuilds must be
+created.
+
+Copy over sources and `build.py` to chromiumos-overlay:
```
(chroot) /mnt/host/source/src/third_party/chromiumos-overlay/sys-devel/llvm/files/update_compiler_wrapper.sh
```
+Rename chromiumos-overlay/sys-devel/llvm/llvm-${VERSION}.ebuild to the next
+revision number. For example, if the current version is
+11.0_pre394483_p20200618-r2:
+```
+(chroot) cd ~/trunk/src/third_party/chromiumos-overlay
+(chroot) git mv llvm-11.0_pre394483_p20200618-r2.ebuild llvm-11.0_pre394483_p20200618-r3.ebuild
+```
+
+Rename chromiumos-overlay/sys-devel/gcc/gcc-${VERSION}.ebuild to the next
+revision number. For example, if the current version is 4.9.2-r254:
+```
+(chroot) cd ~/trunk/src/third_party/chromiumos-overlay
+(chroot) git mv sys-devel/gcc/gcc-4.9.2-r254.ebuild sys-devel/gcc/gcc-4.9.2-r255.ebuild
+```
+
+Edit the new ebuild file and change the number at the end to match the new revision:
+```
+-# If you need to force a cros_workon uprev, change this number (you can use next
+-# uprev): 254
++# If you need to force a cros_workon uprev, change this number (you can use next
++# uprev): 255
+```
+
+Commit those changes together with the changes made by
+`update_compiler_wrapper.sh`.
+
+The changes can then be reviewed and submitted through the normal process.
+
+
+## Paths
+
`build.py` is called by these ebuilds:
-- third_party/chromiumos-overlay/sys-devel/llvm/llvm-9.0_pre361749_p20190714.ebuild
+- third_party/chromiumos-overlay/sys-devel/llvm/llvm-*.ebuild
- third_party/chromiumos-overlay/sys-devel/gcc/gcc-*.ebuild
Generated wrappers are stored here: