Commit Graph

6123 Commits

Author SHA1 Message Date
Justin Yun
d00f5ca1df Do not add '.product' suffix for product_specific module
When a module has both 'product_specific: true' and
'vendor_available: true', the module does not have core variant but
have product and vendor variant modules. As the module generated
multiple variants, the names of the modules have the variant name
suffix. However, it did not create the module with the base module
name because it does not have core variant.

As the base module, in this case, is the product variant, use the
base module name for the product variant without adding the
'.product' suffix to it.

Bug: 161913599
Test: m hidl_test_product@2.0-adapter-helper
Change-Id: I904b43744579a6e89cecbc2e529122eaa8b14cae
2021-02-03 19:43:02 +09:00
Justin Yun
cbca373efa Use target dependent module to update the name suffix
The module names for vendor and product variants have the image
variant suffix to avoid conflict with the core modules. It requires
updating the module names in the dependency tree with the suffixes.

We had a hidden bug that used the original module properties to
update the names of its dependent modules.
Also, it must cover the product variants modules.

Test: updated cc_test.go and build
Change-Id: I6b4ea062d13c8fac1e699138d44376e52e0d7852
2021-02-03 19:42:29 +09:00
Inseob Kim
88796ab3d8 Merge changes from topics "snapshot_androidmk_suffix", "snapshot_list_module" am: 38ce066d3b am: de6f9afbed am: eb313b0574
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1558812

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I89a122a4ad3007bd223407f8a7fd13629b3c4717
2021-02-02 01:55:24 +00:00
Colin Cross
9bd4560e0a Remove some global state from vendor and recovery snapshots am: e0edaf9d49 am: cdab9928d0 am: ba1e014129
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1558811

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: If45399cab752d0f91c640735a74f73d4a01fba00
2021-02-02 01:55:21 +00:00
Julien Desprez
3b933d3165 Test changing default of cc_test_host
Switching all cc_test_host to unit_tests: true by default.
Resolved all the failures (passing presubmit) to enable this.

Test: presubmit trigger
Bug: 177450457
Change-Id: I815e40786c0b62cf0aadd9b837d35c48332639da
2021-02-01 17:34:44 -08:00
Colin Cross
a889080aba Remove global state on module suffixes from vendor and recovery snapshots
Propgate the Android.mk suffix from source modules into the snapshot so
that it can be used for the prebuilt modules.

Bug: 177098205
Test: vendor_snapshot_test.go
Change-Id: Iea151dc91395f714fbcad1df3a6fd0874e5455d9
2021-02-01 20:06:29 +09:00
Colin Cross
e0edaf9d49 Remove some global state from vendor and recovery snapshots
Snapshots storead global sets of modules that should be replaced with
vendor snapshot modules.  Move the data instead to a vendor_snapshot
or recovery_snapshot module type that depends on all the modules in
the snapshot, and then have modules that should use the snaphsot
depend on it to query for the set of modules that should be replaced.

Bug: 177098205
Test: vendor_snapshot_test.go
Change-Id: I2826adacfb473e9139b5ea93ba83b8a54cc1a56b
2021-02-01 20:02:39 +09:00
Ivan Lozano
d8ff4daa91 rust: Allow rust_tests to include data files. am: 9da4aa8166 am: bf557705c1 am: 6604580d74
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1565177

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ib1a8d5a5cb175598a783c686a9055300338ebf59
2021-01-30 00:56:04 +00:00
Ivan Lozano
9da4aa8166 rust: Allow rust_tests to include data files.
Adds the ability to define data files that should be installed alongside
the test.

This also fixes a bug wherein rust_test properties were duplicated.

Bug: 171710847
Test: rust_test module with "data" property installs files to device.
Change-Id: I091489afaf7e76b751a33a28049590d9fb39fe5f
2021-01-29 14:31:32 -05:00
Colin Cross
2df8177575 Add Target to cc.SharedLibraryInfo
Dependencies from common arch modules like java libraires to cc modules
may need to retrieve the Target of the library, add it to
SharedLibraryInfo.

