Commit Graph

7027 Commits

Author SHA1 Message Date
Treehugger Robot
ea8b7771f1 Merge "Remove test_min_api_level property" 2021-12-09 05:51:25 +00:00
Dan Willemsen
7001bf44e1 Support macOS 12 SDK am: e3d50bfba9 am: d4105fcf60 am: 3452b082de am: aa967536d7
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1914488

Change-Id: Id56dc643580403b5fa26adea30851a1c174d4b7f
2021-12-09 02:07:36 +00:00
Justin Yun
d396515482 Remove test_min_api_level property
Replace the test_min_api_level property with
test_options.min_shipping_api_level.

Bug: 187258404
Test: build
Change-Id: Ifbac62f389226ed690f0ec03b9cc0845132ae885
2021-12-09 00:16:41 +00:00
Dan Willemsen
d98c144f21 Merge "Add Darwin x86_64+arm64 universal binary support" am: ce69757379 am: 1bd7543d6e am: b2a6b903fb am: 4d913d8528
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1884611

Change-Id: I0b2e79c1ea2c2889c859fbbcd4ffb964531cf046
2021-12-09 00:04:21 +00:00
Colin Cross
b674b43656 Add dependency license annotations
Add annotations to dependency tags that are dynamic or classpath
linkage.

Bug: 207445310
Test: m checkbuild
Change-Id: Ife89b8f234aa40c380c721eda7dd18cab697fbb3
2021-12-08 15:08:59 -08:00
Dan Willemsen
e3d50bfba9 Support macOS 12 SDK
Test: build w/Xcode 13.1
Change-Id: I9062b8045c4b02551aeeff06f4d7416c766e53a6
2021-12-08 22:12:49 +00:00
Dan Willemsen
ce69757379 Merge "Add Darwin x86_64+arm64 universal binary support" 2021-12-08 21:08:43 +00:00
Liz Kammer
ac47b4d398 Merge "Propagate headers from bazel to mixed builds" am: 92d4188c2b am: 8534a37261 am: 5da0c42a09 am: cf392311e6
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1912212

Change-Id: I3f53ec91a47c2eace89bff50458a8f861329f0fb
2021-12-08 14:35:48 +00:00
Liz Kammer
92d4188c2b Merge "Propagate headers from bazel to mixed builds" 2021-12-08 13:24:08 +00:00
Treehugger Robot
589ee0c600 Merge "Add (obj|tidy)-*_os, and (obj|tidy)-*_subset targets" am: 939cb7b028 am: bf92b6d44e am: c028e47a3a am: 3b23e8bcb1
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1852749

Change-Id: Ie44defb9513e2aa1957300c9bb9778ab835e5602
2021-12-08 07:25:26 +00:00
Treehugger Robot
939cb7b028 Merge "Add (obj|tidy)-*_os, and (obj|tidy)-*_subset targets" 2021-12-08 06:03:14 +00:00
Dan Willemsen
4745007bb1 Add Darwin x86_64+arm64 universal binary support
This is configured from Make by setting up Darwin+Arm64 as a HOST_CROSS
target (which is largely true, as binaries can't be executed on X86_64
machines). On the Soong side, it's a bit blurier, as we don't current
have any other users that are the same OS but not natively executable
(Linux/musl is executable, Windows/x86 is a different OS).

Instead of requiring cc_binary/etc to become multi-architecture-aware
and using something like common_first/MultiTarget, this defaults all
non-multi-architecture-aware modules to be built with both
architectures. It then adds a dependency with the
DarwinUniversalVariantTag so that supporting modules can get the outputs
of the other variant.

Cc uses that dependency tag to run lipo on shared libraries and binaries
so that the output of the x86_64 variant is actually a fat binary
including both architectures.

Bug: 203607969
Test: build sdk-repo targets on a Mac
Change-Id: Icbddb0a177c0ba19d3e0d11f8cf568e0d1ea3245
2021-12-07 22:01:25 -08:00
Treehugger Robot
10d55d3e63 Merge "Add vendor_available: true to libbuildverison" am: d2d8e322f1 am: f0f598bc17 am: 5d06a6576a am: f5af593465
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1912416

Change-Id: I6f768fd2acab73fdb15a676adc97e4b5754cd52f
2021-12-07 22:50:58 +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
Yi Kong
32c2ff41fd Merge "Move "-fdebug-info-for-profiling" flag to device binaries only" am: 8a8cebb01f am: 985e8bcbfc am: d22b2e11c2 am: 482031602a
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1912716

