Commit Graph

46175 Commits

Author SHA1 Message Date
Liz Kammer
b84b8c9c9a Update bp2build denylist cause
The binary is converted; however, there are still issues with the host
toolchain.

Test: build/bazel/ci/bp2build.sh
Change-Id: Idf864ea6c64c0c7bbbaa0c9d43d6eac5120e0268
2021-11-02 15:03:12 -04:00
Wei Li
430d9cc257 Fix python_binary_host module in mixed build. am: 664a4fd0af am: f214e0730f
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1861755

Change-Id: Iff343725dcf997c2809ab586635c57fa57cc8ccb
2021-11-02 17:43:06 +00:00
Wei Li
f214e0730f Fix python_binary_host module in mixed build. am: 664a4fd0af
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1861755

Change-Id: I6d58352099ad262baf820b5fffb6c231665b562b
2021-11-02 17:25:17 +00:00
Wei Li
664a4fd0af Fix python_binary_host module in mixed build.
Test: USE_BAZEL_ANALYSIS=1 m genfunctosyscallnrs
Test: USE_BAZEL_ANALYSIS=1 m func_to_syscall_nrs
Test: USE_BAZEL_ANALYSIS=1 m libseccomp_policy
Bug: 201094425, 197135289

Change-Id: Ibc8b99a92149410c8a879b7a4facf6c8961a7b9f
2021-11-02 17:04:38 +00:00
Colin Cross
9191df23df Move bpglob out of ToolDir
ToolDir is going to become unstable when switching between KatiEnabled
and Soong-only builds while the duplication between out/soong/host and
out/host is resolved.  bpglob gets executed very early during bootstrap,
before the primary builder has run to update the paths to match the
current configuration.  Move it into SoongOutDir() so that its path
is more stable.

Moving bpglob causes incremental build issues, so add a bootstrapEpoch
constant that can be changed when making incompatible changes and will
wipe bootstrap intermediates.

Bug: 204136549
Test: m nothing
Change-Id: I7b1bd1ebfe1209d11db691b3ee00873ef92658cd
2021-11-02 15:30:36 +00:00
Ivan Lozano
8f7bf4891b Merge changes I2373d366,I908496d9 am: c7a4de25c1 am: 9729b0a9ed
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1877337

Change-Id: I391c8cfbb29a7bd9d8749d4f11a8c2ee769c1e6c
2021-11-02 13:05:23 +00:00
Ivan Lozano
9729b0a9ed Merge changes I2373d366,I908496d9 am: c7a4de25c1
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1877337

Change-Id: Id7cf46fe0e98bf51d2e3a9364513d64f18e09466
2021-11-02 12:52:15 +00:00
Ivan Lozano
c7a4de25c1 Merge changes I2373d366,I908496d9
* changes:
  rust: Add common interface for binaries
  rust: Support whole static libraries with any name
2021-11-02 12:37:11 +00:00
Mohammad Islam
3890a127dd Merge "Add exemption for test_framework-apexd and test_service-apexd jars" am: 569f032a9e am: 509ceec200
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1853102

Change-Id: I27efce4ac308d432e32b0abb4bc94bcc400575f3
2021-11-02 10:11:56 +00:00
Treehugger Robot
a444f8de69 Merge "Adding jdk.internal in the allowed package list" am: 31ec5a0709 am: 9ed051884a
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1877319

Change-Id: Ia98aab02b39e80a1018c3626665bd2ea67f0054a
2021-11-02 10:11:08 +00:00
Mohammad Islam
509ceec200 Merge "Add exemption for test_framework-apexd and test_service-apexd jars" am: 569f032a9e
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1853102

Change-Id: Ie0702dea8c36a8b6e4d3fd1f7e9e2b6a36190315
2021-11-02 09:07:15 +00:00
Treehugger Robot
9ed051884a Merge "Adding jdk.internal in the allowed package list" am: 31ec5a0709
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1877319

Change-Id: Idddbfa195edc8fc25b0cd96274ee3b8d2096a8d8
2021-11-02 09:05:55 +00:00
Mohammad Islam
569f032a9e Merge "Add exemption for test_framework-apexd and test_service-apexd jars" 2021-11-02 08:51:01 +00:00
Treehugger Robot
31ec5a0709 Merge "Adding jdk.internal in the allowed package list" 2021-11-02 08:49:31 +00:00
Dan Willemsen
6f9cc50d7e Drop support for pre-macOS 11 SDKs am: 1332eda6e0 am: a9b765c072
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1877741

