aboutsummaryrefslogtreecommitdiff
path: root/compiler_wrapper
AgeCommit message (Collapse)Author
2021-09-18Merging 48 commit(s) from Chromium's toolchain-utilsChih-Hung Hsieh
Merged commit digest: 59bd789 Add mass_seccomp_editor.py for seccomp editing 018c7a7 run_tests_for: recognize `test_`/`unittest_` prefixes as tests cfc2bb9 rust_uprev: changes for rust-1.55 8c582e5 compiler_wrapper: Handle TIDY_TIMEOUT for Android clang-tidy 297b3d6 compiler_wrapper: fix use-llvm-next test 76cc811 compiler_wrapper: update golden files 3ce773e Excise cros_logging module db01057 compiler_wrapper: disable unused-but-set warnings 3bc3b1d OWNERS.toolchain: clean up e87f528 users of mail-sheriff: s/sheriff/detective 338c889 email_sender: s/sheriff/detective 7d81944 compiler_wrapper: support -W[no-]unused-set-variable 7510727 Add upstream-workon.bash script bf26752 llvm_tools: update llvm major in non-llvm ebuilds af7b646 style.yapf: force indentation to 2 2adf813 llvm_tools: more informative message when checking out llvm-project-copy 046d57a compiler_wrapper: Update install script 50dc9b8 afdo_metadata: Publish the new kernel profiles a57cfe5 llvm_tools: use upstream revert_checker 35c7e00 crosperf: reuse perf reports a5ff058 compiler_wrapper: Fix static libgcc handling a0a6360 llvm_tools: add newline at the end of PATCHES.json 5cd9c8d Edit style guide to match pep8 14fda11 git_llvm_rev: prefer upstream/* branches over non-upstream/ branches 05c8210 crosperf: remove idle samples from crosperf report 8fe5e65 crosperf: update location debug info 3796acf compiler_wrapper: Update for gcc -> llvm ebuild migration e5d02c0 Revert "[llvm_tools] automatically uprevs sys-devel/gcc whenever LLVM_NEXT is changed" ba388e1 Temporarily disable -Wdeprecated-copy and -Wdeprecated-declarations. 2a5ee3d afdo_metadata: Publish the new kernel profiles a572519 [llvm_tools] automatically uprevs sys-devel/gcc whenever LLVM_NEXT is changed bd4f0ce compiler_wrapper: bundle.py default output dir 52f7bb6 afdo_metadata: Publish the new kernel profiles 7ea3335 compiler_wrapper: add --rewrapper-path support ed206c8 compiler_wrapper: refactor goma => "remote compile" 2ecec0c compiler_wrapper: refactor goma flag parsing 469f5d2 compiler_wrapper: make goma testing use its own function be8490a compiler_wrapper: fix flaky tests 24accd9 afdo_metadata: Publish the new kernel profiles b2757d0 [compiler_wrapper] explicitly enables `libgcc` as the unwindlib 502fb1d llvm-next: add nostart-stop-gc to the list of flags. 566da22 afdo_metadata: Publish the new kernel profiles 09e2dac llvm_tools: detect cros checkout for default chroot_path a8142b1 llvm_tools: Fix lint warnings in llvm update tools 485c25a llvm_tools: llvm version detection for roll tools 011361f update_kernel_afdo: Check last week profiles ffd95a1 toolchain-utils: Remove uses of "readelf --debug-dump=info" 51a2a9a Bisection: add better support for Chrome. Test: make Change-Id: I64eed452a885c9057f0df48ff87262d2d72598e2
2021-09-15compiler_wrapper: Handle TIDY_TIMEOUT for Android clang-tidyChih-Hung Hsieh
* To check in upstream chromeos tools. * In Android mode, for clang-tidy, call runAndroidClangTidy to handle TIDY_TIMEOUT * Add runWithTimeout to env.go and runCmdWithTimeouit to command.go. BUG=b:199451930 TEST=Use a fake Android clang-tidy.real binary, TEST=to dump passed environment variables and run for required time. Change-Id: I629ae372251c034595011ef70559f8b12ed8568c Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/3162668 Reviewed-by: Chih-Hung Hsieh <chh@google.com> Reviewed-by: Manoj Gupta <manojgupta@chromium.org> Tested-by: George Burgess <gbiv@chromium.org> Commit-Queue: George Burgess <gbiv@chromium.org>
2021-09-15compiler_wrapper: fix use-llvm-next testGeorge Burgess IV
The history of this test looks weird. We've had it intermittently enabled/disabled depending on whether we're passing flags specifically to llvm-next versions of clang. At the moment, it's failing due to a lack of `-Wl,-z,nostart-stop-gc`, which was removed in a previous CL. BUG=None TEST=go test Change-Id: I4b1ab9e5d39ba0e5575f89f51e4e83afba24a025 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/3162667 Reviewed-by: Ryan Beltran <ryanbeltran@chromium.org> Reviewed-by: Manoj Gupta <manojgupta@chromium.org> Commit-Queue: George Burgess <gbiv@chromium.org> Tested-by: George Burgess <gbiv@chromium.org>
2021-09-15compiler_wrapper: update golden filesGeorge Burgess IV
Tests are failing at HEAD; looks like prior changes forgot to update these. BUG=None TEST=go test Change-Id: Ia88b182ba0a922807f0857d8dc3df96de4528aa7 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/3162666 Reviewed-by: Ryan Beltran <ryanbeltran@chromium.org> Reviewed-by: Manoj Gupta <manojgupta@chromium.org> Commit-Queue: George Burgess <gbiv@chromium.org> Tested-by: George Burgess <gbiv@chromium.org>
2021-09-09compiler_wrapper: disable unused-but-set warningsRyan Beltran
This CL disables no-unused-but-set-variable warnings globally in the compiler wrapper. A seperate CL will specifically reenable this warning for platform2. This prevents breakage do to unised variables in third_party. BUG=None TEST=None Change-Id: I2ea44b6249715d3b036843b13d668d50b9b7669d Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/3150656 Tested-by: Ryan Beltran <ryanbeltran@chromium.org> Auto-Submit: Ryan Beltran <ryanbeltran@chromium.org> Reviewed-by: Manoj Gupta <manojgupta@chromium.org> Commit-Queue: Manoj Gupta <manojgupta@chromium.org>
2021-08-25compiler_wrapper: support -W[no-]unused-set-variableJian Cai
BUG=b:194845241 TEST=emerge-atlas harfbuzz Change-Id: I262883ee20ed0fc69fcc3bf119d3068f4cf7729b Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/3061363 Tested-by: Jian Cai <jiancai@google.com> Reviewed-by: George Burgess <gbiv@chromium.org>
2021-08-07compiler_wrapper: Update install scriptManoj Gupta
Update wrapper installation script now that we have separate clang and gcc wrappers. BUG=b:186803617 TEST=run install_compiler_wrapper.sh Change-Id: I14ee2ffc6f74adb9699066a54dbead98e2f2e220 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/3078693 Commit-Queue: Manoj Gupta <manojgupta@chromium.org> Commit-Queue: George Burgess <gbiv@chromium.org> Tested-by: Manoj Gupta <manojgupta@chromium.org> Auto-Submit: Manoj Gupta <manojgupta@chromium.org> Reviewed-by: George Burgess <gbiv@chromium.org> Reviewed-by: Jian Cai <jiancai@google.com>
2021-08-04compiler_wrapper: Fix static libgcc handlingManoj Gupta
Do not add static-libgcc to compiler command line if user is passing {shared|static}-libgcc. BUG=b:187794119 TEST=CQ Change-Id: Iecd969dd11632837013bea71df9547bd08bbf30c Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/3064572 Reviewed-by: George Burgess <gbiv@chromium.org> Tested-by: George Burgess <gbiv@chromium.org> Auto-Submit: Manoj Gupta <manojgupta@chromium.org>
2021-07-24compiler_wrapper: Update for gcc -> llvm ebuild migrationManoj Gupta
Update compiler wrapper for migrating the wrappers from gcc to llvm ebuild. This assumes that clang wrappers now live in /usr/bin/ instead of /usr/x86-64-pc-linux-gnu/... and is no longer co-located with gcc wrappers. BUG=b:186803617 TEST=CQ, SDK tryjobs Change-Id: I60082913dbf5a3c6ce992ea951955086b280af43 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/3046721 Reviewed-by: George Burgess <gbiv@chromium.org> Tested-by: Manoj Gupta <manojgupta@chromium.org>
2021-07-21Temporarily disable -Wdeprecated-copy and -Wdeprecated-declarations.Luis Lozano
BUG=b:191618957 TEST=wrapper test Change-Id: I4340173ae681a6c5f022a3b1f1e890d2c9ee8b99 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/3036676 Commit-Queue: Luis Lozano <llozano@chromium.org> Commit-Queue: Manoj Gupta <manojgupta@chromium.org> Tested-by: Luis Lozano <llozano@chromium.org> Auto-Submit: Luis Lozano <llozano@chromium.org> Reviewed-by: Manoj Gupta <manojgupta@chromium.org>
2021-07-09compiler_wrapper: bundle.py default output dirRyan Beltran
This CL implements defaulting the output directory for bundle.py to the location of compiler wrapper files in third_party/chromiumos-overlay. This also prevents bundle.py from creating directories unless a new --create flag is specified. BUG=None TEST=Manually tested Change-Id: I64d055a73332d3faafad730beda30886212346ee Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/3016910 Commit-Queue: Ryan Beltran <ryanbeltran@chromium.org> Tested-by: Ryan Beltran <ryanbeltran@chromium.org> Reviewed-by: George Burgess <gbiv@chromium.org>
2021-06-18compiler_wrapper: add --rewrapper-path supportGeorge Burgess IV
This CL adds --rewrapper-path support to the compiler, as requested in the linked bug. The use of this is mutually exclusive with that of --gomacc-path. We currently look for either a `--gomacc-path` flag or a `GOMACC_PATH` env var to enable goma. If any rewrapper flag is specified, this disables our checking of `GOMACC_PATH` for the purposes of mutual exclusivity checking. BUG=b:190741226 TEST=go test, a few manual invocations Change-Id: I03dd2835a313806a9700c49c47c82fecf19a4b7f Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/2956696 Reviewed-by: Ryan Beltran <ryanbeltran@chromium.org> Tested-by: George Burgess <gbiv@chromium.org>
2021-06-18compiler_wrapper: refactor goma => "remote compile"George Burgess IV
This is intended to be no functional change. In most places, we use "goma" as a way of saying "remote compilation;" this CL clarifies which is which. BUG=b:190741226 TEST=go test Change-Id: Ia03c1a05486c907cd6f7bc33b59a56c98db5d527 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/2956695 Reviewed-by: Ryan Beltran <ryanbeltran@chromium.org> Tested-by: George Burgess <gbiv@chromium.org>
2021-06-18compiler_wrapper: refactor goma flag parsingGeorge Burgess IV
This is in preparation for adding more flag parsing of this type. BUG=b:190741226 TEST=go test Change-Id: Ief431a6e30b6ba22767cdd46247e362508addd4b Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/2956694 Reviewed-by: Ryan Beltran <ryanbeltran@chromium.org> Tested-by: George Burgess <gbiv@chromium.org>
2021-06-18compiler_wrapper: make goma testing use its own functionGeorge Burgess IV
this logic was repetitive, and we're adding more functions where we need it. BUG=b:190741226 TEST=go test Change-Id: I9736142ec59b22d58776d35357a7aa380365a228 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/2956693 Reviewed-by: Ryan Beltran <ryanbeltran@chromium.org> Tested-by: George Burgess <gbiv@chromium.org>
2021-06-18compiler_wrapper: fix flaky testsGeorge Burgess IV
We're running many tests in parallel that have dependencies on the `umask` global. We shouldn't be running these in parallel with each other, since they may read values for this that're set by other goroutines. Since these are difficult to spot, this CL does two things: - Requiring that all tests mark themselves as either readers of or writers to umask. Any test that does this gets run in serial with other tests that do it. - Requires code that modifies/reads the umask to go through `env.umask`, rather than `syscall.Umask`. This allows us to cheaply and accurately verify that a test's dependency on the process' umask was stated. BUG=b:186801841 TEST=`go test -count=100` passed Change-Id: Ifa871cfa48c005646499b21c1bfa1a4799ca641b Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/2956692 Reviewed-by: Ryan Beltran <ryanbeltran@chromium.org> Tested-by: George Burgess <gbiv@chromium.org>
2021-06-08[compiler_wrapper] explicitly enables `libgcc` as the unwindlibChristopher Di Bella
This is in preparation for our migration to libunwind. BUG=b:187785190 TEST=Tested locally and on CQ Disallow-Recycled-Builds: test-failures Change-Id: I1b11d54de3d9550086ead05c3880f149e2e2f839 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/2945100 Tested-by: Christopher Di Bella <cjdb@google.com> Tested-by: Luis Lozano <llozano@chromium.org> Auto-Submit: Christopher Di Bella <cjdb@google.com> Commit-Queue: Luis Lozano <llozano@chromium.org> Reviewed-by: Luis Lozano <llozano@chromium.org>
2021-06-08llvm-next: add nostart-stop-gc to the list of flags.Luis Lozano
This functionality causes problems for several packages and it seems to be only of importance for instrumented profiling which we don't use. BUG=b:187743526 TEST=CQ Change-Id: I441b96223dc8e09eb113608b85cde918faf2753f Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/2943079 Reviewed-by: George Burgess <gbiv@chromium.org> Tested-by: George Burgess <gbiv@chromium.org> Tested-by: Luis Lozano <llozano@chromium.org> Commit-Queue: Luis Lozano <llozano@chromium.org> Auto-Submit: Luis Lozano <llozano@chromium.org>
2021-05-17Merging 63 commit(s) from Chromium's toolchain-utilsGeorge Burgess IV
Merged commit digest: 3ae4421 afdo_tools: Improve update_kernel_afdo script bc16e2f llvm_tool: make either --sha or --differential required. d8f8736 afdo_metadata: Publish the new kernel profiles fd0b18e llvm_tool: support differential reviews in the cherry-pick tool. 6fed0d0 crosperf: update default remotes 203e739 afdo_metadata: Publish the new kernel profiles d6e464f compiler_wrapper: remove LD_ARGV0 flag d773afd afdo_metadata: Publish the new kernel profiles 2a0c294 default_remotes: update the list of machines 4a12a12 llvm_tools: refactor automatic LLVM bisection b5bce20 llvm_tools: fix LLVM bisection tool. cc6e72a compiler_wrapper: disable rusage when goma enabled 1f5fbfa compiler_wrapper: remove useless gomaEnabled var 307e66c android_bench_suite: remove c4c44a5 afdo_metadata: Publish the new kernel profiles 53e9fbe replaces skylab with crosfleet 529f456 PRESUBMIT.cfg: drop --py3 to cros lint 054e7e5 toolchain-utils: New script to make / on chromebook writable. a2c555d bisection: support hostname:port form device in kernel bisection 7383470 afdo_metadata: Publish the new kernel profiles ed23535 compiler_wrapper: reenable goma w/ rusage e62cc7d afdo_metadata: Publish the new kernel profiles 859aa63 afdo: Add 5.4 into kernel afdo metadata 52a1c9d nightly_revert_checker: update branch name 0833f0c afdo_metadata: Update kernel profiles efdffcc toolchain-utils: compiler_wrapper: Update instructions e3a5ad9 afdo_metadata: Publish the new kernel profiles 412cb5e compiler_wrapper: pass --prefix argument to clang 720f951 toolchain-utils: Update our kefka machines. 72e0092 compiler_wrapper: gofmt gcc_flags.go 7c59ee0 compiler_wrapper: disable goma, ccache w/ rusage 2e0f7c6 fixes failure when a commit has already been cherry-picked 3645b98 afdo_metadata: Publish the new kernel profiles f5dbbbe adds cherry-picking to the nightly revert checker 21929ca gcc: Remove deprecated conversions 1f5d695 gcc: Map Alderlake to Skylake 3dd52af toolchain-utils: Make DWARF v5 the default. 82cde0c kernel_afdo.json: Update to R90-13754.0-1612175977 7ed03fe compiler_wrapper: make a loop c89-compatible 235f72a compiler_wrapper: add go.mod 1ac4f76 compiler_wrapper: add a script to restore us to a working wrapper d4d6eb9 compiler_wrapper: Remove "-m32/movbe" from i686 handling cbc852e compiler_wrapper: work around gcc failing due to a kernel bug 8126715 compiler_wrapper: disable force-disable-werror with GCC 77a0c20 compiler_wrapper: loop in exec on ERESTARTSYS de5be16 compiler_wrapper: fix a bug where we won't log rusage on compilation efefb1a compiler_wrapper: Fix gcc host wrapper config 2844e62 llvm_tools: make the lexan 4c uploader ignore old clang(s) 92fff66 compiler_wrapper: Add "-fcommon" to GCC 7ee49e4 compiler_wrapper: refactor rusage_flag 2257714 llvm_tools: Fix bisection with main branch a58bd46 compiler_wrapper: add working dir to rusage logs 6f559ce kernel_afdo.json: Update to R89-13710.0 d4821af crosperf: Fix index incrementing 9f99f6c rust_uprev: also uprev rust-bootstrap d828420 afdo_metadata: Publish the new kernel profiles 98b1224 compiler_wrapper: remove "-pass-exit-codes" in wrapper 63b249a afdo_metadata: Publish the new kernel profiles 58a786a compiler_wrapper: Fix rusage_flag permission error a27756b rust_uprev: accept -r* in virtual/rust version numbers bcda475 rust_uprev: mark test_success_with_template mock_find_ebuild unused 2d837f0 compiler_wrapper: rename GETRUSAGE flag 914431e compiler_wrapper: make rusage logs json Change-Id: Ifa84609958eeae56d19c1302f8fcdeaa82c23dad
2021-05-14Cherrypick "compiler_wrapper: add go.mod"George Burgess IV
This cherrypicks http://crrev.com/235f72a0dceb95dd50b9a5e4c5485d8158dfb16a from upstream. It's not using the merge script because our current git mirroring setup needs fixing (see my comments on PS1 of https://android-review.googlesource.com/c/platform/external/toolchain-utils/+/1697005) Seems better to unblock the go roll sooner rather than later, so... Original commit message: > compiler_wrapper: add go.mod > > In order to build this outside of the chroot, we apparently now need a > go.mod file. This is autogenerated by the `go` tool. > > BUG=None > TEST=Built inside and outside of the chroot > > Change-Id: I185cb9b626c8b3655ce5cc72524ef2511c7f575e > Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/2676607 > Reviewed-by: Manoj Gupta <manojgupta@chromium.org> > Tested-by: George Burgess <gbiv@chromium.org> Bug: None Test: TreeHugger Change-Id: I9ca6685e3d1c3706427089b0fb55537c9bfa9c18
2021-05-06compiler_wrapper: remove LD_ARGV0 flagRyan Beltran
This CL removes support for using the LD_ARGV0 flag in the compiler wrapper to set arg[0]. BUG=b:187069257 TEST=Rebuilt aarch64-cros-linux-gnu toolchain and verified clang++ called correctly (https://paste.googleplex.com/5669729663451136) Change-Id: I3055a8b1e978f9e5f1eaae91dbc6008f86206246 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/2876078 Reviewed-by: Manoj Gupta <manojgupta@chromium.org> Commit-Queue: Ryan Beltran <ryanbeltran@chromium.org> Tested-by: Ryan Beltran <ryanbeltran@chromium.org>
2021-04-21compiler_wrapper: disable rusage when goma enabledRyan Beltran
This disables rusage logging when Goma is enabled as goma makes the resulting logs meaningless. BUG=None TEST=Updated and ran go tests Change-Id: If55a820676faa6b40d471db48749d384b7e2c671 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/2840684 Reviewed-by: George Burgess <gbiv@chromium.org> Tested-by: Ryan Beltran <ryanbeltran@chromium.org>
2021-04-20compiler_wrapper: remove useless gomaEnabled varRyan Beltran
This CL addresses a comment on CL:2780051 which reenabled Goma with Rusage. Since 2780051 there was an extraneous variable left over. This also removes a now obsolete test. BUG=None TEST=Ran all package go tests Change-Id: I784c1d93fc94333e098bf30a8777469379bfef71 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/2823244 Reviewed-by: George Burgess <gbiv@chromium.org> Reviewed-by: Denis Nikitin <denik@chromium.org> Tested-by: Ryan Beltran <ryanbeltran@chromium.org>
2021-03-29compiler_wrapper: reenable goma w/ rusageRyan Beltran
It was determined that INFRA_FAILUREs in unstable builders were caused by timeouts due to disabling Goma with ruage. This CL remedies that by reenabling Goma. BUG=chromium:1193733 TEST=Tested with bb add Change-Id: Id8c2b175da1634916baadd865bb55331fa2dd99b Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/2780051 Tested-by: Ryan Beltran <ryanbeltran@chromium.org> Reviewed-by: George Burgess <gbiv@chromium.org> Reviewed-by: Denis Nikitin <denik@chromium.org>
2021-03-09Merging 15 commit(s) from Chromium's toolchain-utilsPirama Arumuga Nainar
Merged commit digest: 028b14d toolchain-utils: Remove 'target' from distfiles path (for cleanup). bd1004a toolchain-utils: Fix hyphen/underscore issue for nightly tests. d5d49d2 afdo_metadata: Publish the new kernel profiles d796e2c default_remotes: fix a typo 9d35abc llvm_tools: update upstream branch names to point to `main` 369072a default_remotes: Update toolchain DUT names 4a8085e compiler_wrapper: move llvm-next options to clang options 2c27f0a llvm_tools: pass cl number as str to avoid type error 2421372 afdo_metadata: Publish the new kernel profiles cb138b5 afdo_metadata: Publish the new kernel profiles 8c34e96 crosperf: Fix BadChecksum failure on coral 6da42e5 afdo_metadata: Publish the new kernel profiles 84b5c8f compiler_wrapper: report parent processes' info in warnings tarballs 49187a5 afdo_metadata: Publish the new kernel profiles 602351c update_kernel_afdo: use gsutil.py instead of gsutil Change-Id: I6d94b7821404b85366f1f1c0b0f3fd8ecec8ded4
2021-02-27toolchain-utils: compiler_wrapper: Update instructionsDenis Nikitin
Update steps with gcc. BUG=None TEST=None Change-Id: I41a0f22d1c161aa81bbb47c1a9eec7a3436457a0 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/2718654 Reviewed-by: Caroline Tice <cmtice@chromium.org> Reviewed-by: Jian Cai <jiancai@google.com> Tested-by: Denis Nikitin <denik@chromium.org> Commit-Queue: Denis Nikitin <denik@chromium.org>
2021-02-26compiler_wrapper: pass --prefix argument to clangManoj Gupta
ToT clang needs --prefix is needed to find the correct tools. BUG=chromium:1182224 TEST=Updated compiler wrapper in SimpleChrome, nacl builds. Change-Id: I8073e1a5482a23f38bb1e0d88e2b31ee2d97fa6e Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/2721199 Tested-by: Manoj Gupta <manojgupta@chromium.org> Reviewed-by: George Burgess <gbiv@chromium.org>
2021-02-24compiler_wrapper: gofmt gcc_flags.goRyan Beltran
There was a small formatting error in gcc_flags.go. This caused a minor issue when running bundle.py since the result was not accepted as is by the presubmit. BUG=None TEST=None Change-Id: I47709e5fdfe1e0f8b7cbc731e70b734196bd0ccc Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/2717925 Tested-by: Ryan Beltran <ryanbeltran@chromium.org> Reviewed-by: George Burgess <gbiv@chromium.org>
2021-02-24compiler_wrapper: disable goma, ccache w/ rusageRyan Beltran
Disables Goma and CCahce when rusage monitoring is requested. This allows for usable metrics to be produced for more packages. BUG=chromium:1156314 TEST=Modified and ran unit tests Change-Id: I36415b4df6ce033b23ff8055e900233886e1889d Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/2713228 Tested-by: Ryan Beltran <ryanbeltran@chromium.org> Commit-Queue: Ryan Beltran <ryanbeltran@chromium.org> Reviewed-by: George Burgess <gbiv@chromium.org> Reviewed-by: Denis Nikitin <denik@chromium.org>
2021-02-11gcc: Remove deprecated conversionsMichael Cheng
Recent update to gcc 10 supports up to tigerlake. This CL removes depcreated march conversions BUG=chromium:1167265 TEST=Verify unit tests pass Change-Id: Ic20c9901963deb0e9985f4bcd57c7651cb8aeb3b Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/2691128 Commit-Queue: Michael Cheng <michael.cheng@intel.com> Tested-by: Michael Cheng <michael.cheng@intel.com> Reviewed-by: Manoj Gupta <manojgupta@chromium.org>
2021-02-11gcc: Map Alderlake to SkylakeMichael Cheng
GCC 10 does not support march=alderlake. This CL maps alderlake to skylake BUG=chromium:1167265 TEST=Verify unit tests pass Change-Id: I8fc694650fe0cb883628fb566d0536d1d550df43 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/2689623 Reviewed-by: Manoj Gupta <manojgupta@chromium.org> Tested-by: Manoj Gupta <manojgupta@chromium.org>
2021-02-09toolchain-utils: Make DWARF v5 the default.Caroline Tice
Also update the golden tests appropriately. BUG=chromium:924760 TEST=Already tested/committed in llvm/files/compiler-wrapper. Change-Id: I0cac1f60874d7c473a3a79e37c0eddbe3e5dfed5 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/2683254 Reviewed-by: George Burgess <gbiv@chromium.org> Commit-Queue: Caroline Tice <cmtice@chromium.org> Tested-by: Caroline Tice <cmtice@chromium.org>
2021-02-05compiler_wrapper: make a loop c89-compatibleGeorge Burgess IV
building this on the CQ is failing because this loop uses the c99 feature declaring something in the first clause of a for loop. BUG=None TEST=CQ Change-Id: I92729d30bd392c46e2b1183b92874212bdc59d6f Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/2676930 Tested-by: George Burgess <gbiv@chromium.org> Reviewed-by: Manoj Gupta <manojgupta@chromium.org>
2021-02-04compiler_wrapper: add go.modGeorge Burgess IV
In order to build this outside of the chroot, we apparently now need a go.mod file. This is autogenerated by the `go` tool. BUG=None TEST=Built inside and outside of the chroot Change-Id: I185cb9b626c8b3655ce5cc72524ef2511c7f575e Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/2676607 Reviewed-by: Manoj Gupta <manojgupta@chromium.org> Tested-by: George Burgess <gbiv@chromium.org>
2021-02-04compiler_wrapper: add a script to restore us to a working wrapperGeorge Burgess IV
Sometimes, I'm guilty of using ./install_compiler_wrapper.sh on broken sources. Restoring the world to a working state requires knowing/remembering a command. Seems better to provide that knowledge in executable form. BUG=None TEST=Ran the script Change-Id: I772b19a0b8bebdf6af78b822b710ce6e880c7388 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/2676601 Reviewed-by: Manoj Gupta <manojgupta@chromium.org> Tested-by: George Burgess <gbiv@chromium.org>
2021-02-01compiler_wrapper: Remove "-m32/movbe" from i686 handlingManoj Gupta
Clang handles "-i686" tuple fine linking i386 libraries if needed. "-mnomovbe" is also understood by current clang. BUG=None TEST=go test Change-Id: I0d5058ebe3cadca297af1c01030480cc25194955 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/2665028 Reviewed-by: George Burgess <gbiv@chromium.org> Tested-by: Manoj Gupta <manojgupta@chromium.org>
2021-01-29compiler_wrapper: work around gcc failing due to a kernel bugGeorge Burgess IV
Very rarely on old GCCs, we'll complaints about GCC itself being handed ERESTARTSYS. Retry the compilation in those cases. Similarly, we'll sometimes see `run()` give us random errors with things like `waitid()`, so handle those. BUG=chromium:1166017 TEST=CQ Change-Id: If9b6fdc523f60719608739da0eefa94c82164ae7 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/2648090 Reviewed-by: Manoj Gupta <manojgupta@chromium.org> Tested-by: George Burgess <gbiv@chromium.org>
2021-01-29compiler_wrapper: disable force-disable-werror with GCCGeorge Burgess IV
Enabling this functionality with GCC is pointless -- we don't roll it, so we don't want to catch new -Werrors with it. We're having some GCC-specific functionality coming in soon; disabling this simplifies things some. BUG=chromium:1166017 TEST=CQ Change-Id: I3f73a8124ea85a2f14fd5c909a9bbed2b46f28f4 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/2648431 Reviewed-by: Manoj Gupta <manojgupta@chromium.org> Tested-by: George Burgess <gbiv@chromium.org>
2021-01-29compiler_wrapper: loop in exec on ERESTARTSYSGeorge Burgess IV
Very rarely on old GCCs, we'll see an ERESTARTSYS that fails builders. Kernel documentation indicates that users should never see ERESTARTSYS, but it's unclear how to fix this, so try to work around it for now. BUG=chromium:1166017 TEST=CQ Change-Id: I5a1ca6ce722f929523feb45aeafffcc30dfda05a Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/2647869 Reviewed-by: Manoj Gupta <manojgupta@chromium.org> Tested-by: George Burgess <gbiv@chromium.org>
2021-01-29compiler_wrapper: fix a bug where we won't log rusage on compilationGeorge Burgess IV
env.exec, outside of tests and "print command" configurations, never returns if it executed successfully (since it turns into an actual call to execve()). Since we want to write rusage logs after the compiler is finished, we need to not exec in that case. BUG=None TEST=CQ Change-Id: If19ffb5c590868bc03431301514de875d60f7af5 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/2648089 Reviewed-by: Ryan Beltran <ryanbeltran@chromium.org> Reviewed-by: Manoj Gupta <manojgupta@chromium.org> Tested-by: George Burgess <gbiv@chromium.org>
2021-01-29compiler_wrapper: Fix gcc host wrapper configManoj Gupta
GCC host wrapper was not calling the code to add common flags for no clear reason. Add it so that "-fcommon" is now passed to GCC host compiler invocations. BUG=chromium:1171833 TEST=go test Change-Id: Id354b65ff0a08d0b25f895bb95cd4e99412b856b Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/2657585 Reviewed-by: Manoj Gupta <manojgupta@chromium.org> Tested-by: Manoj Gupta <manojgupta@chromium.org>
2021-01-28compiler_wrapper: Add "-fcommon" to GCCManoj Gupta
pass "-fcommon" to GCC to match clang. This is needed since GCC 10 defaults to "-fno-common". BUG=chromium:1171833 TEST=go test Change-Id: Iceac503c8cc14afc1837c6952100189f45d2b567 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/2657043 Reviewed-by: George Burgess <gbiv@chromium.org> Tested-by: Manoj Gupta <manojgupta@chromium.org>
2021-01-22compiler_wrapper: refactor rusage_flagRyan Beltran
Refactors rusage_flag and its usage in compiler_wrapper to support the use of TOOLCHAIN_RUSAGE_OUTPUT with either FORCE_DISABLE_WERROR. BUG=chromium:1167958 TEST=Modified and ran unit tests Change-Id: I9a643ceabbbeca3bf3a94270d4f4b4d814812f93 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/2635451 Tested-by: Ryan Beltran <ryanbeltran@chromium.org> Reviewed-by: George Burgess <gbiv@chromium.org>
2021-01-20compiler_wrapper: add working dir to rusage logsRyan Beltran
Adds current working directory as a new field in rusage logs. This is useful for determining what package was being compiled. BUG=chromium:1156314 TEST=Modified and ran unit tests Change-Id: I58d7040c90fbd7d9b81532d0114862cbf4b23f88 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/2636450 Tested-by: Ryan Beltran <ryanbeltran@chromium.org> Reviewed-by: George Burgess <gbiv@chromium.org>
2020-12-29compiler_wrapper: remove "-pass-exit-codes" in wrapperManoj Gupta
Handling(ignoring) of "-pass-exit-codes" flag is no longer needed in compiler wrapper. BUG=chromium:979911 TEST=CL:2597389 passed CQ/SDK tests Change-Id: I0114b745eed6d5dbcba10e2ecfb13d1882df32bf Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/2597141 Tested-by: Manoj Gupta <manojgupta@chromium.org> Reviewed-by: Manoj Gupta <manojgupta@chromium.org> Commit-Queue: Manoj Gupta <manojgupta@chromium.org>
2020-12-17compiler_wrapper: Fix rusage_flag permission errorRyan Beltran
Seeing permission errors in builder bots that create rusage_flags. We need to set the Umask to 0 during creation of the directory. BUG=chromium:1156314 TEST=None Change-Id: I667d922762c2cb090adbb3abac2d4782bc48b87d Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/2597478 Reviewed-by: George Burgess <gbiv@chromium.org> Reviewed-by: Tiancong Wang <tcwang@google.com> Tested-by: Ryan Beltran <ryanbeltran@chromium.org> Commit-Queue: Ryan Beltran <ryanbeltran@chromium.org>
2020-12-16compiler_wrapper: rename GETRUSAGE flagRyan Beltran
GETRUSAGE has been renamed TOOLCHAIN_RUSAGE_OUTPUT for clarity. BUG=chromium:1156314 TEST=Reran unit tests for package main Change-Id: I4588b4138f0dd4e4938762250e5caa6b4026e3f2 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/2594261 Reviewed-by: George Burgess <gbiv@chromium.org> Reviewed-by: Manoj Gupta <manojgupta@chromium.org> Tested-by: Ryan Beltran <ryanbeltran@chromium.org> Commit-Queue: Ryan Beltran <ryanbeltran@chromium.org>
2020-12-14compiler_wrapper: make rusage logs jsonRyan Beltran
Modified rusage logs generated by GETRUSAGE flag. Output from each entry is now in json format. BUG=chromium:1156314 TEST=Modified and ran unit tests Change-Id: Ia2cac4af201854de6d4a2c57e6cd8a4585f0931f Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/2585911 Tested-by: Ryan Beltran <ryanbeltran@chromium.org> Reviewed-by: George Burgess <gbiv@chromium.org>
2020-11-26compiler_wrapper: move llvm-next options to clang optionsinglorion
The new Clang version has a number of new warnings which we disable. This CL makes those apply to llvm (current) as well as llvm-next. BUG=None TEST=go test Change-Id: I1f4929580953003d21676e7e72af4577592fb217 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/2561725 Reviewed-by: Manoj Gupta <manojgupta@chromium.org> Tested-by: Manoj Gupta <manojgupta@chromium.org> Commit-Queue: Manoj Gupta <manojgupta@chromium.org>
2020-10-23compiler_wrapper: report parent processes' info in warnings tarballsGeorge Burgess IV
The bug I'm chasing down right now depends on environment variables, and could be due to a `make` invocation in one of N places. Having this context available to me is useful. It seriously pollutes the JSON we dump, but use of `jq` that I've put in the doc about this makes that a non-issue. BUG=None TEST=Ran on stress-ng. parent process info was dumped. Change-Id: Ib4d3b6c9887b4cf2a38472ef299c81af27e9a617 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/2481829 Reviewed-by: Manoj Gupta <manojgupta@chromium.org> Tested-by: George Burgess <gbiv@chromium.org>