Commit Graph

44676 Commits

Author SHA1 Message Date
Martin Stjernholm
50c2a30ffa Merge "Remove fallback workaround for APEX variants which is now unnecessary." am: 3931b8c70d
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1756730

Change-Id: If29fac31f319229cd877d38b3852698815664e54
2021-08-18 08:56:47 +00:00
Martin Stjernholm
3931b8c70d Merge "Remove fallback workaround for APEX variants which is now unnecessary." 2021-08-18 08:37:06 +00:00
Aurimas Liutikas
39e4a5170a Merge "Propagate <uses-library> dependencies from android_library to apps." am: 91436f469a
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1798212

Change-Id: Iba9ef35a2af0b78a4ef093070e048af2a44d9f83
2021-08-17 23:04:32 +00:00
Treehugger Robot
d44adf7ff7 Merge "Apply pylint to cc/symbolfile" am: 68a240badb
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1797009

Change-Id: I99f9dc6de576e7c966e6096033e8f232ebe3fa21
2021-08-17 23:04:18 +00:00
Aurimas Liutikas
91436f469a Merge "Propagate <uses-library> dependencies from android_library to apps." 2021-08-17 22:49:51 +00:00
Treehugger Robot
68a240badb Merge "Apply pylint to cc/symbolfile" 2021-08-17 22:44:37 +00:00
Xin Li
8ded89b1bf Merge "Merge sc-dev-plus-aosp-without-vendor@7634622" into stage-aosp-master 2021-08-17 18:14:22 +00:00
Ulya Trafimovich
42c7f0d173 Propagate <uses-library> dependencies from android_library to apps.
Automatically add `uses_libs`/`optional_uses_libs` properties specified
in `android_library` modules to the apps that transitively depend on
these libraries.

Note that a library may choose to specify its <uses-library> deps as
either optional or required. If this is not the right choice for an app,
it should be able to override it by specifying its own `uses_libs`/
`optional_uses_libs` properties.

Bug: 196377222
Test: lunch aosp_cf_x86_64_phone-userdebug && m
Change-Id: I1e36c56719c0023dcd25fa6aeb92016471702b9f
2021-08-17 16:58:20 +01:00
Lukács T. Berki
6eb2cd3622 Merge changes from topics "remove-blueprint-main", "remove-some-minibp", "remove-srcdir" am: 0dd067d309
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1796650

Change-Id: I923353cdc909c6a82423e4c816cdd22014e7993e
2021-08-17 15:14:23 +00:00
Lukacs T. Berki
98bd32f3ed Define command line args in soong_build . am: f9008075d9
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1796647

Change-Id: Ie2151b807a12fc72dbd621930d8df227bc195dc6
2021-08-17 15:14:20 +00:00
Lukacs T. Berki
47eaa44acb Move bpglob to .bootstrap from .minibootstrap. am: 9d7cf6a336
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1796438

Change-Id: I47db48ebf03d5ce4adb1d410c23327d544ae53e3
2021-08-17 15:14:19 +00:00
Lukács T. Berki
0dd067d309 Merge changes from topics "remove-blueprint-main", "remove-some-minibp", "remove-srcdir"
* changes:
  Remove Srcdir() from BootstrapConfig.
  Define command line args in soong_build .
  Move bpglob to .bootstrap from .minibootstrap.
2021-08-17 14:55:09 +00:00
Treehugger Robot
bcd4f66a27 Merge "Most of the TARGET_COPY_OUT_xxx variables are not constant" am: 860f42c119
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1797012

Change-Id: Ia52d1e7e5e7c1fb6d8d46036753a88c367b6682d
2021-08-17 13:17:02 +00:00
Treehugger Robot
860f42c119 Merge "Most of the TARGET_COPY_OUT_xxx variables are not constant" 2021-08-17 13:05:31 +00:00
Sasha Smundak
02183cfc53 Most of the TARGET_COPY_OUT_xxx variables are not constant
Bug: 193566316
Test: internal
Change-Id: I484a88de933904a2ac2e36084509838d7a85262c
2021-08-16 13:39:48 -07:00
Spandan Das
73de70264a Apply pylint to cc/symbolfile
PEP8 recommends using the not operator over comparision to empty string

Test: pytest build/soong/cc/symbolfile/test_symbolfile.py
Test: pylint --rcfile tools/repohooks/tools/pylintrc
build/soong/cc/symbolfile
Bug: 195738175

Change-Id: I4ed2bc0680beccc19a63d8b3f383983d4dff1baf
2021-08-16 18:59:57 +00:00
Alex Márquez Pérez Muñíz Díaz Púras Thaureaux
645f09bea9 Merge "Expose Soong's default clang versions to Bazel" am: 37abc3c343
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1795147

