Commit graph

5133 commits

Author SHA1 Message Date
Justin Yun
107a4cb56c Update test_min_api_level for cc_test
By replacing MinApiLevelModuleController with
ShippingApiLevelModuleController, we don't need to define
api-level-prop option. The property name must not be a parameter but
be defined in the module controller.

test_min_sdk_version is removed as it is not used.

Bug: 178990561
Test: atest vts_core_liblp_test
Change-Id: Ib4660b91c7adb2ec8b970197dc6f65b8e6952a66
2021-02-20 00:46:21 +00:00
Colin Cross
aa2555387d Add ctx to AndroidMkExtraEntriesFunc
Add a ctx parameter to AndroidMkExtraEntriesFunc to allow them to
access providers.

Test: m checkbuild
Change-Id: Id6becc1e425c3c3d8519248f8c0ce80777fac7cc
Merged-In: Id6becc1e425c3c3d8519248f8c0ce80777fac7cc
2021-02-19 23:05:40 +00:00
Elliott Hughes
272649ceb5 Merge "__ANDROID_UNGUARDED_AVAILABILITY__ is gone now." 2021-02-19 22:27:11 +00:00
Elliott Hughes
5a8c9531e4 __ANDROID_UNGUARDED_AVAILABILITY__ is gone now.
So no need to keep `-D`ing it.

Bug: http://b/179067538
Test: treehugger
Change-Id: If5bcead40d3bb355c241e363a8f1a956cb144438
2021-02-19 10:43:19 -08:00
Paul Duffin
3cb603eb51 Add tests for exported generated headers
Improves the test coverage for exporting of generated headers. These
tests highlight the bug described in b/180712399.

Follow up changes will refactor and fix bugs in this code. Adding the
tests separately help ensure that those changes do not inadvertantly
change the behavior.

Test: m nothing
Bug: 180712399
Change-Id: I0225b0cf53259071edb99a94be5014ed0e019bde
2021-02-19 17:12:01 +00:00
Julien Desprez
251261d01b Merge "Switch cc_test host_supported: true to unit tests" 2021-02-19 16:55:04 +00:00
Jingwen Chen
4e86b6ae43 Merge "bp2build: cc_object converter." 2021-02-19 03:54:43 +00:00
vichang
cd821d8283 Merge "Non-installable module should not be installed into a fuzzer .zip package" 2021-02-18 09:59:06 +00:00
Jingwen Chen
8c1b97e01b bp2build: cc_object converter.
This CL introduces a basic bp2build converter for cc_object modules.
cc_objects maps cleanly to cc_library targets, but with -fnoaddrsig.

This CL also demonstrates generating include deps within a macro to
allow the cc_object compilation to depend on a relative-include header
within an include dir.

e.g. if "foo.cc" includes "android/log.h" and the latter is located at
"include/android/log.h", the autogenerated header deps would export
"android/log.h" correctly to the foo.cc upstream target.

Test: GENERATE_BAZEL_FILES=true m nothing && bp2build-sync write && bazel build //bionic/libc:crtbegin_so1

Change-Id: Ifd9e097051ec184ab0a1929d07918f0ff4f24d98
2021-02-18 03:27:28 -05:00
Dan Albert
a175126009 Merge "[arm64] Build NDK with PAuth and BTI" 2021-02-17 21:37:41 +00:00
Chih-hung Hsieh
6e304f5a88 Merge "Change default DEFAULT_TIDY_HEADER_DIRS to empty" 2021-02-17 18:34:48 +00:00
Victor Chang
00c144f930 Non-installable module should not be installed into a fuzzer .zip package
libicu_* fuzzer depends on installable cc modules and non-installable
cc modules with the same name, because the non-installable modules are
stubs used in the compile-time, and shouldn't be used in runtime.

Bug: 175583039
Test: make haiku dist
Test: Run 2 arbitrary binaries from out/dist/fuzz-target-x86_64.zip on device
Test: Run 2 arbitrary binaries from out/dist/fuzz-host-x86_64.zip on host
Change-Id: I0ecf24bb83e3985da3b8f393adab8c87ab7400c6
2021-02-17 16:40:25 +00:00
Rupert Shuttleworth
a0516f76ab Merge "Add cc_library_headers support to bp2build." 2021-02-17 08:57:19 +00:00
Chih-hung Hsieh
296b7b8440 Merge "Switch to clang-r412851 (build 7141649)" 2021-02-17 00:17:14 +00:00
Rupert Shuttleworth
54e7841b90 Add cc_library_headers support to bp2build.
Test: Added cc_conversion_test.go.
Change-Id: Id4459d2c2fa02687a374cd9fb25d687e9678218c
2021-02-16 23:07:01 +00:00
Chih-Hung Hsieh
6338deba1d Switch to clang-r412851 (build 7141649)
Bug: 179065588
Test: presubmit
Change-Id: Ifb9399e9f4ec0968b174b90c1a1f4f78f903d39d
2021-02-12 13:53:10 -08:00
Chih-Hung Hsieh
9f94c362ea Change default DEFAULT_TIDY_HEADER_DIRS to empty
* Default -header-filter will now contain only module directory.
  * In a clean build of aosp_x86_64-eng, this change can reduce
    the number of (duplicated) clang-tidy warnings by 77% or more.
* When compiled with WITH_TIDY=1, if DEFAULT_TIDY_HEADER_DIRS is
  not set, warnings from a header file will be shown only if
  the file is in a module's (sub)directory.
* Set DEFAULT_TIDY_HEADER_DIRS="bionic/|bootable/|build/|cts/|\
  dalvik/|developers/|development/|frameworks/|\
  libcore/|libnativehelper/|system/"
  will get before this change's -header-filter.
