Commit graph

1242 commits

Author SHA1 Message Date
Chih-Hung Hsieh
43b920e707 Disable tidy checks in TidyGlobalNoChecks
* Save repeated strings in TidyFlags of build.ninja rules.
* Some of these checks were disabled to upgrade clang-tidy.
  They could later be moved to TidyDefaultGlobalChecks and
  TidyExternalVendorChecks if not breaking the build.
  Some projects can then enable those checks locally.

Test: WITH_TIDY=1 make; make tidy-soong_subset
Change-Id: I70e4218c929e3c88f766f2c68c56c51356110e72
2022-06-09 17:58:41 -07:00
Treehugger Robot
59d37c8bb6 Merge "Remove AIDL modules from VndkMustUseVendorVariantList" 2022-06-07 01:00:06 +00:00
Elliott Hughes
ba4a566e2d Merge "Revert "Disable BTI for now."" 2022-06-06 20:10:56 +00:00
Liz Kammer
ace70d857e Merge "Do not hardcode default/experimental c{pp}std" 2022-06-06 13:40:17 +00:00
Jooyung Han
43b2c668da Remove AIDL modules from VndkMustUseVendorVariantList
Vendor variants of AIDL-gen CC modules are by default different from
core variants. So instead of adding them manually to the list, AIDL
builder can mark them as MustUseVendorVariant.

Bug: 233616647
Test: m
Merged-In: Ifca0eb64d60ecb49d72cd0347336b69fb332c58c
Change-Id: Ifca0eb64d60ecb49d72cd0347336b69fb332c58c
2022-06-03 04:46:59 +00:00
Liz Kammer
a5a29de677 Do not hardcode default/experimental c{pp}std
Prevent bugs like b/232866078 by using the same values across Bazel and
Soong

Test: bp2build.sh
Change-Id: If257f9f5f8e8a70bbf3a8cf5479758c703c25c3f
2022-05-27 09:38:03 -04:00
Yi Kong
8ecb22d402 Enable string-compare warning
Test: presubmit
Bug: 153764102
Change-Id: I6fbf7a841cb6ea7bc8433fd2fddd5a825f68aa22
2022-05-24 16:16:21 +08:00
Treehugger Robot
5bec8d41ea Merge "Clean up some bp2build technical debt" 2022-05-23 18:01:04 +00:00
Chih-Hung Hsieh
8212621410 Reduce default global google-* clang-tidy checks
Now only keep the ones that do not have thousands of warnings.
We can add more such checks locally or when more warnings
are fixed or suppressed in source files.

Bug: 112478838
Bug: 218759304
Test: make tidy-soong_subset
Change-Id: Iac93310441cdc64ed80e8c30159a08f95e1e9ebc
2022-05-18 14:49:31 -07:00
Liz Kammer
3bf97bd1c0 Clean up some bp2build technical debt
Previously we ran mutators in bp2build mode to add dependencies, now we
look up modules by name directly. Remove workarounds to allow bp2build
mode to not fail when adding/handling dependencies.

Test: m bp2build
Change-Id: Ibf6fd905150cac306e5c395902ef28f609f4df2a
2022-05-13 19:47:48 -04:00
Elliott Hughes
6741d0eaa9 Now gnu11 is the default, bump experimental to gnu17.
Bug: http://b/232413369
Test: treehugger
Change-Id: I8a2b1eef744c219811c32ad46688437a1ba3f21e
2022-05-12 09:53:11 -07:00
Elliott Hughes
94361dc903 Merge "Try to bump the C default to C11." 2022-05-12 16:23:47 +00:00
Chih-hung Hsieh
63d5ba23ea Merge "Disable performance-no-int-to-ptr in global default" 2022-05-10 05:17:29 +00:00
Chih-Hung Hsieh
5d46cd396e Disable performance-no-int-to-ptr in global default
* This tidy check is too noisy,
  with more than 5000 cases over many files.

Bug: 218759304
Test: make tidy_soong_subset
Change-Id: I8a4b2589ecafdfcd9c19e8a4d59ce1784d1be694
2022-05-09 16:01:10 -07:00
Stephen Hines
7a2a9967b1 Reland "Update to clang-r450784e"
This reverts commit fbc5effdfd.

Bug: http://b/197965342
Bug: http://b/230930120
Test: m and also test internal targets
Change-Id: I49b2d80ef4191ebb08bb6e80507042ee628c7f09
Merged-In: I49b2d80ef4191ebb08bb6e80507042ee628c7f09
2022-05-09 15:52:10 -07:00
Chih-Hung Hsieh
47e35bbd25 Reduce tidy checks in org.chromium.arc.mojom
Too many warnings from this library.
Treat it the same as tidyExternalVendor projects.

Bug: 231626164
Test: make tidy-vendor-google_arc_subset
Change-Id: Ieaf748517390cb6dfac7e85500666dc9f49ffd52
2022-05-05 14:09:12 -07:00
Tianyu Jiang
cc84ca767d Revert "Update to clang-r450784e"
Revert submission 2080443-update-clang-8508608