Change-Id: I85e73990886341295f3f35c1aa4461f272c36b96
2021-08-16 18:29:16 +00:00
Alex Márquez Pérez Muñíz Díaz Púras Thaureaux
37abc3c343 Merge "Expose Soong's default clang versions to Bazel" 2021-08-16 18:08:03 +00:00
Lukacs T. Berki
f7e36d80ff Remove Srcdir() from BootstrapConfig.
It was always ".".

Test: Presubmits.
Change-Id: I5381002b3f2986122f1b335a88119cead0a86d75
2021-08-16 17:05:09 +02:00
Lukacs T. Berki
f9008075d9 Define command line args in soong_build .
They used to be defined in Blueprint but since it doesn't have a
separate existence anymore, we can consolidate all command line
arguments here.

Note that Blueprint is called directly from soong_ui, but that happens
by a simple Go function call and not by invoking a separate binary, so
command line arguments are not needed there.

Test: Presubmits.
Change-Id: Ifa2c101ddbe424b76fc5a508d3d41c329e7353ca
2021-08-16 15:29:02 +02:00
Lukacs T. Berki
9d7cf6a336 Move bpglob to .bootstrap from .minibootstrap.
Test: Presubmits.
Change-Id: If6315e497cdc0e6c0f348eb9d4b596ebd13d6303
2021-08-16 14:08:57 +02:00
Lukacs T. Berki
8860d26219 Separate the files of bp2build and soong_build. am: 56ebaf35b3
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1794527

Change-Id: Ic0ec30647a9f2581444918e4735253defbe38c87
2021-08-16 10:02:43 +00:00
Lukacs T. Berki
56ebaf35b3 Separate the files of bp2build and soong_build.
The following files are forked:

- build-globs.ninja
- The glob list files
- .d files for the glob list files
- The output file (build.ninja or the bp2build marker file)

This makes bp2build and soong_build not overwrite each other's files
they need for proper incrementality.

Test: Presubmits.

Change-Id: I69d192cbd36ecd9677f46f3fa095dfce6f872227
2021-08-16 09:15:28 +02:00
Martin Stjernholm
0e17c1a57e Remove fallback workaround for APEX variants which is now unnecessary.
Test: m nothing
Bug: 191269918
Change-Id: I13091d5ffdd46947899db273b9cb2399dda23907
2021-08-15 22:32:37 +01:00
Xin Li
3eaa6bcecf Merge sc-dev-plus-aosp-without-vendor@7634622
Merged-In: I10ff6a5df76852f0a22fe3ac22df764528f07423
Change-Id: I71f2397f425a46d346e49ac422d256d7e049c7a2
2021-08-14 06:30:56 +00:00
Aurimas Liutikas
4926ea3b85 Merge "Fix the way manifest fixer detects optional <uses-library> entries." am: 15c82a10de
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1794528

Change-Id: I4b456e8b73e90d175e3c06458b1a00e870e7ff48
2021-08-13 21:27:51 +00:00
Aurimas Liutikas
15c82a10de Merge "Fix the way manifest fixer detects optional <uses-library> entries." 2021-08-13 21:00:35 +00:00
Ivan Lozano
951f8669c5 Merge "rust: Allow modules to use only generated sources" am: 0ad64f50fd
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1792593

Change-Id: I04f29876af8675001991a5c0f457dedce1ec1f1c
2021-08-13 19:49:16 +00:00
Ivan Lozano
0ad64f50fd Merge "rust: Allow modules to use only generated sources" 2021-08-13 19:37:04 +00:00
Ivan Lozano
7381e6a503 rust: Link libunwind into Rust static executables. am: 8711c5cf8c
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1795768

Change-Id: Ia655559910aa60a5b9a099a697f413f89ead2d8c
2021-08-13 19:31:52 +00:00
Alex Márquez Pérez Muñíz Díaz Púras Thaureaux
a38e518eb9 Expose Soong's default clang versions to Bazel
As `CLANG_DEFAULT_*VERSION` static strings

Bug: 192058388
Test: Existing tests pass
Change-Id: I047bc3ad9626bf67c12a0b0ac76943c79fb1b4b0
2021-08-13 17:44:07 +00:00
Ivan Lozano
e4db0036d7 rust: Allow modules to use only generated sources
Removes the need for rust_test modules that test generated source to
define a source file that simply calls include()! to pull in the
generated source.

Bug: 196076408
Test: m libselinux_bindgen_test
Change-Id: I600301ab74f6ece861916fa2545b061c81b0d92d
2021-08-13 13:37:19 -04:00
Ivan Lozano
8711c5cf8c rust: Link libunwind into Rust static executables.
Rust static executables fail to build due to missing unwind symbols.
Make sure we link libunwind when building these.

Bug: 194386505
Test: rust_binary with static_executable: true builds.
Change-Id: I74bab25e186e181bc1ac8fdd608687707c662e4d
2021-08-13 13:15:31 -04:00
Ulya Trafimovich
fc0f6e34ce Fix the way manifest fixer detects optional <uses-library> entries.
Previously manifest_fixer used a naive way to distiniguish optional libs
from required ones: it checked if a library is on the list of optional
compatibility libraries. This works for compatibility libs, but not for
other libs.