* Fix a bug: Default header-filter was not added when
  tidy_flags was defined in a module.
  With this fix, some incorrectly hidden header file tidy warnings
  will now show up.

Bug: 179530304
Test: make with WITH_TIDY=1 and various setting of DEFAULT_TIDY_HEADER_DIRS
Change-Id: Ia0c05349908a730862dae36be9a2dbe4f44fb6da
2021-02-12 13:50:38 -08:00
Elliott Hughes
5add0c61d6 Rename __ANDROID_UNGUARDED_AVAILABILITY__ -> __ANDROID_UNAVAILABLE_SYMBOLS_ARE_WEAK__.
Bug: http://b/179067538
Test: treehugger
Change-Id: I5945ca6e767212280a1981e6f78ec3c50acfb3f3
2021-02-11 14:21:59 -08:00
Treehugger Robot
b68036f44b Merge "Add LOCAL_LICENSE_KINDS to build/soong" 2021-02-10 07:18:29 +00:00
Treehugger Robot
509ab03f12 Merge "Ensure that stubs.symbol_file has ".map.txt" suffix" 2021-02-10 01:07:30 +00:00
Jose "Pepe" Galmes
ee4dcdc0ad Merge "Implement directed recovery snapshot." 2021-02-10 00:02:34 +00:00
Treehugger Robot
609b124e5e Merge changes from topic "ps 2.0 cp"
* changes:
  Update VndkMustUseVendorVariantList
  powerstats: PowerStats HAL has been renamed
  Create Power Stats AIDL interface
2021-02-09 19:20:10 +00:00
Jose Galmes
4c6895e5a3 Implement directed recovery snapshot.
Bug: 177451657
Test: m -j nothing
Change-Id: I0b84c34fb2e9e9340d9f9e7405428cd2cc4d43b5
2021-02-09 08:25:34 -08:00
Ivan Lozano
4ccfcc2ee4 Merge "rust: Add rust_ffi_static vendor ramdisk Support" 2021-02-09 13:49:28 +00:00
Ivan Lozano
e6d3098c1b rust: Add rust_ffi_static vendor ramdisk Support
Similar to our vendor support, this adds support for linking rust static
libraries to vendor ramdisk cc modules.

A bug fix is also included where a restriction against setting rust_ffi
vendor-specific was not being enforced.

Bug: 179397942
Test: Example modules link, Soong tests pass.
Change-Id: I737cdf0c2f49ab349bcea2a0429e6298ebc1313e
2021-02-08 09:36:26 -05:00
Bob Badour
02040de891 Add LOCAL_LICENSE_KINDS to build/soong
Added SPDX-license-identifier-Apache-2.0 to:
  Android.bp
  android/Android.bp
  android/soongconfig/Android.bp
  androidmk/Android.bp
  apex/Android.bp
  bazel/Android.bp
  bp2build/Android.bp
  bpf/Android.bp
  bpfix/Android.bp
  cc/Android.bp
  cc/config/Android.bp
  cc/libbuildversion/Android.bp
  cc/libbuildversion/tests/Android.bp
  cc/ndk_api_coverage_parser/Android.bp
  cc/ndkstubgen/Android.bp
  cc/symbolfile/Android.bp
  cmd/dep_fixer/Android.bp
  cmd/diff_target_files/Android.bp
  cmd/extract_apks/Android.bp
  cmd/extract_jar_packages/Android.bp
  cmd/extract_linker/Android.bp
  cmd/fileslist/Android.bp
  cmd/host_bionic_inject/Android.bp
  cmd/javac_wrapper/Android.bp
  cmd/merge_zips/Android.bp
  cmd/multiproduct_kati/Android.bp
  cmd/path_interposer/Android.bp
  cmd/pom2bp/Android.bp
  cmd/pom2mk/Android.bp
  cmd/sbox/Android.bp
  cmd/soong_build/Android.bp
  cmd/soong_env/Android.bp
  cmd/soong_ui/Android.bp
  cmd/zip2zip/Android.bp
  cmd/zipsync/Android.bp
  cuj/Android.bp
  dexpreopt/Android.bp
  dexpreopt/dexpreopt_gen/Android.bp
  env/Android.bp
  etc/Android.bp
  filesystem/Android.bp
  finder/Android.bp
  finder/cmd/Android.bp
  genrule/Android.bp
  jar/Android.bp
  java/Android.bp
  java/config/Android.bp
  kernel/Android.bp
  linkerconfig/Android.bp
  linkerconfig/proto/Android.bp
  makedeps/Android.bp
  partner/Android.bp
  phony/Android.bp
  python/Android.bp
  python/tests/Android.bp
  remoteexec/Android.bp
  rust/Android.bp
  rust/config/Android.bp
  scripts/Android.bp
  sdk/Android.bp
  sh/Android.bp
  shared/Android.bp
  symbol_inject/Android.bp
  symbol_inject/cmd/Android.bp
  sysprop/Android.bp
  tradefed/Android.bp
  ui/build/Android.bp
  ui/logger/Android.bp
  ui/metrics/Android.bp
  ui/metrics/proc/Android.bp
  ui/status/Android.bp
  ui/terminal/Android.bp
  ui/tracer/Android.bp
  xml/Android.bp
  zip/Android.bp
  zip/cmd/Android.bp

Added SPDX-license-identifier-Apache-2.0 SPDX-license-identifier-BSD to:
  finder/fs/Android.bp
  third_party/zip/Android.bp

Bug: 68860345
Bug: 151177513
Bug: 151953481

Test: m all

Exempt-From-Owner-Approval: janitorial work

