Commit graph

27459 commits

Author SHA1 Message Date
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
Thiébaud Weksteen
3805f5cd2e rust: refactor projectGeneratorSingleton
Move the project and knownCrates arguments to attributes of
projectGeneratorSingleton.

Test: SOONG_GEN_RUST_PROJECT=1 m nothing
Change-Id: I52beadc8b3ba68c275ec940a6be51c2645983a6c
2020-09-29 19:08:02 +02:00
Treehugger Robot
ec2752052e Merge "Don't include artifacts for host-cross targets" am: 6c76f18aae
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1440496

Change-Id: I028eddd6d15397d5fb69abd1b38d03db6910b2b5
2020-09-29 14:29:13 +00:00
Martin Stjernholm
4883f2e60c Merge "Retain all stubs versions in the snapshot." am: b7c77bd889
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1441333

Change-Id: Ifc9c67ff2d79f0680a1d2283b46b395b02bbb64c
2020-09-29 14:28:29 +00:00
Paul Duffin
5420a8744b Merge "Allow java_sdk_library to specify doctags_files" am: 41b0876c10
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1432649

Change-Id: Icd447f255f276a2510cf9bc0c491cfb062f55784
2020-09-29 14:22:32 +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
Jiyong Park
4dc2a1aaa7 Expose android.filesToInstall
It will be used by the cvd_host_package module type to gather installed
files and package them in a distributable format.

Bug: 168086242
Test: m

Change-Id: I3af6dcda0bce1f298b1500fbac311c9593ddf375
2020-09-29 20:17:22 +09:00
Martin Stjernholm
ed53b5b4f6 Merge "Propagate all sanitizer flags in SDK snapshots." am: dc6f2b06be
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1427729

Change-Id: Ic363fca3f191ea8bcb7f3dc094d5cc7efc757df0
2020-09-29 10:57:57 +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
1896ffd3ff Merge "Update the default platform version to S" am: 5cc622ad78
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1438373

Change-Id: Iadbef04457a15610a5e56604356257c475d16e29
2020-09-29 00:14:27 +00:00
Yi Kong
7cbfba1f32 Merge "Forbid -fwhole_program_vtables" am: 15bad7a9cf
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1433955

Change-Id: I1a18d7c4689831f130f8767add7b7493b6aadad5
2020-09-29 00:13:54 +00: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
c2161b9756 Merge "Support auto-push of data_device_bins to device in test config auto-gen for sh-test" am: d5bff956f9
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1441257

Change-Id: I138186e341e077e137723c1110cf912ecbbe4b0d
2020-09-28 23:41:29 +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
57d0d3916a Merge "lto: Rename Disabled to Never to reduce confusion" am: f1a406cdd6
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1440494

Change-Id: Id1d281b73f283781b68a955d94263d5145b2054f
2020-09-28 22:02:35 +00:00
Treehugger Robot
f1a406cdd6 Merge "lto: Rename Disabled to Never to reduce confusion" 2020-09-28 21:47:16 +00:00
Treehugger Robot
619e6b60b7 Merge "Collect FORCE_USE_GOMA environment variable as a metric." am: 695755ae8c
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1441254

Change-Id: I14f8a85ecbd069fe619f435d6423f44686324b58
2020-09-28 21:42:48 +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
70cea45d8e Merge changes Id412359e,I9c4d3a33,Ic3216235 am: ca17414206
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1439754

Change-Id: Ib1e28466c83e3fecf429446c0fb1ca02014ffa2d
2020-09-28 20:40:48 +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
22a25d17cb Merge "rust: Add prefer_rlib property for static libstd." am: a711074817
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1440307

Change-Id: I16653294ece344bb13059095427b78e47d57ccf4
2020-09-28 20:05:34 +00: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
446ec378fc Merge "Remove InputRootAbsolutePath spec to header-abi-dumper" am: a6b38f2d3e
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1407532

Change-Id: I28b52abdb778f2e961ce13ec97fc499ff145ac25
2020-09-28 18:25:17 +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
Ivan Lozano
dd0554722a rust: Refactor staticStd to stdLinkage
Instead of returning a boolean, return an enum value to improve
readability and provide greater flexibility for future modifications.

Bug: 168729404
Test: Soong tests pass
Change-Id: Iddcdae8c34be09e476404382e43d1ea5935bae65
2020-09-28 13:26:05 -04: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
b3bc8c5eb7 Merge "Output Javadoc comments for public API" am: d124b6b4e8
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1439053

Change-Id: I56c00619f34a61bb5761375db6d07c9bcd450d14
2020-09-28 15:07:22 +00:00
Paul Duffin
d124b6b4e8 Merge "Output Javadoc comments for public API" 2020-09-28 14:25:48 +00:00
Martin Stjernholm
96a12562b5 Merge "Handle property structs and BpPropertySets as values to AddProperty." am: 79bee057a3
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1423510

Change-Id: Ia5a3afc462144da5d97c64394a31e881659b652e
2020-09-28 10:30:01 +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
22fa34d496 Merge "soong: Exclude system shared libs from fix suggestions" am: 19dfeee7d5
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1433952

Change-Id: I1232d45fd3070b9e888efc713c5359fa07d950dd
2020-09-28 04:13:27 +00:00
Yo Chiang
19dfeee7d5 Merge "soong: Exclude system shared libs from fix suggestions" 2020-09-28 03:54:27 +00:00
Treehugger Robot
a8da4bcffa Merge "Support arch-specific init_rc property" am: 85aaf56dd6
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1439753

Change-Id: I51400669bab91516a6114b2c154d0bc53851f66e
2020-09-26 02:23:51 +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
4aced67bf0 Merge "Add type information to symbolfile and ndkstubgen." am: 9dd2c4d543
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1347983

Change-Id: Ifbf5c4f37570e8eed573e27ce3ad396c000ea002
2020-09-26 00:13:50 +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
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