Name Date Size #Lines LOC

..--

testdata/H25-Apr-2025-18,72618,668

README.mdH A D25-Apr-20251.4 KiB4537

android_config_test.goH A D25-Apr-20253.7 KiB150136

android_llvm_next_flags.goH A D01-Jan-19700

bisect_flag.goH A D25-Apr-20251.7 KiB7864

bisect_flag_test.goH A D25-Apr-20255.6 KiB185164

build.pyH A D25-Apr-20254.7 KiB158117

ccache_flag.goH A D25-Apr-20252.2 KiB7040

ccache_flag_test.goH A D25-Apr-20256 KiB217187

clang_flags.goH A D25-Apr-20256.1 KiB196135

clang_flags_test.goH A D25-Apr-20259.8 KiB328297

clang_syntax_flag.goH A D25-Apr-20251.1 KiB3829

clang_syntax_flag_test.goH A D25-Apr-20255.3 KiB181163

clang_tidy_flag.goH A D25-Apr-20256.6 KiB234189

clang_tidy_flag_test.goH A D25-Apr-202512.8 KiB468426

command.goH A D25-Apr-20257.5 KiB298256

command_test.goH A D25-Apr-20251.2 KiB4033

compile_with_fallback.goH A D25-Apr-20253.7 KiB11088

compile_with_fallback_test.goH A D25-Apr-20258.7 KiB304276

compiler_wrapper.goH A D25-Apr-202514.3 KiB464387

compiler_wrapper_test.goH A D25-Apr-20258.5 KiB292252

config.goH A D25-Apr-20256.6 KiB223154

config_test.goH A D25-Apr-20252.7 KiB135111

crash_builds.goH A D25-Apr-20255.4 KiB15595

crash_builds_test.goH A D25-Apr-20257 KiB261225

crash_dump_test.goH A D25-Apr-20251.2 KiB4332

cros_hardened_config_test.goH A D25-Apr-202514.7 KiB547513

cros_host_config_test.goH A D25-Apr-20252.4 KiB9576

cros_llvm_next_flags.goH A D25-Apr-2025762 203

cros_nonhardened_config_test.goH A D25-Apr-2025647 2818

disable_werror_flag.goH A D25-Apr-202513.1 KiB396277

disable_werror_flag_test.goH A D25-Apr-202521.6 KiB750680

env.goH A D25-Apr-20254.7 KiB187141

env_test.goH A D25-Apr-20258.4 KiB339288

errors.goH A D25-Apr-20252.2 KiB8769

errors_test.goH A D25-Apr-20252 KiB7360

gcc_flags.goH A D25-Apr-2025698 3019

gcc_flags_test.goH A D25-Apr-20251.5 KiB6251

go.modH A D25-Apr-202562 42

go_exec.goH A D25-Apr-2025620 2511

goldenutil_test.goH A D25-Apr-20257.8 KiB253206

install_compiler_wrapper.shH A D25-Apr-20252.5 KiB7351

kernel_bug.goH A D25-Apr-2025781 2612

kernel_bug_test.goH A D25-Apr-20252.4 KiB7564

libc_exec.goH A D25-Apr-20253 KiB10335

libgcc_flags.goH A D25-Apr-2025640 2617

libgcc_flags_test.goH A D25-Apr-20251.4 KiB5846

main.goH A D25-Apr-20251.3 KiB4316

print_cmdline_flag.goH A D25-Apr-2025446 2014

print_cmdline_flag_test.goH A D25-Apr-20252.6 KiB8672

print_config_flag.goH A D25-Apr-2025500 2215

print_config_flag_test.goH A D25-Apr-2025809 2921

remote_build_flag_test.goH A D25-Apr-20258 KiB252218

remote_build_flags.goH A D25-Apr-20254.1 KiB161117

reset_compiler_wrapper.shH A D25-Apr-20251.2 KiB4321

rusage_flag.goH A D25-Apr-20255.2 KiB161121

rusage_flag_test.goH A D25-Apr-20255.3 KiB168144

sanitizer_flags.goH A D25-Apr-20253.4 KiB9961

sanitizer_flags_test.goH A D25-Apr-20256 KiB183156

stackprotector_flags.goH A D25-Apr-2025751 3023

stackprotector_flags_test.goH A D25-Apr-20251.7 KiB5847

sysroot_flag.goH A D25-Apr-20251.5 KiB6347

sysroot_flag_test.goH A D25-Apr-20253.1 KiB11095

testutil_test.goH A D25-Apr-20259.3 KiB352291

thumb_flags.goH A D25-Apr-2025874 2816

thumb_flags_test.goH A D25-Apr-20253 KiB11493

unsupported_flags.goH A D25-Apr-2025365 159

unsupported_flags_test.goH A D25-Apr-2025526 2114

x64_flags.goH A D25-Apr-2025499 2213

x64_flags_test.goH A D25-Apr-20251,007 4031

README.md

1Copyright 2023 The ChromiumOS Authors
2Use of this source code is governed by a BSD-style license that can be
3found in the LICENSE file.
4
5### What
6Toolchain utils compiler wrapper sources.
7
8Please note that there's a regular syncing operation between
9`chromiumos-overlay/sys-devel/llvm/files/compiler_wrapper` and
10`toolchain-utils/compiler_wrapper`. This sync is one way (from
11chromiumos-overlay to `toolchain-utils`). Syncing in this way helps the Android
12toolchain keep up-to-date with our wrapper easily, as they're a downstream
13consumer of it. For this reason, **please be sure to land all actual changes in
14chromeos-overlay**.
15
16### Build + Run Tests
171. Install the wrapper locally in chroot (builds as well)
18```
19(chroot) ./install_compiler_wrapper.sh
20```
21
22#### Running a manual test
23Test a manual build command with `-print-cmdline`
24```
25(chroot) x86_64-cros-linux-gnu-clang++ -o test_exec -f<some_flag_to_add>='some_value' -print-cmdline test.cc
26```
27-  `test.cc` doesn't actually have to exist.
28-  The command above will output the additional build flags that are added in by the wrapper.
29
30#### Testing your changes
311. Add tests to your wrapper changes
321. Run all the tests via:
33```
34go test -vet=all
35```
36
37### Build Only
38This is handy if you just want to test that the build works.
39
40Build the wrapper:
41```
42./build.py --config=<config name> --use_ccache=<bool> \
43  --use_llvm_next=<bool> --output_file=<file>
44  ```
45