Commit graph

7440 commits

Author SHA1 Message Date
Elliott Hughes
b85366e699 Merge "Revert "Disable BTI for now."" am: ba4a566e2d am: 0770744797
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2020301

Change-Id: I9483bcf63e54ae8df300a3bef750575ac90d5aa4
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-06 21:14:43 +00:00
Elliott Hughes
ba4a566e2d Merge "Revert "Disable BTI for now."" 2022-06-06 20:10:56 +00:00
Yu Liu
8d82ac58b4 Support cc code coverage for mixed build
Bug: 231322627
Test: Manual tests and unit tests
Change-Id: I786042af0d612192c54c3572f63a86a47174a242
2022-06-06 12:29:25 -07:00
Liz Kammer
d9b3cf60c2 Merge "Do not hardcode default/experimental c{pp}std" am: ace70d857e am: 72627266b9
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2106991

Change-Id: Idc6f6c058d2d1b1e5cd930adb9be52a8a33397b5
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-06 14:21:07 +00:00
Liz Kammer
ace70d857e Merge "Do not hardcode default/experimental c{pp}std" 2022-06-06 13:40:17 +00:00
Treehugger Robot
98306aa91c Merge "Keep minimal abort when enabling integer overflow check" am: dcec8e067b am: 48d7862515
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2114953

Change-Id: Idbbb36f82d3198126a939e015506d5aa4fbd95da
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-06 10:18:47 +00:00
Treehugger Robot
dcec8e067b Merge "Keep minimal abort when enabling integer overflow check" 2022-06-06 09:45:12 +00:00
Treehugger Robot
01346ff1a6 Merge "Use single clang-tidy build rule and clang-tidy.sh" am: b12ae4f2bd am: 011e470e5e
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2110906

Change-Id: I52e5741db934b6166c3f6a9bb75bb0c6726b4bc5
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-04 00:45:00 +00:00
Chih-Hung Hsieh
80e3e03aa9 Shorten the -checks flag in clang-tidy rules
* If a module defines tidy_checks with "-*",
  pass only "-*" and checks after it to clang-tidy.

Test: make tidy-soong_subset
Change-Id: I2a4a6111f67b934bc29e4e4fe8596a8dce4e7031
2022-06-03 17:17:17 -07:00
Treehugger Robot
b12ae4f2bd Merge "Use single clang-tidy build rule and clang-tidy.sh" 2022-06-04 00:06:26 +00:00
TreeHugger Robot
6f2ef6127c Merge "Remove AIDL modules from VndkMustUseVendorVariantList" into tm-dev-plus-aosp 2022-06-03 22:10:15 +00:00
Colin Cross
4ec2bf1467 Merge "Revert "Use --dependency-file when linking elf files."" am: b914e7f8c6 am: c43e5ff7cc
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2115768

Change-Id: Ieed01217bf395e4951ff571a69b346327d584168
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-06-03 17:40:20 +00:00
Colin Cross
b914e7f8c6 Merge "Revert "Use --dependency-file when linking elf files."" 2022-06-03 16:53:54 +00:00
Jooyung Han
87f73e527c 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
(cherry picked from commit b8d3df82ac)
2022-06-03 04:54:52 +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
Colin Cross
32320e89fd Revert "Use --dependency-file when linking elf files."
This reverts commit 97d87760b4.

Reason for revert: b/234772469

Bug: 137961579
Bug: 234772469
Change-Id: I478f5a2696e87144d0123e8872c9f8ac1d5f24b0
2022-06-02 23:02:01 +00:00
Hang Lu
34448f2430 Keep minimal abort when enabling integer overflow check
Cflag "-fsanitize-trap=all" will override "-fno-sanitize-trap=integer" if "-fsanitize-trap=all" is placed behind. Change the order to make minimal abort work, which will output the abort message to give user a better prompt.

Bug: 233840743
Test: "objdump -dS {CFI enabled so}" to check the instrumented abort instruction
Change-Id: Id85fa8ece3e13d1b21b4fdbf5f4b5124011890ca
2022-06-02 20:47:30 +08:00
Hsin-Yi Chen
dccddb6036 Remove unneeded logic from sourceAbiDiff
- The script creating reference dumps does not need --llndk. It can
  determine the library types automatically.
- NDK passes the ABI checks with -consider-opaque-types-different.
- All libraries checked by the ABI tools have exported headers and don't
  need -advice-only.

Bug: 232891473
Test: development/vndk/tools/header-checker/utils/create_reference_dumps.py \
      && make
Change-Id: Ia418022d6d0b46bfabefaa296fa81e80291fde32
2022-06-02 18:49:26 +08:00
Treehugger Robot
5d069fb876 Merge "Add diff_flags as a header_abi_checker property" 2022-06-02 04:14:57 +00:00
Chih-Hung Hsieh
30ab2f059f Use single clang-tidy build rule and clang-tidy.sh
* The old jobs of two build rules are now combined into
  a new clang-tidy.sh wrapper.
  The clang-tidy build rule now calls clang-tidy.sh.

Bug: 234406661
Test: WITH_TIDY=1 make; make tidy-soong_subset
Change-Id: I91961edf96e9a546f0c3088715a6f2ca8796a21b
2022-05-31 18:46:39 -07:00
Treehugger Robot
5a3b1c792c Merge "Remove -sha256 flag when calling bssl_inject_hash." am: ced67ded0b am: 7e786306df
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2101112