Change-Id: I418b2b3124481307b6936a5547ecd0f37c200bf0
2021-11-02 07:37:38 +00:00
Dan Willemsen
a9b765c072 Drop support for pre-macOS 11 SDKs am: 1332eda6e0
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1877741

Change-Id: I2ed1298dd63bb84497a8276d87fc4bf22869c59e
2021-11-02 07:17:51 +00:00
Jingwen Chen
55bc820d66 bp2build: split Bazel conversion context into smaller ones,
and change TopDownMutatorContext signatures to use Bazel conversion context.

This minimizes the context interfaces/functions actually needed to
convert a module, and makes such interfaces easier to mock/test.

Test: CI
Change-Id: Id573d97023d59e06ef70e1f54437024d3f7aadbd
2021-11-02 06:51:27 +00:00
Jingwen Chen
80b6b64db5 Add an error check in bazelPackage for malformed labels.
Bug: 204281595
Test: CI
Change-Id: Ia94a0b5c8dd3a0294475e9bc816a19ae03f7342d
2021-11-02 06:24:31 +00:00
Dan Willemsen
648df28c38 Add Darwin+Arm64 toolchain support am: 8528f4ec5e am: e44a424acc
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1863969

Change-Id: I38f8bef55ec86a44cf3ebc3ad5df3cd92885b233
2021-11-02 05:58:40 +00:00
Dan Willemsen
e44a424acc Add Darwin+Arm64 toolchain support am: 8528f4ec5e
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1863969

Change-Id: I011b3fb63d4bdc2723e06a58ab598a0aa336a598
2021-11-02 05:40:08 +00:00
Colin Cross
34c7832aaa Convert .meta_lic files to textproto
Make it easier to write tools against .meta_lic files and store complex
data by writing them in textproto.

Test: builds

Change-Id: I54bb82cc5581d17078fd0f56eed43a7364dc70db
2021-11-01 16:32:31 -07:00
Dan Willemsen
1332eda6e0 Drop support for pre-macOS 11 SDKs
As they can't built arm64 binaries. All of our master-based builds are
now running on macOS 11 buildbots.

Bug: 203607969
Change-Id: I24c34a8365a399fbe43629ab5a22a1d53e3429b3
2021-11-01 16:04:43 -07:00
Dan Willemsen
8528f4ec5e Add Darwin+Arm64 toolchain support
This just sets up the toolchain and allows Darwin+Arm64 to be specified
as a HostCross target. These variants will not be exported to Make, or
be installed on a Soong-only build. A future CL will add support for
universal binaries using these variants.

