Commit graph

6663 commits

Author SHA1 Message Date
Liz Kammer
eb5fc70c7b Merge "Delete some unused functions." 2022-04-27 17:36:09 +00:00
Muhammad Haseeb Ahmad
4e70b7586a Merge "Add jni support to java_fuzz_host" 2022-04-27 16:14:29 +00:00
Chih-hung Hsieh
863ebc3199 Merge "add ALLOW_LOCAL_TIDY_TRUE and some tests" 2022-04-27 00:19:03 +00:00
Chih-Hung Hsieh
104f51f70b add ALLOW_LOCAL_TIDY_TRUE and some tests
* A new ALLOW_LOCAL_TIDY_TRUE variable, default is false.
* If it is 0/false, local "tidy:true" is ignored.
* If it is 1/true, local "tidy:true" is honored as it is now.

Bug: 229779921
Test: make with and without ALLOW_LOCAL_TIDY_TRUE=1
Change-Id: I0323289a4d3bb2514982252a5a1339e94f2bbaab
2022-04-26 13:30:32 -07:00
Muhammad Haseeb Ahmad
7e74405b2d Add jni support to java_fuzz_host
Bug: 219782880
Test: m example_java_fuzzer_with_native_lib, go test -run TestJavaFuzz
Change-Id: I1d05fb449e5378a27a0096869d9c12ca0a1245c6
2022-04-26 18:49:02 +00:00
Liz Kammer
c2554b6df2 Delete some unused functions.
Test: cc soong tests
Change-Id: Ifa60cdd19aa9151656a6a9df295fe42ec1d8fd46
2022-04-25 16:00:17 -04: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
Dan Albert
e31a071389 Merge changes from topic "abigail-werror"
* changes:
  Disable ABI dumping for hwasan builds.
  Abort on abitidy errors.
2022-04-20 19:19:07 +00:00
Colin Cross
8d0e466f19 Merge "Copy prebuilt objects to the intermediates directory" 2022-04-19 23:29:17 +00:00
Dan Albert
f71006a962 Disable ABI dumping for hwasan builds.
abidw doesn't currently handle top-byte-ignore correctly. Disable ABI
dumping for those configs while we wait for a fix. We'll still have
ABI checking coverage from non-hwasan builds.

Bug: http://b/190554910
Test: treehugger
Change-Id: I0e29979f8c212c43e0d1beea737abcd7fd0119d7
2022-04-19 22:01:43 +00:00
Dan Albert
604086f988 Abort on abitidy errors.
Test: m ndk
Bug: http://b/190554910
Change-Id: Ie72b345942fef0d3dd740e50aa655408b790978a
2022-04-19 21:07:42 +00:00
Yu Liu
d683fc45a3 Merge "Support use_version_lib in cc_binary." 2022-04-18 19:10:42 +00:00
Trevor Radcliffe
e273af2165 Merge "bp2build support for cc_prebuilt_library" 2022-04-18 17:16:39 +00:00
Yu Liu
a79c946fb0 Support use_version_lib in cc_binary.
Bug: 208481704
Test: Add unit test
Change-Id: I7cf299dd6b3287974067234687b3b2495a85d31e
2022-04-15 15:45:06 -07:00
Colin Cross
ee02aed756 Copy prebuilt objects to the intermediates directory
Copy prebuilt objects to the intermediate directory so that their
output file name matches the module name.  This simplifies using
the clang crt objects, whose input names vary by architecture,
in the musl sysroot genrule.

Bug: 216192129
Test: m checkbuild
Change-Id: I467d699f718e2cc5c6bf0a5c35820dedd51c5930
2022-04-15 15:16:02 -07:00
Yi Kong
6840b8959c Update to clang-r450784c
Test: presubmit
Bug: 219872481
Change-Id: I33ede295283e121ef3628cd982bcd84b96e54b8c
2022-04-16 04:14:06 +08:00
Trevor Radcliffe
58ea451750 bp2build support for cc_prebuilt_library
while cc_prebuilt_library_(shared|static) were already supported,
the raw cc_prebuilt_library module type was not supported by
bp2build. This CL provides that functionality.

Also did a little bit of refactoring and cleaning.

Bug: 225938765
Test: Confirm output BUILD.bazel files look as expected. Confirm
      that build succeeds.
Change-Id: Ic004f88febc0e5b527f2ef420dbd96ecc55d2e09
2022-04-15 16:29:28 +00:00
Ivan Lozano
dc46c6dcbb Merge "rust: Don't append '.vendor' to vendor modules." 2022-04-13 12:53:52 +00:00
Ivan Lozano
f1868af5d5 rust: Don't append '.vendor' to vendor modules.
Rust vendor-only modules would have the '.vendor' subname appended to
them, which meant that 'm <vendor_module>' would not work -- instead
you would need to call 'm <vendor_module>.vendor', which leads to some
confusion.

This CL fixes the behavior by using the same SubName logic as the cc
module.

Bug: 205577906
Test: m <vendor_module> # works without .vendor suffix
Change-Id: I6ba18ce1d7281a1f8342ed6014644b48009d78e0
2022-04-12 13:42:04 -04:00
Alix
40216ae88b moved comment to describe Afdo bool
Test: just added a comment, no tests performed.

Change-Id: Id921b808462600e889ee8fda532a3305821692b2
2022-04-08 18:57:30 +00: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
88b94eac7c Move PGO profiles to its own subdir
This separates out AFDO profiles from PGO profiles.

