Commit graph

27459 commits

Author SHA1 Message Date
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
dba9762aa0 rust: Fix module name in bindgen_test am: e0510d7a69
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1438952

Change-Id: If2a34b8c9e32c20024944ee4af24636f1bd71b3d
2020-09-25 14:17:16 +00: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
0d862c83ef Merge "Avoid Rust source provider rule duplication" am: 4820c2c8d2
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1438332

Change-Id: I9dc8e36980eb687fa07967c9e8cfd230a6e42eee
2020-09-25 13:29:06 +00:00
Ivan Lozano
86ba1e62ef Merge "rust: Add rust_bindgen std version w/ cc defaults." am: ce2cffd583
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1435613

Change-Id: I34955ced21e02ad10b98285d41fb3b58810cb54d
2020-09-25 13:28:30 +00: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
26fb8c32be Merge "Global ThinLTO mode" am: 6a94390d2e
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1432912

Change-Id: Ia7b299a83891c0da76e466b41340ddfdb8df9578
2020-09-25 08:50:39 +00:00
Yi Kong
6a94390d2e Merge "Global ThinLTO mode" 2020-09-25 08:36:17 +00:00
Anton Hansson
233d9d7f5e Merge "Make API lint warnings errors for system & testapi" am: a6906e2329
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1437131

Change-Id: I482be558f1959999a13bdbd3cbfb2263610ebe56
2020-09-25 07:08:45 +00:00
Anton Hansson
a6906e2329 Merge "Make API lint warnings errors for system & testapi" 2020-09-25 06:52:57 +00:00
Kousik Kumar
bad8286a01 Merge "Allow overrides for RBE_log_dir" am: bf30e4d576
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1434973

Change-Id: I5949cd87a5707269d445fd99b50ba6741af428f1
2020-09-25 06:37:42 +00:00
Treehugger Robot
64379b6942 Merge "Switch to armv7 for Rust ARM" am: 985f6295c2
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1438051

Change-Id: Ife72b7a3a7d8cb0e7fb2c68e5d9ae9787e94bf10
2020-09-25 06:35:58 +00:00
Kousik Kumar
bf30e4d576 Merge "Allow overrides for RBE_log_dir" 2020-09-25 05:40:24 +00:00
Treehugger Robot
bbfd7e016a Merge changes I0885e493,Ic37c8db9 am: 4f6eebff0c
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1429848

Change-Id: I2d900a72ff809be4d08cf6272864d01a63293c85
2020-09-25 05:25:06 +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
587f425a1b Merge changes from topics "soong-apilevel", "soong-config-apilevel" am: 8bd5095362
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1388352

Change-Id: I602df3b8e1d648ca10c4eb04a18125c836995330
2020-09-24 21:26:34 +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
Treehugger Robot
fde70e4d75 Merge "Extend target docs to cover (almost) all variants." am: 2c7ca784f7
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1435494

Change-Id: I226e6fe987ee7ab10d6682585576b78c5cff630d
2020-09-24 18:39:23 +00: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
Jiyong Park
2210198129 linux_bionic_arm64 is added when Host_bionic_arm64 is true
linux_bionic_arm64 is the new host target using Bionic as libc.  This
change adds a new Soong config Host_bionic_arm64 that enables the
target.

This change also amends firstTarget() function to handle the case when
the available targets for an OS have different arch families. In that
case, first target is selected for each of the arch family. This is
needed in the (rare) care when both linux_bionic_x86_64 and
linux_bionic_arm64 targets are enabled.

Bug: 159685774
Test: add "Host_bionic_arm64": true to out/soong/soong.config and run
./build/soong/soong_ui.bash --make-mode --skip-make
out/soong/host/linux_bionic-arm64/bin/aarch64-linux-bionic/crosvm

Change-Id: I0885e49379f6ee216c6e82adbb1230655171a7a5
2020-09-24 14:14:36 +09:00
Jiyong Park
1613e5541f HostCross is an attribute of a Target, not OsType
A host target is considered as being cross-compiled when the target
can't run natively on the build machine. For example, linux_glibc/x86_64
is a non-cross target on a standard x86/Linux machine, but is a cross
host on Mac. Previously, whether cross or not was a static attribute of
an OsType. For example, Windows was always considered as cross host,
while linux_bionic was not. This becomes a problem when we support more
host targets like linux_bionic/arm64 which should be cross-host on
standard x86/Linux machines.