Bug: 176593487
Test: cc_test.go
Change-Id: I93ab9da5fab2ccc42c6b483a6d83c071b541d1e6
2021-01-26 11:02:53 -08:00
Treehugger Robot
aad56c2567 Merge "Define odm_available property to install a vendor variant to odm" am: 65490b8cf3 am: cae1637ce5 am: 6b2fbaf2a4
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1542687

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I975f350b63d1b1796bc623205555033a65a4d02e
2021-01-26 13:36:57 +00:00
Treehugger Robot
65490b8cf3 Merge "Define odm_available property to install a vendor variant to odm" 2021-01-26 11:32:18 +00:00
Tamas Petz
bca786d742 [arm64] Build NDK with PAuth and BTI
This change adds a new arch named "armv8-a-branchprot". The new target
is no different from the usual "armv8-a" variant except it has the
compiler flag "-mbranch-protection=standard" set.

With this flag compiler emits Armv8.3-A Pointer Authentication and
Armv8.5-A Branch Target Identification instructions. All of these
instructions are in the hint space; therefore devices which do not
support any of these extensions would execute them as NOPs.

In terms of directory structure there is no change in the output of
build/soong/scripts/build-ndk-prebuilts.sh script.

Test: build NDK prebuilts

Change-Id: Ie52ccba5653fbf567f0b7ca312d8a8e71602ad06
2021-01-26 08:15:07 +01:00
Jeongik Cha
57272380ff Update VndkMustUseVendorVariantList
As AIDL version rule is changed, change VNDK list accordingly.
'unstable' and non-versioned aidl module will be cleaned up

Bug: 150578172
Test: m
Change-Id: I3e82b2c01f1fca75ac97985053b4a5826d151340
Merged-In: I3e82b2c01f1fca75ac97985053b4a5826d151340
2021-01-26 10:20:49 +09:00
Treehugger Robot
b30b0884fa Merge "Enable clang-analyzer-optin.performance.* checks" am: 7328c25275 am: 45e98eb600 am: bbdf4b38ed
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1559878

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I4288232390fe305737adbb1b27dc3faef6fc727d
2021-01-26 01:08:05 +00:00
Jeongik Cha
e6b5399da3 Merge changes from topic "b/150578172-2"
* changes:
  Update VndkMustUseVendorVariantList
  update apex allowed deps
2021-01-26 00:16:58 +00:00
Chih-Hung Hsieh
e9dca0aa0e Enable clang-analyzer-optin.performance.* checks
* Now CLANG_ANALYZER_CHECKS=1 simply enable all clang-analyzer-* checks.

Test: make with WITH_TIDY=1 CLANG_ANALYZER_CHECKS=1
Change-Id: Ib97a2c491df66088197805e979e4bec28f2f433c
2021-01-25 14:00:51 -08:00
Colin Cross
25bb7fdf93 Merge changes I0c9b81d6,Ib1120f98 am: c203ed422a am: 4b44975ad0 am: b4d93cc692
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1558810

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ica6e5c2a66a699503c87cace284da409b088f72a
2021-01-25 19:47:02 +00:00
Yabin Cui
217c8eec1b Merge "Switch to clang-r407598b (12.0.2)." am: 824e5ac072 am: 17c79160c2 am: da6c37dd22
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1557054

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Idbf24aa0134ea732a1b5fe25454b472345283421
2021-01-25 19:46:49 +00:00
Colin Cross
c203ed422a Merge changes I0c9b81d6,Ib1120f98
* changes:
  Add vendor_available coverage to TestVendorSnapshotUse
  Move vendor snapshot tests into vendor_snapshot_test.go
2021-01-25 19:10:52 +00:00
Yabin Cui
824e5ac072 Merge "Switch to clang-r407598b (12.0.2)." 2021-01-25 17:41:31 +00:00
Colin Cross
49d9f605d7 Merge changes from topic "revert_vendor" am: c21e30bb56 am: 0ba23c1903 am: ff381094c1
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1557798

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: If26691d346e45f377307188cd92b0ffa07756703
2021-01-25 16:46:02 +00:00
Colin Cross
c21e30bb56 Merge changes from topic "revert_vendor"
* changes:
  Revert "Revert "Truncate vendor snapshot header glob list after filtering it""
  Revert "Revert "Speed up vendor snapshot header globs""
2021-01-25 16:07:51 +00:00
Justin Yun
ebcf0c5e15 Define odm_available property to install a vendor variant to odm
'vendor_available: true' creates a vendor variant from a system
module. The vendor variant of the module is installed to /vendor.
However, we may want to install the vendor variant to /odm, instead.