Change-Id: Ia47ca14f16b8c9f84f9d533a07e5b00e2c04e8d4
2021-02-06 04:23:21 +00:00
Jooyung Han
7701309889 Merge "cc: fix version macro for stubs" 2021-02-06 01:41:31 +00:00
Jose "Pepe" Galmes
c64b961708 Merge "Generate fake versions of modules excluded in directed vendor snapshot." 2021-02-05 17:54:48 +00:00
Jose Galmes
0a942a0368 Generate fake versions of modules excluded in directed vendor snapshot.
When using the directed vendor snapshot, the build fails because soong
fails to find some variants of the modules that have been excluded
from VENDOR_SNAPSHOT_MODULES, even though those modules are not going
to be used by the build.

The solution implemented here is to generate fake versions of those
modules (empty files) and include them in the generated Android.bp,
so that soong finds the modules, even though trying to use them would
fail.

Bug: 171821997
Bug: 179275601

Test: source build/envsetup.sh
Test: m -j nothing

Change-Id: Ibd3e963ab3e5504c0ac817f7cabbd241bf47a5cb
2021-02-05 17:53:53 +00:00
Liz Kammer
b7eab01167 Merge "bp2build: convert paths/module refs to Bazel label" 2021-02-05 13:39:08 +00:00
Jooyung Han
11b0fbdbf6 cc: fix version macro for stubs
When a cc module is built against a stub, compiler passes version macro
of the stub lib. Version macro should be numeric, so codenames or
"current" should be mapped to numbers just like how ndkstubgen maps to.

* "current" -> future (10000)
* codenames -> look up api_level.json
* otherwise -> cast to int

Bug: 179329813
Test: m / soong test / manually check the output build.ninja
Change-Id: Ic0e1dd904984e161694a0b77fad5559c06a4462f
2021-02-05 11:27:57 +09:00
Treehugger Robot
4f67b03e8b Merge changes I904b4374,I6b4ea062
* changes:
  Do not add '.product' suffix for product_specific module
  Use target dependent module to update the name suffix
2021-02-05 01:52:04 +00:00
Benjamin Schwartz
6ff77eace0 Update VndkMustUseVendorVariantList
Bug: 150578172
Test: m
Change-Id: I68635557faff1bd8daa4964af7946a54a8dee60d
Merged-In: I3e82b2c01f1fca75ac97985053b4a5826d151340
2021-02-04 17:13:11 -08:00
Benjamin Schwartz
71dfb344e4 powerstats: PowerStats HAL has been renamed
Bug: 169864180
Test: m
Change-Id: I0db7d731c3aa81b2c9331570c93ec23038bd743c
(cherry picked from commit 399394b702)
Merged-In: I0db7d731c3aa81b2c9331570c93ec23038bd743c
2021-02-04 16:10:44 -08:00
Benjamin Schwartz
1057ccb75a Create Power Stats AIDL interface
Bug: 162472196
Test: m
Change-Id: I44ffdf07c181cb4a119ec5de73bcb9ffaf485504
(cherry picked from commit 5ec7024911)
Merged-In: I44ffdf07c181cb4a119ec5de73bcb9ffaf485504
2021-02-04 16:09:20 -08:00
Chih-hung Hsieh
adeb44b112 Merge "Disable gnu-folding-constant warning." 2021-02-04 23:59:27 +00:00
Chih-Hung Hsieh
72e88767dc Disable gnu-folding-constant warning.
New clang compiler issue too many such warnings.

Bug: 179065588
Bug: 179309338
Bug: 179278370
Test: make, presubmit
Change-Id: I9948a4b34ec75a01aa24c2fd753722b072ae5202
2021-02-04 11:46:40 -08:00
Liz Kammer
356f7d45c1 bp2build: convert paths/module refs to Bazel label
This currently expands all globs, still need to support converting glob
syntax.

Test: go build_conversion_test
Test: GENERATE_BAZEL_FILES=true m nothing
Test: m nothing
Bug: 165114590
Change-Id: If7b26e8e663d17566fad9614ca87a8da1f095284
2021-02-04 13:45:56 -05:00
Julien Desprez
8908b37a14 Switch cc_test host_supported: true to unit tests
Test: presubmit
Bug: 179092189
Change-Id: Ic5c3ca6de44732f6299ad9a35d1aaef622f3ff7f
2021-02-04 10:10:16 -08:00
Jiyong Park
a417557f80 Ensure that stubs.symbol_file has ".map.txt" suffix
The property refers to the symbol file that describes APIs across
updatable components like APEXes and system/vendor. Since it's important
to keep the APIs backwards incompatible, any change to the APIs should
be reviewed/gated by the NDK API council. The map.txt suffix is the key
for trigging the NDK API review by gerrit.

Bug: N/A
Test: m nothing
Change-Id: I01eae9c6a106d301863ec86e169111712af74d3f
2021-02-04 21:05:47 +09:00
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
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
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
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
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
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
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
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
9b564c5a22 Merge "Fix mismatch between cc and python for windows prefer32" 2021-01-22 23:34:00 +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
ChengYou Ho
4b197e110b Create Weaver aidl interface
Bug: 176107318
Change-Id: Ia4b628edf1ef51c71af7078818c0adf2a4183d03
2021-01-22 06:34:22 +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
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
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
Colin Cross
3a62a9cc2b Truncate vendor snapshot header glob list after filtering it
Test: m checkbuild
Change-Id: I4847bff5c03844194a9a80e8cb24a60694db6208
2021-01-21 00:46:46 +00:00
Evgenii Stepanov
04896cae35 Support memtag_heap in SANITIZE_TARGET_DIAG, fix cc_test interation.
cc_test without sanitize:memtag_heap acts as if it has implicit
sanitize{memtag_heap:true, diag:{memtag_heap:true}}. This is unaffected
by SANITIZE_TARGET.