Reason for revert: b/230930120
Reverted Changes:
I678829f02:Update to clang-r450784e

Change-Id: I89e336ec1deffddbbbf872a3ee4a1082a65fb137
2022-05-02 23:06:49 +00:00
Pirama Arumuga Nainar
525589f40a Update to clang-r450784e
Bug: http://b/197965342

This respin contains lld without two reverts.

Test: presubmit
Change-Id: I678829f02a6b255972b1cc7bde27d114cb272d1d
2022-04-27 23:22:40 -07:00
Yi Kong
a126c63042 Update to clang-r450784d
This respin contains performance improvements to clang-tidy and lld, and
fp16 cost fixes.

Test: presubmit
Bug: 219872481
Change-Id: I322a680cdc6ebc0f1fe3735ed087477e7f2508fe
2022-04-24 12:40:02 +08:00
Yi Kong
6840b8959c Update to clang-r450784c
Test: presubmit
Bug: 219872481
Change-Id: I33ede295283e121ef3628cd982bcd84b96e54b8c
2022-04-16 04:14:06 +08:00
Treehugger Robot
a2a7b57924 Merge changes from topic "export-vars"
* changes:
  export Java variables to Bazel
  refactor Bazel variable export
2022-04-08 17:31:23 +00:00
Yi Kong
25c1c005cf Enable deprecated-enum-enum-conversion warning
Test: presubmit
Bug: 153746563
Change-Id: Id54685056c4e6280dd2962527e11fb7efb840660
2022-04-06 16:34:41 +00:00
Sam Delmerico
7f88956c16 refactor Bazel variable export
Most of the variable export code for cc modules can be re-used for
exporting variables for java modules. Refactor this code into a more
composable structure for reuse.

Test: build/bazel/bp2build.sh
Test: manual comparison of
  out/soong/soong_injection/cc_toolchain/constants.bzl
  with previous output
Change-Id: Ie5a6fee08cc888b7dc69c3e324e5c3f8aa269a8f
2022-04-06 14:48:32 +00:00
Yi Kong
128b608f3c Enable enum-enum-conversion warning
Test: presubmit
Bug: 154138986
Change-Id: I1076e732118c138774ab377adc3273a41f7dde08
2022-04-06 14:32:02 +08:00
Yi Kong
4e309eebe8 Enable enum-float-conversion warning
Test: presubmit
Bug: 154255917
Change-Id: Ib419dbbf0f512551c35c618d2af69a29853f01ae
2022-04-06 00:02:13 +08:00
Treehugger Robot
34f3673f54 Merge "Enable int-in-bool-context warning" 2022-04-05 01:21:10 +00:00
Yi Kong
3f0358bfda Update to clang-r450784b
Test: presubmit
Bug: 219872355
Change-Id: I2ea4855dfcbe9dd297bbd3cf96a451c35038498d
2022-04-03 04:26:03 +08:00
Yi Kong
df95b3448f Enable int-in-bool-context warning
Test: presubmit
Bug: 148287349
Change-Id: I7916c8aec1fd014ef666df430574c6108ab1c01a
2022-03-31 07:12:59 +00:00
Colin Cross
441898c285 Switch to libunwind to remove dependency on libgcc for musl
The libgcc dependency is only used for _Unwind* symbols, remove
it now that libc_musl.so embeds libunwind.a.

Bug: 215802826
Test: m USE_HOST_MUSL=true host-native
Change-Id: I1ad4c1435fc0090c6df2d50d542d2203dfb94d7b
2022-03-29 13:35:17 -07:00
Elliott Hughes
ab5e4c63e8 Try to bump the C default to C11.
Even the Linux kernel's moved, so let's see if we can too...

Test: treehugger
Change-Id: Ic8ceb3b6e7a83acc5defee46618a9345a366d87d
2022-03-28 16:58:22 -07:00
Yi Kong
75ce5d3320 Update to clang-r450784
Test: presubmit
Bug: 219872355
Change-Id: I3cd5f42d887b07929906e08d7d9f1a677b8a4403
2022-03-25 04:30:53 +00:00
Elliott Hughes
7c30653fa2 Revert "Disable BTI for now."
This reverts commit c75994d623.

Reason for revert: BTI shipped in S, and we're going to work on app compat outreach rather than regress this security feature.

Bug: https://issuetracker.google.com/216395195
Change-Id: Ic7143d756907ceb574a686258751840ce62c920f
2022-03-10 18:09:51 +00:00
Colin Cross
4c4c1be915 Use single module for clang runtime libraries
The clang prebuilts now provide a single module with per-architecture
variants instead of a module per architecture.

