Commit graph

24969 commits

Author SHA1 Message Date
Treehugger Robot
025ae97b0e Merge "Add support of test data to python_host_test" 2020-09-29 21:56:19 +00:00
Treehugger Robot
6c76f18aae Merge "Don't include artifacts for host-cross targets" 2020-09-29 14:03:05 +00:00
Martin Stjernholm
b7c77bd889 Merge "Retain all stubs versions in the snapshot." 2020-09-29 13:59:05 +00:00
Paul Duffin
41b0876c10 Merge "Allow java_sdk_library to specify doctags_files" 2020-09-29 13:55:53 +00:00
Martin Stjernholm
dc6f2b06be Merge "Propagate all sanitizer flags in SDK snapshots." 2020-09-29 10:43:08 +00:00
Jiyong Park
ccb406fc9c Don't include artifacts for host-cross targets
When building an APEX, the build system included artifacts from all
targets that are returned from ctx.MultiTargets(). This however has
became a problem as we add new host targets like linux_bionic_arm64.
When there are multiple host targets having different OSes,
ctx.MultiTargets() returns one target per a host OS. For example, when
linux_bionic_arm64 is enabled, ctx.MultiTargets() returns the following
two targets because linux_bionic != linux_glibc.

* linux_glibc_86_64
* linux_bionic_arm64

