Commit Graph

20652 Commits

Author SHA1 Message Date
Ulyana Trafimovich
a4cdcd3796 Merge changes from topic "uses-libs-5" am: 8fab5bcce3
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1353554

Change-Id: I11201716a66279597781fbe9595e01fee32a84a5
2020-07-02 09:20:25 +00:00
Ulyana Trafimovich
8fab5bcce3 Merge changes from topic "uses-libs-5"
* changes:
  Rewrite construct_context.sh in Python.
  Refactor class loader context generation.
2020-07-02 09:06:27 +00:00
Inseob Kim
bde72ec732 Merge "Include shared lib in vendor snapshot if isVndkExt" am: a04db44964
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1354063

Change-Id: I9ee11a10dcaf842a829506aedf774602c01b46f5
2020-07-02 07:55:53 +00:00
Inseob Kim
a04db44964 Merge "Include shared lib in vendor snapshot if isVndkExt" 2020-07-02 07:42:16 +00:00
Bill Peckham
7d3f096cf4 Include shared lib in vendor snapshot if isVndkExt
A VDNK extension is an image:vendor module provided by a
vendor-modified framework project. So it should be
provided to the vendor build as a prebuilt (for the
purposes of building against a vendor snapshot).

Exempt-From-Owner-Approval: cherry pick from internal branch

Bug: 160189878
Test: manual
Change-Id: I3eb4794c1be2949b9c85fd52f823e5e14df4ad7d
Merged-In: I3eb4794c1be2949b9c85fd52f823e5e14df4ad7d
2020-07-02 07:42:05 +00:00
Treehugger Robot
062e9afe7e Merge "apex: add / in file_contexts as system_file" am: fae9e0cf9a
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1351465

Change-Id: I1dab11f8feb4c61e02ddb0299fd54756de3ae10e
2020-07-02 04:31:07 +00:00
Treehugger Robot
fae9e0cf9a Merge "apex: add / in file_contexts as system_file" 2020-07-02 04:22:46 +00:00
Treehugger Robot
f9d5977467 Merge "Dedup NDK library lists in make." am: 8cf2fda4c4
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1353449

Change-Id: I71fb9df477b858276706af826e07ed3e7b27585b
2020-07-02 02:29:20 +00:00
Treehugger Robot
8cf2fda4c4 Merge "Dedup NDK library lists in make." 2020-07-02 02:12:26 +00:00
Treehugger Robot
5ba520122b Merge "Fix out/soong/Android-<>.mk reproducibility" am: 2e93eb702d
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1353442

Change-Id: I529e89400a980a585ba295c5e4a5fa985a1120be
2020-07-02 01:13:38 +00:00
Treehugger Robot
2e93eb702d Merge "Fix out/soong/Android-<>.mk reproducibility" 2020-07-02 00:57:17 +00:00
Treehugger Robot
df1d1240f6 Merge "Rename module -> module-lib" am: 756aa63aee
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1340036

Change-Id: Ifc6c1b399002605de4cda1dbef22c858fc9ecb17
2020-07-02 00:13:35 +00:00
Treehugger Robot
756aa63aee Merge "Rename module -> module-lib" 2020-07-01 23:58:07 +00:00
Matthew Maurer
cd39a5f2a2 Merge changes from topic "rust-flex" am: 367c01b19b
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1353062

Change-Id: Ia79b3e0dc51ae55431e55b22b1329421e2678c9e
2020-07-01 22:41:35 +00:00
Matthew Maurer
8ce15394c1 rust: Mutate prebuilt modules dylib/rlib am: c761eeca48
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1349327

Change-Id: I70dbfeecfbb5d31df53790e12382495e2a9d5d2f
2020-07-01 22:41:33 +00:00
Matthew Maurer
4b8457b422 rust: Add rustlibs auto dependency selection am: 0f003b1851
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1347866

Change-Id: I3bdcbb3770cd0fa28fdd8840cbb879dc1658423d
2020-07-01 22:41:32 +00:00
Matthew Maurer
f7aa77edfb rust: Change default variants am: 2ae0513a8e
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1347868

