Commit Graph

46912 Commits

Author SHA1 Message Date
Treehugger Robot
3bcefabfeb Merge changes I08ec0b44,I79b5a1fc,I469d6558 am: 6abfb33784
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1907862

Change-Id: I8d132015e8cbd7c239dc044dd2e6c0bf95665bc6
2021-12-08 18:13:49 +00:00
Allen Hair
952ebe85f0 Merge "Revert "Set targetsdkversion to future level if TARGET_BUILD_APPS is not empty"" am: 9df0fa5e63
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1914027

Change-Id: Ia35a8a3e1094d2d7c3355e66395dfa7b6880ead7
2021-12-08 18:12:54 +00:00
Treehugger Robot
6abfb33784 Merge changes I08ec0b44,I79b5a1fc,I469d6558
* changes:
  Allow java_sdk_library in an APEX to have higher min_sdk_version.
  Perform CheckMinSdkVersion for java_sdk_library.
  Add MinSdkVersion(ctx) method to ModuleWithMinSdkVersionCheck interface.
2021-12-08 17:58:24 +00:00
Allen Hair
9df0fa5e63 Merge "Revert "Set targetsdkversion to future level if TARGET_BUILD_APPS is not empty"" 2021-12-08 17:54:57 +00:00
Vladimir Marko
7e556310b9 Merge "Stop installing a profile into an APEX if profiles are disabled." am: edd6fde587
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1913479

Change-Id: Ic8051e916e4b6679c626ff4086b8d90b611fd012
2021-12-08 15:48:19 +00:00
Vladimir Marko
edd6fde587 Merge "Stop installing a profile into an APEX if profiles are disabled." 2021-12-08 15:29:14 +00:00
Treehugger Robot
6c8f0b3890 Merge "Support rust_toolchain_library for rust-project" am: a85f7bde32
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1913472

Change-Id: Ieb965dbbd60cdc2936c552895b828edb2a046228
2021-12-08 14:36:50 +00:00
Treehugger Robot
a85f7bde32 Merge "Support rust_toolchain_library for rust-project" 2021-12-08 14:14:34 +00:00
Nikita Iashchenko
004405ed8a Merge "Add jdk.internal.ref to package_allowed_list.txt (OpenJDK 11)" am: 84bec80023
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1818345

Change-Id: Idacc12bb5f9504b4e9c862bacf2c137855c31aaa
2021-12-08 13:47:43 +00:00
Liz Kammer
8534a37261 Merge "Propagate headers from bazel to mixed builds" am: 92d4188c2b
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1912212

Change-Id: I80abd9375d5acc7b5b0a18de975227df239075fd
2021-12-08 13:47:24 +00:00
Nikita Iashchenko
84bec80023 Merge "Add jdk.internal.ref to package_allowed_list.txt (OpenJDK 11)" 2021-12-08 13:40:44 +00:00
Liz Kammer
92d4188c2b Merge "Propagate headers from bazel to mixed builds" 2021-12-08 13:24:08 +00:00
satayev
758968a700 Allow java_sdk_library in an APEX to have higher min_sdk_version.
Inidividual boot or system server jars may have higher min_sdk_version
than the contianing apex, since the runtime respects the values of
min/max_sdk_version; e.g. runtime would not load a boot jar with
higher min_sdk_version. This allows shipping new boot jars via apexes
that target older platforms.

Bug: 190818041
Test: presubmit
Change-Id: I08ec0b4463a17bc8265b948fe09da55eb4e52ac3
2021-12-08 11:36:34 +00:00
satayev
8f088b09d8 Perform CheckMinSdkVersion for java_sdk_library.
In a follow up, apex would expect that any module that implements
ModuleWithMinSdkVersionCheck to have performed appropate checks on
min_sdk_version, to allow relaxing some of the existing conditions.

This change moves the responsibility of checking min_sdk_version
of java_sdk_library to java_sdk_library itself.