Change-Id: I2434f8b74a32a036f1774467256e705dad9b0ebd
2021-12-07 18:28:39 +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
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
cd2b012291 Merge "addSamplingProfileGatherFlags is no longer needed" am: b0d167cb43 am: 84afb3787b am: 8a98aff182 am: f0071759e5
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1908874

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

Change-Id: I5058e9c9a25eb7d3d6272110da979c10d618a617
2021-12-07 03:07:41 +00:00
Chih-hung Hsieh
970f8388a8 Merge "object files depend only on NDK headers" 2021-12-07 02:00:50 +00:00
Christopher Parsons
93ab312e83 Merge "bp2build: split full_cc_library into shared/static" am: 58a2eec1a7 am: bc6610ce5b am: d6cbad5073 am: 9835147a22
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1910490

Change-Id: I8670f9d19e673cf16dad341a338fdd1639ab81eb
2021-12-06 23:56:41 +00:00
Treehugger Robot
d23b83cd7e Merge "[cc/sanitize] Re-enable new pass manager for fuzzer targets" am: 2a7092927c am: d7f163faef am: b3d0ca1e3e am: e7f5c6a15f
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1908971

Change-Id: I337ec894b9109af34627a72977f775cd816b6ec2
2021-12-06 22:38:45 +00:00
Christopher Parsons
58a2eec1a7 Merge "bp2build: split full_cc_library into shared/static" 2021-12-06 22:32:49 +00:00
Treehugger Robot
2a7092927c Merge "[cc/sanitize] Re-enable new pass manager for fuzzer targets" 2021-12-06 21:40:11 +00:00
Chris Parsons
77acf2e5c1 bp2build: split full_cc_library into shared/static
Test: mixed_droid.sh in conjunction with rule changes
Test: bp2build.sh
Change-Id: If0577065fd39a0446eab16b62c15204d43207e19
2021-12-06 14:11:40 -05:00
Liz Kammer
a1e1b21329 Merge "bp2build: support full/lite protos in cc libs" am: 85c0097d69 am: 03b6cf4e30 am: 42866b6eb7 am: b8c8e8c6bf
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1838061

Change-Id: Ia4de81e85727852b01f6ed795b5996694aa2d1a1
2021-12-06 15:55:00 +00:00
Liz Kammer
85c0097d69 Merge "bp2build: support full/lite protos in cc libs" 2021-12-06 14:46:34 +00:00
Yi Kong
5ded619f3e addSamplingProfileGatherFlags is no longer needed
We already add the "-fdebug-info-for-profiling" flag globally by default.
Besides, Sampling PGO does not need additional target-specific build
flags, unlike instrumentation PGO.

This is preparation to separate out sampling pgo into a separate module.
NFCI.

Test: presubmit
Change-Id: Icb28a98c021a78db25d8cb5ca9694ed6b7367a8d
2021-12-06 08:14:00 +00:00
Chih-Hung Hsieh
f6ca1b961b object files depend only on NDK headers
* shared libraries and binaries can depend on NDK share libraries

Bug: 208310402
Test: WITH_TIDY=1 make tidy-soong
Test: WITH_TIDY=1 make droid
Change-Id: I88ca8555c62d5ca49e36ca089749722166afec30
2021-12-05 18:10:13 -08:00
Chih-hung Hsieh
6feef48f50 Merge "No NDK libraries in clang-tidy pathDeps" am: 23d5d986fe am: 60b3edb494 am: 3ae86d3ee8 am: 223dc18842
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1906094

Change-Id: I30019b888cb2c163b135af1f3b7a13883685b5ab
2021-12-04 00:13:42 +00:00
Chih-hung Hsieh
23d5d986fe Merge "No NDK libraries in clang-tidy pathDeps" 2021-12-03 23:14:18 +00:00
Liz Kammer
01cebf606b Merge "Support empty strings in bp2build" am: a9351ef6e6 am: 7cb87525ef am: 3044f94f32 am: 8ac1619830
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1907331

Change-Id: I510c1b3e833a4d279fea7e2a34d125b6c5e6842d
2021-12-02 17:27:12 +00:00
Martin Stjernholm
836a2d96ba Merge changes Ied267053,Ica29c649 am: eca59f3dee am: ee02ef9bd8 am: a1b042e00a am: 80cf160365
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1906612

Change-Id: I8124fd2149e1b091bbc81a16e8d451d4e560ec00
2021-12-02 16:42:55 +00:00
Liz Kammer
12615dbbca bp2build: support full/lite protos in cc libs
Test: bp2build.sh
Bug: 200601772
Change-Id: I3a7e00546726bc63b5eb8d5604557c5988a5320b
2021-12-02 11:00:46 -05:00
Liz Kammer
a9351ef6e6 Merge "Support empty strings in bp2build" 2021-12-02 15:35:10 +00:00
Martin Stjernholm
eca59f3dee Merge changes Ied267053,Ica29c649
* changes:
  Fix prebuilt header files to produce proper AndroidMk entries.
  Reduce code duplication for testing the two header modules.