Now we properly track optionality through all stages of the build,
starting with the addition of the library as a dependency (here's where
the `uses_libs`/`optional_uses_libs` distinction kicks in), store it in
dependency tag and propagate to class loader context, and from there to
the manifest_fixer.

The tests have been updated accordingly.

Bug: 196377222
Test: lunch bertha_x86_64-userdebug && m droid dist cts mts
Change-Id: I3631ce59ebe47116ce7a9b3d33a86f636846ef0f
2021-08-13 16:10:42 +01:00
Liz Kammer
1b621b9c95 Merge "Add some initial benchmarking for bp2build." am: e21bb67be9
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1786668

Change-Id: I27461ae0e155b224272cea63a61f825c3290f3a9
2021-08-13 14:31:54 +00:00
Liz Kammer
e21bb67be9 Merge "Add some initial benchmarking for bp2build." 2021-08-13 14:17:11 +00:00
Jingwen Chen
195c97ec7f Merge "Revert "Exempt prebuilts/jdk and build/bazel/examples/java BUILD..."" am: 76738b1c45
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1795128

Change-Id: I1f29cb527f22a5daca72e224e292c9930644d76b
2021-08-13 05:31:48 +00:00
Jingwen Chen
76738b1c45 Merge "Revert "Exempt prebuilts/jdk and build/bazel/examples/java BUILD..."" 2021-08-13 05:18:56 +00:00
Treehugger Robot
6e5245d884 Merge "Exempt subfolders of packages/apps/Music from bp2build BUILD file overriding." am: 6c00d24a1f
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1794487

Change-Id: Ic8affc6a4dd4da0f1e21b246868589fbe879387f
2021-08-13 03:16:31 +00:00
Treehugger Robot
6c00d24a1f Merge "Exempt subfolders of packages/apps/Music from bp2build BUILD file overriding." 2021-08-13 03:04:25 +00:00
Alex Humesky
e9b3738bad Revert "Exempt prebuilts/jdk and build/bazel/examples/java BUILD..."
Revert submission 1789607-java_android_ci

Reason for revert: doesn't work with lunch
Reverted Changes:
I6f82e4984:Exempt prebuilts/jdk and build/bazel/examples/java...
I75a61c24c:Define a java_runtime and toolchain bazel targets ...
I0f107d334:Add a java binary, a java library, and an android ...

Change-Id: I9869424dd44c03b33ac02ab38e4a3e0deee9eb07
2021-08-13 02:06:23 +00:00
Treehugger Robot
b3eb5721f3 Merge "Update documentation for VisitDirectDeps" am: 1e6760fc71
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1786671

Change-Id: I063185fe2439010155366a7af1087cf2d0e9dd98
2021-08-13 00:07:00 +00:00
Treehugger Robot
1e6760fc71 Merge "Update documentation for VisitDirectDeps" 2021-08-12 23:46:36 +00:00
Alex Márquez Pérez Muñíz Díaz Púras Thaureaux
18adeee3c9 Add infrastructure to support PythonBinary am: a05a255eac
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1793170

Change-Id: Iba029a30aaf1246c135d00341861b37e9628da7f
2021-08-12 22:01:44 +00:00
Liz Kammer
32b77cf8a8 Add some initial benchmarking for bp2build.
Test: go test -benchmark=. in bp2build directory
Change-Id: I8275c38461078cc6100fbc89837177de0edc9d68
2021-08-12 15:54:38 -04:00
Alex Márquez Pérez Muñíz Díaz Púras Thaureaux
a05a255eac Add infrastructure to support PythonBinary
Add a new request type with its own StarLark function
Hook it up via GetPythonBinary
Add to MockBazelContext a LabelToPythonBinary
Add a test for the new request type

Test: request_type_test.go:TestGetPythonBinaryParseResults
Change-Id: I05f6506adfbbdac8b3f40475509ed02ab8e844e5
2021-08-12 18:48:15 +00:00
Ivan Lozano
27e3617a81 Merge "rust: Add support to emit certain Cargo env vars." am: dd7107c84b
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1792594

Change-Id: I3d375478aaabff8df7e260a738735c88bef80ea9
2021-08-12 17:25:39 +00:00
Ivan Lozano
dd7107c84b Merge "rust: Add support to emit certain Cargo env vars." 2021-08-12 17:05:39 +00:00
Yuntao Xu
294e0de163 Merge "Add Platform_sdk_version_or_codename variable" am: fc30cfc7ae
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1790963

Change-Id: I5c073984fb4be2c4452ce8ebd07f770b7c789327
2021-08-12 16:33:33 +00:00
Yuntao Xu
fc30cfc7ae Merge "Add Platform_sdk_version_or_codename variable" 2021-08-12 16:09:32 +00:00