Change-Id: I63b7cdd97d36d524a25d3a7b64fe97bd377ed0f1
2020-07-01 22:41:28 +00:00
Matthew Maurer
60d41b05d4 rust: Fix Properties inheritance for prebuilts am: 128f53b3b4
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1353063

Change-Id: Iab5949e9b76700fa9d565d160cd9d8a9cb8ee47c
2020-07-01 22:41:24 +00:00
Matthew Maurer
367c01b19b Merge changes from topic "rust-flex"
* changes:
  rust: Suppress default sysroot unconditionally
  rust: Mutate prebuilt modules dylib/rlib
  rust: Add rustlibs auto dependency selection
  rust: Change default variants
  rust: Fix Properties inheritance for prebuilts
2020-07-01 22:26:44 +00:00
Dan Willemsen
1a8c8565bd Fix out/soong/Android-<>.mk reproducibility
When there were multiple modules overriding a single module, sometimes
we would create the list in different orders, which would trigger some
of the later mutators to write the Android-<>.mk out in different
orders.

Bug: 160207422
Test: diff out/soong/Android-<>.mk between multiple runs on internal master
Change-Id: I321db706dd34aa20a0b1556fd282d54b826a4a97
2020-07-01 15:13:58 -07:00
Treehugger Robot
5f33df625a Merge "Generate the known NDK libraries list." am: 2e1b8baeda
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1353447

Change-Id: I05725fdfbbd34ee839ac63ff5534a7c40643a122
2020-07-01 21:57:23 +00:00
Treehugger Robot
2e1b8baeda Merge "Generate the known NDK libraries list." 2020-07-01 21:43:09 +00:00
Treehugger Robot
694a75c63c Merge "Output apkcerts file for android_app_set." am: 5aff3afce2
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1354062

Change-Id: I6fe53574991f71e1ca84c19a16de86261700cb65
2020-07-01 20:04:18 +00:00
Treehugger Robot
5aff3afce2 Merge "Output apkcerts file for android_app_set." 2020-07-01 19:53:33 +00:00
Matthew Maurer
c761eeca48 rust: Mutate prebuilt modules dylib/rlib
This change makes it possible to use a single module to provide both
dylib and rlib varieties of a library. This allows the use of libstd and
libtest from a rustlibs property, allowing linkage type to change
for different variants.

Bug: 159718669
Test: cd external crates; mma; m crosvm.experimental
Change-Id: I477c4d2faec63703fdc6dd42ba020747d6a50714
2020-07-01 11:27:12 -07:00
Matthew Maurer
0f003b1851 rust: Add rustlibs auto dependency selection
Adds the rustlibs dependency type which will automatically select
between rlib and dylib based on the type of the library.

Bug: 143217452
Test: cd external/rust; mma
Change-Id: I97faadae98bf957090a32939cfb2d3a10f74a057
2020-07-01 11:27:12 -07:00
Matthew Maurer
2ae0513a8e rust: Change default variants
rust_library now produces only rlib and dylib variants.
rust_library_foreign now produces static and shared variants.

This change was made because both are common cases, but all four
together essentially never happens. This allows us to have fewer repeat
module definitions.

Bug: 143217452
Test: cd external/rust; mma
Change-Id: Iaf69e8da38f7c12710331c51464699cf7cbbb656
2020-07-01 11:27:12 -07:00
Matthew Maurer
128f53b3b4 rust: Fix Properties inheritance for prebuilts
Previously, we had just called AddProperties inside the factory on
libraryDecorator's properties directly. This inadvertantly missed their
MutatedProperties. Inheriting properties from libraryDecorator rather
than baseCompiler will avoid that type of error in the future.

Test: cd external/rust; mma; m crosvm.experimental
Change-Id: Ic08c410e69a8e272d63f9ffbdbe16ba9c3cc3de1
2020-07-01 11:27:12 -07:00
Matthew Maurer
bb3add1104 rust: Suppress default sysroot unconditionally
With proper prebuilt modules, we can avoid any rustc implicit sysroot
searching.

Asd a bonus, this should make rust-project.json generation correctly
grab otherwise implicit dependencies.

Prebuilt rlibs may include several dependency rlibs. Without a
link_dirs attribute, every dependency (even if unexported) would need a
separate module.

