Name | Date | Size | #Lines | LOC | ||
---|---|---|---|---|---|---|
.. | - | - | ||||
testdata/ | 03-May-2024 | - | 18,875 | 18,817 | ||
README.md | D | 03-May-2024 | 2.4 KiB | 76 | 55 | |
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.6 KiB | 84 | 60 | |
ccache_flag.go | D | 03-May-2024 | 2 KiB | 56 | 28 | |
ccache_flag_test.go | D | 03-May-2024 | 5.3 KiB | 190 | 164 | |
clang_flags.go | D | 03-May-2024 | 6.2 KiB | 196 | 132 | |
clang_flags_test.go | D | 03-May-2024 | 9.4 KiB | 313 | 283 | |
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 | 7 KiB | 283 | 245 | |
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 | 304 | 276 | |
compiler_wrapper.go | D | 03-May-2024 | 13.4 KiB | 429 | 365 | |
compiler_wrapper_test.go | D | 03-May-2024 | 7.3 KiB | 255 | 225 | |
config.go | D | 03-May-2024 | 8.2 KiB | 268 | 193 | |
config_test.go | D | 03-May-2024 | 2.7 KiB | 135 | 111 | |
cros_hardened_config_test.go | D | 03-May-2024 | 14.7 KiB | 547 | 513 | |
cros_host_config_test.go | D | 03-May-2024 | 2.4 KiB | 95 | 76 | |
cros_llvm_next_flags.go | D | 03-May-2024 | 786 | 20 | 3 | |
cros_nonhardened_config_test.go | D | 03-May-2024 | 670 | 28 | 18 | |
disable_werror_flag.go | D | 03-May-2024 | 9.6 KiB | 304 | 227 | |
disable_werror_flag_test.go | D | 03-May-2024 | 16.6 KiB | 594 | 535 | |
env.go | D | 03-May-2024 | 4.4 KiB | 174 | 131 | |
env_test.go | D | 03-May-2024 | 8.4 KiB | 336 | 285 | |
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 | 721 | 30 | 19 | |
gcc_flags_test.go | D | 03-May-2024 | 1.5 KiB | 62 | 51 | |
go.mod | D | 03-May-2024 | 62 | 4 | 2 | |
go_exec.go | D | 03-May-2024 | 621 | 24 | 11 | |
goldenutil_test.go | D | 03-May-2024 | 5.9 KiB | 201 | 175 | |
install_compiler_wrapper.sh | D | 03-May-2024 | 2.2 KiB | 50 | 34 | |
kernel_bug.go | D | 03-May-2024 | 804 | 26 | 12 | |
kernel_bug_test.go | D | 03-May-2024 | 2.4 KiB | 75 | 64 | |
libc_exec.go | D | 03-May-2024 | 3 KiB | 102 | 35 | |
libgcc_flags.go | D | 03-May-2024 | 663 | 26 | 17 | |
libgcc_flags_test.go | D | 03-May-2024 | 1.5 KiB | 58 | 46 | |
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 | |
remote_build_flag_test.go | D | 03-May-2024 | 8 KiB | 252 | 218 | |
remote_build_flags.go | D | 03-May-2024 | 4.2 KiB | 161 | 117 | |
reset_compiler_wrapper.sh | D | 03-May-2024 | 1.2 KiB | 43 | 21 | |
rusage_flag.go | D | 03-May-2024 | 5.2 KiB | 161 | 121 | |
rusage_flag_test.go | D | 03-May-2024 | 5.3 KiB | 168 | 144 | |
sanitizer_flags.go | D | 03-May-2024 | 1.1 KiB | 42 | 29 | |
sanitizer_flags_test.go | D | 03-May-2024 | 3.4 KiB | 101 | 82 | |
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 | 1 KiB | 45 | 36 | |
sysroot_flag_test.go | D | 03-May-2024 | 2.4 KiB | 84 | 71 | |
testutil_test.go | D | 03-May-2024 | 9.4 KiB | 350 | 290 | |
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 10.2.0-r3: 48``` 49(chroot) cd ~/trunk/src/third_party/chromiumos-overlay 50(chroot) git mv sys-devel/gcc/gcc-10.2.0-r3.ebuild sys-devel/gcc/gcc-10.2.0-r4.ebuild 51``` 52 53Commit those changes together with the changes made by 54`update_compiler_wrapper.sh`. 55 56The changes can then be reviewed and submitted through the normal process. 57 58 59## Paths 60 61`build.py` is called by these ebuilds: 62 63- third_party/chromiumos-overlay/sys-devel/llvm/llvm-*.ebuild 64- third_party/chromiumos-overlay/sys-devel/gcc/gcc-*.ebuild 65 66Generated wrappers are stored here: 67 68- Sysroot wrapper with ccache: 69 `/usr/x86_64-pc-linux-gnu/<arch>/gcc-bin/10.2.0/sysroot_wrapper.hardened.ccache` 70- Sysroot wrapper without ccache: 71 `/usr/x86_64-pc-linux-gnu/<arch>/gcc-bin/10.2.0/sysroot_wrapper.hardened.noccache` 72- Clang host wrapper: 73 `/usr/bin/clang_host_wrapper` 74- Gcc host wrapper: 75 `/usr/x86_64-pc-linux-gnu/gcc-bin/10.2.0/host_wrapper` 76
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