Refactor the test to cover all permutations.

Change memtag include lists to act similar to SANITIZE_TARGET_DIAG: the
the sync include list upgrades async targets to sync, unless diag is
explicitly set to false in the target definition.

Bug: b/135772972
Test: cc_test.go

Change-Id: I6a969f2f5804cd5f47fc4e93a20e3b99ea5fa111
2021-01-20 22:27:45 +00:00
Colin Cross
0f93e5b9fb Speed up vendor snapshot header globs
The vendor snapshot header globs were repeated 9 times, once for each
possible header suffix.  Globbing is not a fast operation, so this
took 9.68s of CPU time in my AOSP builds.  Replace it instead with a
single glob, followed by filtering down to the desired header
extensions.

Test: m checkbuild
Change-Id: I9c8f8cdad8cbffc0a42217659a48dd9d676e4e4c
2021-01-20 18:36:25 +00:00
Colin Cross
08117deab4 Fix mismatch between cc and python for windows prefer32
Windows prefer32 was implemented in cc, which caused a mismatch
between cc and other packages like python.  This manifested as
missing variant when a python_test_host with compile_multilib: "first"
tried to depend on a cc_binary_host, which implicitly has multilib
"first".

Fixes: 177904375
Test: m checkbuild
Change-Id: Iaaac16ae171c06d90d04d7cac11789d3f39b8d99
2021-01-20 10:26:00 -08:00
Cindy Zhou
0ae13ec307 Merge "Build against cfi supported coverage lib" 2021-01-20 18:08:30 +00:00
Colin Cross
bdeafb93fd Merge "Don't create SDK variants for native bridge modules" 2021-01-20 17:49:36 +00:00
Chih-Hung Hsieh
04f8d379e6 Add clang-analyzer check if selected.
* WITH_TIDY=1 should not include clang-analyzer-* checks
  because they are too slow.
* Nightly builds will use both WITH_TIDY=1 and
  CLANG_ANALYZER_CHECKS=1.

Bug: 173736193
Test: make with WITH_TIDY=1 and CLANG_ANALYZER_CHECKS=1
Change-Id: I3885fd0e20475ceee5e3798bffc11a61994ac113
2021-01-19 19:21:39 -08:00
Inseob Kim
9bd66d1537 Merge "Implement directed vendor snapshot" 2021-01-20 01:17:25 +00:00
Inseob Kim
4c4de0edc3 Merge "Refine sysprop_library header rules" 2021-01-20 01:17:22 +00:00
Ryan Prichard
809eac3057 Merge "Switch platform EH unwinder to prebuilt LLVM libunwind" 2021-01-20 00:10:59 +00:00
Colin Cross
94e347e6a5 Don't create SDK variants for native bridge modules
Native bridge modules never need to build against NDK stubs, so
don't create SDK variants.  Also clear the sdk_version property
for modules that don't have SDK variants so that later code doesn't
use it to trigger SDK behaviors.

Test: m checkbuild
Change-Id: I1920fa82e9fab06235f01a62624382efa16cc6e3
2021-01-19 15:00:45 -08:00
Inseob Kim
7cf1465d2e Implement directed vendor snapshot
Vendors can now generate only needed modules by setting the following
Makefile variables:

- DIRECTED_VENDOR_SNAPSHOT: set to true
- VENDOR_SNAPSHOT_MODULES: list of snapshot candidates

e.g.

DIRECTED_VENDOR_SNAPSHOT := true
VENDOR_SNAPSHOT_MODULES := toybox_vendor sh_vendor libbase libcutils ...

Bug: 157967325
Test: m dist vendor-snapshot after setting those in BoardConfig.mk
Change-Id: I6515a43d9358d94483d7c7fa2b066f9dd457f6aa
2021-01-18 20:08:09 +09:00
Inseob Kim
0641004a3f Refine sysprop_library header rules
Instead of unreliable giant if clause, it's enough to check dependency
between platform (system, system-ext), product, and vendor.

Test: sysprop_test soong test
Test: link against host_supported sysprop_library and use internal props
Change-Id: I7bd5df00b302fa261eff5120106aacc3df93c1b2
2021-01-18 15:23:28 +09:00
Chih-Hung Hsieh
4d31a041c7 Do not enable all clang-analyzer-* checks,
* clang-analyzer is slow and enables clang-diagnostic-padded,
  which cannot be suppressed yet.

Test: make with WITH_TIDY=1 for crosshatch-userdebug
Change-Id: I20193f0db3154b037d58c5ca012a9e753b176722
2021-01-15 21:10:35 -08:00
Chih-Hung Hsieh
34850d350e add more global default checks
Test: make with and without WITH_TIDY=1
Change-Id: Iee07707158f7204e961970ba4d518403b3b2aaf3
2021-01-15 14:31:13 -08:00
Chih-Hung Hsieh
1b4934a215 WITH_TIDY=1 implies -warnings-as-errors=-*
* This allows local projects to enable clang-tidy
  and catch errors in a default build, but allows
  all warnings in a global build with WITH_TIDY=1.

Test: make with WITH_TIDY=1
Change-Id: I92a10af24b23ee9f04eebb0513e8f611dd7dcf59
2021-01-15 14:17:39 -08:00
Treehugger Robot
b47dcf7f0d Merge "Adjust the double loadable check" 2021-01-15 02:22:09 +00:00
Jiyong Park
423e37873b API availability should be checked using __builtin_available
This change turns -Wunguarded-availability option which enforces calls
to APIs which are introduced after the min_sdk_version of the
compliation unit to be guarded with __builtin_available check. For
example, let's assume that we have foo() which was introduced with API
level 30.

void foo() __INTRODUCED_IN(30);

