Commit Graph

6123 Commits

Author SHA1 Message Date
Pirama Arumuga Nainar
0b88bf33fc Merge "Update to use clang-r399163b." 2020-10-02 16:37:52 +00:00
Colin Cross
af4afb7917 Merge changes from topic "sanitizer-runtime-stubs" am: 973f46703b am: 0730dce1c0 am: 0efc79cdd4 am: f7d81e216a am: 40776c7e17
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1437232

Change-Id: I28c538d3650f35158bd8edaed8d5807cec4954d9
2020-10-02 02:58:46 +00:00
Kris Alder
d5a4a952de Merge "add acknowledgements field to fuzz_config" am: 0f1a0f7a81 am: 394e9930b9 am: a55a4eab8d am: 695c0eb7e6 am: 2d3599203f
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1442242

Change-Id: I2c5c4f0479bda67b1e4a8607dec49f47541a87c4
2020-10-02 02:26:59 +00:00
Colin Cross
973f46703b Merge changes from topic "sanitizer-runtime-stubs"
* changes:
  Add version dependencies to sanitizer runtime dependencies
  Fix prebuilt library stubs
  Track allowed transitive deps in any updatable module.
2020-10-02 01:06:10 +00:00
Kris Alder
0f1a0f7a81 Merge "add acknowledgements field to fuzz_config" 2020-10-01 23:58:01 +00:00
Stephen Hines
5060c9e558 Update to use clang-r399163b.
Bug: http://b/155835175
Test: aosp_blueline
Change-Id: I34d26da72a36b16491cf328075d817b073acfc0d
2020-09-30 19:07:42 -07:00
Colin Cross
e7257d2019 Add version dependencies to sanitizer runtime dependencies
The hwasan runtime has stubs, make the function to add all version
variants of a shared library available to the sanitizer mutator.

Test: m checkbuild
Change-Id: Ie4124022140f8520834d7bf7b59f0499cd381083
2020-09-30 21:17:59 +00:00
Colin Cross
d48fe734cd Fix prebuilt library stubs
There were multiple stacked issues with prebuilt library stubs that
cancelled eachother out.  Prebuilts were never considered to be
DirectlyInAnyApex by the AndroidMk logic to handle stubs libraries
because it looked it up in the global list of modules in apexes
using the name with the "prebuilt_" prefix.  Fixing that to use
ctx.BaseModuleName() exposed a second issue, that stubs variants
for prebuilt libraries were never created, so there was no latest
version to expose to Make.

Making the *prebuiltLibraryLinker type work with all of the
methods that handle stubs should really be done with an interface
and methods implemented on *libraryDecorator, but that would
also cause other types like that embed libraryDecorator to
participate in stubs that may trigger more issues.  I'd like
to replace those methods anyways, so just manually handle
*prebuiltLibraryLinker for now.

Test: m checkbuild
Change-Id: I1267ee01659ad9ab11d75318c6c6bdbf8f72a061
2020-09-30 21:17:51 +00:00
Yi Kong
78387f9b14 Merge "Do not implicitly turn on lto for static libraries" am: 21de510915 am: a5e515b85a am: 9903727782 am: 355e0e1512 am: 7a856f9d08
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1440495

Change-Id: I1937b487d3a5e462797e5d2c030964390efd3c73
2020-09-30 04:00:39 +00:00
Yi Kong
21de510915 Merge "Do not implicitly turn on lto for static libraries" 2020-09-30 01:42:10 +00:00
Treehugger Robot
198ee1d790 Merge "Add support of test data to python_host_test" am: 025ae97b0e am: 7cfb58c3f4 am: 88f0a9458b am: 48471f78a6 am: 7a663a68ec
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1433195

Change-Id: Ia17b9d4a0667a3271d27f07ad0104a65553bb938
2020-09-30 00:37:16 +00:00
Kris Alder
2598c9b350 add acknowledgements field to fuzz_config
This will be used to track who should be recognized for any CVEs
resulting from bugs found by a fuzz target.