Previously we were casing out on exact structs, which might be OK when
libraryDecorator and procMacroDecorator were the only possibilities, but
repeating the logic for three types is too much. Using an interface
makes this logic scale better.

Bug: 159591910
Test: cd external/rust; mma; m crosvm.experimental
Change-Id: Ia1124e09f48cd05e39f094bbcb988622ebd2272f
2020-07-01 11:27:12 -07:00
Thiébaud Weksteen
a1410c7f5e Merge "Explicitly define Rust default lints" am: 6bbe5774a3
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1353556

Change-Id: I363b2bc2d42f4bb7bc88fe90be8884661bb5c971
2020-07-01 17:51:29 +00:00
Thiébaud Weksteen
6bbe5774a3 Merge "Explicitly define Rust default lints" 2020-07-01 17:38:58 +00:00
Treehugger Robot
5befecfe64 Merge changes Ib7ad715d,I3a83b5ed am: 7d9deed9fd
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1353932

Change-Id: Ib5967801f9d3a6b143a50f59f77820e13a918d81
2020-07-01 17:33:04 +00:00
Treehugger Robot
7d9deed9fd Merge changes Ib7ad715d,I3a83b5ed
* changes:
  Remove frameworkResModule from sdkCorePlatform.
  Remove the concept of useDefaultLibs from Soong.
2020-07-01 17:23:46 +00:00
Jaewoong Jung
11c1e0f94d Output apkcerts file for android_app_set.
Soong and Make have no ways to figure out what splits will be outputted
from a given android_app_set, so it's impossible for them to provide
full PACKAGES.$(LOCAL_MODULE).CERTIFICATE entries, which are required to
build a final apkcerts.txt. This change makes extract_apks produce
apkcerts.txt files for each input modules instead. The Make-side
counterpart of this change merges all local apkcerts.txt into a final
one.

Fixes: 160119159
Test: main_test.go
Test: m apkcerts-list
Merged-In: I321e80fd636a955213761f56a3ac64bfe7f7f7c0
Change-Id: I321e80fd636a955213761f56a3ac64bfe7f7f7c0
2020-07-01 10:03:09 -07:00
Treehugger Robot
d922debd99 Merge "Add BenchmarkProperties to cc_defaults" am: e6b5e9aa82
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1353047

Change-Id: I7182cf2dc9c83c7d740badc2c470d90d2b129e0d
2020-07-01 16:59:20 +00:00
Treehugger Robot
e6b5e9aa82 Merge "Add BenchmarkProperties to cc_defaults" 2020-07-01 16:46:11 +00:00
Colin Cross
342c28eb01 Merge changes Ie33d2e05,Ie2b4509b,I5ac3a1f5 am: 8ec6261388
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1353385

Change-Id: Ia43082a9479e4a3379f9726f3a9ea8842c7b89eb
2020-07-01 15:54:45 +00:00
Colin Cross
8ec6261388 Merge changes Ie33d2e05,Ie2b4509b,I5ac3a1f5
* changes:
  Fix finder on symlinks pointing to directories
  Add Stat to finder/fs
  Move finder_test filesystem helper functions to fs/test.go
2020-07-01 15:42:22 +00:00
Thiébaud Weksteen
8e46efac71 Explicitly define Rust default lints
Add documentation on how lints are defined and used in Android. Merge
the deny_warnings attribute with a new attribute (no_lint) which can be
used to disable the default linting parameters.
Explicitly allow all lints for external/ and prebuilts/, which remove
any warning when building sysroot for the devices.

Test: cd external/rust/crates; mma
Test: add dummy internal Rust module; mma
Change-Id: I62be1c41aeda4068fb9e288038727c1de5ffe547
2020-07-01 17:11:58 +02:00
Treehugger Robot
98d8ee9bd8 Merge "Rename the Default* constants in java/config." am: 8f70db2b48
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1353886

Change-Id: Ibcc651741aeff9bdfc783ed59a718e9c089ba769
2020-07-01 14:56:57 +00:00
Treehugger Robot
8f70db2b48 Merge "Rename the Default* constants in java/config." 2020-07-01 14:43:46 +00:00
Treehugger Robot
d6bc08bdbd Merge "Prepare Soong for switch to stable core/platform API." am: 286d8f9972
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1353885