Change-Id: Ied93aad59538ecae30b560265dbf63006f0e5e76
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-31 17:23:26 +00:00
Treehugger Robot
ced67ded0b Merge "Remove -sha256 flag when calling bssl_inject_hash." 2022-05-31 16:53:06 +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
Hsin-Yi Chen
6ad1e4b5ea Add diff_flags as a header_abi_checker property
The property allows developers to add extra flags to header-abi-diff for
specific libraries.

Bug: 232891473
Test: m libbinder.vendor
Change-Id: I203af73c784dfc7738bb64f57b224c08d5c595ce
Merged-In: I203af73c784dfc7738bb64f57b224c08d5c595ce
(cherry picked from commit 4f992b663f)
2022-05-26 15:12:37 +08:00
Hsin-Yi Chen
ab255ae347 Merge "Add diff_flags as a header_abi_checker property" into tm-dev am: 39a9db3bae
Original change: https://googleplex-android-review.googlesource.com/c/platform/build/soong/+/18482834

Change-Id: I6f53043eead9258ecc9903a3d779ed04df60aef2
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-26 05:24:08 +00:00
Hsin-Yi Chen
39a9db3bae Merge "Add diff_flags as a header_abi_checker property" into tm-dev 2022-05-26 04:21:54 +00:00
Trevor Radcliffe
2bb24935e4 Merge "Generate genlex rules from bp2build for cc targets" am: 5731d0fffd am: c68fbc38e7
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2092784

Change-Id: I91cba2b4927db6e1284efcf82161f81f4216bebb
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-25 20:32:59 +00:00
Trevor Radcliffe
5731d0fffd Merge "Generate genlex rules from bp2build for cc targets" 2022-05-25 19:38:15 +00:00
Yi Kong
6faa9b759a Merge "Enable string-compare warning" am: f13a66adfd am: e99fbffa25
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2098017

Change-Id: I615039bbe1d8ba084bda367b836184b4c6606475
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-25 08:02:30 +00:00
Yi Kong
f13a66adfd Merge "Enable string-compare warning" 2022-05-25 07:02:34 +00:00
Muhammad Haseeb Ahmad
35ca6bc67f Merge "Make IsSanitizerEnabledForJni return false" am: 53a129db89 am: e353655540
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2105764

Change-Id: Icb9a49ce6817fe2f7fa6a6d35b6b2345cd07035c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-25 06:59:42 +00:00
Muhammad Haseeb Ahmad
e6567fe56b Make IsSanitizerEnabledForJni return false
Change-Id: I5e1722bc32b63649fc9973d11e9fd5bdea72ddbe
Test: m
2022-05-25 00:13:08 +00:00
Liz Kammer
3d704c2826 Merge "Handle multiple linkages in sdk snapshots" am: 91f10eccc6 am: 1446249224
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2097793

Change-Id: I5f428f85d998cde7a90d3cf361480a66363ae3db
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-24 14:55:28 +00:00
Trevor Radcliffe
ef9c900ec3 Generate genlex rules from bp2build for cc targets
This change will cause bp2build to generate genlex targets any
time a .l or .ll file is present in the srcs for a cc target and
add those genlex targets to the srcs attribute of the original
target.

Bug: 207408632
Test: unit tests
Change-Id: I1bce82c9d3c3d458eae1cef547ffae3d6e975134
2022-05-24 14:42:51 +00:00
Liz Kammer
91f10eccc6 Merge "Handle multiple linkages in sdk snapshots" 2022-05-24 14:13:19 +00:00
Yi Kong
8ecb22d402 Enable string-compare warning
Test: presubmit
Bug: 153764102
Change-Id: I6fbf7a841cb6ea7bc8433fd2fddd5a825f68aa22
2022-05-24 16:16:21 +08:00
Liz Kammer
a99444cf9d Merge "Remove library decorator for extracting headers" am: 707f65d3d5 am: f5e9440e45
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2097186

Change-Id: Id8724a1650f87ab39809ebf5abdeb9b4034ca3dd
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-23 20:02:54 +00:00
Christopher Parsons
424baa8f24 Merge "cc bazel handlers: use better interface checking" am: b002f87d2e am: 6be00cbfac
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2098663

Change-Id: I500bf1f35121d0ae51c56703928d05e4df04a53f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-23 20:02:00 +00:00
Liz Kammer
707f65d3d5 Merge "Remove library decorator for extracting headers" 2022-05-23 19:36:57 +00:00
Christopher Parsons
b002f87d2e Merge "cc bazel handlers: use better interface checking" 2022-05-23 18:54:50 +00:00
Treehugger Robot
a2a665b40e Merge "Clean up some bp2build technical debt" am: 5bec8d41ea am: d5c19f1eb9
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2075729

Change-Id: Ia782f52cc1dfb7a43cef80f8fd374160b0208526
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-23 18:53:44 +00:00
Treehugger Robot
5bec8d41ea Merge "Clean up some bp2build technical debt" 2022-05-23 18:01:04 +00:00
Yi-yo Chiang
b421d787b2 Merge "Add android.hardware.gnss-V2-ndk to VndkMustUseVendorVariantList" into tm-dev am: 6fc324a9e0
Original change: https://googleplex-android-review.googlesource.com/c/platform/build/soong/+/18473525

Change-Id: I10dfdeec83a8bd75fd744d9de9cf4590553794fa
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-23 16:43:38 +00:00
Liz Kammer
96320dfff8 Handle multiple linkages in sdk snapshots
Currently, if the same library is specified for multiple of native_libs,
native_shared_libs, and native_static_libs for different arch/oses,
there can be a few errors:

1. specifying a .so file as `srcs` within a cc_prebuilt_library rather
than being specified only for shared
2. the final type of prebuilt library is dependent on the arch/os

