aboutsummaryrefslogtreecommitdiff
path: root/compiler_wrapper/testdata
AgeCommit message (Collapse)Author
2021-12-06compiler_wrapper: add missing unused-but-set-varRyan Beltran
This CL adds a Wno-unused-but-set-var flag that was accidentally missing in a clangPostFlags field. THis is already present in the llvm repo, must have been fixed in there without mirroring it. BUG=b:195433889 TEST=None Change-Id: I23fcc91aee7b316cd70652f0119177d5ebdf7bbd Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/3319338 Reviewed-by: Manoj Gupta <manojgupta@chromium.org> Commit-Queue: Ryan Beltran <ryanbeltran@chromium.org> Tested-by: Ryan Beltran <ryanbeltran@chromium.org>
2021-10-20compiler_wrapper: ignore unused_but_set_variableRyan Beltran
This CL adds -Wno-unused-but-set-variable to clang post flags to prevent these warnings from blocking the LLVM uprev. BUG=b:195433889 TEST=cq Change-Id: I5195412183e2684aecd20b6ff2c3345f8b8b9dfb Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/3235575 Reviewed-by: Manoj Gupta <manojgupta@chromium.org> Commit-Queue: Ryan Beltran <ryanbeltran@chromium.org> Tested-by: Ryan Beltran <ryanbeltran@chromium.org>
2021-10-08compiler_wrapper: move llvmnext flag to post flagsRyan Beltran
This CL moves flags added for LLVM Next that disabled variable_unused_but_set warnings to PostFlags in order to make sure it gets added after Wall and Wextra. BUG=b:195433889 TEST=reran package tests Change-Id: Icdd2cbe3ced7b8427257c87f9e527b0d0e8da57d Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/3214640 Reviewed-by: Manoj Gupta <manojgupta@chromium.org> Commit-Queue: Ryan Beltran <ryanbeltran@chromium.org> Tested-by: Ryan Beltran <ryanbeltran@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-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-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-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-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-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-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-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>
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-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-05toolchain-utils: Sync compiler wrapper changes with llvm changes.Caroline Tice
This updates the compiler wrapper flags to match recent updates to compiler wrapper in sys-devel/llvm (for llvm-next). BUG=chromium:1133468 TEST=None Change-Id: Ibab9f0e1d0e35db3ba838e70a812efe2d5137a0a Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/2448871 Reviewed-by: Manoj Gupta <manojgupta@chromium.org> Commit-Queue: Caroline Tice <cmtice@chromium.org> Tested-by: Caroline Tice <cmtice@chromium.org>
2020-09-22toolchain-utils: Update compiler wrapper to disable warning.Caroline Tice
This CL updates toolchain-utils to match recent compiler wrapper changes in sys-devel/llvm/files. It's purpose is to disable the new warning -Wcompound-token-split-by-space. Also update golden tests appropriately. BUG=chromium:1130080 TEST=Previous CL already tessted/committed. Change-Id: I261250dc7ed6f1be7c3aa4652d793c924e1dc18d Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/2423619 Commit-Queue: Caroline Tice <cmtice@chromium.org> Commit-Queue: George Burgess <gbiv@chromium.org> Tested-by: Caroline Tice <cmtice@chromium.org> Auto-Submit: Caroline Tice <cmtice@chromium.org> Reviewed-by: George Burgess <gbiv@chromium.org>
2020-08-13compiler_wrapper: remove some flags from unsupport clang flagsJian Cai
LLVM implemented some flags that used to not be supported. Remove these flags from unsupported flags in the wrapper. BUG=chromium:1112929 TEST=tested locally. Change-Id: If91df0d35ac3db926067d3e0c5e213f6c5e3f390 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/2346956 Reviewed-by: Manoj Gupta <manojgupta@chromium.org> Tested-by: Jian Cai <jiancai@google.com>
2020-08-10compiler_wrapper: use crashArtifactsDir to apply clang optsGeorge Burgess IV
Since we now have crashArtifactsDir as a more abstract concept, it seems good to apply '-fcrash-diagnostics-dir=' based on that, rather than having it as an explicit clang flag. BUG=chromium:1113442 TEST=FIXME Change-Id: I147779d7cf8806b3bc712c2998446158e87ec967 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/2343975 Reviewed-by: Manoj Gupta <manojgupta@chromium.org> Tested-by: George Burgess <gbiv@chromium.org>
2020-07-30compiler_wrapper: add -fexperimental-new-pass-managerJian Cai
LLVM is currently build with DENABLE_EXPERIMENTAL_NEW_PASS_MANAGER=ON on Chrome OS. This is however not reflected in clang crash diagnoses. Adding -fexperimental-new-pass-manager to help with reproducibility on 4c. BUG=chromium:1111103 TEST=CQ tests. Change-Id: Ie01431dff397e982469e29c9132e21374354762d Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/2327414 Reviewed-by: George Burgess <gbiv@chromium.org> Reviewed-by: Manoj Gupta <manojgupta@chromium.org> Tested-by: Jian Cai <jiancai@google.com>
2020-07-14compiler_wrapper: remove -grecord-gcc-switchesBob Haarman
-grecord-gcc-switches causes the compiler and compiler flags to be stored in the produced debug information. This causes Goma builds to be non-deterministic, because the compiler path differs depending on whether the compiler was run locally or on Goma. This, in turn, causes cache pollution and needless work. Since we are not in fact using the information stored by -grecord-gcc-switches, this change disables it. We can re-enable it when we want to start using the information, provided we come up with another way to avoid the issues described earlier. BUG=chromium:1103065 TEST=Build an object file in chromeos-chrome and check that info is absent Change-Id: Ib8022a3a1baf2e4b5d3d9d1453deb67f539baff4 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/2290624 Commit-Queue: Bob Haarman <inglorion@chromium.org> Tested-by: Bob Haarman <inglorion@chromium.org> Reviewed-by: George Burgess <gbiv@chromium.org> Reviewed-by: Tiancong Wang <tcwang@google.com>
2020-06-26compiler_wrapper: redirect clang crash dignosesJian Cai
Redirect all diagnoses of clang crashes to a dedicated directory using fcrash-diagnostics-dir so we can upload these files to the cloud. The flag was added to clangPostFlags to overwite redirection done on package level. BUG=chromium:1056904 TEST=None Change-Id: I78bfc77d7f3af8556b4308f2e71407d627627747 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/2251038 Reviewed-by: Manoj Gupta <manojgupta@chromium.org> Commit-Queue: Jian Cai <jiancai@google.com> Tested-by: Jian Cai <jiancai@google.com>
2020-05-04Revert "wrapper: Temporarily disable -Wmax-tokens"Tiancong Wang
This reverts commit 3b2358092e00ab7904a873b516ac6aac832c2277. According to crrev.com/c/2171058, the fix in chromium could work. Will wait till the patch submitted in chromium and CrOS uprevs to merge the change into CrOS. Reason for revert: The workaround is not needed anymore. Original change's description: > wrapper: Temporarily disable -Wmax-tokens > > As reported in crbug.com/1072209, -Wmax-tokens is causing latest > chrome fail to build. While we are blocked by Chrome uprevs, we > want to update the compiler by disabling the warning, until it's > fixed properly on upstream Chrome. > > BUG=chromium:1072209 > TEST=Local testing in CrOS > > Change-Id: I082dd342a802e80250d0fca7c4b15afb4e972e7e > Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/2161770 > Commit-Queue: Tiancong Wang <tcwang@google.com> > Tested-by: Tiancong Wang <tcwang@google.com> > Reviewed-by: George Burgess <gbiv@chromium.org> Bug: chromium:1072209 Change-Id: I904fb3c4f7d125579667bef675be654a5465fad9 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/2173949 Tested-by: Tiancong Wang <tcwang@google.com> Reviewed-by: Manoj Gupta <manojgupta@chromium.org> Commit-Queue: Tiancong Wang <tcwang@google.com>
2020-04-22wrapper: Temporarily disable -Wmax-tokensTiancong Wang
As reported in crbug.com/1072209, -Wmax-tokens is causing latest chrome fail to build. While we are blocked by Chrome uprevs, we want to update the compiler by disabling the warning, until it's fixed properly on upstream Chrome. BUG=chromium:1072209 TEST=Local testing in CrOS Change-Id: I082dd342a802e80250d0fca7c4b15afb4e972e7e Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/2161770 Commit-Queue: Tiancong Wang <tcwang@google.com> Tested-by: Tiancong Wang <tcwang@google.com> Reviewed-by: George Burgess <gbiv@chromium.org>
2020-03-13compiler_wrapper: Stop setting CCACHE_BASEDIRManoj Gupta
CCACHE_BASEDIR used to be set to sysroot so that ccache can reuse compilation results across different boards. This is not useful on builders and also less useful for board builds since we set closer to target CFLAGS now. It also breaks use of -fmacro-prefix-map option in clang/gcc. So rip it out and simplify the rest of code. BUG=chromium:983759 TEST=go test Change-Id: Ia99ca994c976ee1137c3d904a78f7e25931c70f6 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/2103170 Commit-Queue: Manoj Gupta <manojgupta@chromium.org> Tested-by: Manoj Gupta <manojgupta@chromium.org> Reviewed-by: George Burgess <gbiv@chromium.org>
2020-03-13compiler_wrapper: Add "-fcommon" to clang invocationsManoj Gupta
Clang ToT has switched to "-fno-common" as default to match GCC 10 which breaks many packages. Upgrading to ToT versions of many packages does not fix the problem as packages upstream have not fixed them yet. Pass "-fcommon" in compiler wrapper to workaround this for now. This does not change the current clang behavior which defaults to "-fcommon" so this is a NFC. BUG=chromium:1060413 TEST=packages build with ToT clang; NFC for current clang Change-Id: I5a40e502db201615f45a7e4720105bebef2f2b0a Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/2102905 Reviewed-by: George Burgess <gbiv@chromium.org> Commit-Queue: Manoj Gupta <manojgupta@chromium.org> Tested-by: Manoj Gupta <manojgupta@chromium.org>
2020-03-04compiler-wrapper: Update clang-tidy flags to match Android.Caroline Tice
The flags that we use to generate clang tidy warnings have gotten out of sync with the flags the Android team uses. This CL fixes that. BUG=None TEST=None Change-Id: I766af02fee111e2e2233612e8352de1fb0802c3b Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/2088431 Reviewed-by: George Burgess <gbiv@chromium.org> Reviewed-by: Manoj Gupta <manojgupta@chromium.org> Commit-Queue: Caroline Tice <cmtice@chromium.org> Tested-by: Caroline Tice <cmtice@chromium.org>
2020-03-04compiler_wrapper: Stop disabling two warnings.Manoj Gupta
Chrome OS code now is clean of following warnings: "-Wreorder-init-list" and "-return-stack-address" so stop disabling them. BUG=chromium:1057384 TEST=warnings tested by CL:1898670 Change-Id: I568cf93a9e836ba936ea976312e9a78b5c473157 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/2081707 Tested-by: Manoj Gupta <manojgupta@chromium.org> Reviewed-by: George Burgess <gbiv@chromium.org>
2020-02-28When double-build-with-Wno-error, add -Wno-error=foo for -Werror=fooPirama Arumuga Nainar
This will gracefully handle cases where a warning enforced with -Werror got stricter in upstream. This change also needs updates to golden testdata. No additional tests added since this is covered by existing tests. Originally reviewed in https://android-review.googlesource.com/c/1244796. BUG=b:149836702 TEST=go test Change-Id: I94624deb258b15e131387377b99bfb1747dca1a1 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/2079548 Tested-by: Pirama Arumuga Nainar <pirama@google.com> Reviewed-by: George Burgess <gbiv@chromium.org>
2020-02-14toolchain-utils: fix python3 errors in go scriptsZhizhou Yang
There are several places go scrtips launching and generating python related code. This patch makes sure they are python 3 compatible. BUG=chromium:1042452, chromium:1011676 TEST=Passed all python and go tests. Change-Id: Ie531ceedb14ca2af94bd26f59ba4cab399ef1e6a Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/2054081 Reviewed-by: Manoj Gupta <manojgupta@chromium.org> Commit-Queue: Zhizhou Yang <zhizhouy@google.com> Tested-by: Zhizhou Yang <zhizhouy@google.com> Auto-Submit: Zhizhou Yang <zhizhouy@google.com>
2020-02-13compiler_wrapper: update the presubmit tests.Jian Cai
Update paths used in test cases. BUG=chromium:1042452 TEST=verified locally. Change-Id: I0ddca454280f91508b632785ec9b417328e2ab3e Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/2018235 Tested-by: Jian Cai <jiancai@google.com> Reviewed-by: George Burgess <gbiv@chromium.org>
2020-01-22compiler_wrapper: add python search pathJian Cai
Exporting BISECT_STAGE to POPULATE_GOOD currently makes the wrapper fail to build any files with the error message of "ModuleNotFoundError: No module named 'bisect_driver'". This patch fixes the issue by adding search path for bisect_driver.py explicitly. BUG=chromium:1042452 TEST=verified locally. Change-Id: I7c73459b377d9011c7087a9e241db378ffb216e8 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/2003947 Tested-by: Jian Cai <jiancai@google.com> Reviewed-by: Manoj Gupta <manojgupta@chromium.org> Reviewed-by: George Burgess <gbiv@chromium.org>
2019-10-31toolchain_utils: Upgrade compiler wrapper for llvm r370808.Caroline Tice
BUG=chromium:1001317 TEST=In progress Change-Id: I78481d2ca3f555d670e7e5972e547f94d2be22a8 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/1888745 Reviewed-by: George Burgess <gbiv@chromium.org> Reviewed-by: Tobias Bosch <tbosch@google.com> Commit-Queue: Caroline Tice <cmtice@chromium.org> Tested-by: Caroline Tice <cmtice@chromium.org>
2019-10-29toolchain_utils: Add post-user flags to compiler_wrapper.Caroline Tice
This adds the ability to add flags to the compiler command that cannot be overridden by the user (e.g. when we MUST turn off a warning). It adds '-Wno-implicit-int-float-conversion as such a flag for llvm-next. BUG=chromium:1018778 TEST='go test' passes Change-Id: Ic57747be9719be83d3c5f7d7b4f4263f69f4de61 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/1881725 Reviewed-by: Tobias Bosch <tbosch@google.com> Reviewed-by: George Burgess <gbiv@chromium.org> Commit-Queue: Caroline Tice <cmtice@chromium.org> Tested-by: Caroline Tice <cmtice@chromium.org> Legacy-Commit-Queue: Commit Bot <commit-bot@chromium.org>
2019-10-17compiler_wrapper: remove WITH_TIDY support for android.Tobias Bosch
Also consolidates most of the android specific logic into one place so it's clear which flags are used and which ones are not. Also detects wrapping of clang-tidy for future special casing. BUG=chromium:773875 TEST=unit tests, golden tests TEST=android's test_compiler.py --with-tidy Change-Id: Ic83340ba63ec3ea4c3c174069d3dc017ecbcdd72 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/1866603 Tested-by: Tobias Bosch <tbosch@google.com> Reviewed-by: George Burgess <gbiv@chromium.org>
2019-10-11compiler_wrapper: Disable new pass manager with sanitizers+coverage.Manoj Gupta
Useing sanitizers and coverage together in new pass manager causes clang to crash. Avoid the crash by disabling new pass manager in these cases. BUG=chromium:1013622 TEST=go test Change-Id: Ifc787e9f288891e3e1b68c791f0ddaa508d8c816 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/1856379 Tested-by: Manoj Gupta <manojgupta@chromium.org> Reviewed-by: George Burgess <gbiv@chromium.org>
2019-10-11compiler_wrapper: Replace UserHomeDir uses.Tobias Bosch
os.UserHomeDir is not available in the Go version in Cros SDK. Replace by explicit env value of "HOME". BUG=None TEST=go test Change-Id: Ia0da2d9bce042510fcc1b14cb074dadfe4d0f2f2 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/1856381 Commit-Queue: Manoj Gupta <manojgupta@chromium.org> Reviewed-by: George Burgess <gbiv@chromium.org> Reviewed-by: Tobias Bosch <tbosch@google.com> Tested-by: Manoj Gupta <manojgupta@chromium.org> Legacy-Commit-Queue: Commit Bot <commit-bot@chromium.org>
2019-10-11Android wrapper: Support wrapping clang-tidyTobias Bosch
Android uses the wrapper also for clang-tidy. TEST=golden tests BUG=chromium:773875 Change-Id: I17534b44b1bc7e6b60002f2660966f27d70301ad Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/1854899 Reviewed-by: George Burgess <gbiv@chromium.org> Tested-by: Tobias Bosch <tbosch@google.com>
2019-10-10toolchain-utils: Enable poison system warning in llvm-nextDenis Nikitin
Add "poison-system-directories" warning in llvm-next builds. Treat as an error. BUG=None TEST=not tested Change-Id: Iaca80da6f38d27fe8e98a67c6701a7884d2ca5b2 Reviewed-on: https://chromium-review.googlesource.com/1839120 Tested-by: Denis Nikitin <denik@chromium.org> Commit-Ready: Denis Nikitin <denik@chromium.org> Legacy-Commit-Queue: Commit Bot <commit-bot@chromium.org> Reviewed-by: Manoj Gupta <manojgupta@chromium.org> Reviewed-by: Tobias Bosch <tbosch@google.com>
2019-10-02Android wrapper: Support compile with fallback.Tobias Bosch
The old android wrapper supports to use a fallback compiler in case of errors. This replicates this logic. See https://cs.corp.google.com/android/toolchain/llvm_android/compiler_wrapper.py. BUG=chromium:773875 TEST=unit test, golden tests comparing to old wrapper Change-Id: Iff7281e6e21c4834f9a4493884ed7b3d66b87967 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/1833898 Tested-by: Tobias Bosch <tbosch@google.com> Reviewed-by: George Burgess <gbiv@chromium.org>
2019-09-30Android wrapper: Support @param files for bisection.Tobias Bosch
BUG=chromium:773875 TEST=unit test Change-Id: I94f99977f823e098aae39c79b9e01603fd84f5fa Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/1832309 Tested-by: Tobias Bosch <tbosch@google.com> Reviewed-by: George Burgess <gbiv@chromium.org>
2019-09-30Android wrapper: Add support for --gomacc-path.Tobias Bosch
This is used by Android. To keep the wrappers in sync, we also support it on ChromeOS. BUG=chromium:773875 TEST=golden tests and comparison against old andorid wrapper. Change-Id: I02d7456ead1c94327eb6810aeef4d106596518ec Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/1831789 Reviewed-by: George Burgess <gbiv@chromium.org> Tested-by: Tobias Bosch <tbosch@google.com>
2019-09-30Initial support for the android wrapper.Tobias Bosch
BUG=chromium:773875 TEST=golden tests and comparison against old andorid wrapper. Change-Id: Ic11be4bc1399adcbf9c50134928aceda45e936ca Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/1831787 Tested-by: Tobias Bosch <tbosch@google.com> Reviewed-by: George Burgess <gbiv@chromium.org>
2019-09-26Support extra args for llvm next.Tobias Bosch
Also removes the capability of defining the old wrapper path now that we are getting close to landing it. BUG=chromium:773875 TEST=golden tests and comparison against old wrapper. Change-Id: I543ddb1651edf2a269917f8afb5a667129bc3561 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/1826986 Tested-by: Tobias Bosch <tbosch@google.com> Reviewed-by: George Burgess <gbiv@chromium.org>
2019-09-16clang wrappers: Use LLD as the default linker.Manoj Gupta
Match the changes to python wrapper in CL:1686078. Also add small fix for echo path, it should be /bin/echo instead of /usr/bin/echo. BUG=chromium:979909 TEST=go test Change-Id: I5e626febd5abab4f9824aba1e158f264bf75be9e Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/1803778 Tested-by: Manoj Gupta <manojgupta@chromium.org> Reviewed-by: Tobias Bosch <tbosch@google.com>
2019-08-26Only resolve cmd path against $PATH if path does not contain a folder.Tobias Bosch
BUG=chromium:773875 TEST=unit test Change-Id: I442afcfac00bcdbdfa33b739087af12987c57584 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/1772176 Tested-by: Tobias Bosch <tbosch@google.com> Reviewed-by: George Burgess <gbiv@chromium.org>
2019-08-21Support "gcc", "clang" as compiler namesTobias Bosch
BUG=chromium:773875 TEST=golden tests, emerge-lakitu sys-kernel/linux-headers Change-Id: I205059a9f61484caaf69ed340fd42a47531e00f8 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/1762344 Tested-by: Tobias Bosch <tbosch@google.com> Reviewed-by: George Burgess <gbiv@chromium.org>
2019-08-20Match old wrapper for ordering of -mthumb and -fno-stack-protectorTobias Bosch
BUG=chromium:773875 TEST=golden tests and compare to old wrapper Change-Id: Iac9f45390cbe6076d3e3851da85de7d27fe11ed7 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/1762376 Reviewed-by: George Burgess <gbiv@chromium.org> Reviewed-by: Luis Lozano <llozano@chromium.org> Tested-by: Tobias Bosch <tbosch@google.com>