Then if foo() is called for a module whose min_sdk_version is less than
30, say 26, it should be called as below:

if (__builtin_available(android 30, *)) {
  foo();
} else {
  // fallback impl
}

For modules whose min_sdk_version is >=30, the guard is not required.

Bug: 150860940
Bug: 134795810
Test: m

Change-Id: I084148b9a051350626a37cb394daa4398b7332d5
2021-01-15 09:43:35 +09:00
Treehugger Robot
ee8ae11c0f Merge "Must use vendor variant for health storage AIDL HAL" 2021-01-14 22:22:08 +00:00
Chris Li
46cad069d1 Revert "To use same default for the nightly builds."
This reverts commit b063dc4221.

Reason for revert: DroidMonitor-triggered revert due to breakage https://android-build.googleplex.com/builds/quarterdeck?branch=git_master&target=crosshatch-userdebug&lkgb=7080774&lkbb=7082597&fkbb=7080869, bug 177549474

Test: make
Change-Id: I8b6cf3b56fddde9832e1428a3d1aef00f19637fb
2021-01-14 13:37:54 -08:00
Cindy Zhou
5d5cfc164d Build against cfi supported coverage lib
The change will detect if a module is compiled against cfi support, and
will usebuild the coverage build against the libprofile that supports cfi. This is to resolve compilation errors when
building against modules with cfi support.
Bug: 177098919
Test: forrest build for cf_x86_phone-userdebug_coverage http://go/forrest-run/L81700000786828933

Change-Id: I8e0421cdf1c6e499292cfa3457cefd3c42f13155
Merged-In: I8e0421cdf1c6e499292cfa3457cefd3c42f13155
2021-01-14 11:46:10 -08:00
Colin Cross
6c0a9f69e9 Merge "Remove global state from VNDK" 2021-01-14 18:31:06 +00:00
Janis Danisevskis
0ce3a40bf8 Merge "The build related changes for Secure Clock and Shared Secret functionalities." 2021-01-14 18:04:02 +00:00
Jiyong Park
0474e1f677 Adjust the double loadable check
The check no longer tracks private dependencies like stubImplDepTag and
staticVariantTag. It also doesn't do the check for double_loadable
libraries that are not depended on by a LLNDK library.

Bug: N/A
Test: m
Test: add 'double_loadable: true, gen_trace: true` to an aidl_interface
module. The build doesn't break.

Change-Id: Iccd1a9d445a48d03c373708ba1bdd34b9a7f152d
2021-01-14 18:29:47 +09:00
Ryan Prichard
b35a85ee8b Switch platform EH unwinder to prebuilt LLVM libunwind
For the platform libc++ STL, remove the
-Wl,--exclude-libs,libunwind_llvm.a argument, which is redundant with
the same argument in deviceGlobalLdflags.

Bug: http://b/153025717
Test: device boots
Change-Id: Idd7791d52f74aab2d5f59419fb75f841fc29a2eb
2021-01-13 19:51:06 -08:00
Colin Cross
7821224d8e Remove global state from VNDK
Move the global lists of VNDK modules into boolean properties on the
modules themselves, and use the new SingletonModule functionality
to visit all modules and collect the list of modules with the properties
set.

Bug: 176904285
Test: all soong tests
Test: m checkbuild
Test: compare Soong outputs
Change-Id: Icf7e2f8f190a517d30f0780e98762bc0084ddb24
2021-01-13 16:44:32 -08:00
Yifan Hong
78d0f4880c Must use vendor variant for health storage AIDL HAL
Test: mmma hardware/interfaces/health/storage
Bug: 177470478
Change-Id: Iae8dc547d68ecb528c0eb9684353267c1dd30459
Merged-In: Iae8dc547d68ecb528c0eb9684353267c1dd30459
2021-01-13 16:11:45 -08:00
Chih-Hung Hsieh
b767f913f1 Fix comment.
Test: make
Change-Id: I6c69549cb873e1d160ec6d590749361dc1a291dd
2021-01-13 13:24:15 -08:00
Chih-hung Hsieh
66f7fdd1c8 Merge "To use same default for the nightly builds." 2021-01-13 21:22:48 +00:00
Orion Hodson
62555ffa5a Merge "Remove remaining libnativehelper implicit includes" 2021-01-13 06:11:03 +00:00
Colin Cross
2bcb4940bb Merge changes Ib29ede45,I1b2bfdfb
* changes:
  Create LLNDK vendor variants when DeviceVndkVersion is not set
  Add a new SingletonModule type
2021-01-12 20:43:39 +00:00
Evgenii Stepanov
e7c39a5da4 Merge "Include/exclude lists for memtag_heap sanitizer." 2021-01-12 19:33:02 +00:00
Chirag Pathak
cfa220559d The build related changes for Secure Clock and Shared Secret functionalities.
Also restored sorting.

Test: N/A
Bug: b/171844725
Bug: b/168673523

Change-Id: I423e08cab38ef685fd9eb6a3c338e285de0e8757
2021-01-12 11:13:16 -08:00
Jiyong Park
b35a819834 __ANDROID_API__ tracks min_sdk_version
Previously, for cc_* modules, __ANDROID_API__ tracked the sdk_version
property. This however has caused a few number of problems:

1. It's confusing. __ANDROID_API__ has meant minSdkVersion. Therefore
the sdk_version property should mean minSdkVersion (since the macro
tracks the property). However, the introduction of the new
min_sdk_version property (which is currently for APEX) made this very
confusing. Also, this is not consistent with the java_* modules where
sdk_version means compileSdkVersion.

