Commit graph

4052 commits

Author SHA1 Message Date
Yi Kong
d9c1af6c5e Merge "Remove mention of libhidlbase_pgo" am: 319eaaa9f5 am: 60458f13b4 am: 7c964d0511
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1933094

Change-Id: I14268684e09e05930fa8783330f8f6897c9a079f
2022-01-06 18:20:18 +00:00
Yi Kong
319eaaa9f5 Merge "Remove mention of libhidlbase_pgo" 2022-01-06 17:42:59 +00:00
Usta Shrestha
81c1dd2638 Merge "Remove customizableProperties from android.ModuleBase" am: 9eab2ef9a4 am: 1df75fdde5 am: f92eb6e8d2
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1929304

Change-Id: I7e12bd9d931653643876cac1a3fa1ded21864b15
2022-01-05 23:29:34 +00:00
Usta
dca0219965 Remove customizableProperties from android.ModuleBase
- customizableProperties was being used to access all properties,
i.e. basically `GetProperties()`

- generalProperties was a subset of properties,
i.e. `initArchModule()` would only add new arch-specific properties
to `customizableProperties` (and `archProperties`) but not `generalProperties`

This PR sets generalProperties to contain all properties,
which then makes customizableProperties redundant.
And in arch.go, any iteration is done via `archProperties` instead.

Bug: 206961391
Test: m nothing and diff the ninja files
Change-Id: Ieb72b31c0a447fcbf34c92a04f002d7b9d777a86
2022-01-04 13:33:51 -05:00
Yi Kong
2b8f5f588f Remove mention of libhidlbase_pgo
This library is getting removed.

Test: presubmit
Change-Id: I10bfb36c07e094881c7254219d3071da6ac687dd
2021-12-27 23:30:39 +08:00
Yi Kong
a093bdbd5b Merge "Introduce afdo" am: 37d0a5790a am: bd0d787fec am: d788f19592
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1917257

Change-Id: Ia767b7dc6d8e823bbc9104dfb2a23e2c1125d9c8
2021-12-23 05:57:13 +00:00
Yi Kong
37d0a5790a Merge "Introduce afdo" 2021-12-23 04:53:29 +00:00
Treehugger Robot
d0956e62be Merge "Added src and exclude_src to debuggable builds" 2021-12-23 03:32:47 +00:00
Christopher Parsons
5f81eb4dd6 Merge "Handle the 'enabled' property in bp2build" am: 948e851b83 am: fdb30910fc am: e40c2f5076
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1917398

Change-Id: I5a60df27f103b10f55abc35852f1ffd08c3338cb
2021-12-22 16:42:37 +00:00
Jay Aliomer
2599d1d120 Added src and exclude_src to debuggable builds
Fixes: 200976245
Test: manually tested
Change-Id: I68b6230f30aa2c15e6a80010cd639ea453b4b29e
Merged-In: I68b6230f30aa2c15e6a80010cd639ea453b4b29e
(cherry picked from commit 85a8afa9e7)
(cherry picked from commit 778582f415)
2021-12-22 18:05:34 +09:00
Chris Parsons
58852a05f3 Handle the 'enabled' property in bp2build
Also fix some bugs pertaining to configurable attribute handling of bool
attributes and label sttributes, so that they may support values across
multiple different axes at the same time.

Test: unit tests for bp2build
Test: mixed_droid

Change-Id: I411efcfddf02d55dbc0775962068a11348a8bb2c
2021-12-21 16:37:32 -05:00
Treehugger Robot
4712720e76 Merge "Add comments and clarify errors in neverallow" am: 68542bfcb5 am: fee1c91a2e am: a185769983
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1874483

Change-Id: Ie5010c7a89859779b4b97324c629c480df23d428
2021-12-21 20:25:39 +00:00
Treehugger Robot
68542bfcb5 Merge "Add comments and clarify errors in neverallow" 2021-12-21 19:28:36 +00:00
Liz Kammer
091e30666e bp2build remove "-std" from cflags am: cac7f690eb am: 547bdc5207 am: 7b901cb0fb
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1927501

Change-Id: I468f8accaaf37502c10e0392e217d56ce016c551
2021-12-21 19:19:00 +00:00
Liz Kammer
a3d7915c9e Add comments and clarify errors in neverallow
Sample of new error for violation:

