Commit Graph

42651 Commits

Author SHA1 Message Date
Luke Huang
9fdb4bd7b0 Merge "Fix the apex compatible issue on the platform Q" am: 4a256414e9 am: c575e41b44
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1710971

Change-Id: I6eae818132585cdc2ce470224479bc1b76be03d5
2021-05-20 10:09:19 +00:00
Luke Huang
c575e41b44 Merge "Fix the apex compatible issue on the platform Q" am: 4a256414e9
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1710971

Change-Id: I1fdcd9b0978ebfcdcf934b368edaf43583540b14
2021-05-20 09:45:52 +00:00
Paul Duffin
4a32d109b9 [automerger skipped] Merge "Test dex jar paths provided to apex by bootclasspath_fragment" into sc-dev am: 796421bdf1 -s ours
am skip reason: Merged-In Ib7dadf3e65151f4e925251f7b1a9c099e824ea63 with SHA-1 f2fa0b5e8e is already in history

Original change: https://googleplex-android-review.googlesource.com/c/platform/build/soong/+/14648794

Change-Id: I749f0a257df2dda1e132be28785b312a00d03686
2021-05-20 09:44:47 +00:00
Artur Satayev
343fd5a113 [automerger skipped] Merge "Use absolute paths in classpaths.proto." into sc-dev am: 7334a69ab6 -s ours
am skip reason: Merged-In Icc3e1a903c34187cfcd67a3ae7bc3dd746445c03 with SHA-1 7d22657c45 is already in history

Original change: https://googleplex-android-review.googlesource.com/c/platform/build/soong/+/14640316

Change-Id: I3cc1470a1d6823686491062b7bc0033c396541ac
2021-05-20 09:44:38 +00:00
Rupert Shuttleworth
29005a5bea Merge "Move some implicitly shared testing code for bp2build into testing.go." am: e2f45d3e08 am: 68b8e17c5d
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1712090

Change-Id: Iaff69a9fa4a7d0da3e96f9b0845dcad25d771865
2021-05-20 09:39:00 +00:00
Paul Duffin
796421bdf1 Merge "Test dex jar paths provided to apex by bootclasspath_fragment" into sc-dev 2021-05-20 09:38:16 +00:00
Luke Huang
4a256414e9 Merge "Fix the apex compatible issue on the platform Q" 2021-05-20 09:29:02 +00:00
Artur Satayev
7334a69ab6 Merge "Use absolute paths in classpaths.proto." into sc-dev 2021-05-20 09:21:39 +00:00
Rupert Shuttleworth
68b8e17c5d Merge "Move some implicitly shared testing code for bp2build into testing.go." am: e2f45d3e08
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1712090

Change-Id: I9236c8481ae4322642999369feb33a493a4200be
2021-05-20 09:16:02 +00:00
Rupert Shuttleworth
e2f45d3e08 Merge "Move some implicitly shared testing code for bp2build into testing.go." 2021-05-20 09:02:10 +00:00
Paul Duffin
a733569b77 [automerger skipped] Merge "Workaround to make AlwaysUsePrebuiltSdks() work with platform_bootclasspath" am: 40aa4363cb am: 773f71ebcb -s ours
am skip reason: Merged-In I3226e21cd6a7f9e4d6bbe94e54129ac5e1d4c679 with SHA-1 59db6d4c5d is already in history

Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1711988

Change-Id: Id2deda3ec8335d637fc96bffad34000d53fa6c76
2021-05-20 07:31:20 +00:00
Paul Duffin
773f71ebcb Merge "Workaround to make AlwaysUsePrebuiltSdks() work with platform_bootclasspath" am: 40aa4363cb
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1711988

Change-Id: Ie9a2a851c5645791c188c4591ffef7665c38f6eb
2021-05-20 07:14:20 +00:00
Paul Duffin
40aa4363cb Merge "Workaround to make AlwaysUsePrebuiltSdks() work with platform_bootclasspath" 2021-05-20 06:58:34 +00:00
Paul Duffin
d90fde3758 Test dex jar paths provided to apex by bootclasspath_fragment
This change adds a test to verify the existing behavior to provide a
baseline against which following changes can be compared.

Bug: 179354495
Test: m nothing
Merged-In: Ib7dadf3e65151f4e925251f7b1a9c099e824ea63
Change-Id: Ib7dadf3e65151f4e925251f7b1a9c099e824ea63
(cherry picked from commit f2fa0b5e8e)
2021-05-20 07:56:17 +01:00
Jingwen Chen
adee405c4c Set the default --platforms value to android_arm. am: 6333b0e460 am: 46afe47940
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1713488

Change-Id: Iaa5f8a25b279ef2a7e388f817ee1161c0b8048c2
2021-05-20 06:52:58 +00:00
Jingwen Chen
46afe47940 Set the default --platforms value to android_arm. am: 6333b0e460
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1713488

