Commit Graph

6123 Commits

Author SHA1 Message Date
Evgenii Stepanov
70b23f8fd4 Merge "Include/exclude lists for memtag_heap sanitizer." am: e7c39a5da4 am: 40ab27f081 am: e03a8aefb8
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1540685

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I5629e73f4fed9db72fb08026dbd4efcedb51336e
2021-01-12 22:23:57 +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
ChengYou Ho
8e5839c075 Create authsecret aidl interface am: 50ab3ff048 am: 9739215454 am: 355ab7a280
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1541204

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I2967ea71cbcdd168f07cd985556c7be739949996
2021-01-12 09:37:13 +00: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
7e1167549f Support "memtag_heap" sanitizer. am: 193ac2eb96 am: c93afaf7ee am: 580eb59fb1
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1538502

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I952769cd9b4c1f4348db18fbc6b1194c2e6e86fe
2021-01-12 03:43:44 +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
Cindy Zhou
16d02e9e7f Merge "Build against cfi supported coverage lib" 2021-01-11 19:33:16 +00:00
ChengYou Ho
35556e51b6 Create OemLock aidl interface am: 142b28a095 am: 33274bb3ec am: de21b6de15
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1542685

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I9807537e7eda2efca383f8babd6b14bd51611f4c
2021-01-11 07:43:35 +00:00
ChengYou Ho
142b28a095 Create OemLock aidl interface
Bug: 176107318
Change-Id: I31da15e7aedfaafb1841de0fc8e81aed73405ae0
2021-01-11 05:57:07 +00:00
Cindy Zhou
7e82baa8fe 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
2021-01-10 06:35:48 -08:00
Treehugger Robot
74f08f9b44 Merge "Update comments for (vendor|product)_available" am: 4ba271573d am: 428410f284 am: c08535a83b
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1542686

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: If0e5dc0279f54de3b5fda1e5eee588240f0862b1
2021-01-08 21:38:07 +00:00
Treehugger Robot
4ba271573d Merge "Update comments for (vendor|product)_available" 2021-01-08 20:48:15 +00:00
Kris Alder
7a4f30005a Merge "add options for LibFuzzer, HWASan, and ASan to fuzz_config" am: 4803765257 am: 73fb162a6e am: 28fd479588
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1542043

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ic97e9d59e340fe19c274c93c800ef616aac1f274
2021-01-08 17:55:17 +00:00
Ivan Lozano
0000a41830 Merge "Refactor CC to prep for Rust sanitizable modules." am: 65f7312db0 am: 09e17772e3 am: f5fd6bd02e
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1527233

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I3af612b60d961dee88accfbb726fcdda29d45cdf
2021-01-08 17:54:56 +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
Treehugger Robot
b0c3fd7a0e Merge "Do not read 'vendor_available: false'" am: 86cc40a74c am: d2279b4421 am: 49f37c378d
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1541272

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I5cec2463cb34c06838e191f2a721978154c6b460
2021-01-08 01:27:50 +00:00
Treehugger Robot
2d349e4514 Merge "Implement fake vendor snapshot" am: 56bfef1032 am: a64ac34c21 am: 087944d6e4
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1538640

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I08fc4e8479f49f595467890407f3d2e057294202
2021-01-08 01:27:08 +00:00
Treehugger Robot
4a4432ed0e Merge "Remove redundant snapshot functions" am: 42beaf6d93 am: a2461dae24 am: 03dca72f33
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1541207

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I6c24183bb6fdafc0736377b2062aa5a2cd4da129
2021-01-08 01:26:55 +00: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
Colin Cross
912f1700a8 Merge "Split vndk_libraries_txt into multiple module types" am: ee7d0fd0f6 am: 15e8f2b6ca am: 8e37c43f3d
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1541063

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I445abaa15513343916904d063ca106b30d5cd0b1
2021-01-07 19:20:21 +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
21d6f869c6 Fix llndk_library init am: 4f4f8ebd3f am: dcc5fc1550 am: 9f84abfe40
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1541062

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I3d6a83a820d6f01d96e52dce0b037ee3c5b8076e
2021-01-07 03:59:02 +00:00
Treehugger Robot
c6b6483362 Merge "Create vndkproduct.libraries.txt" am: 47d186cd4e am: 184f4f0668 am: f2fc837d01
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1519461

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I927426ae76b9755bb5ec9a48c42bdc53ee0b5051
2021-01-07 03:16:26 +00:00
Jooyung Han
a2861d19f5 Merge "Add "aidl.flags:" property for cc_/java_ modules" am: 26ab0f1051 am: 076ed3bca3 am: fccf62ed45
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1538625

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I7842f59026d63a2aab8efe354cc37f20ee9e39ab
2021-01-07 03:16:17 +00:00
Yabin Cui
e769dbb352 Merge "Switch to clang-r407598 (12.0.1)." am: 87b16fa3b4 am: 5327ff1d57 am: 27451f6122
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1541244

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ia255b87e3f72b5757193ad3d4edbede713fbf127
2021-01-07 03:15:20 +00: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
005f4685ac Merge "Support for recovery snapshot." am: 7ba6f1cca7 am: 11d4dee3f1 am: 1b15ce5d98
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1526263

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I2e59f440026537b88681972e2ba00d9bda4afded
2021-01-06 22:44:08 +00:00
Jose "Pepe" Galmes
7ba6f1cca7 Merge "Support for recovery snapshot." 2021-01-06 21:17:54 +00:00
Treehugger Robot
7746f3a695 Merge "Static variant deps are not considered as being in the same APEX" am: 4c89f3e11f am: 1735a305c7 am: 5a28af22c2
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1538627

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ie70efa1d2c7770165017b00c1d48738222bd6f87
2021-01-06 07:23:44 +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