Bug: 145745999
Test: n/a
Change-Id: I21e065ab8013d013b1d9f42981c729b996163387
2020-09-29 22:28:18 +00:00
Treehugger Robot
025ae97b0e Merge "Add support of test data to python_host_test" 2020-09-29 21:56:19 +00:00
Yi Kong
e2577141ba Do not implicitly turn on lto for static libraries
For global ThinLTO, don't implicitly turn on LTO for static libraries,
but instead rely on mutator to generate correct variants.

Bug: 169004486
Test: GLBOAL_THINLTO=true m
Change-Id: I9cdeea706ec6dd4ad31f55b9e12a96b42176aa89
2020-09-30 01:13:57 +08:00
Martin Stjernholm
00855813c7 Merge "Retain all stubs versions in the snapshot." am: b7c77bd889 am: 4883f2e60c am: 93c4cb8430 am: 451b2d3c80 am: c05238ce45
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1441333

Change-Id: Ib6241371d2bf1ed657812017fe374da6f81b4c4f
2020-09-29 15:51:12 +00:00
Martin Stjernholm
b7c77bd889 Merge "Retain all stubs versions in the snapshot." 2020-09-29 13:59:05 +00:00
Martin Stjernholm
dddb0dacc3 Merge "Propagate all sanitizer flags in SDK snapshots." am: dc6f2b06be am: ed53b5b4f6 am: ed13b58341 am: 13f7ea7ed3 am: 914d2f277d
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1427729

Change-Id: I5247de71fc51ba7bd2928a0447d67216a83eff5c
2020-09-29 12:54:44 +00:00
Martin Stjernholm
dc6f2b06be Merge "Propagate all sanitizer flags in SDK snapshots." 2020-09-29 10:43:08 +00:00
Yi Kong
d88f1fa80b Merge "Forbid -fwhole_program_vtables" am: 15bad7a9cf am: 7cbfba1f32 am: b7b3eb6a74 am: b0b3793396 am: f408894985
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1433955

Change-Id: Ie7a47eaeb3d91944f866c3e1049720de839a7c7c
2020-09-29 01:54:26 +00:00
Yi Kong
15bad7a9cf Merge "Forbid -fwhole_program_vtables" 2020-09-28 23:56:02 +00:00
Treehugger Robot
486aa3a4df Merge "lto: Rename Disabled to Never to reduce confusion" am: f1a406cdd6 am: 57d0d3916a am: c98e32702a am: 459599a303 am: 7a684f23d3
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1440494

Change-Id: Ieec8ffa1ab773e5f78f429d07ed9280eda0a682c
2020-09-28 22:55:27 +00:00
Treehugger Robot
a312770456 Merge changes Id412359e,I9c4d3a33,Ic3216235 am: ca17414206 am: 70cea45d8e am: ef5534114c am: 192d515e63 am: 24fadfd1cb
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1439754

Change-Id: I407daeb9d8cd4237b848e7ef3dba8d60d3e2c612
2020-09-28 22:54:00 +00:00
Treehugger Robot
f1a406cdd6 Merge "lto: Rename Disabled to Never to reduce confusion" 2020-09-28 21:47:16 +00:00
Martin Stjernholm
618b671bf4 Retain all stubs versions in the snapshot.
This is a quick fix to avoid build failures due to prebuilts lacking
stubs versions that the sources have, which causes dependencies on
older version stubs fail on master-art-host where the sources of e.g.
Bionic are no longer available.

More work is required to make the version handling of stubs DTRT - a
TODO comment outlines it.

Test: m nothing
Test: `m runtime-module-sdk`, check that the generated Android.bp
  has the full stubs.versions list like the sources.
Bug: 169373910
Change-Id: I0ebfaf94f9d45a0e58d9785c40e7cea626f0ab83
2020-09-28 22:32:02 +01:00
Treehugger Robot
ca17414206 Merge changes Id412359e,I9c4d3a33,Ic3216235
* changes:
  Fix ChooseSdkVersion after api levels
  Don't export flags from SourceProvider variants
  Simplify missing whole_static_libs checking
2020-09-28 20:27:10 +00:00
Treehugger Robot
6ddb6097aa Merge "Remove InputRootAbsolutePath spec to header-abi-dumper" am: a6b38f2d3e am: 446ec378fc am: 7e24b199b5 am: 52fe5a97c9 am: c0c8932759
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1407532

