Commit Graph

32299 Commits

Author SHA1 Message Date
Treehugger Robot
edeeabc7e0 Merge "Use soong_zip -srcjar for proto and aidl srcjars" am: b2d77d4a52
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1535580

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Iacdc0c5fbbee463a6ab737eb4fce0b7751501169
2020-12-24 03:25:43 +00:00
Treehugger Robot
b2d77d4a52 Merge "Use soong_zip -srcjar for proto and aidl srcjars" 2020-12-24 03:04:37 +00:00
Colin Cross
cf02ec8747 Use soong_zip -srcjar for proto and aidl srcjars
IntelliJ's indexer is unhappy with the full paths in the proto
and aidl srcjars.  Use the -srcjar argument to soong_zip, which
causes it to extract the correct filename for .java files based on
the package statement in the file.

Bug: 176209347
Test: manual
Change-Id: I63d9d4f6ba670e3b851835d719519d675ae54c7f
2020-12-23 17:13:16 -08:00
Treehugger Robot
13b56f815f Merge "Fix library order in class loader context to agree with PackageManager." am: 7dbc5786e3
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1535013

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I1a12d7efe589cfa9badc33d40659c2fab026f303
2020-12-23 20:12:32 +00:00
Treehugger Robot
7dbc5786e3 Merge "Fix library order in class loader context to agree with PackageManager." 2020-12-23 19:58:25 +00:00
Ulya Trafimovich
c9f2b9494d Fix library order in class loader context to agree with PackageManager.
PackageManager adds compatibility libraries for different SDK versions
in descending order, and Soong should do the same.

Bug: 132357300

Test: lunch aosp_cf_x86_phone-userdebug && m \
  && launch_cvd \
  && adb wait-for-device \
  && adb logcat | grep -E 'ClassLoaderContext [a-z ]+ mismatch'

  [no messages "ClassLoaderContext classpath element mismatch"]

Change-Id: Ib1d981808ae4022b2c6e73f407a003e8b8e9c7d6
2020-12-23 18:22:26 +00:00
Anton Hansson
325936250d Merge "Add attribute to disable last-api compat tracking" am: 74c8436ce0
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1534344

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I8ec74f2d9a289fc38aa41b38a14639d17c03fe4e
2020-12-23 09:29:27 +00:00
Anton Hansson
74c8436ce0 Merge "Add attribute to disable last-api compat tracking" 2020-12-23 09:05:46 +00:00
Jaewoong Jung
ce131b6fcf Merge "Remove unnecessary snake case variables." am: e794b1e302
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1533880

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I5deddd7ee941e701beb25323282a761e61aec2ed
2020-12-23 01:29:33 +00:00
Kalesh Singh
c425b49238 Merge "Reland: Add android.hardware.memtrack-unstable-ndk_platform" am: 98dea94982
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1534599

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I76ab805d74bfdfbe59c1c16353c355476559c142
2020-12-23 01:28:44 +00:00
Treehugger Robot
75b1a9e43e Merge "rust modules in APEX don't get installed to the system partition" am: 109d9ccdcb
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1532938

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Idd86c4725819e31268e62c9f29d9fe50d098f51f
2020-12-23 01:27:57 +00:00
Jaewoong Jung
e794b1e302 Merge "Remove unnecessary snake case variables." 2020-12-23 01:21:28 +00:00
Kalesh Singh
98dea94982 Merge "Reland: Add android.hardware.memtrack-unstable-ndk_platform" 2020-12-23 01:20:51 +00:00
Treehugger Robot
109d9ccdcb Merge "rust modules in APEX don't get installed to the system partition" 2020-12-23 00:42:20 +00:00
Kalesh Singh
7b63b2677d Reland: Add android.hardware.memtrack-unstable-ndk_platform
Bug: 175021432
Test: Fixes build failure on aosp/1518666
Change-Id: Id53bb93bfce35347637a271b7f6aa3c1c4d8c839
2020-12-22 20:49:54 +00:00
Jaewoong Jung
18aefc1977 Remove unnecessary snake case variables.
Test: m nothing + TreeHugger
Change-Id: I99f7162944daa6c57c6ae4763261e108bb5cb6b1
2020-12-22 12:38:35 -08:00
Colin Cross
f0dee605eb Merge changes from topic "llndk_cc_library" am: 1f8c272984
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1532861

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I0a7b3e3f0aef5c44094a6cb1783ee4eb26b323c2
2020-12-22 19:09:24 +00:00
Colin Cross
1f8c272984 Merge changes from topic "llndk_cc_library"
* changes:
  Don't rewrite LLNDK dependencies with .llndk suffix
  Don't strip stub libraries