2. This is preventing go/android-future-symbols. The plan is to make the
APIs that are above the minSdkVersion available as weak symbols.
Previously those APIs had to be accessed via dlsym because they are
hidden behind the __ANDROID_API__ macro at build-time. To use make the
APIs visible at build-time, the module authors had to __ANDROID_API__
beyond their minSdkVersion. This is against the definition of
__ANDROID_API__.

To solve above problems, __ANDROID_API__ now correctly tracks
min_sdk_version. In addition, min_sdk_version now defaults to
sdk_version. Therefore, most of the modules that don't set
min_sdk_version aren't affected by this change.

Bug: 163288375
Test: m
Change-Id: I645e6bb1234c27ae0a69b7b87a59206cfd350744
2021-01-13 03:12:24 +09:00
Chih-Hung Hsieh
b063dc4221 To use same default for the nightly builds.
* disable misc-no-recursion check

Bug: 173736193
Test: make with WITH_TIDY=1
Change-Id: Ibdf90d520f67b26f7adade4698868a47afa01161
2021-01-12 00:55:28 -08:00
ChengYou Ho
50ab3ff048 Create authsecret aidl interface
Bug: 176107318
Change-Id: Ia2ddb148600fb846a41802b25ec73a7747720090
2021-01-12 06:01:15 +00:00
Evgenii Stepanov
4beaa0c964 Include/exclude lists for memtag_heap sanitizer.
Bug: b/135772972
Test: cc_test.go / TestSanitizeMemtagHeap
Change-Id: I263b23647f1874ae3024101dce1b07091c1c9403
2021-01-11 17:50:07 -08:00
Evgenii Stepanov
193ac2eb96 Support "memtag_heap" sanitizer.
Memtag_heap adds an ELF note that enables MTE heap tagging in
bionic/scudo. Ignored on non-executables. With diagnostic
(diag:{memtag_heap:true}) enables the SYNC mode, otherwise - ASYNC mode.

Memtag_heap defaults to set (with diag) on cc_test targets, unset
otherwise. Ignored on non MTE-compatible hardware.

Bug: b/135772972
Test: soong tests

Change-Id: I88fd0f159e609e17bd13487749980a1ba02cb91c
2021-01-11 21:50:39 +00:00
ChengYou Ho
142b28a095 Create OemLock aidl interface
Bug: 176107318
Change-Id: I31da15e7aedfaafb1841de0fc8e81aed73405ae0
2021-01-11 05:57:07 +00:00
Treehugger Robot
4ba271573d Merge "Update comments for (vendor|product)_available" 2021-01-08 20:48:15 +00:00
Kris Alder
4803765257 Merge "add options for LibFuzzer, HWASan, and ASan to fuzz_config" 2021-01-08 17:06:28 +00:00
Ivan Lozano
3968d8f678 Refactor CC to prep for Rust sanitizable modules.
Adds a PlatformSanitizable interface which both CC and Rust can
implement so that the sanitizer mutators in CC can sanitize Rust
shared/static libraries appropriately.

Bug: 147140513
Test: m nothing
Change-Id: Ib31103b6c4902a4d5df2565c0d7c981298d100a3
2021-01-08 08:53:46 -05:00
Justin Yun
0b1db6d5e9 Update comments for (vendor|product)_available
As we replaced '(vendor|product)_available: false' with
'vndk.private: true', update the soong comments with it.

Bug: 175768895
Test: na
Change-Id: Iaa08d0caf2995d2327443e156abe8448c4e500c5
2021-01-08 15:22:34 +09:00
Colin Cross
b5f6fa678d Create LLNDK vendor variants when DeviceVndkVersion is not set
The LLNDK vendor variants need to exist even when the VNDK is not
being used in order for the next patch to list them once the global
maps are removed.

Bug: 176904285
Test: m checkbuild
Change-Id: Ib29ede455d5b6a4b7d3f4685db8fba6d32025314
2021-01-07 17:19:27 -08:00
Treehugger Robot
86cc40a74c Merge "Do not read 'vendor_available: false'" 2021-01-08 00:57:35 +00:00
Treehugger Robot
56bfef1032 Merge "Implement fake vendor snapshot" 2021-01-08 00:24:51 +00:00
Treehugger Robot
42beaf6d93 Merge "Remove redundant snapshot functions" 2021-01-08 00:24:27 +00:00
Kris Alder
c81f59f03e add options for LibFuzzer, HWASan, and ASan to fuzz_config
Bug: 176998722
Test: built fuzz target with these options specified, checked resulting
config.json

Change-Id: Id38668dd11e76eead4ec87bd225ba67e3b30b80d
2021-01-07 23:43:10 +00:00
Justin Yun
c0d8c49224 Do not read 'vendor_available: false'
In case of VNDK, 'vendor_available: false' had a special meaning that
defines VNDK-private libraries. It is not trivial because not
defining a boolean property means 'false' normally. To avoid the
confusion replace it with the 'vndk.private: true' for VNDK-private
libraries and 'private: true' for LLNDK-private libraries.

All VNDK libraries must define 'vendor_available: true' and may have
'vndk.private: true' if they are VNDK-private.
With this change '(vendor|product)_available: false' is the same as
not defining the property.

LLNDK-private must define 'private: true' instead of
'vendor_available: false'.

Bug: 175768895
Test: build
Change-Id: I57fbca351be317257d95027f3cdcdbbe537eab23
2021-01-07 17:58:55 +09:00
Inseob Kim
0c1ca4c3e4 Remove redundant snapshot functions
Leaving only isSnapshotAware is sufficient and clearer than before.

