• Home
Name Date Size #Lines LOC

..--

testdata/06-Sep-2024-18,72618,668

README.mdD06-Sep-20241.4 KiB4537

android_config_test.goD06-Sep-20243.7 KiB150136

android_llvm_next_flags.goD01-Jan-19700

bisect_flag.goD06-Sep-20241.7 KiB7864

bisect_flag_test.goD06-Sep-20245.6 KiB185164

build.pyD06-Sep-20244.7 KiB158117

ccache_flag.goD06-Sep-20242.2 KiB7040

ccache_flag_test.goD06-Sep-20246 KiB217187

clang_flags.goD06-Sep-20246.1 KiB196135

clang_flags_test.goD06-Sep-20249.8 KiB328297

clang_syntax_flag.goD06-Sep-20241.1 KiB3829

clang_syntax_flag_test.goD06-Sep-20245.3 KiB181163

clang_tidy_flag.goD06-Sep-20246.6 KiB234189

clang_tidy_flag_test.goD06-Sep-202412.8 KiB468426

command.goD06-Sep-20247.5 KiB298256

command_test.goD06-Sep-20241.2 KiB4033

compile_with_fallback.goD06-Sep-20243.7 KiB11088

compile_with_fallback_test.goD06-Sep-20248.7 KiB304276

compiler_wrapper.goD06-Sep-202414.3 KiB464387

compiler_wrapper_test.goD06-Sep-20248.5 KiB292252

config.goD06-Sep-20246.6 KiB223154

config_test.goD06-Sep-20242.7 KiB135111

crash_builds.goD06-Sep-20245.4 KiB15595

crash_builds_test.goD06-Sep-20247 KiB261225

crash_dump_test.goD06-Sep-20241.2 KiB4332

cros_hardened_config_test.goD06-Sep-202414.7 KiB547513

cros_host_config_test.goD06-Sep-20242.4 KiB9576

cros_llvm_next_flags.goD06-Sep-2024762 203

cros_nonhardened_config_test.goD06-Sep-2024647 2818

disable_werror_flag.goD06-Sep-202413.1 KiB396277

disable_werror_flag_test.goD06-Sep-202421.6 KiB750680

env.goD06-Sep-20244.7 KiB187141

env_test.goD06-Sep-20248.4 KiB339288

errors.goD06-Sep-20242.2 KiB8769

errors_test.goD06-Sep-20242 KiB7360

gcc_flags.goD06-Sep-2024698 3019

gcc_flags_test.goD06-Sep-20241.5 KiB6251

go.modD06-Sep-202462 42

go_exec.goD06-Sep-2024620 2511

goldenutil_test.goD06-Sep-20247.8 KiB253206

install_compiler_wrapper.shD06-Sep-20242.5 KiB7351

kernel_bug.goD06-Sep-2024781 2612

kernel_bug_test.goD06-Sep-20242.4 KiB7564

libc_exec.goD06-Sep-20243 KiB10335

libgcc_flags.goD06-Sep-2024640 2617

libgcc_flags_test.goD06-Sep-20241.4 KiB5846

main.goD06-Sep-20241.3 KiB4316

print_cmdline_flag.goD06-Sep-2024446 2014

print_cmdline_flag_test.goD06-Sep-20242.6 KiB8672

print_config_flag.goD06-Sep-2024500 2215

print_config_flag_test.goD06-Sep-2024809 2921

remote_build_flag_test.goD06-Sep-20248 KiB252218

remote_build_flags.goD06-Sep-20244.1 KiB161117

reset_compiler_wrapper.shD06-Sep-20241.2 KiB4321

rusage_flag.goD06-Sep-20245.2 KiB161121

rusage_flag_test.goD06-Sep-20245.3 KiB168144

sanitizer_flags.goD06-Sep-20243.4 KiB9961

sanitizer_flags_test.goD06-Sep-20246 KiB183156

stackprotector_flags.goD06-Sep-2024751 3023

stackprotector_flags_test.goD06-Sep-20241.7 KiB5847

sysroot_flag.goD06-Sep-20241.5 KiB6347

sysroot_flag_test.goD06-Sep-20243.1 KiB11095

testutil_test.goD06-Sep-20249.3 KiB352291

thumb_flags.goD06-Sep-2024874 2816

thumb_flags_test.goD06-Sep-20243 KiB11493

unsupported_flags.goD06-Sep-2024365 159

unsupported_flags_test.goD06-Sep-2024526 2114

x64_flags.goD06-Sep-2024499 2213

x64_flags_test.goD06-Sep-20241,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