2020-12-22 18:55:34 +00:00
Anton Hansson
3dba945f2b Merge "Remove sdk_version: "none" restriction" am: 0a2afd183a
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1533344

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ibd095c26ffbf3129e0bbc6a69c7a3d8994956074
2020-12-22 11:47:40 +00:00
Anton Hansson
0a2afd183a Merge "Remove sdk_version: "none" restriction" 2020-12-22 11:41:27 +00:00
Ulyana Trafimovich
99d0a65605 Merge changes I6a512209,I56437f26 am: b630c37d61
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1533342

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ia6862d1130f743ea5c5bd4c8ad8fbbba1b4fa4b2
2020-12-22 10:53:13 +00:00
Ulyana Trafimovich
b630c37d61 Merge changes I6a512209,I56437f26
* changes:
  Unify addition of class loader subcontext from dependencies.
  Move ClassLoaderContexts() method to UsesLibraryDependency interface.
2020-12-22 10:14:41 +00:00
Jiyong Park
459feca5cc rust modules in APEX don't get installed to the system partition
Otherwise, we get duplicated build rules.

Bug: N/A
Test: OUT_DIR=out DIST_DIR=out/dist
build/soong/scripts/build-ndk-prebuilts.sh

Change-Id: I2be0695d284bd72a19e02c8b7509a7f39afade8b
2020-12-22 15:10:00 +09:00
Colin Cross
127bb8b9f6 Don't rewrite LLNDK dependencies with .llndk suffix
Rewriting LLNDK dependencies with .llndk suffix requries referencing
a global data structure to determine if a given library is an LLNDK
library and therefore needs the .llndk suffix.  References to
global data structures from mutators must be removed to support
incremental Soong analysis.  Instead, move the LLNDK stubs rules
into the vendor variant of the implementing cc_library so that
the original name can be used.

As an incremental step, the llndk_library modules are left in
place, and the properties are copied into the cc_library via
the dependency specified by the llndk_stub property.  A followup
will move the LLNDK properties directly into the cc_library and
delete the llndk_library modules.

The global list of LLNDK libraries is kept for now as it is used
to generate the vndk.libraries.txt file.

Bug: 170784825
Test: m checkbuild
Test: compare Soong outputs
Test: all Soong tests
Change-Id: I2a942b21c162541a49e27b2e5833c9aebccff1d0
2020-12-21 17:53:30 -08:00
Colin Cross
adc81a0783 Don't strip stub libraries
LLNDK and NDK stubs are already not stripped, don't strip APEX stubs
either.

Test: m checkbuild
Change-Id: I9a50df4b8b73d764ca81634a8a3014726eceda99
2020-12-21 15:54:09 -08:00
Ulya Trafimovich
88bb6f6342 Unify addition of class loader subcontext from dependencies.
Previously CLC construction was scattered across different module types
and dependency tags. This CL moves all logic to one function, which
handles all special cases. This will allow to simplify CLC API and
reduce the number of different ways in which CLC is constructed.

Previously some of the cases failed early (at the time when a library is
added to CLC) if the build/install paths were unknown. Other cases did
not fail early, but were validated later before CLC was used. Late
failures are necessary because some of the libraries with unknown paths
still have to be processed by manifest_fixer (which doesn't need library
paths), but they do not use dexpreopt (which needs library paths). This
CL removes the early failures (all paths are still validated later).

The CLC tests do not fail because they use a private method that toggles
the "strict" flag (that enforces early/late failure mode) manually in
the method call.

The CL also makes a functional change in the way CLC is constructed for
component libraries that have an OptionalImplicitSdkLibrary(), or
libraries that are disguised as SDK libraries via `provides_uses_lib`.
Previously such a component/disguised library X was added to its own CLC
as a sibling element of X's own <uses-library> dependencies, which
created incorrect CLC structure. Now this is handled by addCLCFromDep,
when X is processed as dependency and added as a top-level CLC element
with its sub-CLC properly nested under it.

Bug: 132357300
Test: lunch aosp_cf_x86_phone-userdebug && m
Change-Id: I6a512209b87b81d785875f10f76b21c81b2ed579
2020-12-21 22:16:21 +00:00
Bob Badour
2694776f39 Merge "getNamespacesToSearchForModule to use blueprint.Namespace" am: d8065c606c
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1533699

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I42c2f90c85f5ced2f8d844aad9e59593ff872739
2020-12-21 21:22:45 +00:00
Bob Badour
d8065c606c Merge "getNamespacesToSearchForModule to use blueprint.Namespace" 2020-12-21 20:56:32 +00:00
Treehugger Robot
ee0052200d Merge "Support writing a ZIP64 file header" am: cef48e956b
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1532736

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I2de7a3b577e0bbdd4b84d96197a7397e0ca474ab
2020-12-21 20:40:15 +00:00
Treehugger Robot
cef48e956b Merge "Support writing a ZIP64 file header" 2020-12-21 20:22:36 +00:00
Bob Badour
38620edca1 getNamespacesToSearchForModule to use blueprint.Namespace
Allow for nil argument.

Test: m all

Change-Id: I03e3afe00d72905f259ce1af5085387b796ebc3d
2020-12-21 18:40:53 +00:00
Anton Hansson
dff2c78a20 Add attribute to disable last-api compat tracking
Setting this to true by default is dangerous as it can mask bugs. Create
a dedicated attribute for java_sdk_library to enable this behavior
instead. The default will be flipped in a future CL when all the current
offenders have been fixed.