Test: m nothing
Change-Id: I497ee72ca0cc2386b1b947732473ac63b722621c
2021-01-07 05:15:50 +00:00
Inseob Kim
e9aec6aaca Implement fake vendor snapshot
A fake vendor snapshot is a vendor snapshot whose prebuilt binaries and
captured headers are all empty. It's much faster to be built than the
real vendor snapshot, so users can exploit the fake vendor snapshot to
reduce the size of vendor snapshot they need, by installing the fake
snapshot and then inspecting the ninja dependencies.

Bug: 157967325
Test: m dist vendor-fake-snapshot
Change-Id: I5e16e8dbbf9dd5e753cdd471ca73d06984a6cb2c
2021-01-07 14:09:31 +09:00
Colin Cross
e4e44bc61b Split vndk_libraries_txt into multiple module types
Replace the vndk_libraries_txt module type with llndk_libraries_txt,
etc. in preparation for making it a new SingletonModule, which will
only work with a single instance of the module type.

Bug: 176904285
Test: m checkbuild
Change-Id: Ie010a9eeee8f5849201aa4ab4eb9b2e7a9cd7d5b
2021-01-06 17:54:30 -08:00
Colin Cross
4f4f8ebd3f Fix llndk_library init
llndk_library modules were not calling module.Init(), which caused them
not to register ModuleBase.VendorProperties.  Unregistered property
structs lose their values during cloning, which caused the shared
variants of llndk_library modules to not have IsLLNDK set.

Call module.Init(), which registers ModuleBase.VendorProperties.  Also
add a helper function to filter out llndk_library modules that now
show up in the list of modules with IsLLNDK set.

Bug: 170784825
Test: m checkbuild
Change-Id: Iafde85f6a95e85a618f6f7d7a210398febb6b158
2021-01-06 17:50:48 -08:00
Treehugger Robot
47d186cd4e Merge "Create vndkproduct.libraries.txt" 2021-01-07 01:43:15 +00:00
Jooyung Han
26ab0f1051 Merge "Add "aidl.flags:" property for cc_/java_ modules" 2021-01-07 01:28:47 +00:00
Yabin Cui
87b16fa3b4 Merge "Switch to clang-r407598 (12.0.1)." 2021-01-07 00:52:21 +00:00
Jose "Pepe" Galmes
7ba6f1cca7 Merge "Support for recovery snapshot." 2021-01-06 21:17:54 +00:00
Yabin Cui
db7dda89f3 Switch to clang-r407598 (12.0.1).
Also suppress a clang-tidy warning and a ubsan check to pass compilation.

Bug: 171348143
Test: build.
Change-Id: Ie5162c15df172cefd7cff9776e54531fd620bc23
2021-01-05 19:43:45 -08:00
Jiyong Park
12177fc962 Static variant deps are not considered as being in the same APEX
The shared variant of a cc_library module depends on the static variant
of the same module. The dependency is just to optimize the build time by
not compiling the same source files twice. It doesn't mean that the
"static:" dependencies of the static variant are used to build the
shared variant. Therefore, the inter-variant dependency is considered
as NOT being in the same APEX.

Bug: N/A
Test: m

Change-Id: I7b8ff8e5bd5c9eb31fc4d8d18bd93dd80296fb81
2021-01-06 11:40:37 +09:00
Justin Yun
8a2600cfc9 Create vndkproduct.libraries.txt
Some VNDKs will be available to product modules by adding
'product_available' property. These VNDK libs will be listed in
vndkproduct.libraries.txt and tracked by the build system for the
changes. The product available VNDK list will be frozen by the
release process.

Bug: 174323911
Test: build
Change-Id: Ie1b085851413a8f2273925fefdc14fec3bfc7892
2021-01-05 20:05:39 +09:00
Jooyung Han
e197d8b174 Add "aidl.flags:" property for cc_/java_ modules
The property can be used to pass additional flags to the AIDL compiler.
For example,

  cc_library {
    ..
    srcs: ["Foo.aidl"],
    aidl: {
      flags: [
        "-Werror",      // warnings as error
        "-Weverything", // turn on all warnings
      ],
    },
  }

Bug: 168028537
Test: soong test
Change-Id: I8120eeae7cd7b1acdd34c554af996a29e760a368
2021-01-05 10:40:22 +09:00
Cindy Zhou
18417cbd72 Skip apex dep check when sanitizer diag is enabled
To avoid adding ubsan to the apex allowed_dep list, this commit adds a
check on depedency tags to see if apex check should be skipped.
The check is only used on sharedLib dependencies when diag mode are enabled
for sanitizers.

Bug: 158010610

Test: make build for aosp-sargo and aosp_cf_x86_phone-userdebug

Change-Id: I3d7dbb70d8c80ffae1854819cf8cf9e6b0b15c00
2020-12-29 14:48:37 +00:00
Justin Yun
31094b10d2 Skip product variant for core-variant VNDK
VNDK "mustUseVendorVariant" option checks only for the vendor
variant. Since the product variant of the VNDK is skipped from
installing, we don't need check product variant for
"mustUseVendorVariant" check.

Bug: 176268903
Test: m libxml2.product
      m libxml2.vendor
Change-Id: I3b10f0579aceca1fb32fa4d6fb21dc020a35874d
2020-12-24 16:11:23 +09:00
Justin Yun
fd9e804470 Define vndk.private property for VNDK-private libraries
To define VNDK-private libraries, we used `vendor_available: false`.
Because of it, `vendor_available == nil` had different meaning from
`vendor_available: false` for the VNDK libraries.
To clarify this, we change the logic for defining VNDK-private
libraries which was:

cc_library {
    name: "vndk_private",
    vendor_available: false,
    product_available: false,
    vndk: {
        enabled: true,
    },
}

It must be replaced with

cc_library {
    name: "vndk_private",
    vendor_available: true,
    product_available: true,
    vndk: {
        enabled: true,
        private: true,
    },
}