Bug: 205923322
Test: presubmit
Change-Id: I79b5a1fc34098fff60221e416db6e6e69e01f531
2021-12-08 11:36:34 +00:00
satayev
ad99149a62 Add MinSdkVersion(ctx) method to ModuleWithMinSdkVersionCheck interface.
Bug: 205923322
Test: presubmit
Change-Id: I469d655823e12a14bc0abaeb544a5dd2a6d3622f
2021-12-08 11:36:31 +00:00
Jiakai Zhang
29e35e115d Stop installing a profile into an APEX if profiles are disabled.
Bug: 209630530
Test: art/tools/golem/build-target.sh
Change-Id: I0ac4e1860a47da20626b423b9b1f62dd49259deb
2021-12-08 11:05:19 +00:00
Thiébaud Weksteen
566eb80d3c Support rust_toolchain_library for rust-project
Bug: 209678277
Test: SOONG_GEN_RUST_PROJECT=1 m nothing; check that libstd is included
Change-Id: Ic197e00bc4695aa6dcd46b8c704a82a2e5e90460
2021-12-08 17:54:19 +11:00
Treehugger Robot
bf92b6d44e Merge "Add (obj|tidy)-*_os, and (obj|tidy)-*_subset targets" am: 939cb7b028
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1852749

Change-Id: I475e6901bebbc7f9b5a9b2efe8c04eb5b5ec0020
2021-12-08 06:21:37 +00:00
Treehugger Robot
939cb7b028 Merge "Add (obj|tidy)-*_os, and (obj|tidy)-*_subset targets" 2021-12-08 06:03:14 +00:00
Treehugger Robot
cd53bf5bee Merge "Update clang version to clang-r437112" am: 4efcb9d81a
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1913743

Change-Id: Iba7a12a6034585d5c1c7cc3cf9feb6988ae4c9b4
2021-12-08 04:16:31 +00:00
Treehugger Robot
4efcb9d81a Merge "Update clang version to clang-r437112" 2021-12-08 04:00:23 +00:00
Kun Niu
131a5a13fe Revert "Set targetsdkversion to future level if TARGET_BUILD_APPS is not empty"
This reverts commit e33e25b4a5.

Reason for revert: may causing b/209301265,
Test: https://android-build.googleplex.com/builds/abtd/run/L66400000952203490
Change-Id: Ifcccdcfbfc014d4172f4d9488ea699380d3f3ebe
2021-12-08 00:44:07 +00:00
Chih-Hung Hsieh
253fd0609d Update clang version to clang-r437112
Bug: 201432564
Test: make
Change-Id: Idad9e1154b2c65eb29b7682c205f7bb50af17f0b
2021-12-07 15:24:38 -08:00
Treehugger Robot
f0f598bc17 Merge "Add vendor_available: true to libbuildverison" am: d2d8e322f1
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1912416

Change-Id: I1edc9dcf067047e8414f1863c5b740084efc2f50
2021-12-07 21:52:13 +00:00
Treehugger Robot
d2d8e322f1 Merge "Add vendor_available: true to libbuildverison" 2021-12-07 21:20:27 +00:00
Chih-Hung Hsieh
80783774b9 Add (obj|tidy)-*_os, and (obj|tidy)-*_subset targets
* The obj-* targets only call clang or clang++ to compile
  C/C++ files, like the tidy-* targets only call clang-tidy.
* Add (obj|tidy)-dir_os and module_os-(obj|tidy) phony targets
  to include only targets of the specified OS.
* Add (obj|tidy)-dir_os_subset and module_os_subset-(obj|tidy) phony targets
  to include only a subset of that OS target group.
  * Most clang-tidy runs produce the same warnings for all variants
    of an OS. The *_subset targets reduce runs over multiple variants.
  * The obj-*subset targets are useful for a quick test to compile
    at least one variant of every C/C++ file for each OS.
* The (obj|tidy)-soong phony target is changed to include only
  (obj|tidy)-top_level_directory targets instead of ALL
  module-(obj|tidy) targets in all subdirectories.