This change introduces:
* an ability for a member type to override the type for specified
  properties
  * checks for a library being used with incompatible member types
  * basing linkage nesting on the member type in addition to variants

  This will ensure that the correct library type is used, regardless of
  the order of iteration over oses/arches, and support nesting linkages
  where necessary but only one linkage variant exists.

Test: soong tests
Test: CI
Change-Id: I81dee013b09b99c34ca6c18f9cfcc12ee56d33d1
2022-05-23 10:51:22 -04:00
Christopher Parsons
89aeb9181b Merge "Refactor mixed builds to only take one pass" am: 489128b8ef am: 935261d614
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2094705

Change-Id: I64c79ef138c4a5ee8e6197d2ce2b50bb7397ea7d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-20 16:15:37 +00:00
Chris Parsons
6ce2cf9b69 cc bazel handlers: use better interface checking
This is a far better approach for ensuring that bazel handlers implement
the BazelHandler interface, as it causes a compile error if they do not
implement the appropriate interface methods.

Test: Manually verified no change in ninja file
Change-Id: I63a4f8b57e3aedd4c0915c2fd2eb7029e9a993aa
2022-05-20 10:54:17 -04:00
Christopher Parsons
489128b8ef Merge "Refactor mixed builds to only take one pass" 2022-05-20 14:13:49 +00:00
Chris Parsons
f874e46153 Refactor mixed builds to only take one pass
This large refactoring has both immense performance implications and
improves mixed builds complexity / usability. Summary:

1. Queueing calls to Bazel is done in a new mutator instead of a full
   soong_build pass. Normal soong_build flow is interrupted (via a
   functional hook in blueprint) to invoke bazel and parse its response.
2. Implementing mixed build support for additional modules is as simple
   as implementing MixedBuildsBuildable. In this interface, define the
   request that must be queued to Bazel, and then subsequently define
   how to handle the returned bazel cquery metadata.
3. Mixed builds consists of only a single pass. This greatly
   improves mixed build performance.

Result:
  A 33% runtime improvement on soong analysis phase with mixed builds.

Caveats:
  C++ BazelHandler handling still remains a bit of a mess; I did what
  I could within this CL's scope, but this may require additional cleanup.

Test: Treehugger
Test: Verified that aosp_arm ninja file is bit-for-bit identical with or
without this change.

Change-Id: I412d9c94d429105f4ebfafc84100d546069e6621
2022-05-20 10:04:13 -04:00
Md Shahriar Hossain Sajib
c79d12269c Merge "Revert "Turn gtest isolated true by default"" am: cf5161be7c am: 85b58b0eb9
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2100876

Change-Id: I98ebf64aecc369ccbf7208c1f7d77faf07ca35c6
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-20 13:25:53 +00:00
Md Shahriar Hossain Sajib
cf5161be7c Merge "Revert "Turn gtest isolated true by default"" 2022-05-20 08:16:01 +00:00
Md Shahriar Hossain Sajib
d8b58663ff Revert "Turn gtest isolated true by default"
This reverts commit d2a9d88410.

Reason for revert: DroidMonitor-triggered revert due to breakage https://android-build.googleplex.com/builds/quarterdeck?branch=git_master&target=aosp_bramble-userdebug&lkgb=8618360&lkbb=8620137&fkbb=8618374, bug b/233280626

Bug: 233280626
Change-Id: If56b36ea1c883415b90bd2153707cb69df29776e
2022-05-20 08:02:50 +00:00
Yi Kong
81e711424e Merge "Rename modulesAddedWall to modulesWarningsAllowed" am: 8e836ba4b7 am: b2c1ea9749
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2098612

Change-Id: Id1360bc05eeef79518176bc2177dacc25743638b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-20 00:49:01 +00:00
Yi Kong
8e836ba4b7 Merge "Rename modulesAddedWall to modulesWarningsAllowed" 2022-05-20 00:26:18 +00:00
Julien Desprez
4d995a5b76 Merge "Turn gtest isolated true by default" am: 754edfa660 am: c05fce0836
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2092883

Change-Id: I60ae5b76029b0542130bf40472ed254f769176a1
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-19 21:13:38 +00:00
Julien Desprez
754edfa660 Merge "Turn gtest isolated true by default" 2022-05-19 20:38:45 +00:00
Lukács T. Berki
3982666000 Merge "Keep a "sanitizer dependency" flag for each sanitizer." am: 913b3c7585 am: 0907ebaf1e
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2098988

Change-Id: I9405aba0b9b38ad185591f48bedd210286edc6d5
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-19 12:50:49 +00:00
Lukács T. Berki
913b3c7585 Merge "Keep a "sanitizer dependency" flag for each sanitizer." 2022-05-19 12:14:04 +00:00
Yi Kong
de936474bc Rename modulesAddedWall to modulesWarningsAllowed
MODULES_ADDED_WALL is deceiving and it actually meant which modules are
allowed to have warnings (do not automatically append -Werror flag).

Test: presubmit
Bug: 233183337
Change-Id: Ibd21e269eba04d01f13026d70a9e34ccb1cf26d7
2022-05-19 20:11:10 +08:00
Yi-Yo Chiang
8500198442 Add android.hardware.gnss-V2-ndk to VndkMustUseVendorVariantList
Bug: 229319958
Test: Build android.hardware.gnss-V2-ndk.vendor without triggering
  "Checking VNDK vendor variant" error.