Change-Id: I2abf14d038ba1a1bec6a38a59d2b009cf55b854b
2020-09-28 19:55:20 +00:00
Treehugger Robot
a6b38f2d3e Merge "Remove InputRootAbsolutePath spec to header-abi-dumper" 2020-09-28 17:45:41 +00:00
Yi Kong
f43ff059ff lto: Rename Disabled to Never to reduce confusion
Having different name from the underlying property is confusing...

Test: build
Change-Id: Ia24b664d6cded68abed2966455193f0e20757e06
2020-09-28 17:18:36 +00:00
Yo Chiang
03657c4a9f Merge "soong: Exclude system shared libs from fix suggestions" am: 19dfeee7d5 am: 22fa34d496 am: 608f5d70a1 am: 1c8e5b008a am: b968547539
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1433952

Change-Id: I27f03660107924612004f8110b25042a4d740b7e
2020-09-28 05:49:08 +00:00
Yo Chiang
19dfeee7d5 Merge "soong: Exclude system shared libs from fix suggestions" 2020-09-28 03:54:27 +00:00
Yu-Han Yang
6229f2123c Merge "Add GNSS AIDL interfaces (build/soong)" 2020-09-26 02:34:36 +00:00
Treehugger Robot
e3cd9f7433 Merge "Add type information to symbolfile and ndkstubgen." am: 9dd2c4d543 am: 4aced67bf0 am: a3447367c9 am: ac1ec64369 am: f366b3fcea
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1347983

Change-Id: Ie27b64d7b8f26386270fb1896a8387d8cdc4c621
2020-09-26 02:04:26 +00:00
Colin Cross
7812fd3814 Fix ChooseSdkVersion after api levels
I2954bb21c1cfdeb305f25cfb6c8711c930f6ed50 switched normalizeVersions
to work on ApiLevels, which inadvertantly caused it to return "current"
instead of "10000" for libraries that specify "current" in their stubs
property.  ChooseSdkVersion couldn't handle "current" because it was
manually converting the version to an int.  Switch ChooseSdkVersion
to use ApiLevels instead so that it can handle "current".

Test: m checkbuild
Change-Id: Id412359e092483ba419118dd03bc206fae702a96
2020-09-26 00:53:03 +00:00
Colin Cross
e4f6ebaf6c Simplify missing whole_static_libs checking
Whole_static_libs required custom error checking when
AllowMissingDependencies was set because it could end up depending
on an empty list of objects, which would leave nothing in the
dependency tree that had been replaced with an ErrorRule.
Reuse the prebuilts case to depend on the .a file when there
are no objects and remove the custom error handling.

Test: TestEmptyWholeStaticLibsAllowMissingDependencies
Change-Id: Ic3216235f7e5ae8b5b6ab31ef2ca35c3994d82aa
2020-09-26 00:52:44 +00:00
Treehugger Robot
9dd2c4d543 Merge "Add type information to symbolfile and ndkstubgen." 2020-09-25 23:59:07 +00:00
Ivan Lozano
bc9e421215 rust: Allow rust_bindgen to use cc_defaults.
rust_bindgen modules can't inherit properties in cc_defaults that would
be useful for generating bindings (such as cflags). This CL moves these
common properties out into a new struct in cc and adds that struct to
cc_default.

Additionally, Cppflags is added to rust_bindgen to make sure that these
get picked up as well from cc_defaults.

Bug: 163598610
Test: rust_bindgen module uses cflags in cc_defaults.
Test: New Soong test passes
Change-Id: I702442a355244dc01954083f98a2eebbcea12e47
2020-09-25 16:15:26 -04:00
Yi Kong
aaac6f5c7d Merge "Global ThinLTO mode" am: 6a94390d2e am: 26fb8c32be am: 7fa23be7cc am: b3a004e12c am: 01fe41a3ea
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1432912

Change-Id: I6f63a7c9b62ae1ed6f401a5ee6ad001f854b6010
2020-09-25 16:24:51 +00:00
Yi Kong
6a94390d2e Merge "Global ThinLTO mode" 2020-09-25 08:36:17 +00:00
Treehugger Robot
e798cae7e5 Merge changes I0885e493,Ic37c8db9 am: 4f6eebff0c am: bbfd7e016a am: e67f4200fd am: 2b04afb880 am: 2c81bf414e
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1429848