* For aosp_arm64-eng make tidy-* targets; count NINJA commands:
    tidy-soong                     381K
    tidy-soong_subset              106K
    tidy-soong_android             294K
    tidy-soong_android_subset       73K
    tidy-soong_linux_glibc          84K
    tidy-soong_windows              12K
    tidy-bionic                     12K
    tidy-bionic_subset               2.4K
    tidy-bionic_android             11.5K
    tidy-bionic_android_subset       2.1K
    tidy-bionic_linux_glibc          1K
    tidy-device_android              7K
    tidy-device_android_subset       5K
    tidy-hardware_android            3K
    tidy-hardware_android_subset     9K
    libfec_rs-tidy                   33
    libfec_rs_subset-tidy             9
    libfec_rs_android-tidy           18
    libfec_rs_android_subset-tidy     3
* For aosp_arm64-eng make obj-* targets; count NINJA commands:
    obj-soong                      399K
    obj-soong_subset               112K
    obj-soong_android              305K
    obj-soong_android_subset        75K
    obj-soong_linux_glibc           90K
    obj-soong_linux_glibc_subset    38K
    obj-soong_windows               12K
    obj-bionic                      15K
    obj-bionic_subset                3K
    obj-bionic_android              14K
    obj-bionic_android_subset        2.3K
    obj-bionic_linux_glibc           1.3K
    obj-system-core                  6K
    obj-system-core_subset           3K
    obj-frameworks-base             16K
    obj-frameworks-base_subset       6K
    libfec_rs-obj                    33
    libfec_rs_subset-obj              9
    libfec_rs_android-obj            18
    libfec_rs_android_subset-obj      3

Test: NINJA_ARGS="-n" WITH_TIDY=1 make some_obj_tidy_target;
      compare output commands from various phony targets
Bug: 199169329
Bug: 202769240
Change-Id: I186c45dc07c5884888c1063dfc09cf212ffb0ebf
2021-12-07 12:58:11 -08:00
Romain Jobredeaux
f7a7a95c07 Merge "Initial bp2build converter for android_app." am: 4526269c2e
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1907394

Change-Id: I02d305612a4282470d068f5f1441bebf260aa699
2021-12-07 20:37:37 +00:00
Treehugger Robot
27631d2412 Merge "Fix filter-out being negated in rbc product configuration" am: 022a5faef3
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1912042

Change-Id: If2d0a204779045107cf92275855b89db7e65837c
2021-12-07 20:37:18 +00:00
Romain Jobredeaux
4526269c2e Merge "Initial bp2build converter for android_app." 2021-12-07 20:14:29 +00:00
Treehugger Robot
022a5faef3 Merge "Fix filter-out being negated in rbc product configuration" 2021-12-07 20:13:56 +00:00
Chris Wailes
0691ee250d Merge "Allow users to enable local incremental Rust builds" am: 58e748d8d4
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1910146

Change-Id: Ie1c1dca183efe75aae787e0f65cc020fd7122543
2021-12-07 19:51:03 +00:00
Chris Wailes
58e748d8d4 Merge "Allow users to enable local incremental Rust builds" 2021-12-07 19:33:24 +00:00
Yi Kong
985e8bcbfc Merge "Move "-fdebug-info-for-profiling" flag to device binaries only" am: 8a8cebb01f
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1912716

Change-Id: I070f2d1588dd9181024307b453bd142df6c1bf20
2021-12-07 17:38:43 +00:00
Yi Kong
8a8cebb01f Merge "Move "-fdebug-info-for-profiling" flag to device binaries only" 2021-12-07 17:17:58 +00:00
Jiakai Zhang
255734a03a Merge "Add ART boot image profile to the ART APEX." am: e6f63be764
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1904290