Change-Id: Ic03a04b97db601ff46510e00b2986a30f60066e6
2022-05-19 18:19:10 +08:00
Yi Kong
44808590d7 Merge "Only set -Wall once." am: 6769323a44 am: 6dc7f37b34
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2099056

Change-Id: I551a7775d02b4bd71ca77309532835411d650cb2
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-19 08:37:36 +00:00
Chih-Hung Hsieh
d1c91e6723 Reduce default global google-* clang-tidy checks am: 8212621410 am: 60351d1944
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2099984

Change-Id: Ib32948a4a630f35be29e5462470e62ac7e23258c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-19 08:36:11 +00:00
Lukacs T. Berki
2da6c3cc86 Keep a "sanitizer dependency" flag for each sanitizer.
This is so that we can avoid mutating state in sanitizerMutator, as
would be necessary if we only had a single bit for every sanitizer
together.

Test: Presubmits.
Change-Id: I5576367c12972fbea64342ab123118ec5a2cfeec
2022-05-19 09:48:57 +02:00
Yi Kong
6769323a44 Merge "Only set -Wall once." 2022-05-19 07:43:08 +00:00
Hsin-Yi Chen
4f992b663f Add diff_flags as a header_abi_checker property
The property allows developers to add extra flags to header-abi-diff for
specific libraries.

Bug: 232891473
Test: m libbinder.vendor
Change-Id: I203af73c784dfc7738bb64f57b224c08d5c595ce
2022-05-19 15:19:57 +08: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
Elliott Hughes
ed4a27b2e1 Only set -Wall once.
We set -Wall in the global cflags, and then again at the point where we
decide whether or not to add -Werror. The trouble with this is that it
undoes the effect of any attempt to disable a warning implied by -Wall.

Discovered while trying to enable -Wmisleading-indentation (which is
part of -Wall) in a way that doesn't apply to external/ or vendor/.

Test: treehugger
Change-Id: I68d74fb05922dd9f6bd4c8423ca69b485c15e3d2
2022-05-18 13:15:00 -07:00
Pete Bentley
c0d89b3db1 Remove -sha256 flag when calling bssl_inject_hash.
Flag removed upstream, all platforms now use SHA-256
for libcrypto integrity hash.

Test: m && flashall
Change-Id: I453edebb80ec2a853d54ce5c3f055b6456010524
2022-05-18 18:01:22 +01:00
Lukács T. Berki
5258c42167 Merge "Make java_fuzz_host not implement Sanitizeable." am: 53c6c67cbb am: 2928c292e6
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2096734

Change-Id: I1827cc21a64596be2af5760519d755c078658383
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-18 07:33:06 +00:00
Lukács T. Berki
53c6c67cbb Merge "Make java_fuzz_host not implement Sanitizeable." 2022-05-18 06:43:42 +00:00
Lukacs T. Berki
8c77ae369a Make java_fuzz_host not implement Sanitizeable.
Also remove a tiny bit of state mutation from sanitizerMutator. Every
little bit helps!

Test: Prebuilts + comparing soong/build.ninja .
 Your branch is up to date with 'aosp/master'.

Change-Id: I73b28b660b572610242765d87b70ab081b0b43df
2022-05-17 11:25:28 +02:00
Alix Espino
67982ef710 Merge "convert Dynamic_list property" am: 5b75bf1d7e am: be2d27b673
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2078468

Change-Id: I84461833e5a2f583d28297c4161ccd2dda952862
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-16 18:24:24 +00:00
Alix Espino
5b75bf1d7e Merge "convert Dynamic_list property" 2022-05-16 16:33:51 +00:00
Liz Kammer
5454944b9a Remove library decorator for extracting headers
It is unused and removing it allows us to use the same function for
prebuilt/not libraries.

Test: bp2build.sh
Change-Id: I92ac56496cff2c2e55d6eb9f261fe75a1b232856
2022-05-13 19:52:27 -04: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
a142a0f91b Merge "Now gnu11 is the default, bump experimental to gnu17." am: 51cb2d9374 am: 1b9dbb8712
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2097173

Change-Id: I093577943ca148279c7f5875166d31eb829a8b13
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-13 18:29:44 +00:00
Elliott Hughes
11ce77e3aa Merge "Try to bump the C default to C11." am: 94361dc903 am: 4f8ee857f6
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2043314

Change-Id: I4b17328f340d40c95d571e5c85469c6cf5119e39
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-12 17:57:33 +00: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
28b0550b8e Merge "no out/soong/... in default header-filter" am: c275b81fc7 am: 302ce27825
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2092485

Change-Id: Ic3fb8ab5358c9d92a37b893bc7a9cbd18b9d2909
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-11 20:47:16 +00:00
Chih-hung Hsieh
0259c2dfda Merge "Disable performance-no-int-to-ptr in global default" am: 63d5ba23ea am: 28ddfd918b
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2092585

Change-Id: I53e38e1b9bf48a5bc8c7fa49a59a8594acaeca0c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-11 20:43:27 +00:00
Treehugger Robot
9ebcbc95c0 Merge "Reland "Update to clang-r450784e"" am: 5554b0e276 am: 635fdabe3e
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2093183

Change-Id: I34a4d49544cf1882499dcc6327b1a0e813d927f0
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-11 20:39:57 +00:00
David Brazdil
88bcf3e7f5 Add binary_test.cc to testSrcs am: 979ef5bb2a am: f534a3e78d
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2092068

Change-Id: I7ea63c67c492734d2c8c5a30eadecd6d1a0368c3
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-11 20:38:41 +00:00
David Brazdil
0d75028441 Fix test compilation error am: 3ac9d2bf23 am: 8cb745ae7a
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2092067

