Name | Date | Size | #Lines | LOC | ||
---|---|---|---|---|---|---|
.. | - | - | ||||
testdata/ | 03-May-2024 | - | 17,549 | 17,491 | ||
README.md | D | 03-May-2024 | 2.7 KiB | 84 | 62 | |
android_config_test.go | D | 03-May-2024 | 3.2 KiB | 133 | 121 | |
android_llvm_next_flags.go | D | 01-Jan-1970 | 0 | |||
bisect_flag.go | D | 03-May-2024 | 1.8 KiB | 78 | 64 | |
bisect_flag_test.go | D | 03-May-2024 | 5.7 KiB | 185 | 164 | |
build.py | D | 03-May-2024 | 3 KiB | 103 | 72 | |
bundle.README | D | 03-May-2024 | 605 | 19 | 13 | |
bundle.py | D | 03-May-2024 | 2 KiB | 69 | 45 | |
ccache_flag.go | D | 03-May-2024 | 1.7 KiB | 49 | 25 | |
ccache_flag_test.go | D | 03-May-2024 | 4.5 KiB | 163 | 141 | |
clang_flags.go | D | 03-May-2024 | 6.8 KiB | 209 | 139 | |
clang_flags_test.go | D | 03-May-2024 | 9.1 KiB | 303 | 275 | |
clang_syntax_flag.go | D | 03-May-2024 | 1.1 KiB | 38 | 29 | |
clang_syntax_flag_test.go | D | 03-May-2024 | 5.3 KiB | 181 | 163 | |
clang_tidy_flag.go | D | 03-May-2024 | 6.9 KiB | 244 | 196 | |
clang_tidy_flag_test.go | D | 03-May-2024 | 12.3 KiB | 452 | 413 | |
command.go | D | 03-May-2024 | 6.4 KiB | 261 | 222 | |
command_test.go | D | 03-May-2024 | 1.2 KiB | 40 | 33 | |
compile_with_fallback.go | D | 03-May-2024 | 3.7 KiB | 110 | 88 | |
compile_with_fallback_test.go | D | 03-May-2024 | 8.7 KiB | 302 | 275 | |
compiler_wrapper.go | D | 03-May-2024 | 9 KiB | 298 | 259 | |
compiler_wrapper_test.go | D | 03-May-2024 | 5.7 KiB | 201 | 177 | |
config.go | D | 03-May-2024 | 7.3 KiB | 242 | 177 | |
config_test.go | D | 03-May-2024 | 3 KiB | 147 | 93 | |
cros_hardened_config_test.go | D | 03-May-2024 | 14.9 KiB | 552 | 519 | |
cros_host_config_test.go | D | 03-May-2024 | 2.4 KiB | 95 | 76 | |
cros_llvm_next_flags.go | D | 03-May-2024 | 750 | 19 | 3 | |
cros_nonhardened_config_test.go | D | 03-May-2024 | 639 | 26 | 17 | |
disable_werror_flag.go | D | 03-May-2024 | 8.9 KiB | 280 | 208 | |
disable_werror_flag_test.go | D | 03-May-2024 | 15.8 KiB | 568 | 515 | |
env.go | D | 03-May-2024 | 3.8 KiB | 153 | 114 | |
env_test.go | D | 03-May-2024 | 7.2 KiB | 290 | 246 | |
errors.go | D | 03-May-2024 | 2.2 KiB | 87 | 69 | |
errors_test.go | D | 03-May-2024 | 2 KiB | 73 | 60 | |
gcc_flags.go | D | 03-May-2024 | 912 | 34 | 23 | |
gcc_flags_test.go | D | 03-May-2024 | 1.7 KiB | 66 | 55 | |
go_exec.go | D | 03-May-2024 | 621 | 24 | 11 | |
goldenutil_test.go | D | 03-May-2024 | 5.9 KiB | 201 | 175 | |
gomacc_flag.go | D | 03-May-2024 | 924 | 42 | 35 | |
gomacc_flag_test.go | D | 03-May-2024 | 2.8 KiB | 95 | 79 | |
install_compiler_wrapper.sh | D | 03-May-2024 | 1.8 KiB | 41 | 29 | |
libc_exec.go | D | 03-May-2024 | 2.5 KiB | 89 | 35 | |
main.go | D | 03-May-2024 | 1.3 KiB | 43 | 16 | |
pie_flags.go | D | 03-May-2024 | 1.3 KiB | 44 | 35 | |
pie_flags_test.go | D | 03-May-2024 | 2.2 KiB | 85 | 73 | |
print_cmdline_flag.go | D | 03-May-2024 | 469 | 20 | 14 | |
print_cmdline_flag_test.go | D | 03-May-2024 | 2.6 KiB | 86 | 72 | |
print_config_flag.go | D | 03-May-2024 | 523 | 22 | 15 | |
print_config_flag_test.go | D | 03-May-2024 | 832 | 29 | 21 | |
rusage_flag.go | D | 03-May-2024 | 3.4 KiB | 105 | 83 | |
rusage_flag_test.go | D | 03-May-2024 | 5.7 KiB | 171 | 144 | |
sanitizer_flags.go | D | 03-May-2024 | 1.8 KiB | 59 | 44 | |
sanitizer_flags_test.go | D | 03-May-2024 | 5 KiB | 153 | 129 | |
stackprotector_flags.go | D | 03-May-2024 | 774 | 30 | 23 | |
stackprotector_flags_test.go | D | 03-May-2024 | 1.7 KiB | 58 | 47 | |
sysroot_flag.go | D | 03-May-2024 | 750 | 32 | 24 | |
sysroot_flag_test.go | D | 03-May-2024 | 2.4 KiB | 84 | 71 | |
testutil_test.go | D | 03-May-2024 | 7.7 KiB | 299 | 256 | |
thumb_flags.go | D | 03-May-2024 | 897 | 28 | 16 | |
thumb_flags_test.go | D | 03-May-2024 | 3.1 KiB | 114 | 93 | |
unsupported_flags.go | D | 03-May-2024 | 388 | 15 | 9 | |
unsupported_flags_test.go | D | 03-May-2024 | 549 | 21 | 14 | |
x64_flags.go | D | 03-May-2024 | 522 | 22 | 13 | |
x64_flags_test.go | D | 03-May-2024 | 1 KiB | 40 | 31 |
README.md
1# Compiler wrapper 2 3See the comments on the top of main.go. 4Build is split into 2 steps via separate commands: 5- bundle: copies the sources and the `build.py` file into 6 a folder. 7- build: builds the actual go binary, assuming it is executed 8 from the folder created by `bundle.py`. 9 10This allows to copy the sources to a Chrome OS / Android 11package, including the build script, and then 12build from there without a dependency on toolchain-utils 13itself. 14 15## Testing Inside the Chroot 16 17To test updates to the wrapper locally: 18 19Run `install_compiler_wrapper.sh` to install the new wrapper in the chroot: 20``` 21(chroot) ~/trunk/src/third_party/toolchain-utils/compiler_wrapper/install_compiler_wrapper.sh 22``` 23 24Then perform the tests, e.g. build with the new compiler. 25 26 27## Updating the Wrapper for Chrome OS 28 29To update the wrapper for everyone, the new wrapper configuration must be copied 30into chromiumos-overlay, and new revisions of the gcc and llvm ebuilds must be 31created. 32 33Copy over sources and `build.py` to chromiumos-overlay: 34``` 35(chroot) /mnt/host/source/src/third_party/chromiumos-overlay/sys-devel/llvm/files/update_compiler_wrapper.sh 36``` 37 38Rename chromiumos-overlay/sys-devel/llvm/llvm-${VERSION}.ebuild to the next 39revision number. For example, if the current version is 4011.0_pre394483_p20200618-r2: 41``` 42(chroot) cd ~/trunk/src/third_party/chromiumos-overlay 43(chroot) git mv llvm-11.0_pre394483_p20200618-r2.ebuild llvm-11.0_pre394483_p20200618-r3.ebuild 44``` 45 46Rename chromiumos-overlay/sys-devel/gcc/gcc-${VERSION}.ebuild to the next 47revision number. For example, if the current version is 4.9.2-r254: 48``` 49(chroot) cd ~/trunk/src/third_party/chromiumos-overlay 50(chroot) git mv sys-devel/gcc/gcc-4.9.2-r254.ebuild sys-devel/gcc/gcc-4.9.2-r255.ebuild 51``` 52 53Edit the new ebuild file and change the number at the end to match the new revision: 54``` 55-# If you need to force a cros_workon uprev, change this number (you can use next 56-# uprev): 254 57+# If you need to force a cros_workon uprev, change this number (you can use next 58+# uprev): 255 59``` 60 61Commit those changes together with the changes made by 62`update_compiler_wrapper.sh`. 63 64The changes can then be reviewed and submitted through the normal process. 65 66 67## Paths 68 69`build.py` is called by these ebuilds: 70 71- third_party/chromiumos-overlay/sys-devel/llvm/llvm-*.ebuild 72- third_party/chromiumos-overlay/sys-devel/gcc/gcc-*.ebuild 73 74Generated wrappers are stored here: 75 76- Sysroot wrapper with ccache: 77 `/usr/x86_64-pc-linux-gnu/<arch>/gcc-bin/4.9.x/sysroot_wrapper.hardened.ccache` 78- Sysroot wrapper without ccache: 79 `/usr/x86_64-pc-linux-gnu/<arch>/gcc-bin/4.9.x/sysroot_wrapper.hardened.noccache` 80- Clang host wrapper: 81 `/usr/bin/clang_host_wrapper` 82- Gcc host wrapper: 83 `/usr/x86_64-pc-linux-gnu/gcc-bin/4.9.x/host_wrapper` 84
bundle.README
1Copyright 2019 The Chromium OS Authors. All rights reserved. 2Use of this source code is governed by a BSD-style license that can be 3found in the LICENSE file. 4 5Toolchain utils compiler wrapper sources. 6 7Build the wrapper: 8./build --config=<config name> --use_ccache=<bool> \ 9 --use_llvm_next=<bool> --output_file=<file> 10 11ATTENTION: 12The files in this folder are generated. Do not modify manually! 13 14To update: 15- modify third_party/toolchain_utils/compiler_wrapper 16- run third_party/toolchain_utils/compiler_wrapper/bundle.py --output_dir=... 17 18Source: https://chromium-review.googlesource.com/q/{change_id} 19