Fix all the tests to have the right API files.

Bug: 176092454
Test: m nothing
Change-Id: Ieab94bcb74abf8d018365a56fb447fe3dbd46957
2020-12-21 17:25:30 +00:00
Jaewoong Jung
c08ca970c9 Merge "Remove the return value from dexpreopt" am: 4eb5048585
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1532723

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I76fe4b0cf57d64a573788486622d2557e7685830
2020-12-21 16:38:09 +00:00
Jaewoong Jung
4eb5048585 Merge "Remove the return value from dexpreopt" 2020-12-21 16:19:23 +00:00
Martin Stjernholm
c386b232d8 Merge "Set the Soong config variable to keep building ART from source." am: 7461e3c19a
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1534343

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I26717be4562adb7c5686224217a23bc1999b514c
2020-12-21 15:38:46 +00:00
Martin Stjernholm
7461e3c19a Merge "Set the Soong config variable to keep building ART from source." 2020-12-21 15:15:11 +00:00
Martin Stjernholm
2a9013ee17 Set the Soong config variable to keep building ART from source.
Without this Soong may run into inconsistencies due to stale prebuilts.
This amends https://r.android.com/1529658.

Test: TH build of NDK
Bug: 175918603
Bug: 172480615
Change-Id: I14680e4547d7d5f560d31ef61b71af8d159c4c53
2020-12-21 13:37:22 +00:00
Anton Hansson
e564c8e685 Merge changes I6d1be1a9,Ie5e9310e am: 69c43e40ad
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1531790

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Iedb64dd996ca82f2f9979ef6cc932bfe8a9da032
2020-12-21 10:32:52 +00:00
Anton Hansson
69c43e40ad Merge changes I6d1be1a9,Ie5e9310e
* changes:
  Skip mainline_sdk by default in build_test.bash
  Allow multiple --skip-products and --products arguments to multiproduct_kati
2020-12-21 09:59:32 +00:00
Colin Cross
1f31a3e61b Merge "Fix NDK build in downstream branches" am: bad07a2fb9
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1532267

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I2ae017ed00ef5436926d1fffd09dbfb0d8ba5eb7
2020-12-20 06:05:21 +00:00
Colin Cross
bad07a2fb9 Merge "Fix NDK build in downstream branches" 2020-12-20 05:36:26 +00:00
Treehugger Robot
ad435c7dde Merge "variable: Update product_variables.arc struct" am: 15d46f15d7
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1532982

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Iff09483dee8a183d37fd5c85466384f363502331
2020-12-19 08:26:44 +00:00
Treehugger Robot
15d46f15d7 Merge "variable: Update product_variables.arc struct" 2020-12-19 08:07:42 +00:00
Patrice Arruda
fb2e97a139 Merge "Read the proc status file when PID is given for metrics purpose." am: 175500f016
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1532500

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I7ce39afe6caa7e92cfc12b5ff4a60318696636fe
2020-12-18 05:03:54 +00:00
Patrice Arruda
175500f016 Merge "Read the proc status file when PID is given for metrics purpose." 2020-12-18 04:14:09 +00:00
Colin Cross
e6a83e65d1 Fix NDK build in downstream branches
The NDK build in downstream branches with prebuilt apexes break
with multiple rules to copy the apex after
I8038ed5c6f05c989ac21ec06c4552fb3136b9a7a renamed SkipInstall to
HideFromMake, which is shadowed by an existing HideFromMake method.
Call through from the existing HideFromMake as a quick-fix for the
build.

Fixes: 175911330
Test: NDK build
Change-Id: Id475671d5dad888913bfb1af2e4be1f2454c3211
2020-12-17 18:22:34 -08:00
Satoshi Niwa
54f4826672 variable: Update product_variables.arc struct
- Add whole_static_libs
- Add `android:"arch_variant"` so arc struct can be used inside
  target.android.product_variables

Test: m
Bug: 171847983
Change-Id: Iaa99b007302462ef66d0d943bc16d37a6e8ecdc7
2020-12-18 09:53:26 +09:00
Treehugger Robot
a90af4fbe5 Merge "SOONG_* variables are emitted only for the BuildOS variants" am: d9d59fb57c
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1532981

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I125e57f96bce6e5a8417f95ec8908f2c6a14e4eb
2020-12-18 00:08:01 +00:00
Treehugger Robot
d9d59fb57c Merge "SOONG_* variables are emitted only for the BuildOS variants" 2020-12-17 23:44:37 +00:00
Colin Cross
373147baa9 Support writing a ZIP64 file header
If the length of a stored file is more than 2^32 and a data descriptor
is not being used then a ZIP64 extra is required in the file header to
store the uncompressed and compressed lengths.

Bug: 175055267
Test: TestCopyFromZip64
Change-Id: Id414b4c04f48aefabfd835bd8339333d36576375
2020-12-17 15:08:50 -08:00