Change-Id: I414dc2f41624ddbde01cca97652500555d398bcd
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-11 20:38:32 +00:00
Chih-Hung Hsieh
5fe637aadb no out/soong/... in default header-filter
* There are too many warnings from out/.../*.pb.h
  and other generated header files.

Bug: 180862582
Bug: 231245501
Test: WITH_TIDY=1 make
Change-Id: Ibabc1040666b50c6dec4fd66ae999a3441324fbd
2022-05-10 01:27:42 -07:00
Chih-hung Hsieh
63d5ba23ea Merge "Disable performance-no-int-to-ptr in global default" 2022-05-10 05:17:29 +00:00
Treehugger Robot
5554b0e276 Merge "Reland "Update to clang-r450784e"" 2022-05-10 02:46:52 +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
David Brazdil
979ef5bb2a Add binary_test.cc to testSrcs
Bug: 231700648
Test: m
Change-Id: If6161b2475887a6d40547f258ccb360c6d719b7a
2022-05-09 23:11:22 +01:00
David Brazdil
3ac9d2bf23 Fix test compilation error
Bug: 231700648
Test: include 'binary_test.go' in 'cc/Android.bp' and build
Change-Id: Ie09ae5c754753751a450fe8854d5c8743afc2e72
2022-05-09 19:36:04 +01:00
Julien Desprez
d2a9d88410 Turn gtest isolated true by default
Test: presubmit
Bug: 178498003
Change-Id: Ica5584e8b20b5acc92759b384a9263dbd1d4096d
2022-05-09 11:16:54 -07:00
Chih-hung Hsieh
95859ee707 Merge "Reduce tidy checks in org.chromium.arc.mojom" am: 5181502756 am: 7196ec8e1b
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2088473

Change-Id: I447189a16ba3639641faed37918adf8ef076533d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-07 00:36:25 +00:00
Chih-hung Hsieh
5181502756 Merge "Reduce tidy checks in org.chromium.arc.mojom" 2022-05-06 23:31:32 +00:00
Trevor Radcliffe
d13a0636fe Merge "Make isolated true by default for gtest" am: 2845464d2d am: d2878482eb
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2068108

Change-Id: I29c67ef4a2b72ec06fb0dea3fcee8232fc6ba5e1
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-06 17:55:46 +00:00
Trevor Radcliffe
2845464d2d Merge "Make isolated true by default for gtest" 2022-05-06 17:11:17 +00: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
David Brazdil
9814b83996 Add linker_scripts property am: 958c957696 am: b6c3de2689
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2073768

Change-Id: I0ef2c0218d1dedee702f15e1fb154d111f077182
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-05 17:39:46 +00:00
David Brazdil
530ba0cd3e Fix typo in installer.go am: 3eb5a74a26 am: 0ddc067f16
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2076519

Change-Id: I55b3d9acbcd88988fc553204f91b47608b8c0eb7
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-05 17:39:42 +00:00
David Brazdil
958c957696 Add linker_scripts property
Add a linker_scripts property that is similar to version_script
but uses a -Wl,--script flag and can be passed multiple times.

Test: TestBinaryLinkerScripts
Change-Id: If405cfbcdaf8e99559414ba759734084fae0f7ec
2022-05-05 16:36:56 +01:00
David Brazdil
3eb5a74a26 Fix typo in installer.go
Test: builds
Change-Id: I51364616e2a16f932d34ef33565d04a00d8f4ca5
2022-05-05 16:36:56 +01:00
Mark Dacek
87989eed0f Merge "Log information for Mixed Builds modules. Test: Output matches expected. https://paste.googleplex.com/5913495636803584?raw Performance evaluated: https://docs.google.com/spreadsheets/d/1X7eOVBKEZUwUWl5i8CDfBo9yUeZrDPXWi2JYO4BEZt4/edit?resourcekey=0-co8crIFW9dpiedhCMkhAgw#gid=0" am: 390df4c181 am: f06d0af87d
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2072287

Change-Id: I2da415e45f8feb50ee219e01d3247bc33e6ac441
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-03 22:00:01 +00:00
Mark Dacek
390df4c181 Merge "Log information for Mixed Builds modules. Test: Output matches expected. https://paste.googleplex.com/5913495636803584?raw Performance evaluated: https://docs.google.com/spreadsheets/d/1X7eOVBKEZUwUWl5i8CDfBo9yUeZrDPXWi2JYO4BEZt4/edit?resourcekey=0-co8crIFW9dpiedhCMkhAgw#gid=0" 2022-05-03 20:04:10 +00:00
MarkDacek
ff851b83b6 Log information for Mixed Builds modules.
Test: Output matches expected. https://paste.googleplex.com/5913495636803584?raw
Performance evaluated: https://docs.google.com/spreadsheets/d/1X7eOVBKEZUwUWl5i8CDfBo9yUeZrDPXWi2JYO4BEZt4/edit?resourcekey=0-co8crIFW9dpiedhCMkhAgw#gid=0

Change-Id: I88780c7cc52a189a72216c5e2e499c96574b3731
2022-05-03 18:11:32 +00:00
Trevor Radcliffe
cd8fd67753 Make isolated true by default for gtest
This change sets everything up to do this, but does not actually
enable it. jdesprez will follow up by making a one line change
that actually turns the default to true when he does test
debugging/verification.

Bug: 178498003
Test: build. Relying on @jdesprez for the rest of the verification
Change-Id: I3b1b6b57279dd4f9f7fc559e2d3ad76911b045e8
2022-05-03 14:51:16 +00:00
Treehugger Robot
d0ace6dffb Merge "Remove version_selector mutator" am: 7f5b4e3229 am: 09c23eb3b0
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2060089

Change-Id: If216f7704bc6a3e56be329c1883545c4061e320e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-03 05:52:26 +00:00
Treehugger Robot
7f5b4e3229 Merge "Remove version_selector mutator" 2022-05-03 03:06:57 +00:00
Tianyu Jiang
dde3f8eda1 Merge "Revert "Update to clang-r450784e"" am: 5ae0cd2a38 am: aaf74b0443
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2083810

Change-Id: I6da5df2ec6cde975e401e958fcc72be000503cf1
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-05-03 00:09:00 +00:00
Tianyu Jiang
5ae0cd2a38 Merge "Revert "Update to clang-r450784e"" 2022-05-02 23:14:38 +00: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
Treehugger Robot
b99b6dd144 Merge "Remove warnings about mismatched types with builtins for stubs." am: b69919c70d am: 755be611c1
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2081784

Change-Id: I6eb6f647cdbfd3d81cc5602417226c0965ae114f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-29 23:18:48 +00:00
Treehugger Robot
b69919c70d Merge "Remove warnings about mismatched types with builtins for stubs." 2022-04-29 22:29:27 +00:00
Mitch Phillips
4e5f9a1521 Remove warnings about mismatched types with builtins for stubs.
Looks like new versions of the toolchain have an error about mismatching
the definitions used in the stubs with the builtin definitions. Since we
don't care about this when building stubs, ignore it by disabling the
builtin definitions.

Bug: N/A
Test: Build platform with ToT LLVM compiler.
Change-Id: I4e449c5fb96d0d5442fd57a7fea02ba69463324b
2022-04-29 13:12:28 -07:00
Treehugger Robot
cbc94d7fc5 Merge "Update to clang-r450784e" am: 28881cbd55 am: 4a83601c95
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2078625

Change-Id: I4c95c0fe770348fd017265f15b44b8f45a062bcb
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-29 18:13:34 +00:00
Treehugger Robot
50da2c4530 Merge "Prototype changes for multitree" am: 184a6b87e5 am: 91255a653f
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2076401

Change-Id: Icf425fdcfddcb1267d241175ec86758117e53afc
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-29 18:09:34 +00:00
Treehugger Robot
0b80b69378 Merge "Use --dependency-file when linking elf files." am: ff22afa704 am: 87089903c2
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1975926

Change-Id: I1413949241ed383368027fb3f1a10cb60cfb74f5
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-29 18:09:12 +00:00
Treehugger Robot
28881cbd55 Merge "Update to clang-r450784e" 2022-04-29 01:00:33 +00:00
Treehugger Robot
184a6b87e5 Merge "Prototype changes for multitree" 2022-04-28 22:20:47 +00:00
Treehugger Robot
ff22afa704 Merge "Use --dependency-file when linking elf files." 2022-04-28 22:14:54 +00:00
Oriol Prieto Gasco
eda12cb250 Set the dist dir for musl targets of build_version_test
Bug: 230604501
Test: build/soong/soong_ui.bash --make-mode apexer_tools static_apexer_tools dist BUILD_HOST_static=1 USE_HOST_MUSL=true
Change-Id: I29b7f4c16346e39b89f099eecf816d9811a7b587
Merged-In: I29b7f4c16346e39b89f099eecf816d9811a7b587
2022-04-28 14:18:59 +00:00
Oriol Prieto Gasco
d6db5357e6 Merge "Set the dist dir for musl targets of build_version_test" into tm-dev am: 557e3fa4a6
Original change: https://googleplex-android-review.googlesource.com/c/platform/build/soong/+/17982168

Change-Id: Iee4b398f715ae6c39b1d244b9fdad618190647a3
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-28 13:11:45 +00:00
Oriol Prieto Gasco
557e3fa4a6 Merge "Set the dist dir for musl targets of build_version_test" into tm-dev 2022-04-28 12:17:41 +00:00
Inseob Kim
5eb7ee9fad Prototype changes for multitree
This change contains a prototype implementation for multitree. Several
interfaces and modules are added.

1. Imported/Exported
Modules implementing Exportable interface can export artifacts to other
components. "imported_filegroup" modules can import generated artifacts from other exported modules.

2. Multitree metadata
It contains information about imported/exported modules in each
component, and can be generated via "m update-meta".

3. cc library stub
It's based on prototype stub libraries. It uses imported/exported
mechanism to expose a C API, with a map.txt file and header files.

Bug: 230448564
Test: m
Change-Id: Id7ff7618e2c630c5617a564d8b23b60a1cc9c8e8
2022-04-28 08:20:10 +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
Trevor Radcliffe
9fb1e99a08 Merge "Refactor cc/bp2build.go to use parse helper" am: 4dc57a6d7b am: 2ca964ecda
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2072288

Change-Id: Iccb0fbd53e97bf6ecec7e01d720ca0ceb5fb76a1
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-27 20:00:51 +00:00
Trevor Radcliffe
4dc57a6d7b Merge "Refactor cc/bp2build.go to use parse helper" 2022-04-27 18:40:00 +00:00
Liz Kammer
d71a590b75 Merge "Delete some unused functions." am: eb5fc70c7b am: 7df48d0702
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2075898

Change-Id: Ie321a52c68529813f5f07e485e3b9055d1b7ec6d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-27 18:37:17 +00:00
Muhammad Haseeb Ahmad
809cd79d01 Merge "Add jni support to java_fuzz_host" am: 4e70b7586a am: 5b63f52025
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2045705

Change-Id: I3b9da743e9cf88e8defdb6610630e37a8bfa46b7
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-27 17:56:23 +00:00
Alix
773adaa3c7 convert Dynamic_list property
Migration of Dynamic_List property

Test: Treehugger
Bug: 226971493
Change-Id: I067a5a56d167dbd0fb852cbce3d066d42498195e
2022-04-27 17:49:34 +00:00
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
Oriol Prieto Gasco
92e3e4fbf6 Set the dist dir for musl targets of build_version_test
Bug: 230604501
Test: build/soong/soong_ui.bash --make-mode apexer_tools static_apexer_tools dist BUILD_HOST_static=1 USE_HOST_MUSL=true
Change-Id: I29b7f4c16346e39b89f099eecf816d9811a7b587
2022-04-27 15:32:48 +00:00
Chih-hung Hsieh
2b9eba93c9 Merge "add ALLOW_LOCAL_TIDY_TRUE and some tests" am: 863ebc3199 am: 9ef9536d76
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2070069

Change-Id: I3c7c8f50e41be7360886c1a11e07a0049889a0fd
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-27 01:11:59 +00:00
Chih-hung Hsieh
863ebc3199 Merge "add ALLOW_LOCAL_TIDY_TRUE and some tests" 2022-04-27 00:19:03 +00:00
Colin Cross
97d87760b4 Use --dependency-file when linking elf files.
Use the new --dependency-file flag for lld to produce a deps file.

Fixes: 137961579
Test: m checkbuild
Change-Id: I4e0724795a4237ef4560f814e5ef40e44591d776
2022-04-26 13:58:01 -07: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
Yi Kong
db7e0ceb2f 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
(cherry picked from commit a126c63042)
Merged-In: I322a680cdc6ebc0f1fe3735ed087477e7f2508fe
2022-04-26 16:45:34 +00:00
Liz Kammer
c2554b6df2 Delete some unused functions.
Test: cc soong tests
Change-Id: Ifa60cdd19aa9151656a6a9df295fe42ec1d8fd46
2022-04-25 16:00:17 -04:00
Treehugger Robot
168b8dbbb0 Merge "Update to clang-r450784d" am: e1d067b529 am: fe7dfae4d0
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2074438

Change-Id: I08e3482d5c6a14901994d6f83243db1d7b7ed3ea
Ignore-AOSP-First: this is an automerge
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-25 19:08:24 +00: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
Trevor Radcliffe
542954f5cb Refactor cc/bp2build.go to use parse helper
Fixes: 228965274
Test: m bp2build
Change-Id: I3d8bb158d76752f2def6d5eb55d72b47020d82ca
2022-04-21 20:04:42 +00:00
Dan Albert
4451946baa Merge changes from topic "abigail-werror" am: e31a071389 am: 30cfbf22eb am: d0399047c0
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2065275

Change-Id: Id24a2c0c0c4d09fe1c9421a71ba421d73ec1a350
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-20 20:36:37 +00:00
Dan Albert
8d87262fa7 Abort on abitidy errors. am: 604086f988 am: 73de4dbcc1 am: e5cae493fe
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1737315

Change-Id: Ifeedb058a2b1cec90b2e49289b9b051ba25d4793
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-20 20:36:34 +00:00
Dan Albert
73de4dbcc1 Abort on abitidy errors. am: 604086f988
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1737315

Change-Id: I1833517f786194dd61a2211254f4515bdbc04871
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-20 19:53:13 +00: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
243d505e43 Merge "Copy prebuilt objects to the intermediates directory" am: 8d0e466f19 am: 25a43ee488 am: 4c1d1766a5
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2065278

Change-Id: I05f934f07bc88f426b9d4d5124c04bd0e28cf259
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-20 06:13:12 +00:00
Hsin-Yi Chen
d2e803f282 Merge "Disable RBE for header-abi-dumper" into tm-dev 2022-04-20 02:02:30 +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
b1ad5a19da Merge "Support use_version_lib in cc_binary." am: d683fc45a3 am: fcb1eeb60e am: 06253ff2b4
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2036969

Change-Id: I0d120dfe500f2045a86cf20b5e833a5866dd7cf4
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-18 20:11:01 +00:00
Yu Liu
d683fc45a3 Merge "Support use_version_lib in cc_binary." 2022-04-18 19:10:42 +00:00
Trevor Radcliffe
638b1e8c9c Merge "bp2build support for cc_prebuilt_library" am: e273af2165 am: 1be93569b4 am: 667b854f8c
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2059893

Change-Id: Ib5533fe194744a82c5ad9c90be2010ec72f55e64
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-18 18:49:58 +00:00
Trevor Radcliffe
e273af2165 Merge "bp2build support for cc_prebuilt_library" 2022-04-18 17:16:39 +00:00
Hsin-Yi Chen
6580d84f51 Disable RBE for header-abi-dumper
The header-abi-dumper processes do not terminate when
USE_RBE_DUMPER=true. To unblock SDK finalization, the RBE rule is
disabled until the bug is fixed.

Test: make
Bug: 226497964
Change-Id: I3fc2357b71d346fcda431077a68c69757981318b
2022-04-18 05:35:35 +00:00
Yi Kong
41df31f70c Update to clang-r450784c am: 6840b8959c am: 071ee7f912 am: a02083a355
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2063319

Change-Id: I0cc4ac66dd3a6cb0177ff349a229beec14c756e4
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-16 05:55:53 +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
a6c6629935 Merge "rust: Don't append '.vendor' to vendor modules." am: dc46c6dcbb am: f6cd4e10dc am: 37aa3f6f50
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2062447

Change-Id: Idbc7c92adbff2b458d5655347b7a5155ee2de4f5
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-13 14:31: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
Alex Hong
a0012d1386 Merge "Add android.hardware.dumpstate-V1-ndk to vndkMustUseVendorVariantList" into tm-dev 2022-04-12 04:43:27 +00:00
Alix Espino
cba065beb2 Merge "moved comment to describe Afdo bool" am: 8c81305c80 am: dc338ac418 am: 3b4e9c6bef
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2057880

Change-Id: I3b6843c7874230df31d5727a40dc0e61bd6df3e0
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-11 20:35:27 +00:00
Liz Kammer
2394224da3 Remove version_selector mutator
This mutator simply set a mutated property immediately before a separate
mutator used the value in the property. Instead of a separate mutator,
condense the two into a single mutator pass.

Test: CI
Change-Id: I26c392cdb96f6182a19fbcf0cf3f88a8fc72f81c
2022-04-08 16:17:12 -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
759f5a25a6 Merge changes from topic "export-vars" am: a2a7b57924 am: 066a777c15 am: fefe3547a2
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2044966

Change-Id: I3f71b23b335baa61b0b997e454d900a8e914c549
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-08 18:36:58 +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
121fdcc569 Merge "Move PGO profiles to its own subdir" am: db7e96083f am: 9e6272329c am: 0ac50898d3
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2057434

Change-Id: I9f48f5ba5643f90a37bebda589dd9862f3cb6aea
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-08 05:30:51 +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
Alex Hong
88a40df94e Add android.hardware.dumpstate-V1-ndk to vndkMustUseVendorVariantList
aidl libs need to be differentiated because they explicitly set
different system/vendor stabilities.

Test: make
Bug: 223118410
Change-Id: I5b6e3de9ae2630fea146d97f3de89edf5545ba50
2022-04-07 22:41:55 +08:00
Treehugger Robot
e6b2e97bed Merge "Enable deprecated-enum-enum-conversion warning" am: 2c3999050b am: 4fef0e2167 am: 99977a6b57
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2057428

Change-Id: I01f022b8e9682b0c52939f3d75cbf68011f16662
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-07 13:03:24 +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
Treehugger Robot
4017fc08c4 Merge "Enable enum-enum-conversion warning" am: 54f45e5c17 am: ec6b500e4d am: 33fbb89b4c
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2057447

Change-Id: I54e4a62d8a5dc62bf6de7b970b5c79bf7ea22f1c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-06 13:51:15 +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
Treehugger Robot
421421ac43 Merge "Enable enum-float-conversion warning" am: ccba7e76bb am: 1dab0b06f1 am: 75fc9e2884
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2054169

Change-Id: I24a6177eaad7ee197d2d830e602e9ccc70cac43a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-05 21:53:04 +00:00
Trevor Radcliffe
e9b72c8800 Merge "Add support for test_suites to cc_test_library" am: 85b935eff2 am: 030b1e4dc0 am: 45841bca8c
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2042844

Change-Id: I4a7dad94a83aba289aa15c19a3b664e49e89750e
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-05 16:30:04 +00: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
9f0ca9f3f2 Merge "Enable int-in-bool-context warning" am: 34f3673f54 am: 94d3cfa385 am: a8da9b10ad
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2001832

Change-Id: Ifb364e9220065398fd1c62fca103ee502ffa1307
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-05 02:40:29 +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
2baf2cf2bd Merge "Update to clang-r450784b" am: 07d9ca7de3 am: 2643d6fff3 am: 6be0db7381
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2053446

Change-Id: I7b8be2da2a04fb2e058747c9cb2a008112c540cf
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-04-04 18:17:16 +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
652dbcaa9a Merge changes from topic "musl_clang_runtimes" am: 0f2a718ce4 am: e3f28d26a6 am: c068a7d423
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1980450

Change-Id: I45f717f96780715af04c0c4eef61bd4db763cc63
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-03-30 04:51:05 +00:00
Colin Cross
a152356349 Switch to libunwind to remove dependency on libgcc for musl am: 441898c285 am: b7ea2f5c7e am: d1b5f338e5
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1983628

Change-Id: I015e1b22dbcc2dbfdd9c2eb053d8ae94bfd8fcd7
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-03-30 04:51:00 +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
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
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
Treehugger Robot
2f9953b7ee Merge "Dedupe libraries in both static and whole static" am: 6876d5aa5f am: 0c576c591f am: 509c730ec9
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2032378

Change-Id: Iead517d8e7d92144ed625b2f0b2b04f7808acfac
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-03-26 01:06:56 +00:00
Treehugger Robot
6876d5aa5f Merge "Dedupe libraries in both static and whole static" 2022-03-26 00:32:01 +00:00
Mitch Phillips
b6194c08cd Merge "[HWASan] Enable zero-initialization." am: c6ea944e18 am: ab50a4f910 am: 2c491d8302
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2037383

Change-Id: I25593c51078fcbdc5705aa0b588b8e0d29790183
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-03-25 21:46:28 +00:00
Mitch Phillips
c6ea944e18 Merge "[HWASan] Enable zero-initialization." 2022-03-25 20:53:02 +00:00
Yi Kong
6233591d63 Merge "Update to clang-r450784" am: 846a25912d am: 5c1c1cc020 am: 8b5f050b64
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2027885

Change-Id: I9fc50c9978723c4198e94c647c1f3dea56a6d7a2
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2022-03-25 06:47:08 +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