This config is a bit stranger than the regular 64/32 multilib, as it's
two primary 64-bit configs. And on a Darwin/X86 machine, the Arm64
versions are HostCross (doesn't work on the current machines), while a
Darwin/Arm64 machine, either version works (if Rosetta is installed).

Bug: 203607969
Change-Id: Iacaed77d267773672da027cd74917e33fb1c1e94
2021-11-01 15:07:37 -07:00
Colin Cross
5e5d6332b4 Merge "Export Soong install rules to Make" am: 1caea35278 am: 7f5f69f9ba
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1869552

Change-Id: Idf2e8d7503f49ea3df962ee1ca6a26daf9360ad6
2021-11-01 22:05:02 +00:00
Colin Cross
7f5f69f9ba Merge "Export Soong install rules to Make" am: 1caea35278
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1869552

Change-Id: If4139b06b8e07ab7cddb9ed1f428495e7dafe0d8
2021-11-01 21:47:57 +00:00
Colin Cross
1caea35278 Merge "Export Soong install rules to Make" 2021-11-01 21:31:56 +00:00
Treehugger Robot
2c812cb270 Merge "Create prebuilt system modules for all API scopes" am: 2bbd2c55c5 am: ef70b722db
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1875855

Change-Id: Idd1b95efd88354e04110e82f88f4b934e2c0e6a8
2021-11-01 19:51:23 +00:00
Treehugger Robot
ef70b722db Merge "Create prebuilt system modules for all API scopes" am: 2bbd2c55c5
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1875855

Change-Id: I180ae8fa05ab72e4e3c6c0cce5a19eea55d6f395
2021-11-01 19:33:16 +00:00
Treehugger Robot
2bbd2c55c5 Merge "Create prebuilt system modules for all API scopes" 2021-11-01 19:16:03 +00:00
Ivan Lozano
21fa0a5844 rust: Add common interface for binaries
Structs embedding binaryDecorator (rust_test, rust_benchmark, rust_fuzz)
are binaries as well, but won't pass checks against *binaryDecorator,
such as the check in StaticExecutable().

Add a binaryInterface that can be checked instead to simplify these
checks and ensure we catch all binaries.

Bug: 170672854
Test: rust_test, rust_benchmark return true StaticallyLinked
Change-Id: I2373d3663373a6977260785602a02d39a41320fe
2021-11-01 14:57:44 -04:00
Ivan Lozano
fdadcd7937 rust: Support whole static libraries with any name
This CL allows binaries to depend on whole static libraries which
don't begin with the 'lib' prefix.

Bug: 170672854
Test: Whole static library that doesn't have lib prefix can be linked
Change-Id: I908496d9369c7bec3232e2feed0599f6cf6d9383
2021-11-01 14:56:59 -04:00
Treehugger Robot
49753eca77 Merge changes I346ac9c0,I57352aa0 am: 57be76d9ac am: 061abc7259
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1875854

Change-Id: Ie794197f49ea4825f477d34cea074efe5f1169ff
2021-11-01 18:53:07 +00:00
Treehugger Robot
061abc7259 Merge changes I346ac9c0,I57352aa0 am: 57be76d9ac
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1875854

Change-Id: I2bfef4479f413f4eca23a831612b4277e27c49c3
2021-11-01 18:27:36 +00:00
Treehugger Robot
57be76d9ac Merge changes I346ac9c0,I57352aa0
* changes:
  Make prebuilt_api test environment realistic
  Add test for prebuilt_apis creation of system modules
2021-11-01 18:11:06 +00:00
Treehugger Robot
074031e402 Merge "Make manifest_check errors colorful." am: 0888700fe1 am: d2a38198e0
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1877316

Change-Id: Ic76f22379b2c6c1586f89c8bcf4669621c1db53e
2021-11-01 17:46:53 +00:00
Treehugger Robot
d2a38198e0 Merge "Make manifest_check errors colorful." am: 0888700fe1
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1877316

Change-Id: Idd8323833406b0e358abb947c615ff889ccf1d11
2021-11-01 17:29:05 +00:00
Treehugger Robot
0888700fe1 Merge "Make manifest_check errors colorful." 2021-11-01 17:11:52 +00:00
Paul Duffin
9474d1a187 Dist API specific core-for-system-modules am: bce9f08d02 am: 381f698843
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1873693

Change-Id: I51465180108017ffe8f492b909a53056a3807ac0
2021-11-01 16:44:12 +00:00
Paul Duffin
004547facd Use module-lib system modules when building from prebuilts
When building from source the build uses the java system modules for
the public or module APIs as needed. However, previously when building
from prebuilts it would always use the public API. That difference lead
to build failures when building from prebuilts.

This change makes the selection of java system modules when building
from prebuilts consistent with the selection when building from
sources.

As API levels 30 and 31 (which are the only previous releases to
provide system modules) did not provide separate java system modules
for the module-lib API those levels always use the public APIs.

Bug: 204189791
Test: - before applying these change
      m TARGET_BUILD_APPS=framework-connectivity
      - build fails with compilation error due to missing module APIs
      m sdk dist
      cp out/dist/system-modules/module-lib/core-for-system-modules.jar prebuilts/sdk/current/module-lib/core-for-system-modules.jar
      - apply these changes
      m TARGET_BUILD_APPS=framework-connectivity
      - build passes as expected
Change-Id: Id113ff014e7892b1009fbcaad89b1ae23a7c3b79
2021-11-01 16:40:28 +00:00
Paul Duffin
b077bcc6bc Create prebuilt system modules for all API scopes
Previously, system modules were only created for the public API scope.
This change creates them for any API scope as long as its directory has
a core-for-system-modules.jar.

It does that by hooking into the existing logic for creating a
java_import for all jars in the API directories and creating a
java_system_modules for every core-for-system-modules.jar file. That
avoids the need for extra path globs.

Test: m droid
      m sdk_public_current_system_modules
      - works as expected.
      m sdk_module-lib_current_system_modules
      - fails with missing target as expected.
      touch prebuilts/sdk/current/module-lib/core-for-system-modules.jar
      m sdk_module-lib_current_system_modules
      - fails with invalid jar file as expected.
Bug: 204189791
Change-Id: I27a264941009e03439d5d847dab14a7b4f6f119f
2021-11-01 16:37:49 +00:00
Paul Duffin
1cad3a53db Make prebuilt_api test environment realistic
Previously, the fixture preparer for prebuilt_apis would add a
core-for-system-modules.jar file in every API directory even though
currently they only exist in the public API directories.

This change makes the test environment more realistic by only creating
them for the public API. Rather than hard code that into the test code
(which would duplicate the hard coding in the decodeSdkDep func) this
extracts a function that is used by both. That ensures that any changes
to that func will be reflected in both the test and runtime behavior.

Bug: 204189791
Test: m nothing
Change-Id: I346ac9c0dcf407c61de16b6027663a05821bcf62
2021-11-01 16:36:23 +00:00
Paul Duffin
6d448b7a0a Add test for prebuilt_apis creation of system modules
Previously, there were no tests for this (outside uses in other tests).
This change adds a test that uses the fixture preparers that create a
prebuilt_api in order to make prebuilt APIs available. That ensures
that both the prebuilt_api is working as expected and the preparer
creates a realistic test environment.

Bug: 204189791
Test: m nothing
Change-Id: I57352aa00f7b268e5286be92f177764dd63ba7e8
2021-11-01 16:36:02 +00:00
Paul Duffin
381f698843 Dist API specific core-for-system-modules am: bce9f08d02
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1873693

Change-Id: Ic4206df7453370b3073a4656843d1bfadafadf8b
2021-11-01 16:13:34 +00:00
Ulya Trafimovich
b4c19f8a31 Make manifest_check errors colorful.
Insert ANSI escape codes in the error text. Colors are red, blue, green
and some text is in bold --- these are all bright enough on either dark
or light background.

Also, add a link to the online documentation.

Bug: 132357300
Test: manually mangle one of Android.bp files to get a manifest_check
  error and observe that it is colorful.
Change-Id: I2af2aa0415d0eb0eabc88dc5504198e11bfb91b6
2021-11-01 14:39:46 +00:00
Sorin Basca
ca4ab1a7a8 Adding jdk.internal in the allowed package list
This is needed for adding jdk.internal.HotSpotIntrinsicCandidate as a no-op

Bug: 202495224
Test: m
Change-Id: Ib97a7fe955d920aca93630d1d5b04fedff1af960
2021-11-01 14:20:33 +00:00
Paul Duffin
bce9f08d02 Dist API specific core-for-system-modules
Previously, the dist only contained a core-for-system-modules.jar for
the public API. This change adds API specific directories containing a
core-for-system-modules.jar file for each of the following APIs:
* public
* module-lib

Bug: 204189791
Test: rm -fr out/dist
      m sdk dist
      find out/dist -name core-for-system-modules.jar
      - outputted the following:
      out/dist/core-for-system-modules.jar
      out/dist/system-modules/module-lib/core-for-system-modules.jar
      out/dist/system-modules/public/core-for-system-modules.jar
Change-Id: Id1845926e2085f70d58e9fc22e9c11cb3d62b919
2021-11-01 14:01:39 +00:00
Joe Onorato
c1ce0ed41c Merge "Add support for java streaming proto" am: 22e973c539 am: a224d53694
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1874416

Change-Id: I2898febfd2f709d07bef0b92b9f067ead51a3910
2021-11-01 00:40:40 +00:00
Joe Onorato
a224d53694 Merge "Add support for java streaming proto" am: 22e973c539
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1874416

Change-Id: I2b61650dee7adddcd3ce116a2dfd5b7ceb587ee4
2021-11-01 00:26:18 +00:00
Joe Onorato
22e973c539 Merge "Add support for java streaming proto" 2021-11-01 00:14:59 +00:00
Colin Cross
204c59ef91 Merge changes I04f2f558,Ie16a6264,I83a3be9f,Icb3eeef3 am: 91eaa6316a am: 19aa461cc0
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1869551

Change-Id: I512a0433e8517e7062fb9929e2f80d48ae23036b
2021-10-30 19:55:35 +00:00