2021-12-02 14:50:47 +00:00
Martin Stjernholm
d51cb5c130 Fix prebuilt header files to produce proper AndroidMk entries.
Necessary for modules that depend on headers through
LOCAL_HEADER_LIBRARIES in legacy Android.mk files.

Test: m nothing
Test: m nothing SOONG_CONFIG_art_module_source_build=false
  on internal master
Test: m droid checkbuild SOONG_CONFIG_art_module_source_build=false
Test: m SOONG_CONFIG_art_module_source_build=false \
        out/soong/.intermediates/prebuilts/module_sdk/art/current/sdk/prebuilt_jni_headers/linux_glibc_x86_64/prebuilt_jni_headers.a
      ar t out/soong/.intermediates/prebuilts/module_sdk/art/current/sdk/prebuilt_jni_headers/linux_glibc_x86_64/prebuilt_jni_headers.a \
        && echo ok
Bug: 202192894
Change-Id: Ied267053d1fc3563870a3faaf41d79983a22815a
2021-12-02 10:54:45 +00:00
Pirama Arumuga Nainar
7448392895 [cc/sanitize] Re-enable new pass manager for fuzzer targets
Bug: http://b/133876586

This was turned off but the upstream change fixing this has been long
part of the Android toolchain.

Test: Output of
  m aidl_parser_fuzzer; readelf aidl_parser_fuzzer | grep -c sancov
hasn't changed.

Change-Id: Id7edd7ac5791b0e031fd4af46381acdbb1b80d47
2021-12-01 20:47:52 -08:00
Jooyung Han
149cd19c2a Merge "Set min_sdk_version (system/core)" am: 3d221b302a am: 3fb87f01f3 am: 2db4b4ccdf am: 0cc1d4dc46
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1899133

Change-Id: Ic3a67401ad22ecbb120b0e1d15e14bc48524d0d4
2021-12-02 03:42:27 +00:00
Edwin
655bf07640 Add android.hardware.drm-V1-ndk/_platform
Needed when `vendor=true` and `vndk: {enabled: true,}`.

Test: build

Bug: 200055138
Bug: 170964303
Change-Id: Ia064edf3ef6d871ef93ead8bb10a970c47d91f5a
2021-12-02 03:37:36 +00:00
Jooyung Han
3d221b302a Merge "Set min_sdk_version (system/core)" 2021-12-02 02:27:20 +00:00
Treehugger Robot
d59d567cc8 Merge "Revert "Enable hwasan use after scope detection."" am: bc1d8dd659 am: 415f5ebe44 am: 1a2224e744 am: 58c2927d13
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1907157

Change-Id: If8ac9d815970c624960443e6e40c7c1c475a750e
2021-12-01 19:18:33 +00:00
Treehugger Robot
bc1d8dd659 Merge "Revert "Enable hwasan use after scope detection."" 2021-12-01 18:13:39 +00:00
Martin Stjernholm
611e140043 Reduce code duplication for testing the two header modules.
Preparation for adding more tests to them.

Test: m nothing
Bug: 202192894
Change-Id: Ica29c649c4669e821371fbf8360f437871b7d041
2021-12-01 16:04:34 +00:00
Liz Kammer
46fb7aba4d Support empty strings in bp2build
Previously, could not set an empty string as a value of an attribute;
however, this is necessary in some cases. To not unnecessarily create an
empty string, use string pointers for attributes rather than strings.

Test: go test bp2build tests
Change-Id: I03b3a3567452d455246d22d81f86c317d06b7c39
2021-12-01 10:14:49 -05:00
Florian Mayer
77d0035a07 Revert "Enable hwasan use after scope detection."
This reverts commit 753dd32123.

Reason for revert: Broke hwasan postsubmit and https://r.android.com/1906006 does not seem to fix it. Reverting while investigating.

Change-Id: I0033314ac936e7062dc785b3b362ead0b5e9d8f0
2021-12-01 02:31:45 +00:00
Chih-Hung Hsieh
5b72153646 No NDK libraries in clang-tidy pathDeps
Bug: 208310402
Test: WITH_TIDY=1 make tidy-soong
Change-Id: I530fc23a1f6215b8c7f8f2bfcb235d6f58c2a702
2021-11-30 17:31:23 -08:00