Change-Id: I0f4f240998621e4458722972787972b99ca00e72
2021-05-20 06:35:36 +00:00
TreeHugger Robot
4f4d1b1439 [automerger skipped] Merge "Add usesTargetFiles option in dexpreopt_gen" into sc-dev am: b05357c76e -s ours
am skip reason: Merged-In I9667fadbf3b7c6f770e0d1bcbee5d67c1ecd8a3d with SHA-1 4dda75e73e is already in history

Original change: https://googleplex-android-review.googlesource.com/c/platform/build/soong/+/14609951

Change-Id: I934e3ed143883a191642c8f3c39afaa442b77a09
2021-05-20 02:10:28 +00:00
Jingwen Chen
6333b0e460 Set the default --platforms value to android_arm.
This is because the default lunch target is aosp_arm.

Change-Id: I3d99f6ea99862dc2eb579be10db123fe578f9f75
Test: TH
2021-05-20 01:38:53 +00:00
TreeHugger Robot
b05357c76e Merge "Add usesTargetFiles option in dexpreopt_gen" into sc-dev 2021-05-20 01:28:10 +00:00
Jingwen Chen
7d36a5a08e Merge "bp2build: avoid adding deps on system_shared_libs temporarily." am: 5ea6e801e4 am: 07bdd0fdc5
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1710972

Change-Id: Id7348b08e4382eddf654d02383154eadfd1b3926
2021-05-19 23:00:42 +00:00
Jingwen Chen
07bdd0fdc5 Merge "bp2build: avoid adding deps on system_shared_libs temporarily." am: 5ea6e801e4
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1710972

Change-Id: I2e6f817f076fe4513d8672ee145603b82cbd9910
2021-05-19 22:42:08 +00:00
Jingwen Chen
5ea6e801e4 Merge "bp2build: avoid adding deps on system_shared_libs temporarily." 2021-05-19 22:23:50 +00:00
Paul Duffin
32669567f6 Merge "Test dex jar paths provided to apex by bootclasspath_fragment" am: 4483ec110d am: 5f12386d2f
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1710508

Change-Id: I007f4b574e820553261cb8e17455f4f267df50f6
2021-05-19 20:30:00 +00:00
Paul Duffin
5f12386d2f Merge "Test dex jar paths provided to apex by bootclasspath_fragment" am: 4483ec110d
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1710508

Change-Id: Ia6c60dca2e851da36567485d1a134b486431ebd9
2021-05-19 20:13:56 +00:00
Paul Duffin
4483ec110d Merge "Test dex jar paths provided to apex by bootclasspath_fragment" 2021-05-19 19:49:16 +00:00
Paul Duffin
8c0b082140 Workaround to make AlwaysUsePrebuiltSdks() work with platform_bootclasspath am: 59db6d4c5d
Original change: https://googleplex-android-review.googlesource.com/c/platform/build/soong/+/14640318

Change-Id: I14865260aaad92237e33788238cad46aa7508d69
2021-05-19 14:47:53 +00:00
Paul Duffin
59db6d4c5d Workaround to make AlwaysUsePrebuiltSdks() work with platform_bootclasspath
The AlwaysUsePrebuiltSdks() causes all java_sdk_library_import modules
to be preferred over the source, i.e. as if they had prefer: true set.
That interacts badly with the work that is being done to integrate the
bootclasspath_fragment/platform_bootclasspath modules into the build.

It would work fine once that integration has been completed but in the
interim it causes problems. e.g. it does not cause a problem in AOSP
because those java_sdk_library_import modules that are affected have
already been integrated into the build properly.

Unfortunately, internally that is not the case because there are
java_sdk_library/java_sdk_library_import modules that still need to
be updated.

Before the java_sdk_library_import can be safely preferred each
java_sdk_library/java_sdk_library_import module that contributes to the
bootclasspath must:
* Be in the contents of matching bootclasspath_fragment and
  prebuilt_bootclasspath_fragment modules.
* Have an apex and one of a prebuilt_apex/apex_set that contains the
  dex implementation jar and lists the prebuilt_bootclasspath_fragment
  name in its exported_bootclasspath_fragments property.

Safely preferred in this context means that the whole build will
continue to work rather than the current situation which is that only
some of the build will work and some will fail if an attempt is
actually made to build it.

Unfortunately, many java_sdk_library_import modules are missing:
* The prebuilt_bootclasspath_fragment.
* The exported_bootclasspath_fragments property on the
  prebuilt_apex/apex_set that contains them.

Together these cause the following symptoms:
1. The java_sdk_library_import does not have a dex implementation jar.
2. The java_sdk_library_import does not have a myapex variant.