Test: presubmit
Change-Id: I2c0b710199cae31773bd6c3b29a0ca7a4e338b47
2022-04-07 23:54:28 +08: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
Trevor Radcliffe
85b935eff2 Merge "Add support for test_suites to cc_test_library" 2022-04-05 15:34:53 +00:00
Treehugger Robot
34f3673f54 Merge "Enable int-in-bool-context warning" 2022-04-05 01:21:10 +00:00
Trevor Radcliffe
f389cb4e35 Add support for test_suites to cc_test_library
Some cc_test_library modules will need to be installed for
compatibility test. This CL adds the capacity to use the
test_suites property to enable this behavior.

Fixes: 226402757
Test: Wrote unit tests, confirmed installation to proper dirs,
      and verified conversion that necessitated this change
Change-Id: I7313d4927d28aacad9e444962fd2a7efc6c3bc1f
2022-04-04 19:10:13 +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
ed12a04a3e Enable sanitizers for musl
Now that we provide runtimes built for musl, enable the sanitizers
when targeting musl.

Bug: 215802826
Test: m USE_HOST_MUSL=true host-native
Change-Id: Id17513ee305274874c31e9c99ce4faeff4a1c057
2022-03-29 13:35:17 -07: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
Treehugger Robot
6876d5aa5f Merge "Dedupe libraries in both static and whole static" 2022-03-26 00:32:01 +00:00
Mitch Phillips
c6ea944e18 Merge "[HWASan] Enable zero-initialization." 2022-03-25 20:53:02 +00:00
Yi Kong
846a25912d Merge "Update to clang-r450784" 2022-03-25 05:49:48 +00:00
Yi Kong
75ce5d3320 Update to clang-r450784
Test: presubmit
Bug: 219872355
Change-Id: I3cd5f42d887b07929906e08d7d9f1a677b8a4403
2022-03-25 04:30:53 +00:00
Mitch Phillips
597605603a [HWASan] Enable zero-initialization.
Previously, we use to fill memory with 0xbe bytes. This caused a lot of
problems that necessitated disablement. For example, 0xbe-filled mutexes
are apparently locked, and there were a few instances of
uninitialized-mutex use.

Given that zero-fill is now the default behaviour, enable zero-init in
HWASan as well.

For now, only fill the first page. It would be preferable to fill the
whole allocation, but I don't want to spin for too many cycles filling
huge secondary pages. In future, we might change the behaviour to have
an explicit "zero initialize" option that completely fills the primarily
allocations, and knows it's unnecessary for the secondary.

Bug: 226078464
Test: Boot w/ HWASan (done by presubmit robot)

Change-Id: I7de3a7f9fa2fdeb5116e5bf6586babe4d06fcb91
2022-03-22 18:38:34 +00:00
Liz Kammer
cc2c1efc9a Dedupe libraries in both static and whole static
In Soong, libraries can appear in both static and whole static libs;
however, in Bazel, this results in errors due to duplicate libraries.

Test: bp2build.sh
Change-Id: I9dda4f7a7812340d28a6160d0e25f421c9db6612
2022-03-21 09:03:29 -04:00
Yu Liu
fc603167f4 Support tailoring clang --target flag based on min sdk version.
Bug: 215748260
Test: Tested using aquery to verify the --target flag; add added unit

Change-Id: Ifb13509db7d1e110316aa44d55ec9cccaa4b83d1
2022-03-18 01:16:52 +00:00
Colin Cross
7e2092a274 Support BUILD_HOST_static=1 for musl and linux_bionic builds
BUILD_HOST_static=1 is useful for musl and linux_bionic builds to
produce standalone static binaries.

Bug: 179809553
Test: m USE_HOST_MUSL=true BUILD_HOST_static=1 apexer deapexer
Change-Id: Iac0f4ca92c3ffb27bccd4cac15a6ef9fa5924471
2022-03-08 15:15:56 -08:00
Treehugger Robot
86ac783d8e Merge changes from topic "vsdk_ramdisk"
* changes:
  Add InstallInRoot property to snapshot binary json file.
  Fix for duplicate modules across vendor and ramdisk snapshots.
2022-03-08 17:10:54 +00:00
Colin Cross
3c66771c62 Merge "Use single module for clang runtime libraries" 2022-03-08 06:51:43 +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
Jose Galmes
c1a56bcbe9 Add InstallInRoot property to snapshot binary json file.
Bug: 215295121
Test: Generated snapshot and verified InstallInRoot property is present.
Change-Id: I4f20a454477d1263e9c16e98468d659f89e1e4f1
2022-03-07 14:49:46 -08:00
Pirama Arumuga Nainar
b37ae58a3d Memory mapped coverage (take 2)
Add a build variable, CLANG_COVERAGE_CONTINUOUS_MODE, instead of
selecting based on paths.

Test: CLANG_COVERAGE_CONTINUOUS_MODE=true m and verify continuous mode works

Change-Id: I731172fc1f00e1cabff8efcf8b99f9a48210b446
2022-03-04 14:07:53 -08:00
Liz Kammer
6e4cd27bec Merge "Export variant/features via soong_injection" 2022-03-03 18:11:25 +00:00
Treehugger Robot
5c8693f5d7 Merge "Revert "[cc_fuzz] Revert 'disable LTO' patches."" 2022-03-02 05:08:27 +00:00
Mitch Phillips
5007c4a06d Revert "[cc_fuzz] Revert 'disable LTO' patches."
Revert submission 1976512-revert-nolto-fuzzing

Reason for revert: b/222160662
Reverted Changes:
Iacee4fa29:[cc_fuzz] Revert 'disable LTO' patches.
Ic509b00a1:[cc_fuzz] Revert 'disable LTO' patches.
If85931f09:[cc_fuzz] Revert 'disable LTO' patches.

Change-Id: I84e01a4f84145e3331c2955836c8cc9bfa05c36b
2022-03-02 01:25:22 +00:00
Treehugger Robot
6c0de9938e Merge "[cc_fuzz] Revert 'disable LTO' patches." 2022-03-01 23:43:04 +00:00