Bug: 220019988
Test: m checkbuild
Change-Id: I39e2cf8ae14edf8510276dab38011afaef85822c
Merged-In: I39e2cf8ae14edf8510276dab38011afaef85822c
2022-03-07 14:56:32 -08:00
Liz Kammer
e8303bd0ae Export variant/features via soong_injection
Test: build/bazel/ci/bp2build.sh
Change-Id: If70043dc9d020d5f4a243ba4b192b99c9c7e8563
2022-02-28 14:17:15 -05:00
Treehugger Robot
cda344f120 Merge "Fix typos in arch_list and do variant validation" 2022-02-23 17:34:51 +00:00
Chih-hung Hsieh
70387c5d03 Merge "Do not add non-existing -Bprebuilts/gcc/.../bin" 2022-02-17 18:25:38 +00:00
Pirama Arumuga Nainar
2b31fbb805 Merge "Reland "Switch to clang-r445002"" 2022-02-17 18:07:38 +00:00
Chih-Hung Hsieh
57da82697a Do not add non-existing -Bprebuilts/gcc/.../bin
* Only prebuilts/gcc/linux-x86/host/x86_64-w64-mingw32-4.8/x86_64-w64-mingw32/bin
  exists for x86_windows_host.
* Remove config.ToolPath;
  add required -B flags into ToolchainCflags and ToolchainLdflags.

Bug: 218883919
Test: make droid tidy-soong_subset
Change-Id: I9a18bf8cc0cf84e091c7463b3bda316eaab53aa3
2022-02-16 15:49:39 -08:00
Colin Cross
e4c400bef5 Merge "Add --sysroot /dev/null to musl compiles" 2022-02-16 23:32:51 +00:00
Liz Kammer
2c2afe26ea Fix typos in arch_list and do variant validation
Test: m nothing
Change-Id: Icfbc9f886a1e16abe02bf6c61671b8187a699942
2022-02-15 17:26:35 -05:00
Pirama Arumuga Nainar
8a4804f53b Reland "Switch to clang-r445002"
Bug: http://b/214080353
Bug: http://b/218805949

Reland switch to clang-r445002.  The math test failures are fixed by
disabling FMA (-ffp-contract=off).

Test: - atest -a libcore.java.math.RunCSVTestsStrict
      - select bionic tests on go/abtd
      - atest -a \
gatm_algo_test:gatm_algo_test.TestAllGatmTestData/GatmAlgoTest#VerifyOutputValues/05temporaltracing_5frames_1lux_h_drc_free
      - presubmit

Change-Id: I8383edb116caa63884507932406a5f49a223d006
2022-02-15 17:27:30 +00:00
Colin Cross
7b2e5cd134 Merge changes Ibd19d9a5,Icfc42ad7,Ieafdcceb
* changes:
  Fix musl clang triple
  Add musl_<arch> and glibc_<arch> properties
  Add libc_musl as a dependency of RuleBuilderCommand.BuiltTool
2022-02-11 23:09:27 +00:00
Colin Cross
6745a8ef1d Add --sysroot /dev/null to musl compiles
Prevent linking against host glibc libraries by passing
--sysroot /dev/null to compile and link rules targeting musl.

Bug: 190084016
Test: m USE_HOST_MUSL=true host-native
Change-Id: Ief2c9507af9ae7cf5376cb874fcef0f2cbaf9994
2022-02-11 13:51:41 -08:00
Liz Kammer
f610a74f4c Add error message for unsupported x86 arch variant
Previously this would result in a Ninja variable lookup, instead, let's
error sooner in Soong.

Test: CI
Change-Id: Ib3e15dce84364e6f7a83b82cb5f0e8694ffc9d2a
2022-02-10 16:58:08 -05:00
Colin Cross
72ee67659d Fix musl clang triple
Use x86_64-linux-musl and i686-linux-musl as the clang triple when
targeting musl.

Bug: 190084016
Test: m USE_HOST_MUSL=true host-native
Change-Id: Ibd19d9a5fbf4b67950745480d1e0ed8e02eeeba1
2022-02-10 11:50:31 -08:00
Nicolas Geoffray
2b2d9392fc Merge "Revert "Switch to clang-r445002"" 2022-02-10 14:15:46 +00:00
Nicolas Geoffray
83b2b326b7 Revert "Switch to clang-r445002"
This reverts commit d950ab8bb3.

Reason for revert: Breaks Java math tests
Test: atest libcore.java.math.RunCSVTestsStrict

Change-Id: Ief6d0422fda991616afa59f5ce419aee5ac26a58
2022-02-10 09:58:50 +00:00
Pirama Arumuga Nainar
111817435a Merge "Switch to clang-r445002" 2022-02-09 18:55:08 +00:00
Liz Kammer
72beb34609 Add package for printing starlark formatted data
Bug: 216168792
Test: build/bazel/ci/bp2build.sh
Change-Id: I3a06b19396f7ffe1c638042cda7e731dd840f1d6
2022-02-08 17:32:28 -05:00
Treehugger Robot
cf637f101c Merge "Disable tidy default DeprecatedOrUnsafeBufferHandling check" 2022-02-08 03:30:31 +00:00