These workarounds will avoid Soong reporting build failures. However,
the build will still fail if an attempt is made to build anything
produced by the platform-bootclasspath, e.g. hidden API processing or
a system image.

Bug: 188505921
Bug: 179354495
Test: m TARGET_BUILD_APPS=Calendar
Change-Id: I3226e21cd6a7f9e4d6bbe94e54129ac5e1d4c679
2021-05-19 14:12:45 +00:00
Rupert Shuttleworth
06559d07cb Move some implicitly shared testing code for bp2build into testing.go.
Test: go test
Change-Id: I403d703184e517dbffbdccb8007229cad00858c1
2021-05-19 09:14:26 -04:00
Paul Duffin
f2fa0b5e8e Test dex jar paths provided to apex by bootclasspath_fragment
This change adds a test to verify the existing behavior to provide a
baseline against which following changes can be compared.

Bug: 179354495
Test: m nothing
Change-Id: Ib7dadf3e65151f4e925251f7b1a9c099e824ea63
2021-05-19 13:48:25 +01:00
Martin Stjernholm
ef4cd82004 Merge changes Ibc673303,I70317eb8 am: b81b29c2f6 am: 6ad9cee907
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1711292

Change-Id: I7d8bf4e687d5f6e090087be39fcaf67756ad7e0b
2021-05-19 12:21:51 +00:00
Martin Stjernholm
6ad9cee907 Merge changes Ibc673303,I70317eb8 am: b81b29c2f6
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1711292

Change-Id: I4ae96a04ff422f0c67406e8a1086dd4a3fa9682a
2021-05-19 12:03:33 +00:00
Martin Stjernholm
b81b29c2f6 Merge changes Ibc673303,I70317eb8
* changes:
  Don't fail if the target module is disabled in dex2oat tool dependencies.
  Use oatdump rather than oatdumpd for boot jar boot.*.oatdump.txt files.
2021-05-19 11:47:07 +00:00
Paul Duffin
7487a7abb6 Workaround to make AlwaysUsePrebuiltSdks() work with platform_bootclasspath
The AlwaysUsePrebuiltSdks() causes all java_sdk_library_import modules
to be preferred over the source, i.e. as if they had prefer: true set.
That interacts badly with the work that is being done to integrate the
bootclasspath_fragment/platform_bootclasspath modules into the build.

It would work fine once that integration has been completed but in the
interim it causes problems. e.g. it does not cause a problem in AOSP
because those java_sdk_library_import modules that are affected have
already been integrated into the build properly.

Unfortunately, internally that is not the case because there are
java_sdk_library/java_sdk_library_import modules that still need to
be updated.

Before the java_sdk_library_import can be safely preferred each
java_sdk_library/java_sdk_library_import module that contributes to the
bootclasspath must:
* Be in the contents of matching bootclasspath_fragment and
  prebuilt_bootclasspath_fragment modules.
* Have an apex and one of a prebuilt_apex/apex_set that contains the
  dex implementation jar and lists the prebuilt_bootclasspath_fragment
  name in its exported_bootclasspath_fragments property.

Safely preferred in this context means that the whole build will
continue to work rather than the current situation which is that only
some of the build will work and some will fail if an attempt is
actually made to build it.

Unfortunately, many java_sdk_library_import modules are missing:
* The prebuilt_bootclasspath_fragment.
* The exported_bootclasspath_fragments property on the
  prebuilt_apex/apex_set that contains them.

Together these cause the following symptoms:
1. The java_sdk_library_import does not have a dex implementation jar.
2. The java_sdk_library_import does not have a myapex variant.

These workarounds will avoid Soong reporting build failures. However,
the build will still fail if an attempt is made to build anything
produced by the platform-bootclasspath, e.g. hidden API processing or
a system image.

Bug: 188505921
Bug: 179354495
Test: m TARGET_BUILD_APPS=Calendar
Change-Id: I3226e21cd6a7f9e4d6bbe94e54129ac5e1d4c679
Merged-In: I3226e21cd6a7f9e4d6bbe94e54129ac5e1d4c679
2021-05-19 11:42:20 +00:00
satayev
6bd823241f Use absolute paths in classpaths.proto.
The intention before was to use relative paths to a partition where a
config is defined. However, jars in /system_ext partition are planned to
be declared in /system's classpaths.proto config.

Bug: 180105615
Test: derive_classpath_test, CtsClasspathsTestCases
Change-Id: Icc3e1a903c34187cfcd67a3ae7bc3dd746445c03
Merged-In: Icc3e1a903c34187cfcd67a3ae7bc3dd746445c03
(cherry picked from commit 7d22657c45)
2021-05-19 12:22:23 +01:00
Jingwen Chen
f19b7100ed Merge "bp2build: export CommonGlobalIncludes to @soong_injection." am: 4ca2ca5413 am: fef72cb7da
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1710970