Bug: 175768895
Test: m nothing
Change-Id: I81769f57c2231e54b682a28e4b82631ab9f3d390
2020-12-24 10:51:07 +09:00
Jose Galmes
6f843bc4ba Support for recovery snapshot.
Bug: 171231437

Test: source build/envsetup.sh
Test: ALLOW_MISSING_DEPENDENCIES=true m -j nothing

Change-Id: I74636cf7f97e027a229a5ef7c776f2b7a42ead95
2020-12-23 10:34:44 -08:00
Justin Yun
6977e8a80c 'vendor_available: *' will not create product variant
With this patch, `vendor_available: true` will no longer creates
product variant. Instead, modules need to set `product_available:
true` if they have to be available to product vanriant.
If both properties are defined for VNDKs, they must have the same
values.

Bug: 150902910
Test: m nothing
Change-Id: I28fb6886e6114583227a31151136627c8516ac9c
2020-12-23 18:14:30 +09:00
Jaewoong Jung
e794b1e302 Merge "Remove unnecessary snake case variables." 2020-12-23 01:21:28 +00:00
Kalesh Singh
98dea94982 Merge "Reland: Add android.hardware.memtrack-unstable-ndk_platform" 2020-12-23 01:20:51 +00:00
Kalesh Singh
7b63b2677d Reland: Add android.hardware.memtrack-unstable-ndk_platform
Bug: 175021432
Test: Fixes build failure on aosp/1518666
Change-Id: Id53bb93bfce35347637a271b7f6aa3c1c4d8c839
2020-12-22 20:49:54 +00:00
Jaewoong Jung
18aefc1977 Remove unnecessary snake case variables.
Test: m nothing + TreeHugger
Change-Id: I99f7162944daa6c57c6ae4763261e108bb5cb6b1
2020-12-22 12:38:35 -08:00
Colin Cross
127bb8b9f6 Don't rewrite LLNDK dependencies with .llndk suffix
Rewriting LLNDK dependencies with .llndk suffix requries referencing
a global data structure to determine if a given library is an LLNDK
library and therefore needs the .llndk suffix.  References to
global data structures from mutators must be removed to support
incremental Soong analysis.  Instead, move the LLNDK stubs rules
into the vendor variant of the implementing cc_library so that
the original name can be used.

As an incremental step, the llndk_library modules are left in
place, and the properties are copied into the cc_library via
the dependency specified by the llndk_stub property.  A followup
will move the LLNDK properties directly into the cc_library and
delete the llndk_library modules.

The global list of LLNDK libraries is kept for now as it is used
to generate the vndk.libraries.txt file.

Bug: 170784825
Test: m checkbuild
Test: compare Soong outputs
Test: all Soong tests
Change-Id: I2a942b21c162541a49e27b2e5833c9aebccff1d0
2020-12-21 17:53:30 -08:00
Colin Cross
adc81a0783 Don't strip stub libraries
LLNDK and NDK stubs are already not stripped, don't strip APEX stubs
either.

Test: m checkbuild
Change-Id: I9a50df4b8b73d764ca81634a8a3014726eceda99
2020-12-21 15:54:09 -08:00
Colin Cross
97a1be6e7b Merge changes from topic "sbox_tools"
* changes:
  Sandbox genrule tools
  Call ctx.InstallFile for uninstallable cc modules
  Don't copy uninstallable variants of NDK libraries to sysroot
2020-12-17 22:01:06 +00:00
Colin Cross
a9c8c9f145 Call ctx.InstallFile for uninstallable cc modules
SkipInstall is actually primarily used to prevent making a module
visible to Make, rename it and add new SkipInstall that actually
skips installation without affecting Make.

Call c.SkipInstall() for uninstallable cc modules to allow calling
c.installer.install, which will collect PackagingSpecs for
uninstallable cc modules, allowing them to be used by genrules.

Bug: 124313442
Test: m checkbuild
Change-Id: I8038ed5c6f05c989ac21ec06c4552fb3136b9a7a
2020-12-17 10:02:18 -08:00
Colin Cross
95b07f2b59 Don't copy uninstallable variants of NDK libraries to sysroot
After the next patch libraryDecorator.install will be called for
uninstallable variants of modules, manually filter them out when
copying to the NDK sysroot.

Bug: 124313442
Test: m checkbuild
Change-Id: I28b538d4ae271dc5e27c386d7cfa538ac0ed841b
2020-12-17 10:02:18 -08:00
Treehugger Robot
1a74be780b Merge "Assert android.ApexModule interface for types having ApexModuleBase" 2020-12-17 04:14:35 +00:00
Treehugger Robot
6a8c18a89b Merge "versioning macro is exported from prebuilt stubs as well" 2020-12-16 01:31:10 +00:00
Kalesh Singh
fc0cba0b77 Merge "Revert "Add android.hardware.memtrack-unstable-ndk_platform"" 2020-12-16 00:48:06 +00:00
Kalesh Singh
67d69f0d1c Revert "Add android.hardware.memtrack-unstable-ndk_platform"
Revert submission 1518702-memtrack-aidl

Reason for revert: Broken tests and boot time regressions
Reverted Changes:
Ic4dd70e2c:Add android.hardware.memtrack-unstable-ndk_platfor...
Iaf99d0ca4:Add stable aidl memtrack HAL to product packages
Iac54ae2ba:Add stable aidl memtrack hal to vndk list
If310210a3:libmemtrack: Add support for AIDL memtrack HAL
Ib6c634def:Memtrack HAL: Add stable AIDL implementation
I5e1d0e006:Memtrack HAL stable aidl sepolicy

Change-Id: I4fc71dc5813d10600727a2630c10f5d113f61936
2020-12-16 00:19:38 +00:00