This change removes HostCross from the OsClass type and instead adds a
property HostCross to the Target type. When a target is being added, it
is initialized to true when the target can't run natively on the current
build machine.

Bug: 168086242
Test: m
Change-Id: Ic37c8db918873ddf324c86b12b5412952b0f2be2
2020-09-24 14:14:31 +09:00
Colin Cross
269cacfd9d Merge "Move PrimaryModule, FinalModule, VisitAllModuleVariants to BaseModuleContext" am: 3735c144e0
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1429243

Change-Id: I0f5ba6f62e3a439f12a26d39959eb19456d885de
2020-09-24 01:17:23 +00:00
Colin Cross
3735c144e0 Merge "Move PrimaryModule, FinalModule, VisitAllModuleVariants to BaseModuleContext" 2020-09-24 00:58:24 +00:00
Colin Cross
e73994b003 Merge "Add providers support" am: f950513579
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1360942

Change-Id: I5113e018591803a018733f2511507cef59583831
2020-09-24 00:49:49 +00:00
Colin Cross
f950513579 Merge "Add providers support" 2020-09-24 00:28:42 +00:00
Martin Stjernholm
e284b48496 Extend target docs to cover (almost) all variants.
Test: n/a - comment change only
Change-Id: Ia0e6e4c6f872cf8023cb6470935cab3d6a0c1fee
2020-09-23 21:12:45 +01:00
Jooyung Han
7f146c0da1 apex: emit file_contexts for flattened apex
Flattened APEXes are installed in /<partition>/apex/<name>, so its
file_contexts file should be amended accordingly.
For example, file_contexts of an apex "com.android.foo" with should be
modified by prepending actual install path to the path regex.

/bin/foo <sepolicy label>
=> /system/apex/com\.android\.foo/bin/foo <sepolicy label>

File_contexts file is emitted to "make" via LOCAL_FILE_CONTEXTS variable
for apex_manifest.pb module.

Make collects these files and use them to build file_contexts.bin.

Also removed global state which is used to keep the list of all
flattened apexes.

Bug: 166518492
Test: m file_contexts.bin
      check intermediate file_contexts.modules.tmp file
      in $OUT/obj/ETC/file_contexts.bin_intermediates/
Change-Id: I780370b6e576964a5c09f9477f3361f341dd576b
2020-09-23 15:43:39 +00:00
Martin Stjernholm
d170d99b68 Merge "Handle absolute source paths correctly." am: a9a99bc6d2
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1433434

Change-Id: I40e5a082b2c1a89c96d3a2a3538012c50b5e9d59
2020-09-23 13:09:09 +00:00
Martin Stjernholm
a9a99bc6d2 Merge "Handle absolute source paths correctly." 2020-09-23 13:03:06 +00:00
Roland Levillain
3fa6d0567b Merge "Add missing characters in documentation of compile_multilib property." am: 1a1b885319
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1434051

Change-Id: I3706ff9edd59a555baf8e94f59788d412a20d951
2020-09-23 12:43:38 +00:00
Roland Levillain
1a1b885319 Merge "Add missing characters in documentation of compile_multilib property." 2020-09-23 12:19:07 +00:00
Kousik Kumar
0d15a72915 Allow overrides for RBE_log_dir
We should override log-dir with the environment variables if its set.
This is needed in our integration tests and generally to allow for
user-overrides.

Test: RBE_log_dir=`pwd`/rbelogs mmma external/boringssl
Change-Id: I3d316a2d60122c42f5c3b5dfede4037362a7b5f1
2020-09-23 02:59:19 -04:00
Yi Kong
280fdb9610 Merge "Tweak ThinLTO inling heuristics in absense of PGO profile" am: 76a5ba81e2
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1433954

Change-Id: I6eedf30113a002854b78c04597c67792f54f1cff
2020-09-23 04:55:12 +00:00
Yi Kong
76a5ba81e2 Merge "Tweak ThinLTO inling heuristics in absense of PGO profile" 2020-09-23 04:31:42 +00:00
Pirama Arumuga Nainar
16878206e6 Merge "Propagate PGO instr. flags to dependencies of a static lib" am: d55be35331
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1433217

Change-Id: If3a11415ed62abf469645fcd42d2a3332ee47fc8
2020-09-23 01:28:37 +00:00
Pirama Arumuga Nainar
d55be35331 Merge "Propagate PGO instr. flags to dependencies of a static lib" 2020-09-23 01:11:40 +00:00