error: system/bt/gd/rust/topshim/macros/Android.bp:10:1: module
"libtopshim_macros" variant "linux_glibc_x86_64": violates neverallow
requirements. Not allowed:
        module types: ["rust_benchmark" "rust_benchmark_host"
"rust_binary" "rust_binary_host" "rust_library" "rust_library_dylib"
"rust_library_rlib" "rust_ffi" "rust_ffi_shared" "rust_ffi_static"
"rust_fuzz" "rust_library_host" "rust_library_host_dylib"
"rust_library_host_rlib" "rust_ffi_host" "rust_ffi_host_shared"
"rust_ffi_host_static" "rust_proc_macro" "rust_test" "rust_test_host"]
      EXCEPT in dirs: ["device/google/cuttlefish/"
"external/adhd/" "external/crosvm/" "external/libchromeos-rs/"
"external/minijail/" "external/rust/" "external/selinux/libselinux/"
"external/uwb/" "external/vm_tools/p9/"
"frameworks/native/libs/binder/rust/" "frameworks/proto_logging/stats/"
"packages/modules/DnsResolver/" "packages/modules/Virtualization/"
"prebuilts/rust/" "system/core/libstats/pull_rust/"
"system/extras/profcollectd/" "system/extras/simpleperf/"
"system/hardware/interfaces/keystore2/" "system/librustutils/"
"system/logging/liblog/" "system/logging/rust/" "system/nfc/"
"system/security/" "system/tools/aidl/"
"tools/security/fuzzing/example_rust_fuzzer/"
"tools/security/fuzzing/orphans/" "vendor/"]

Old error:

error: system/bt/gd/rust/topshim/macros/Android.bp:10:1: module
"libtopshim_macros" variant "linux_glibc_x86_64": neverallow
-dir:device/google/cuttlefish/* -dir:external/adhd/*
-dir:external/crosvm/* -dir:external/libchromeos-rs/*
-dir:external/minijail/* -dir:external/rust/*
-dir:external/selinux/libselinux/* -dir:external/uwb/*
-dir:external/vm_tools/p9/* -dir:frameworks/native/libs/binder/rust/*
-dir:frameworks/proto_logging/stats/*
-dir:packages/modules/DnsResolver/*
-dir:packages/modules/Virtualization/* -dir:prebuilts/rust/*
-dir:system/core/libstats/pull_rust/* -dir:system/extras/profcollectd/*
-dir:system/extras/simpleperf/*
-dir:system/hardware/interfaces/keystore2/* -dir:system/librustutils/*
-dir:system/logging/liblog/* -dir:system/logging/rust/*
-dir:system/nfc/* -dir:system/security/* -dir:system/tools/aidl/*
-dir:tools/security/fuzzing/example_rust_fuzzer/*
-dir:tools/security/fuzzing/orphans/* -dir:vendor/*
type:"rust_benchmark" type:"rust_benchmark_host type:rust_binary
type:rust_binary_host type:rust_library type:rust_library_dylib
type:rust_library_rlib type:rust_ffi type:rust_ffi_shared
type:rust_ffi_static type:rust_fuzz type:rust_library_host
type:rust_library_host_dylib type:rust_library_host_rlib
type:rust_ffi_host type:rust_ffi_host_shared type:rust_ffi_host_static
type:rust_proc_macro type:rust_test type:rust_test_host

Test: go test soong tests
Change-Id: I1a7ee6bbc8258dfffa5a76f02c12fb1e54fdba1a
2021-12-21 12:00:43 -05:00
Liz Kammer
cac7f690eb bp2build remove "-std" from cflags
Soong overrides "-std" flags when provided via cppflags or conlyflags;
however, any user-provided "-std=" cflag will be overridden by Soong's
std flag handling.

For Bazel, we _always_ allow user to override via user provided flags.
To prevent conflicts, we remove the silently ignored values from
Android.bp files in the bp2build conversion.

Test: build/bazel/ci/bp2build.sh
Test: build/bazel/ci/mixed_droid.sh
Change-Id: I4c33b2ae593a7ff3ff8e3ad15ef3461354fc0c83
2021-12-21 11:49:01 -05:00
Liz Kammer
cc3dd1e941 Merge "Fix typo in bp2build denylist." am: 5166a1c707 am: 1acfbe98bb am: 3f304d2d7e
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1927621

Change-Id: I1851b0606a2707f8b78b3aff5787e4134e8cfdd8
2021-12-21 16:31:48 +00:00
Liz Kammer
5166a1c707 Merge "Fix typo in bp2build denylist." 2021-12-21 15:44:27 +00:00
Sorin Basca
cae602eee3 Merge "Adding option to include sources only for Java 11 builds" am: 55f84a74c5 am: d0ade7a7f8 am: c9b9540233
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1927441

Change-Id: I0bbe60a35917f8945bf0a8f5b794293b44cd2c5b
2021-12-21 08:18:45 +00:00
Yi Kong
eb8efc902d Introduce afdo
A new configuration rule for sampling PGO. This differs from the
original pgo.go rule in the following ways:
 * Automatic propagation to static dependencies
 * Simpler configuration (just put `afdo: true` to optimsation targets)

http://go/android-afdo

Test: build
Bug: 79161490
Change-Id: Ie194824cd523bca19e10ced41d2078fc598f13b3
2021-12-21 16:09:23 +08:00
Inseob Kim
d128b2d644 Merge "Add sepolicy prebuilt directories to soong_config" am: 1778546f7a am: 0245bbe0e1 am: 938f382579
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1925909

Change-Id: Id1ec535922b9041a6892a6f1e6c237c26563efa7
2021-12-21 07:39:44 +00:00
Sorin Basca
55f84a74c5 Merge "Adding option to include sources only for Java 11 builds" 2021-12-21 07:37:46 +00:00
Inseob Kim
1778546f7a Merge "Add sepolicy prebuilt directories to soong_config" 2021-12-21 07:09:58 +00:00
Sorin Basca
9347ae3ba0 Adding option to include sources only for Java 11 builds
Bug: 207852002
Test: m
Test: EXPERIMENTAL_TARGET_JAVA_VERSION_11=true m
Change-Id: I554a79798ea7f1dd4a96b09f761090f83a009cb4
2021-12-20 21:33:14 +00:00
Jiakai Zhang
3a3250f40e Merge changes I8f4eaed1,I358a62d3 am: 880e11112d am: 02d1c10b3a am: 58fe40abc1
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1928068

Change-Id: I3b312ffc40a2499676fd8f5219017aa8f86d1911
2021-12-20 21:11:58 +00:00
Jiakai Zhang
880e11112d Merge changes I8f4eaed1,I358a62d3
* changes:
  Dexpreopt standalone system server jars from prebuilts.
  Dexpreopt standalone system server jars.
2021-12-20 19:52:37 +00:00
Jiakai Zhang
389a647320 Dexpreopt standalone system server jars.
Standalone system server jars are dynamically loaded by system server
using a `PathClassLoader` whose parent is `SYSTEMSERVERCLASSPATH`. They
are listed in `PRODUCT_STANDALONE_SYSTEM_SERVER_JARS` and
`PRODUCT_APEX_STANDALONE_SYSTEM_SERVER_JARS` in Makefile. We need to
dexpreopt them to achieve better performance.

Bug: 203198541
Test: m nothing
Test: -
  1. Add a standalone system server jar (e.g., by patching
     aosp/1906158)
  2. Build a system image.
  3. See the odex and vdex files generated in
     $ANDROID_PRODUCT_OUT/system/framework/oat/
  4. Flash the image to a device.
  5. Run `atest art_standalone_dexpreopt_tests`.
Change-Id: I358a62d34989c5c8eba12e18fe6167e0b72ff69d
2021-12-20 15:07:26 +00:00
Treehugger Robot
8ef2179a6e Merge "Remove InstallBypassMake and ToMakePath" am: f1228f570a am: a9f335cf5a am: fd865c6688
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1889722

Change-Id: I03ff465d17fb4625b8b5e7dc535c5791e87d204d
2021-12-17 07:19:06 +00:00
Treehugger Robot
f1228f570a Merge "Remove InstallBypassMake and ToMakePath" 2021-12-17 06:15:16 +00:00
Treehugger Robot
aed3014477 Merge "Remove some unblocked items from the denylist" am: 86baf3e191 am: c64fa15c3a am: aa5f57db49
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1911671

Change-Id: I17fb1dec44e797a218feaf59b9bcf99c0781b4ff
2021-12-16 23:14:38 +00:00
Liz Kammer
9460b46ea2 Fix typo in bp2build denylist.
Test: m bp2build and ensure libnativehelper_compat_libc++ not converted
Change-Id: I3dddda6c19a0105aa89f2015ae329935862ef73e
2021-12-16 16:21:23 -05:00
Liz Kammer
3e0151688a Merge "Add external/libpng" am: 911e9f8654 am: 157d11bf2b am: d108041835
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1924581

Change-Id: Iaeb24ba46d7806d7557347b989ab47eccb224961
2021-12-16 20:45:44 +00:00
Treehugger Robot
4f388fc602 Merge "Allowlist directory for com.android.adbd." am: 8c495942c2 am: 6a37e0e485 am: b40a89da08
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1922098

Change-Id: I72bca937165403198f4d75d2b3ee150362b42c39
2021-12-16 20:44:50 +00:00
Treehugger Robot
cec672ffa9 Merge "Make all defaults modules bazelable" am: 3eed7f9a8b am: 3434f3734f am: 1cff15e0b1
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1924162

Change-Id: I12a3495cecd4545275ac65c6a936ba6d40321e1b
2021-12-16 20:44:28 +00:00
Treehugger Robot
4390ce8c50 Merge "Remove unused functions" am: c42b19f0a8 am: 27c1ec557b am: b265dff352
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1924157

Change-Id: I8477d469c21c8e19a99e389735f53056c09e98aa
2021-12-16 20:44:12 +00:00
Liz Kammer
5c31358f86 Remove some unblocked items from the denylist
Test: bp2build.sh
Test: mixed_libc.sh
Change-Id: Iaef35cd2eb1ec2efb467548b1630f686f84aac2a
2021-12-16 13:34:02 -05:00
Liz Kammer
911e9f8654 Merge "Add external/libpng" 2021-12-16 14:04:49 +00:00
Treehugger Robot
8c495942c2 Merge "Allowlist directory for com.android.adbd." 2021-12-16 01:50:31 +00:00
Treehugger Robot
3eed7f9a8b Merge "Make all defaults modules bazelable" 2021-12-16 01:36:47 +00:00
Treehugger Robot
c42b19f0a8 Merge "Remove unused functions" 2021-12-16 00:58:07 +00:00
Inseob Kim
0f46e7ca88 Add sepolicy prebuilt directories to soong_config
These are used when we build vendor sepolicy against old plat sepolicy.

Bug: 33691272
Test: build
Change-Id: Ia4fea509a2e122f24d1669a0908c4b3d2bb3b32c
2021-12-16 09:50:44 +09:00
Colin Cross
c68db4b305 Remove InstallBypassMake and ToMakePath
InstallBypassMake and ToMakePath are obsolete, remove them.

Bug: 204136549
Test: m checkbuild
Change-Id: Ie5a6f7254b3d317ed6039e114ed6aec35e1ce273
2021-12-15 15:22:53 -08:00
Liz Kammer
6fb30b62e0 Merge "bp2build: Expand check if filegroup contains proto" am: b849d4a6d5 am: ccdd5a8de4 am: 774e8930d5
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1916846

Change-Id: Idac17bbc93d169b59d27837bee8f6b2f6c956947
2021-12-15 21:25:12 +00:00
Usta Shrestha
2291956fd0 Merge "cosmetic changes" am: 54c827fbcb am: 1869cf7433 am: 4067425242
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1914979

Change-Id: Ic6153408e098d52f76996200d3e9b563c45ab99f
2021-12-15 20:16:41 +00:00
Liz Kammer
b849d4a6d5 Merge "bp2build: Expand check if filegroup contains proto" 2021-12-15 20:11:13 +00:00
Usta Shrestha
54c827fbcb Merge "cosmetic changes" 2021-12-15 18:56:01 +00:00
Liz Kammer
416201d081 Make all defaults modules bazelable
Since these are not being converted directly, this has two primary
impacts:
* defaults modules will no longer appear as unconverted deps.
* defaults modules do not have to be marked individually, which should
  allow all defaults-based soong-config-modules to just convert as
  necessary.

Test: bp2build.sh
Change-Id: I44c99d5a51d1887a95c17dfdf956f91af671b2ea
2021-12-15 13:18:42 -05:00
Liz Kammer
aabfb5dc47 bp2build: Expand check if filegroup contains proto
Previously we looked for proto as suffix, however, some filegroups use
"<foo>-proto-srcs" or "<bar>-proto-sources", instead we look for proto
as a distinct word in a filegroup name.

Test: go test soong tests
Change-Id: Icf916a84304a02617efff9768e5b82d5ffe658bd
2021-12-15 13:07:58 -05:00
Liz Kammer
b5b478d73d Add external/libpng
This exercises the need for additional flags for external modules.

Test: build/bazel/ci/bp2build.sh
Change-Id: I0110640a0639577e7f40f53676d94fb7973c3233
2021-12-15 13:00:21 -05:00
Dan Willemsen
8f92005ac8 Remove unused functions
Change-Id: I585052343d6fe88757b009664a44afe7b93ef849
2021-12-15 01:18:49 -08:00