Change-Id: I1659c7def751bd620de8922dbdccaa2a16c3d4b4
2021-05-19 11:01:39 +00:00
Jingwen Chen
fef72cb7da Merge "bp2build: export CommonGlobalIncludes to @soong_injection." am: 4ca2ca5413
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1710970

Change-Id: I8c41d9f3c79c26a1534213e3c66ead0a06720643
2021-05-19 10:42:52 +00:00
Jingwen Chen
45dec1072b bp2build: avoid adding deps on system_shared_libs temporarily.
At least until libc and libm builds, which are the common values in
system_shared_libs. We don't have a way to break the cycle of:

libstdc++.so (system_shared_libs) -> libc.so -> ...(whole_static_libs) -> libstdc++.a (system_shared_libs) -> []

because bp2build just sees it as:

libstdc++ (system_shared_libs) -> libc -> (whole_static_libs) -> libstdc++ (system_shared_libs) -> libc -> ...

therefore creating a cycle.

This CL punts the problem for now by ignoring system_shared_libs in the cc deps mutator, with a TODO.

Test: TH

Bug: b/186024507
Bug: b/186489250
Change-Id: Id4744593af39b7eb3b31418c8afaeeac99a0ab5f
2021-05-19 10:30:29 +00:00
Jingwen Chen
4ca2ca5413 Merge "bp2build: export CommonGlobalIncludes to @soong_injection." 2021-05-19 10:21:41 +00:00
Treehugger Robot
7cd375713d Merge "Use absolute paths in classpaths.proto." am: c798d27e2c am: acc6169665
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1711290

Change-Id: I61fe2af32b02b05d6138969ec88af0ea03b26a6a
2021-05-19 10:05:33 +00:00
Treehugger Robot
acc6169665 Merge "Use absolute paths in classpaths.proto." am: c798d27e2c
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1711290

Change-Id: I02d2954da489baf5bd4c48fbc00471ca6f77fb77
2021-05-19 09:36:56 +00:00
Treehugger Robot
c798d27e2c Merge "Use absolute paths in classpaths.proto." 2021-05-19 09:14:05 +00:00
Luke Huang
088b53577d Fix the apex compatible issue on the platform Q
Adjust the statement to always check the min_sdk_version
for cc build module.

Test: forrest, TH
Change-Id: I9aceb7ba33baa23d193a6d554e7892a5d5f0effa
2021-05-19 16:48:22 +08:00
Jingwen Chen
2199995129 bp2build: export CommonGlobalIncludes to @soong_injection.
Test: TH
Fixes: 186035856
Change-Id: Iff336427694289c8913b58674e67fc0f792ad851
2021-05-19 05:53:51 +00:00
Treehugger Robot
53c9ef0c68 Merge "In the finder, keep track of BUILD files instead of only BUILD.bazel files." am: c6d212264d am: 00fdace6ab
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1710728

Change-Id: I50b588d325e8469943d2706c7369b4307f57ccb3
2021-05-18 23:37:08 +00:00
Christopher Parsons
fff800b34c Merge "Support middleman actions in mixed builds" am: f949ec20c0 am: 274da509db
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1711048

Change-Id: Ieb4e49f7e9e8c89e901bf744edcc9c5da449080a
2021-05-18 23:37:02 +00:00
Treehugger Robot
5067949d2f Merge "Remove libjemalloc5 and libc_jemalloc_wrapper from denylist." am: 1ff512573e am: 7f3ba8d67b
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1710530

Change-Id: Ie8c05c7cb33bcfa24725f0fd84cfcf4d54f0a988
2021-05-18 23:36:30 +00:00
Treehugger Robot
00fdace6ab Merge "In the finder, keep track of BUILD files instead of only BUILD.bazel files." am: c6d212264d
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1710728

Change-Id: Ia697a239c9091b8c38621546abae2826ac69641c
2021-05-18 23:32:03 +00:00
Christopher Parsons
274da509db Merge "Support middleman actions in mixed builds" am: f949ec20c0
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1711048

Change-Id: I1a9e80889f9a6e984c947c1bdb53c92876a63623
2021-05-18 23:31:49 +00:00
Treehugger Robot
7f3ba8d67b Merge "Remove libjemalloc5 and libc_jemalloc_wrapper from denylist." am: 1ff512573e
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1710530

Change-Id: I5f0935c9a23e608ded17631ab174e0b68e738880
2021-05-18 23:30:29 +00:00
Treehugger Robot
e8d48e4dbc Merge "Have bp2build generate BUILD.bazel instead of generating BUILD." am: 1deadca316 am: 8de0b38292
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1710729

Change-Id: Id85aaa74096fe44cd86545ce58c021509d4805eb
2021-05-18 23:26:14 +00:00