Change-Id: I9cdd28b911a24c5c2a7163802cc0e3240989b330
2021-12-07 15:36:48 +00:00
Liz Kammer
eb2d6d1ffd Propagate headers from bazel to mixed builds
Bug: 208503274
Test: mixed_libc.sh
Change-Id: I0be57f2a22f48be3a919208db4034d2bd03c18c0
2021-12-07 10:25:11 -05:00
Jiakai Zhang
e6f63be764 Merge "Add ART boot image profile to the ART APEX." 2021-12-07 15:22:37 +00:00
Romain Jobredeaux
1282c42484 Initial bp2build converter for android_app.
The only supported attributes at this point are:
- srcs
- manifest
- package_name
- resource_dirs
as they most easily map to bazel's android_binary's srcs, manifest, custom_package, and resource_files respectively.
Allow-listing all apps that use these fields, along with sdk_version and dex_preopt. The latter 2 are ignored by the converter,
- sdk_version because we're currently relying on a single pre-built SDK,
- dex_preopt because,
   1. though it is not supported in Bazel builds yet, it doesn't prevent the apps from building, and
   2. the apps being converted only use the dex_preopt attribute to disable dex_preopt, which is what is happening anyway.

Change-Id: I4a4f771eeb8f60a1cd4844b2ac1ce3df7c070e73
Test: ./build/bazel/scripts/run_presubmits.sh
Bug: 198224074
Bug: 203688791
2021-12-07 09:41:49 -05:00
A. Cody Schuffelen
580b93c3e8 Add vendor_available: true to libbuildverison
This allows using libbuildversion in Cuttlefish, which builds many
binaries for both vendor and host.

On vendor executables, this gets the build id from the
ro.vendor.build.version.incremental property.

Bug: 206843934
Test: m -j
Change-Id: I9ab11b42de3f1febf282f107c3e137592097d3c0
2021-12-06 22:08:40 -08:00
Yi Kong
196b926ac2 Move "-fdebug-info-for-profiling" flag to device binaries only
We do not profile host binaries. Moving to device binaries only helps
saving some disk space as well as shortening build time.

Test: presubmit
Change-Id: I09afb106d0e2ee250b3bc75d9dfd9cb8b6552c97
2021-12-07 13:51:38 +08:00
Yi Kong
84afb3787b Merge "addSamplingProfileGatherFlags is no longer needed" am: b0d167cb43
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1908874

Change-Id: Ibed29cbda16e7960ce0ebcd1cd771d795be7b70b
2021-12-07 04:45:13 +00:00
Yi Kong
b0d167cb43 Merge "addSamplingProfileGatherFlags is no longer needed" 2021-12-07 04:27:14 +00:00
Chih-hung Hsieh
9df47e552b Merge "object files depend only on NDK headers" am: 970f8388a8
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1911210

Change-Id: I8de54cceb398adbc7e08dd7eb7164ccd3480e3b7
2021-12-07 02:27:16 +00:00
Chih-hung Hsieh
970f8388a8 Merge "object files depend only on NDK headers" 2021-12-07 02:00:50 +00:00
Jingwen Chen
dd569eec32 Merge "Add descriptions to soong_build actions." am: 838e7cdd73
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1911272

Change-Id: I075e78d080948b6978b0fc7d91490bc6b1bff9c0
2021-12-07 01:31:21 +00:00
Jingwen Chen
838e7cdd73 Merge "Add descriptions to soong_build actions." 2021-12-07 01:01:16 +00:00
Cole Faust
eec0d8137e Fix filter-out being negated in rbc product configuration
Bug: 201700692
Test: go test
Change-Id: I3245e33dc88dd2e456a24780c8cc20ed605d67a6
2021-12-06 16:23:51 -08:00
Chris Wailes
d9781fd67e Allow users to enable local incremental Rust builds
This CL allows users to set the SOONG_RUSTC_INCREMENTAL environment
variable to enable incremental Rust builds.  The out/soong/rustc
directory is used for intermediate artifacts.

Test: m rust
Change-Id: Ica2587c30596325b7d3e82d8e3c1d610b92718b8
2021-12-06 15:02:20 -08:00
Christopher Parsons
bc6610ce5b Merge "bp2build: split full_cc_library into shared/static" am: 58a2eec1a7
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1910490

Change-Id: I1b94b2448db51f2688a499be4df1593d70adef42
2021-12-06 22:54:45 +00:00
Christopher Parsons
58a2eec1a7 Merge "bp2build: split full_cc_library into shared/static" 2021-12-06 22:32:49 +00:00