Change-Id: Id5cd03ac91d2ea43a7d3b42d4c682b2cb5621a39
2020-09-25 07:01:03 +00:00
Dan Albert
063452b1c1 Replace FutureApiLevel with an ApiLevel. am: 0b176c8038 am: d5e15a13df am: 818d1b4e6e am: d997f3cd33 am: 07f0cae3c7
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1388351

Change-Id: Ife2f7c6a1d6dc9828c07ef6341b774e23d40fe3e
2020-09-25 06:00:59 +00:00
Dan Albert
d2a7987456 Replace ApiStrToNum uses with ApiLevel. am: c8060536e8 am: 6e3d089818 am: c81c409966 am: 97825a1e23 am: 049b18bb14
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1371896

Change-Id: Id26f8d0f0323da9fbf924fcb42dda23d326e2909
2020-09-25 06:00:55 +00:00
Martin Stjernholm
b024957791 Propagate all sanitizer flags in SDK snapshots.
liblog snapshot needs to sanitizer.address=false to avoid cycle in asan
builds. Adding that separately in library_sdk_member.go would start to
feel like whack-a-mole, so the snapshot generation is instead extended
to handle nested property structs.

This uses the BpPropertySet.AddProperty extension in
https://r.android.com/1423510, and common value optimisation now
recurses into non-anonymous structs, instead of comparing them as a
whole.

Test: m nothing
Test: `m SANITIZE_TARGET=address nothing` with prebuilts/runtime
  present in the manifest and a fresh snapshot made with this
Bug: 151303681
Change-Id: I472554117a488e6c800045cb2ed59377778571a4
2020-09-25 00:33:04 +01:00
Treehugger Robot
4f6eebff0c Merge changes I0885e493,Ic37c8db9
* changes:
  linux_bionic_arm64 is added when Host_bionic_arm64 is true
  HostCross is an attribute of a Target, not OsType
2020-09-24 22:56:43 +00:00
Dan Albert
d5e15a13df Replace FutureApiLevel with an ApiLevel. am: 0b176c8038
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1388351

Change-Id: I2f73307959278d9bc79301ff1ad7776e55a7d8de
2020-09-24 21:26:30 +00:00
Dan Albert
6e3d089818 Replace ApiStrToNum uses with ApiLevel. am: c8060536e8
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1371896

Change-Id: I2fc7571ca37d31f6f9e1a3d5abe8268d13c030d0
2020-09-24 21:25:54 +00:00
Dan Albert
af7b36dea5 Add type information to symbolfile and ndkstubgen.
Test: mypy symbolfile
Test: pytest
Bug: None
Change-Id: I6b1045d315e5a10e699d31de9fafc084d82768b2
2020-09-24 14:03:31 -07:00
Dan Albert
8bd5095362 Merge changes from topics "soong-apilevel", "soong-config-apilevel"
* changes:
  Convert more versions in config to ApiLevel.
  Replace FutureApiLevel with an ApiLevel.
  Replace ApiStrToNum uses with ApiLevel.
2020-09-24 21:02:07 +00:00
Yi Kong
93718e0d41 Global ThinLTO mode
Experimental global ThinLTO mode for compilation time evaluation.

Bug: 169004486
Test: GLBOAL_THINLTO=true m
Change-Id: I2ff06397be8b65c7972f1e5f09ab1496949567ee
2020-09-25 02:43:14 +08:00
Orion Hodson
230090ccc1 Remove remaining libnativehelper implicit includes
Bug: 152482542
Test: m checkbuild
Change-Id: Ieded4b0e3906ef625b3bb6cf0dd1a3e178dd320c
2020-09-24 14:42:11 +01:00
Yo Chiang
219968c9b3 soong: Exclude system shared libs from fix suggestions
Pass the value of system_shared_libs to the Android.mk world, so that
prebuilt ELF check can exclude them from fix suggestions.

Bug: 141925662
Test: Write a bad cc_prebuilt_library module and check fix suggestions
Change-Id: I0cc61821765507180ce6a582bf8125a192f83a57
2020-09-24 13:18:08 +08:00