aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2022-07-28rust_uprev: Remove flip_mirror_in_ebuildBob Haarman
Previously, we temporarily switched on RESTRICT="mirror" for an ebuild before updating the manifest. This allows us to fetch distfiles from their original locations (rather than the default, which is to require them to be fetched from mirrors). We don't actually need this, so this change removes the code that does this. BUG=None TEST=unit tests, also tested on rust-1.60.0 uprev Change-Id: I5f29ffad83a5826dbe523db4657d9ea17c43bcff Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/3594132 Commit-Queue: Bob Haarman <inglorion@chromium.org> Reviewed-by: George Burgess <gbiv@chromium.org> Tested-by: Bob Haarman <inglorion@chromium.org>
2022-07-27rust_uprev: yapf and isortBob Haarman
When making some changes, I got some complaints from the formatters. Fixing the formatting first, before making edits. BUG=None TEST=./run_tests_for.py rust_tools/rust_uprev.py Change-Id: I4802b40dfeb3348cf2c060737992250b75136e0e Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/3788604 Commit-Queue: Bob Haarman <inglorion@chromium.org> Reviewed-by: Michael Benfield <mbenfield@google.com> Tested-by: Bob Haarman <inglorion@chromium.org>
2022-07-26rust-analyzer-chromiumos-wrapper: Support some command line arguments.Michael Benfield
VS Code (and possibly other editors) like to pass `--version` and possibly other arguments, so forward them to `rust-analyzer`. BUG=b:240341002 TEST=Build, test on VS Code Change-Id: Icadf05088c4220f058fcdce68489d266368ab1e7 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/3785120 Commit-Queue: George Burgess <gbiv@chromium.org> Auto-Submit: Michael Benfield <mbenfield@google.com> Reviewed-by: George Burgess <gbiv@chromium.org> Tested-by: Michael Benfield <mbenfield@google.com>
2022-07-25buildbot_utils: remove out-of-date codeGeorge Burgess IV
It's well past 2019. Let's remove this. Style changes are courtesy of `yapf`. BUG=None TEST=None Change-Id: Ic70f01775958fc61790901028569945f76eeb763 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/3785491 Tested-by: George Burgess <gbiv@chromium.org> Commit-Queue: George Burgess <gbiv@chromium.org> Auto-Submit: George Burgess <gbiv@chromium.org> Reviewed-by: Jordan Abrahams-Whitehead <ajordanr@google.com>
2022-07-21llvm_tools: Remove unused patch_metadata_file argJordan R Abrahams-Whitehead
This argument is not actually used anymore. Technically it was never actually needed and it was passed in other ways to the patch_manager.py even before the refactoring. This just removes it from one function's arguments. It's hard to clean the forwarded patch_metadata_file arg in every situation, so let's just do it for this function that we introduced. BUG=None TEST=./run_tests_for llvm_tools/ Change-Id: I5c3f2a217df082cd51362aa70c8b585ad5135e47 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/3780680 Tested-by: Jordan Abrahams-Whitehead <ajordanr@google.com> Commit-Queue: Jordan Abrahams-Whitehead <ajordanr@google.com> Reviewed-by: Manoj Gupta <manojgupta@chromium.org>
2022-07-21llvm_tools: Clean up on apply_all_from_jsonJordan R Abrahams-Whitehead
At present, update_chromeos_llvm_hash.py will keep trying to apply patches from separate llvm subprojects, to the same LLVM dir. This causes patches to stack, so that the second time it applies the same patch it then fails to apply. This commit fixes the issue by cleaning up the git directory on every stage of the loop. This commit also fixes some type casts. BUG=b:239279349, b:239280701 TEST=./update_chromeos_llvm_hash_unittest.py TEST=./update_packages_and_run_tests.py \ --extra_change_lists 1394249 1986966 \ --chroot_path $CROS_ROOT \ --llvm_version google3 cq Change-Id: I6cc853d80c47fefaba4ff0b5133787b716177567 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/3780679 Commit-Queue: Jordan Abrahams-Whitehead <ajordanr@google.com> Tested-by: Jordan Abrahams-Whitehead <ajordanr@google.com> Reviewed-by: Christopher Di Bella <cjdb@google.com> Commit-Queue: Christopher Di Bella <cjdb@google.com> Reviewed-by: Manoj Gupta <manojgupta@chromium.org>
2022-07-20llvm_tools: Fix missing importJordan R Abrahams-Whitehead
At present, programs which import the now deleted llvm_patch_management break. This commit removes the dependency, and moves the one relevant function from llvm_patch_management to update_chromeos_llvm_hash. Some other developer quality of life additions have been added, such as type hints, to get the new patch_manager implementation to validate static checks. BUG=b:239280701, b:239279349, b:237870186 TEST=get_upstream_patch.py ... TEST=run_tests_for llvm_tools/* Change-Id: I2a7880c9f3b285109f6b115ad8b22eccbf0b714f Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/3777524 Commit-Queue: Jordan Abrahams-Whitehead <ajordanr@google.com> Reviewed-by: Christopher Di Bella <cjdb@google.com> Tested-by: Jordan Abrahams-Whitehead <ajordanr@google.com> Reviewed-by: George Burgess <gbiv@chromium.org>
2022-07-20rust-analyzer-chromiumos-wrapper: addMichael Benfield
This is a wrapper program enabling use of `rust-analyzer` running in the chroot with an editor outside the chroot. BUG=b:235120448 TEST=tested with Neovim Change-Id: I64287071ce6cc26c6848b6fb09743f6df9fac311 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/3715832 Reviewed-by: George Burgess <gbiv@chromium.org> Commit-Queue: Michael Benfield <mbenfield@google.com> Tested-by: Michael Benfield <mbenfield@google.com> Reviewed-by: Michael Benfield <mbenfield@google.com>
2022-07-15afdo_metadata: Publish the new kernel profilesDenis Nikitin
Update chromeos-kernel-4.4 Update chromeos-kernel-4.14 Update chromeos-kernel-4.19 Update chromeos-kernel-5.4 Update chromeos-kernel-5.10 BUG=None TEST=Verified in kernel-release-afdo-verify-orchestrator Change-Id: Ic6bea362338745eff5f67b50207b14c1447f36ac Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/3765945 Commit-Queue: Manoj Gupta <manojgupta@chromium.org> Reviewed-by: Manoj Gupta <manojgupta@chromium.org> Tested-by: Denis Nikitin <denik@chromium.org> Auto-Submit: Denis Nikitin <denik@chromium.org>
2022-07-15llvm_tools: Remove unused llvm_patch_management.pyJordan R Abrahams-Whitehead
This code is not used by anything on the ChromeOS side, and is just a wrapper around patch_manager.py itself. The README implies that it auto-fills the command line arguments, but this is somewhat unneccesary, and if we want to add support for this workflow, it should likely be in patch_manager.py itself as a subcommand. This commit removes llvm_patch_management.py and llvm_patch_management_unittest.py, and also removes it from the README.md. Also removes other incorrect flags from the README.md. BUG=b:188465085 TEST=./run_tests_for.py llvm_tools/* Change-Id: Ibf5f77977f70a8b7334e111a92a8fec5be462201 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/3765939 Reviewed-by: Manoj Gupta <manojgupta@chromium.org> Tested-by: Jordan Abrahams-Whitehead <ajordanr@google.com> Commit-Queue: Jordan Abrahams-Whitehead <ajordanr@google.com> Reviewed-by: George Burgess <gbiv@chromium.org>
2022-07-15llvm_tools: Clean patch_manager dead code, testsJordan R Abrahams-Whitehead
At present, patch_manager.py and related files had lots of dead code (>50% of the lines were not used). This commit removes them, and removes the tests which tested that unused code. Test concepts that were useful were either already covered, or have been added as well in this commit. This commit also cleans up some imports and moves some functions for better access to testing. BUG=b:188465085 TEST=Preupload tests pass TEST=llvm builds successfully locally with copied llvm_tools/ Change-Id: I202952a1f5d53a1182c1c6c51b8072573c5cbc5d Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/3761449 Commit-Queue: Jordan Abrahams-Whitehead <ajordanr@google.com> Tested-by: Jordan Abrahams-Whitehead <ajordanr@google.com> Reviewed-by: George Burgess <gbiv@chromium.org> Reviewed-by: Manoj Gupta <manojgupta@chromium.org>
2022-07-12patch_sync: Sync version range changesJordan R Abrahams-Whitehead
At present, patch_sync intentionally does not copy over version changes to existing patches, it only copies new patches to the other repositories. This commit changes this behaviour at the request of the Android toolchain team, so that now version range changes are also copied over (but nothing else). BUG=b:237030928 TEST=cargo test TEST=patch_sync locally with version range changes Change-Id: I115fa02012cdf663a2b5b5657e769f513241dedd Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/3756345 Reviewed-by: George Burgess <gbiv@chromium.org> Tested-by: Jordan Abrahams-Whitehead <ajordanr@google.com> Commit-Queue: Jordan Abrahams-Whitehead <ajordanr@google.com>
2022-07-11patch_sync: Add copyright lines to patch_syncJordan R Abrahams-Whitehead
These copyright lines should be added, and they're currently missing. Failing presubmit checks without this change. BUG=None TEST=Presubmit checks pass Change-Id: I9cd3b9e26a4d7284974705aa96cb6050db25e767 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/3756344 Auto-Submit: Jordan Abrahams-Whitehead <ajordanr@google.com> Reviewed-by: George Burgess <gbiv@chromium.org> Tested-by: Jordan Abrahams-Whitehead <ajordanr@google.com> Commit-Queue: George Burgess <gbiv@chromium.org>
2022-07-08afdo_metadata: Publish the new kernel profilesDenis Nikitin
Update chromeos-kernel-4.4 Update chromeos-kernel-4.14 Update chromeos-kernel-4.19 Update chromeos-kernel-5.4 Update chromeos-kernel-5.10 BUG=None TEST=Verified in kernel-release-afdo-verify-orchestrator Change-Id: I65702c5f9e1342eaba5707546f049df6f7eb5fd6 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/3748693 Tested-by: Denis Nikitin <denik@chromium.org> Commit-Queue: Christopher Di Bella <cjdb@google.com> Reviewed-by: Christopher Di Bella <cjdb@google.com> Auto-Submit: Denis Nikitin <denik@chromium.org>
2022-07-02update OWNERS.toolchainRyan Beltran
This CL updates OWNERS.toolchain with recent changes to the ChromeOS Toolchain Team. BUG=b:237711871 TEST=presubmit Change-Id: I66b02236664f04b49cd5a7a81c17ccb5b6fc86e3 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/3741464 Tested-by: George Burgess <gbiv@chromium.org> Reviewed-by: George Burgess <gbiv@chromium.org> Commit-Queue: George Burgess <gbiv@chromium.org>
2022-06-29compiler_wrapper: add autocrash logicGeorge Burgess IV
As outlined in the attached bug, we want to be able to crash the compiler based on a handful of heuristics. Crashing Clang helps get us self-contained reproducers fairly easily. This CL provides (off-by-default) functionality to do the above. The expectation is that a SWE will hack at it to make it work as they need to. BUG=b:236736327 TEST=Installed the new wrapper; observed autocrashes. Change-Id: I76ec753ec37baa5e9b6dab92668081fa7c605725 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/3714885 Reviewed-by: Manoj Gupta <manojgupta@chromium.org> Reviewed-by: Jordan Abrahams-Whitehead <ajordanr@google.com> Commit-Queue: George Burgess <gbiv@chromium.org> Tested-by: George Burgess <gbiv@chromium.org>
2022-06-27get_upstream_patch: Validate patch applicationAdrian Dole
Currently, get_upstream_patch does not validate that a patch applies to the current LLVM state. Add validation before modifying PATCHES.json. Move several functions into patch_utils to avoid depending on patch_manager. BUG=b:227216280 TEST=./get_upstream_patch.py --platform chromiumos --sha [patch SHA] Change-Id: I97e7d401e7f8fc6d85dbfb9a310e4a77205ef444 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/3711269 Reviewed-by: Adrian Dole <adriandole@google.com> Commit-Queue: Adrian Dole <adriandole@google.com> Auto-Submit: Adrian Dole <adriandole@google.com> Reviewed-by: Jordan Abrahams-Whitehead <ajordanr@google.com> Tested-by: Adrian Dole <adriandole@google.com>
2022-06-24crate_ebuild_help.py: addMichael Benfield
BUG=None TEST=manually running the script Change-Id: I53fa857210b5f13edb318aba407b945a5de98f0d Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/3715833 Reviewed-by: George Burgess <gbiv@chromium.org> Tested-by: Michael Benfield <mbenfield@google.com> Commit-Queue: Michael Benfield <mbenfield@google.com>
2022-06-23afdo_metadata: Publish the new kernel profilesManoj Gupta
Update chromeos-kernel-4.4 Update chromeos-kernel-4.14 Update chromeos-kernel-4.19 Update chromeos-kernel-5.4 Update chromeos-kernel-5.10 BUG=None TEST=Verified in kernel-release-afdo-verify-orchestrator Change-Id: I3e39be51d01147f17059f4c94df085185eea1561 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/3722453 Reviewed-by: Denis Nikitin <denik@chromium.org> Commit-Queue: Denis Nikitin <denik@chromium.org> Tested-by: Manoj Gupta <manojgupta@chromium.org> Auto-Submit: Manoj Gupta <manojgupta@chromium.org> Commit-Queue: Manoj Gupta <manojgupta@chromium.org>
2022-06-23compiler_wrapper: Stop managing pie flagsManoj Gupta
With CL:3710850, pie will be defaults for clang and GCC (cross-compiles). No need to manage them separately. BUG=b:190047257 TEST=go test Change-Id: Icf8e74d6a31c5de678ec9a6a5c321a17a0154d37 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/3722436 Reviewed-by: Jordan Abrahams-Whitehead <ajordanr@google.com> Reviewed-by: George Burgess <gbiv@chromium.org> Auto-Submit: Manoj Gupta <manojgupta@chromium.org> Tested-by: Manoj Gupta <manojgupta@chromium.org> Commit-Queue: George Burgess <gbiv@chromium.org>
2022-06-17afdo_metadata: Publish the new kernel profilesMichael Benfield
Update chromeos-kernel-4.4 Update chromeos-kernel-4.14 Update chromeos-kernel-4.19 Update chromeos-kernel-5.4 Update chromeos-kernel-5.10 BUG=None TEST=Verified in kernel-release-afdo-verify-orchestrator Change-Id: Icde18d30e128cfb4fbc26414ec747403392541a0 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/3708110 Tested-by: Denis Nikitin <denik@chromium.org> Commit-Queue: Michael Benfield <mbenfield@google.com> Reviewed-by: Denis Nikitin <denik@chromium.org>
2022-06-16llvm_tools: Migrate patch_manager.py bisectionJordan R Abrahams-Whitehead
Previous restructing did not handle the bisection case, as it was considerably more complicated than other failure modes for patch_manager.py This commit changes the operation of bisection in patch_manager.py quite drastically, as it now assumes that the git bisection process can occur outside of patch_manager.py, rather than internally. BUG=b:188465085 TEST=./patch_manager_unittests.py TEST=./patch_manager.py --failure_mode bisect <...> \ # With a patch that applied far too late Change-Id: I156373dc13bcbd3d297f8537fb6fb77fe9f0e9a5 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/3704539 Commit-Queue: Jordan Abrahams-Whitehead <ajordanr@google.com> Tested-by: Jordan Abrahams-Whitehead <ajordanr@google.com> Reviewed-by: George Burgess <gbiv@chromium.org>
2022-06-15llvm_tools: Print removed in patch_manager.pyJordan R Abrahams-Whitehead
We should print out what we actually did, instead of just exiting silently when everything goes well. This is informative to the user running patch_manager.py code. BUG=b:188465085 TEST=./patch_manager_unittest.py Change-Id: Idcb203d0c3e28d1b00e7b9503334863b7844d033 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/3706059 Reviewed-by: George Burgess <gbiv@chromium.org> Tested-by: Jordan Abrahams-Whitehead <ajordanr@google.com> Commit-Queue: Jordan Abrahams-Whitehead <ajordanr@google.com>
2022-06-15llvm_tools: Unify patch json representationJordan R Abrahams-Whitehead
At present, I made a mistake where patch_utils expected certain keys to exist. However, the original patch_manager.py didn't. This was further broken by the fact that patch_sync.py would avoid serializing the 'platforms' field if empty, causing a back and forth between patch_utils.py and patch_sync. Update the unittests to match and verify we're doing the correct thing. BUG=None TEST=./patch_utils_unittest.py TEST=./patch_manager_unittest.py Change-Id: Ib02c9d552848831f395b006de9a28ea4292b82f7 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/3704542 Tested-by: Jordan Abrahams-Whitehead <ajordanr@google.com> Reviewed-by: George Burgess <gbiv@chromium.org> Commit-Queue: Jordan Abrahams-Whitehead <ajordanr@google.com>
2022-06-14llvm_tools: Restructure most patch_manager modesJordan R Abrahams-Whitehead
This is an attempt to gradually replace some of the behavior of patch_manager.py with a more extendable structure. Instead of having the same code handle every patch_manager.py mode, instead we can have a dispatch for supported modes, and the fallback to legacy when we can't separate the existing behavior. This does not change the external API of patch_manager.py at all. All unittests still pass, and we're still applying patches correctly as expected. BUG=b:188465085, b:227216280 TEST=./patch_manager_unittest.py TEST=cp patch_manager.py patch_utils.py ${llvm_files}/patch_manager/ \ && sudo emerge llvm Change-Id: I43d26d4e903140ce2e490624aaac15d0bae898cd Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/3661358 Tested-by: Jordan Abrahams-Whitehead <ajordanr@google.com> Reviewed-by: George Burgess <gbiv@chromium.org> Commit-Queue: Jordan Abrahams-Whitehead <ajordanr@google.com>
2022-06-10compiler_wrapper: add a --version_suffix flag to build.pyGeorge Burgess IV
This allows us to provide more information about the compiler being wrapped to the wrapper. The intended use of this is to embed hashes of the compiler being wrapped into the wrapper itself, so as the compiler changes, the wrapper's SHA changes with it. While I'm in the area, fix up a comment, and apply this flag to our manual wrapper installation script. BUG=b:222321317 TEST=`emerge llvm` Change-Id: I20380722e1e539d51fe7ea708c63dad696d84c87 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/3696434 Reviewed-by: Denis Nikitin <denik@chromium.org> Tested-by: George Burgess <gbiv@chromium.org> Commit-Queue: George Burgess <gbiv@chromium.org>
2022-06-10llvm_tools: Add more utils to patch_utils.pyJordan R Abrahams-Whitehead
This adds the json_to_patch_entries function which abstracts away a common pattern to convert the PATCHES.json file contents into patch_entries eagerly. Fixes some typing issues too that have presented themselves in later CLs. BUG=None TEST=./patch_utils_unittest.py Change-Id: I5ecb1aedbbfb4f04176c021ff976da417319c17e Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/3699193 Reviewed-by: George Burgess <gbiv@chromium.org> Tested-by: Jordan Abrahams-Whitehead <ajordanr@google.com> Commit-Queue: Jordan Abrahams-Whitehead <ajordanr@google.com>
2022-06-07compiler_wrapper: include header lints for tidyRyan Beltran
This CL adds a flag to clang tidy invocations to prevent supressed lints in header files. BUG=b:187790543 TEST=None Change-Id: I9977818894899fc6c28f0c3d4121326ca854e1b3 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/3694553 Commit-Queue: Ryan Beltran <ryanbeltran@chromium.org> Tested-by: Ryan Beltran <ryanbeltran@chromium.org> Reviewed-by: George Burgess <gbiv@chromium.org>
2022-06-03llvm_tools: Add atomic_write to patch_utils.pyJordan R Abrahams-Whitehead
This allows a utility function which can write to an arbitrary file without risking an incomplete write error, causing issues and creating an invalid edit. This function ensures that the file is only swapped if the file write was successful, otherwise the file is deleted. BUG=None TEST=./patch_utils_unittest.py Change-Id: Iedc3297b0e59d216f027e6ff125f92bc4d088c7d Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/3685569 Reviewed-by: George Burgess <gbiv@chromium.org> Commit-Queue: Jordan Abrahams-Whitehead <ajordanr@google.com> Tested-by: Jordan Abrahams-Whitehead <ajordanr@google.com>
2022-06-01llvm_tools: Clean up of patch_manager.pyJordan R Abrahams-Whitehead
This is just some general clean up of patch_manager.py before any structural changes. Mostly sorting imports, re-doing some typing. BUG=None TEST=./patch_manager_unittest.py Change-Id: I96d6db4efb20ed4b934a39defe9171de5e19d450 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/3673493 Commit-Queue: Jordan Abrahams-Whitehead <ajordanr@google.com> Reviewed-by: George Burgess <gbiv@chromium.org> Tested-by: Jordan Abrahams-Whitehead <ajordanr@google.com>
2022-06-01llvm_tools: Add patch_utils.py and unittestsJordan R Abrahams-Whitehead
This introduces the patch_utils.py library, which contains various PATCHES.json and patch_manager utilities that will be useful for future patch manager restructuring. In particular, patch_manager.py doesn't explain why its patches fail, or give any information as to what is wrong with its patch applications. patch_utils.py provides the PatchEntry class, which is a self contained object which can provide this diagnostic information. This module will later be incorporated into patch_manager.py and get_upstream_patches.py BUG=b:188465085, b:227216280 TEST=./patch_utils_unittest.py Change-Id: I6f6e24e6449ea68f6751fbcad14fca76c1bbaec8 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/3648887 Tested-by: Jordan Abrahams-Whitehead <ajordanr@google.com> Reviewed-by: George Burgess <gbiv@chromium.org> Commit-Queue: Jordan Abrahams-Whitehead <ajordanr@google.com>
2022-05-23crosperf: remove ".cros" suffix from hostnamesBob Haarman
We don't need the ".cros" suffix anymore, and its presence causes the ping check for at least one host to fail. BUG=b:231402615 TEST=Checking lab machines should pass after this Change-Id: I620db48c6f92837c12f86886eb9e87168dfc6ed7 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/3661356 Reviewed-by: Denis Nikitin <denik@chromium.org> Tested-by: Bob Haarman <inglorion@chromium.org> Commit-Queue: Bob Haarman <inglorion@chromium.org>
2022-05-20afdo_metadata: Publish the new kernel profilesDenis Nikitin
Update chromeos-kernel-4.4 Update chromeos-kernel-4.14 Update chromeos-kernel-4.19 Update chromeos-kernel-5.4 Update chromeos-kernel-5.10 BUG=None TEST=Verified in kernel-release-afdo-verify-orchestrator Change-Id: I882dfa16066e0048c1ed3640dcbb29c697786e23 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/3656068 Commit-Queue: Manoj Gupta <manojgupta@chromium.org> Auto-Submit: Denis Nikitin <denik@chromium.org> Tested-by: Denis Nikitin <denik@chromium.org> Reviewed-by: Manoj Gupta <manojgupta@chromium.org>
2022-05-19llvm_tools: Add check for invalid until valuesJordan R Abrahams-Whitehead
Currently in get_upstream_patch.py, it's possible for the "until" value to be earlier than "from", which means the patch can never apply. This CL reports this as an error now. Applies some pre-upload autofixes as well, and adds minor documentation for the --differential flag to describe some non-obvious behavior. BUG=None TEST=get_upstream_patch.py with invalid patch versions Change-Id: Ie8338f8b9b27f0c41f0e350706a3131e5daab1b2 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/3653987 Reviewed-by: Manoj Gupta <manojgupta@chromium.org> Commit-Queue: Jordan Abrahams-Whitehead <ajordanr@google.com> Tested-by: Jordan Abrahams-Whitehead <ajordanr@google.com> Reviewed-by: George Burgess <gbiv@chromium.org>
2022-05-17crosperf: Remove .cros dependency and add snappy to remotesDenis Nikitin
Clean up code which handles ".cros" suffix. Crosfleet, ssh and cros shell don't require .cros suffix in remotes. Snappy device is back. Add it to lab machines checks. BUG=b:231402615 TEST=tested locally Change-Id: I6e9a308428de05b8e84891933bdc19c55e18d08e Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/3651281 Commit-Queue: Denis Nikitin <denik@chromium.org> Reviewed-by: Manoj Gupta <manojgupta@chromium.org> Tested-by: Denis Nikitin <denik@chromium.org>
2022-05-17afdo_metadata: Publish the new kernel profilesDenis Nikitin
Update chromeos-kernel-4.4 Update chromeos-kernel-4.14 Update chromeos-kernel-4.19 Update chromeos-kernel-5.4 Update chromeos-kernel-5.10 BUG=None TEST=Verified in kernel-release-afdo-verify-orchestrator Change-Id: If3f7a828c656a6534f7cf93aa7beed5666e1ed71 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/3647287 Commit-Queue: Jordan Abrahams-Whitehead <ajordanr@google.com> Auto-Submit: Denis Nikitin <denik@chromium.org> Reviewed-by: Jordan Abrahams-Whitehead <ajordanr@google.com> Tested-by: Denis Nikitin <denik@chromium.org>
2022-05-17auto_delete_nightly_test_data: gracefully handle dirs not existingGeorge Burgess IV
To avoid cases like the attached bug, simply log when a dir doesn't exist. Doesn't seem bad to consider this a success. BUG=b:232843376 TEST=None Change-Id: I291d1b1ca4007d2402a6707c83ce483470099c84 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/3651935 Auto-Submit: George Burgess <gbiv@chromium.org> Reviewed-by: Jordan Abrahams-Whitehead <ajordanr@google.com> Commit-Queue: Jordan Abrahams-Whitehead <ajordanr@google.com> Tested-by: George Burgess <gbiv@chromium.org>
2022-05-16compiler_wrapper: keep FORTIFY if sanitizer is trivialGeorge Burgess IV
For sanitizers like `return`, `builtin`, etc., we have no reason to also drop FORTIFY checks. BUG=b:231357370 TEST=`go test` Change-Id: I1e349a4f6743e549b7bc0899a307b10683bb42e9 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/3651188 Reviewed-by: Manoj Gupta <manojgupta@chromium.org> Commit-Queue: George Burgess <gbiv@chromium.org> Tested-by: George Burgess <gbiv@chromium.org>
2022-05-16compiler_wrapper: fix testGeorge Burgess IV
`-Wl,-z -Wl,defs` should be passed as separate flags. BUG=b:231357370 TEST=go test Change-Id: Iacd0be0c74df0cc7bd8607473a859c36c5ef4f06 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/3651187 Commit-Queue: Manoj Gupta <manojgupta@chromium.org> Auto-Submit: George Burgess <gbiv@chromium.org> Reviewed-by: Manoj Gupta <manojgupta@chromium.org> Tested-by: George Burgess <gbiv@chromium.org>
2022-05-12compiler_wrapper: handle split "-Wl,-z,defs"Adrian Ratiu
During the libxcrypt build, both "-Wl,-z,defs" and its split equivalent "-Wl,-z -Wl,defs" are used which create problems because only the unified version is supported. This adds support for filtering the flags seprately and two tests to verify the functionality. BUG=b:187795307 TEST=Local builds with cross-*/libxcrypt; CQ. Change-Id: If48499f5c8e552e28c7cefd2d959e40f4757a88f Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/3641843 Tested-by: Adrian Ratiu <adrian.ratiu@collabora.corp-partner.google.com> Reviewed-by: Manoj Gupta <manojgupta@chromium.org> Reviewed-by: George Burgess <gbiv@chromium.org> Commit-Queue: Manoj Gupta <manojgupta@chromium.org> Tested-by: Manoj Gupta <manojgupta@chromium.org>
2022-05-11crosperf: Update remote lab machinesDenis Nikitin
BUG=b:231402615 TEST=ping <dut> Change-Id: I40b3c47f9c5209501cb2a15457a4c640887e8733 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/3642336 Tested-by: Denis Nikitin <denik@chromium.org> Commit-Queue: Denis Nikitin <denik@chromium.org> Reviewed-by: Ryan Beltran <ryanbeltran@chromium.org>
2022-05-11compiler_wrapper: `go fmt`George Burgess IV
Pre-upload checks in chromiumos-overlay complained about these files not being `go fmt`'ed; do that. This is apparently an artifact of a build tag migration upstream: https://go.googlesource.com/proposal/+/master/design/draft-gobuild.md ...so leave both in here for a while. BUG=b:232114933 TEST=go test Change-Id: I8f8e0896d3e3ce37d155035d93412f8c1c89b1b7 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/3639686 Tested-by: George Burgess <gbiv@chromium.org> Commit-Queue: Jordan Abrahams-Whitehead <ajordanr@google.com> Reviewed-by: Jordan Abrahams-Whitehead <ajordanr@google.com> Auto-Submit: George Burgess <gbiv@chromium.org>
2022-05-11compiler_wrapper: Disable warning implicit-intManoj Gupta
Wimplicit-int has been promoted to be an default error even with Wno-error. Disable the error by default since it is breaking a lot of packages. BUG=b:231987783 TEST=cq Change-Id: If88877cb63cdd5c392fcf05c2940751547466213 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/3642338 Tested-by: Manoj Gupta <manojgupta@chromium.org> Reviewed-by: George Burgess <gbiv@chromium.org> Commit-Queue: George Burgess <gbiv@chromium.org> Auto-Submit: Manoj Gupta <manojgupta@chromium.org>
2022-05-10compiler_wrapper: move common clangFlags to a functionGeorge Burgess IV
BUG=b:232114933 TEST=go test Change-Id: Iffc686c47c21017a31b9fb69e1f2764390fe29f3 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/3639683 Reviewed-by: Jordan Abrahams-Whitehead <ajordanr@google.com> Commit-Queue: George Burgess <gbiv@chromium.org> Tested-by: George Burgess <gbiv@chromium.org>
2022-05-10compiler_wrapper: sort clangFlags; partition for dedupGeorge Burgess IV
This CL sorts clang flags, and puts ones shared across all CrOS configurations into their own textual blocks. This should make factoring these out into their own function not require golden updates, which makes verifying the CL that actually _does_ that simpler. BUG=b:232114933 TEST=go test Change-Id: I7dc6110d680505d4ad2af98709730e85c386ae5d Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/3639682 Reviewed-by: Jordan Abrahams-Whitehead <ajordanr@google.com> Tested-by: George Burgess <gbiv@chromium.org> Commit-Queue: George Burgess <gbiv@chromium.org>
2022-05-10compiler_wrapper: factor clangPostFlags into a function; sortGeorge Burgess IV
Since order doesn't matter, make this sorted. Otherwise, these are all shared, so no point in repeating them. BUG=b:232114933 TEST=go test Change-Id: Ide3c620de9018fed3fe8d898b21b3d5d4f42700f Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/3639281 Reviewed-by: Jordan Abrahams-Whitehead <ajordanr@google.com> Commit-Queue: George Burgess <gbiv@chromium.org> Tested-by: George Burgess <gbiv@chromium.org>
2022-05-10compiler_wrapper: un-pointer-ify all configsGeorge Burgess IV
We do nothing with these but immediately deref them. It's simpler (and should be infinitesimally faster) to just have values here. BUG=None TEST=go test Change-Id: I6df8eda8f36032e856f9abad3e090c62c9d6beb0 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/3639684 Commit-Queue: George Burgess <gbiv@chromium.org> Reviewed-by: Jordan Abrahams-Whitehead <ajordanr@google.com> Tested-by: George Burgess <gbiv@chromium.org>
2022-05-10compiler_wrapper: Disable warning implicit-function-declarationManoj Gupta
Wimplicit-function-declaration has been promoted to be an default error even with Wno-error. Disable the error by default since it is breaking a lot of packages. BUG=b:230345382 TEST=cq Change-Id: Ib46b0b47a3e1dea3797739370a4d9cf92a4d25f9 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/3637117 Tested-by: Manoj Gupta <manojgupta@chromium.org> Auto-Submit: Manoj Gupta <manojgupta@chromium.org> Reviewed-by: George Burgess <gbiv@chromium.org> Commit-Queue: Manoj Gupta <manojgupta@chromium.org>
2022-05-10compiler_wrapper: remove -checks=* for tidyRyan Beltran
This CL removes -checks=*` from the Clang Tidy flags when WITH_TIDY=tricium which allows projects to provide their own configuration files for clang tidy. BUG=b:187790543 TEST=manually tested Change-Id: Ic6893a09146f071874f21f7bedb04a1f85e83284 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/3635256 Reviewed-by: George Burgess <gbiv@chromium.org> Commit-Queue: Ryan Beltran <ryanbeltran@chromium.org> Tested-by: Ryan Beltran <ryanbeltran@chromium.org>
2022-05-10check-presubmit: use `isort` with `yapf`George Burgess IV
This requires a few things: - Running `isort` to begin with - Syncing with Chromite's `yapf` config, so `yapf` and `isort` don't disagree - ...Which itself requires upgrading `yapf`, since these disagree with `yapf`'s current configuration in toolchain-utils. The most recent chromite configuration requires v0.31.0, and depot_tools only has v0.27.0. This CL does all of these. BUG=b:231985625 TEST=Ran on a few files in toolchain-utils Change-Id: I43414abea7b75790b129e78708903ed90dae6ab0 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/3636138 Reviewed-by: Jordan Abrahams-Whitehead <ajordanr@google.com> Commit-Queue: George Burgess <gbiv@chromium.org> Tested-by: George Burgess <gbiv@chromium.org>