'device_specific: true' does not work for this purpose because
'vendor_available: true' is allowed only for the system or product
modules to create a vendor variant. But 'device_specific: true'
itself creates a vendor variant that may not work with
'vendor_available: true'.

To install the vendor variant to /odm, we define a new property
'odm_available'. 'odm_available' is exactly the same as the
'vendor_available' except the install path of the vendor variant.
By defining 'odm_available: true', the vendor variant of the module
will be installed to /odm or /vendor/odm instead of /vendor.

Bug: 176147321
Bug: 176079978
Test: check if a module with 'odm_available: true' is installed to
      /vendor/odm
Change-Id: I2d16bd2c515796597b2fbd1eb66f7c2736434697
2021-01-25 17:08:44 +09:00
Justin Yun
5bb120fe70 Check vndk-private with the IsVndkPrivate() am: e09ac17466 am: 9f900373d7 am: 24ee8579e9
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1554987

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I9edbfdaa1ba40c1460f728ad0fee44625fbd0038
2021-01-23 02:43:37 +00:00
Colin Cross
2e577f3657 Add vendor_available coverage to TestVendorSnapshotUse
Test that the correct suffix is added to the Make references to a
vendor_available library in a vendor snapshot.

Bug: 177098205
Test: vendor_snapshot_test.go
Change-Id: I0c9b81d63798e221db856fa0e4742a467c356fcb
2021-01-22 17:42:31 -08:00
Colin Cross
0fce0bab12 Move vendor snapshot tests into vendor_snapshot_test.go
Move the vendor snapshot tests into vendor_snapshot_test.go to
reduce the size of cc_test.go

Bug: 177098205
Test: go test ./build/soong/cc/...
Change-Id: Ib1120f986fc0111a9487fce00539a4c5ae7e2e87
2021-01-22 17:42:28 -08:00
Justin Yun
e09ac17466 Check vndk-private with the IsVndkPrivate()
*_available will not provide if a module is VNDK-private or not.
Fixed it by using IsVndkPrivate() with private() interface.

By allowing exclude_from_vendor_snapshot for vendor_available
modules, available() interface is no longer required. Tests are
updated for exclude_from_vendor_snapshot on vendor_available modules.

Bug: 175768895
Test: m nothing
Change-Id: I9ff85256170d59b378a4c354d5c007cfbeacabc5
2021-01-23 01:11:58 +00:00
Colin Cross
75862ebcb2 Merge "Fix mismatch between cc and python for windows prefer32" am: 9b564c5a22 am: 0448d58125 am: a5085a5fd1
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1554549

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I78510184ca457855b032d54c5f5613c438b2257f
2021-01-23 00:45:56 +00:00
Colin Cross
9b564c5a22 Merge "Fix mismatch between cc and python for windows prefer32" 2021-01-22 23:34:00 +00:00
Dan Willemsen
da37007955 Merge "Add Mac 11.1 SDK to the allowlist" am: ba680de96e am: 21a794a0d8 am: 332fd96a00
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1556740

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ib511f0fbd3b5f38ce9f00bb489919cfcc12b045e
2021-01-22 21:28:40 +00:00
Dan Willemsen
ba680de96e Merge "Add Mac 11.1 SDK to the allowlist" 2021-01-22 19:05:09 +00:00
Colin Cross
1f2f4eb07d Revert "Revert "Truncate vendor snapshot header glob list after filtering it""
This reverts commit 758140ceae.

Reason for revert: modifying glob results no longer corrupts cache after aosp/1557261

Change-Id: Id94f1f5835a93e83dc9f465627913b91908d3560
2021-01-22 18:06:57 +00:00
Colin Cross
ec118d0734 Revert "Revert "Speed up vendor snapshot header globs""
This reverts commit c2aff9e9fd.

Reason for revert: modifying glob results no longer corrupts cache after aosp/1557261

Change-Id: I682b92ad08c82ac4fa5482497cb587bd0223d21b
2021-01-22 18:05:59 +00:00
Jeongik Cha
f5c418cedf Update VndkMustUseVendorVariantList
As AIDL version rule is changed, change VNDK list accordingly.
'unstable' and non-versioned aidl module will be cleaned up