Change-Id: I23afe384caa6bbf978075023455207c3097c5a49
2020-07-01 12:09:01 +00:00
Pete Gillin
7b0bdce69e Remove frameworkResModule from sdkCorePlatform.
This seems unnecessary: modules using `sdk_version: "core_platform"`
don't expect frameworks dependencies.

Test: m framework
Change-Id: Ib7ad715d1f4b4934c3c4a84839f4ead85a5abb29
2020-07-01 13:05:32 +01:00
Treehugger Robot
286d8f9972 Merge "Prepare Soong for switch to stable core/platform API." 2020-07-01 11:57:26 +00:00
Pete Gillin
0638dfcf94 Rename the Default* constants in java/config.
These values are used in two out of the many possible sdk_version
configurations, and therefore weren't really defaults in any
meaningful sense. Giving them more descriptive names makes the code
easier to follow.

Bug: 157640067
Test: m nothing
Change-Id: Icf38a9c0be2606ad0478929e1b40dfcee36cddef
2020-07-01 12:40:58 +01:00
Pete Gillin
e3d44b245b Remove the concept of useDefaultLibs from Soong.
This field in the java/sdk structure was used in two of the many
possible configurations, so it wasn't really a "default". It also
meant that, to understand those configurations, the reader had to know
what was considered the default, which was only possibly by reading
the code in java.go and droiddoc.go which implemented special code
paths when useDefaultLibs was true. By eliminating that setting and
explicitly setting the required values, the code is simpler and easier
to understand.

This change is a straight refactoring, in the sense that the output of
the build should be unchanged.

Regarding the changes to the proguardRaiseTag dependency in java.go:
- This is a noop for anything which had sdkDep.useModule = true prior
  to this change, because they all had the same value for
  hasFrameworkLibs() and hasStandardLibs().
- This is a noop for anything which had sdkDep.useDefaultLibs = true
  prior to this change, because they do not use proguard settings.
- Therefore, it is a noop overall.
- Nevertheless, it is required to make sdkCorePlatform work. Without
  this change, such modules would pick up a dependency on framework
  libs via the (unused) proguardRaiseTag, which creates a circular
  dependency, because this is the sdk_version used when building
  framework libs themselves.

Bug: 157640067
Test: m java docs droid
Change-Id: I3a83b5edc1bd48c16b55f6f77e3e710fc8fbd8fa
2020-07-01 12:40:58 +01:00
Pete Gillin
40a0642385 Prepare Soong for switch to stable core/platform API.
This ensures that `m nothing` succeeds even if java/config/config.go
is changed to use `stable.core.platform.api.stubs` and
`stable-core-platform-api-stubs-system-modules` instead of the legacy
versions. (The change to stable cannot be made yet because real
targets depend on APIs only in legacy, but it is useful for the build
system to be ready for this change.)

Bug: 157640067
Test: m nothing (with and without local change mentioned above)
Change-Id: Id7562d8c592551fd0ed2b9849bcf6eb707c2a1d0
2020-07-01 11:31:30 +01:00
Ulya Trafimovich
5f364b63b8 Rewrite construct_context.sh in Python.
This allows to reuse SDK version comparison routine from other Python
scripts. With the addition of non-numeric versions comparison has become
more complex, and the deleted shell script did it incorrectly: it used
comparisons like `[[ "S" -lt 28 ]]` which results in "true" as strings
are converted to zero in numeric context. This resulted in adding legacy
libraries to class loader context of apps targeting recent SDK versions.
The error was masked because currently there is only one non-AOSP app
that uses the script (GoogleDialer), and it targets numeric SDK version.

Test: lunch aosp_cf_x86_phone-userdebug && m
Bug: 132357300
Change-Id: I26e752e29b5453fd3e29d5dbfbe4d9df9c0a55b7
2020-07-01 09:44:23 +01:00
Nicolas Geoffray
c88c02244c Merge "Add host exports for platform libraries used by ART host testing." am: 7462eda53e
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1353553

Change-Id: I690afacb604b29a473f31b213618d8c19a94a492
2020-07-01 08:43:52 +00:00
Nicolas Geoffray
7462eda53e Merge "Add host exports for platform libraries used by ART host testing." 2020-07-01 08:33:56 +00:00