Some dependencies (like soong_zip, etc.) are not enabled for the new
host target (because they don't have to) and therefore the build fails.
Since the purpose of host APEX is to package some host tools for
testing, etc., we actually don't need the second target for APEX.

Fixing the problem by not skipping "cross host" targets which can't be
natively executed on the host machine.

Bug: 169454252
Test: HOST_CROSS_OS=linux_bionic HOST_CROSS_ARCH=arm64 m
Test: DIST_DIR=$(pwd)/out/dist \
        ./art/tools/dist_linux_bionic.sh com.android.support.apexer
Change-Id: Idaded56e4b4fc0195c8bbc760e4b4728016bd5b4
2020-09-29 11:22:23 +09:00
Treehugger Robot
5cc622ad78 Merge "Update the default platform version to S" 2020-09-29 00:09:50 +00:00
Yi Kong
15bad7a9cf Merge "Forbid -fwhole_program_vtables" 2020-09-28 23:56:02 +00:00
Frank Feng
d5bff956f9 Merge "Support auto-push of data_device_bins to device in test config auto-gen for sh-test" 2020-09-28 23:29:04 +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
695755ae8c Merge "Collect FORCE_USE_GOMA environment variable as a metric." 2020-09-28 20:57:22 +00: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
frankfeng
be6ae776e5 Support auto-push of data_device_bins to device in test config auto-gen for sh-test
Bug: 148805488
Test: m
Test: ziptool-tests:
Change-Id: Iee4e8550dc77220ea576c5c33ade5d3b770573f0
2020-09-28 13:22:57 -07:00
Ivan Lozano
a711074817 Merge "rust: Add prefer_rlib property for static libstd." 2020-09-28 19:23:23 +00:00
Patrice Arruda
c97d6dcbb3 Collect FORCE_USE_GOMA environment variable as a metric.
FORCE_USE_GOMA is needed to be collected as a metric for the
deprecation of GOMA on Android builds.

Bug: b/169423400
Test: m nothing, ran printproto command
Change-Id: I12300389f1f27239d8f21875d1b6e4ad069d95d7
2020-09-28 18:25:42 +00:00
Treehugger Robot
a6b38f2d3e Merge "Remove InputRootAbsolutePath spec to header-abi-dumper" 2020-09-28 17:45:41 +00:00
Paul Duffin
a2ae7e0358 Allow java_sdk_library to specify doctags_files
When generating Javadoc the processor needs to be given information
about the doctags that are present in the source. This change allows
that information to be managed with the java_sdk_library that generates
the stubs source from which the Javadoc is generated.

Bug: 168301990
Test: Built offline-sdk-docs with and without the change and
      diffed them. The only difference was the timestamp.js
      file.
Change-Id: I4adbeb0781bc2191461fec856ffa90ea185e7434
2020-09-28 18:35:57 +01: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
Ivan Lozano
11200870b0 rust: Add prefer_rlib property for static libstd.
Adds the prefer_rlib property to allow linking libstd statically for
device rust binaries. This also changes the default behavior of rustlibs
to also prefer rlib linkage. This is because dylibs do not provide
rlib-libstd variants and always link in libstd dynamically. Thus a
binary requesting libstd rlib linkage should not attempt to link against
dylibs that link libstd dynamically.

Bug: 168729404
Test: New Soong test passes.
Change-Id: Idf8dfbbce8fd936f55a3fb323b17a1a7f0ee954e
2020-09-28 12:01:47 -04:00
Paul Duffin
d124b6b4e8 Merge "Output Javadoc comments for public API" 2020-09-28 14:25:48 +00:00
Martin Stjernholm
79bee057a3 Merge "Handle property structs and BpPropertySets as values to AddProperty." 2020-09-28 10:06:04 +00:00
Yo Chiang
19dfeee7d5 Merge "soong: Exclude system shared libs from fix suggestions" 2020-09-28 03:54:27 +00:00
Treehugger Robot
85aaf56dd6 Merge "Support arch-specific init_rc property" 2020-09-26 02:07:40 +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
d3e05caa47 Don't export flags from SourceProvider variants
There is no need to export the linkdirs from the SourceProvider
variant.  Remove them to reduce differences in build.ninja from
a later patch that moves the flag exporting into compile(), which
isn't called by the SourceProvider variant.

Test: m checkbuild
Change-Id: I9c4d3a336a07cb9074376303bfa277c05d893b98
2020-09-26 00:52:55 +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
Colin Cross
0bab8773cb Support arch-specific init_rc property
Mulitple init_rc files may be necessary to support multilib binaries
with different installed names.

Test: m checkbuild
Change-Id: I17d3a3b2346a25b230e5a325deb0d78f0ee045f0
2020-09-25 14:01:21 -07:00
Paul Duffin
6877e6d951 Output Javadoc comments for public API
When generating stubs source for contributions to the public API keep
the Javadoc comments from the input source so that the stubs source can
be used as input to the metalava invocation that creates the stubs from
which the public Javadoc is generated.

This is needed to fix an issue with conscrypt's contributions to the
public API, i.e. SSLEngines and SSLSockets where the Javadoc comments
were not present in the generated Javadoc.

Test: Built offline-sdk-docs with and without the change and
      diffed them. The only difference was the timestamp.js
      file and they now included proper documentation for the
      SSLEngines/SSLSockets classes.
Bug: 169162018
Change-Id: I1b50cff3b91766ce261b2f8e798b77ebc6faac70
2020-09-25 20:23:37 +01:00
Thiébaud Weksteen
e0510d7a69 rust: Fix module name in bindgen_test
Test: m nothing
Change-Id: Ifc1dda4433906f3496e86f5b29b7d9ec694d735c
2020-09-25 15:50:09 +02:00
Thiébaud Weksteen
4820c2c8d2 Merge "Avoid Rust source provider rule duplication" 2020-09-25 13:14:01 +00:00
Ivan Lozano
ce2cffd583 Merge "rust: Add rust_bindgen std version w/ cc defaults." 2020-09-25 13:11:34 +00:00
Thiébaud Weksteen
295c72bebc Avoid Rust source provider rule duplication
Until now, source provider modules duplicated the rule to generate the
source for each variant. Add a inter-variant dependency between the
source and the other variants (e.g. rlib, dylib) to avoid this
duplication. Add documentation on this behaviour.

Bug: 162588681
Test: m
Change-Id: I41c9e2220f8875245415e17374852e540dfd47ec
2020-09-25 11:36:13 +02:00
Yi Kong
6a94390d2e Merge "Global ThinLTO mode" 2020-09-25 08:36:17 +00:00
Anton Hansson
a6906e2329 Merge "Make API lint warnings errors for system & testapi" 2020-09-25 06:52:57 +00:00
Kousik Kumar
bf30e4d576 Merge "Allow overrides for RBE_log_dir" 2020-09-25 05:40:24 +00:00
Jiyong Park
84d8a7e111 Update the default platform version to S
R is out. The platform codename on the main branch is now S and the API
level of the platform is 30, which is R because S hasn't been finalized.

Bug: N/A
Test: rm -rf out; ./build/soong/soong_ui.bash --make-mode --skip-make
Change-Id: I486b9639bccfe17a42681e1f84097373f8f401e7
2020-09-25 13:47:41 +09:00
Treehugger Robot
985f6295c2 Merge "Switch to armv7 for Rust ARM" 2020-09-25 03:50:41 +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
Martin Stjernholm
191c25f589 Handle property structs and BpPropertySets as values to AddProperty.
Both will create a nested property set, that may be merged with an
existing one.

Test: m nothing
Bug: 151303681
Change-Id: I30696ba3eb8960ca6fa54c9ee2cf6229ab9f5da9
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
Matthew Maurer
ad64c39442 Switch to armv7 for Rust ARM
In the previous mode, building Rust code using certain intrinsics would
fail on arm32 since our runtime is armv7, but our codegen was arm.

Test: cd external/rust; mma
Bug: 169245712
Change-Id: Ie800486b39325486f5ff319e46632df2a6987391
2020-09-24 14:28:47 -07: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
Treehugger Robot
2c7ca784f7 Merge "Extend target docs to cover (almost) all variants." 2020-09-24 18:05:39 +00:00
Ivan Lozano
3d94752b34 rust: Add rust_bindgen std version w/ cc defaults.
Adds the c_std and cpp_std properties to rust_bindgen, and use the
default values from cc if these are undefined.

This assumes by default that the header extension indicates whether
the header is a C or C++ header file. This default can be overridden
by setting either c_std or cpp_std.

Test: Soong tests pass, "-std=" arg included in bindgen calls
Bug: 163580541
Change-Id: I5b0d3b8eae9a54dd91d8a0aca583d7803a344f27
2020-09-24 13:45:09 -04:00
Anton Hansson
b30f593da4 Make API lint warnings errors for system & testapi
They used to be listed to not have this treatment, but we are
baselining the existing warnings and making them errors instead.

Bug: 154317059
Test: m
Change-Id: I306b5a07d1b771cc0061aaac44f881f40fbe85ed
Merged-In: I306b5a07d1b771cc0061aaac44f881f40fbe85ed
2020-09-24 13:51:29 +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