Bug: 150578172
Test: m
Change-Id: I3e82b2c01f1fca75ac97985053b4a5826d151340
2021-01-22 20:32:02 +09:00
ChengYou Ho
262adc3e41 Create Weaver aidl interface am: 4b197e110b am: 1ba735ada4 am: 56a957fa9a
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1554279

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I85131d81820b53a852633ec758510a580503bcf1
2021-01-22 07:44:07 +00:00
ChengYou Ho
4b197e110b Create Weaver aidl interface
Bug: 176107318
Change-Id: Ia4b628edf1ef51c71af7078818c0adf2a4183d03
2021-01-22 06:34:22 +00:00
Daniel Cardenas
915ee01fef Merge changes from topic "revert_vendor" am: 3e2760a539 am: 7868fe0c6f am: f1d2946eaa
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1556737

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I2c3629d513298a21f25335d203964c8a2cac3222
2021-01-22 06:01:46 +00:00
Yabin Cui
5e3d82ebdb Switch to clang-r407598b (12.0.2).
Bug: 178106097
Test: build.
Change-Id: I1ce256547fc395a6b440950b4c88f7fe777c86ee
2021-01-21 21:30:45 -08:00
Daniel Cardenas
3e2760a539 Merge changes from topic "revert_vendor"
* changes:
  Revert "Speed up vendor snapshot header globs"
  Revert "Truncate vendor snapshot header glob list after filtering it"
2021-01-22 05:12:51 +00:00
Christopher Di Bella
81bc3b130d Merge "adds new warnings to Android build (1/2)" am: 490b9d7931 am: 3cab1ce6f5 am: d19b58ada9
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1497076

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I6159e650973c49c6b768a109e32ac6f2199fe967
2021-01-21 23:55:11 +00:00
Evgenii Stepanov
e0ea5943fc Merge "Support memtag_heap in SANITIZE_TARGET_DIAG, fix cc_test interation." am: 298bafdde9 am: d1926575a7 am: f22bbf2d8c
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1550323

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I5922cb4bdc7e722992ca7c435abff4255d13f330
2021-01-21 23:53:35 +00:00
Dan Willemsen
5191b00369 Add Mac 11.1 SDK to the allowlist
Historically we've only had to add one major release a year to the Mac
SDK allowlist, but this year the versioning scheme changed and 11.1 is a
minor update to 11 (instead of 10.x.1 like in years past). Unfortunately
the Xcode tools don't let you just specify '11' like they did with
'10.x', so this is more complicated to fix in a scalable way.

Test: build with xcode 12.3 and macOS SDK 11.1
Change-Id: I2e88e9289727261389a863e7147a0b146ec5148a
2021-01-21 14:56:39 -08:00
Christopher Di Bella
490b9d7931 Merge "adds new warnings to Android build (1/2)" 2021-01-21 22:24:51 +00:00
Evgenii Stepanov
298bafdde9 Merge "Support memtag_heap in SANITIZE_TARGET_DIAG, fix cc_test interation." 2021-01-21 20:32:19 +00:00
Sally Yuen
c2aff9e9fd Revert "Speed up vendor snapshot header globs"
This reverts commit 0f93e5b9fb.

Reason for revert: causing extra soong regenerations

Change-Id: I4ed2e5c82dfe3e99fbb9590b80f92c79a27e8025
2021-01-21 20:17:33 +00:00
Sally Yuen
758140ceae Revert "Truncate vendor snapshot header glob list after filtering it"
This reverts commit 3a62a9cc2b.

Reason for revert:  causing extra soong regenerations

Change-Id: I4ceb5334634613a00ac9c312b75c623a8aced8ab
2021-01-21 20:17:07 +00:00
Jiyong Park
942c119b14 Merge changes from topic "future_symbol" am: 1de5a578d2 am: 27d194c793 am: 9e6596f3ed
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1425589

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ic0c73002351347ad25c2ef23885743cfa457ce61
2021-01-21 18:55:24 +00:00
Christopher Di Bella
23a991c04e adds new warnings to Android build (1/2)
The following warnings have been turned on, and turned on as errors:

-Wbool-operation
-Wimplicit-int-float-conversion
-Wint-in-bool-context
-Wstring-compare
-Wstring-plus-int
-Wxor-used-as-pow

Test: no extra tests necessary

Change-Id: Ic8ab26de9e5323e9b81ad79eef787abfb264848c
2021-01-21 17:53:42 +00:00
Jiyong Park
1de5a578d2 Merge changes from topic "future_symbol"
* changes:
  API availability should be checked using __builtin_available
  __ANDROID_API__ tracks min_sdk_version
2021-01-21 16:33:05 +00:00