Commit Graph

3897 Commits

Author SHA1 Message Date
Colin Cross
790ef35d1e Make HostToolPath, HostJNIToolPath and sboxPathForToolRel use pathForInstall
Use pathForInstall instead of PathForOutput for HostToolPath,
HostJNIToolPath and sboxPathForToolRel so that they internally produce
an InstallPath that can later support being converted to Make install
path.

Bug: 204136549
Test: m checkbuild
Change-Id: Ie16a62641d113873daeec4d1dd4261251bc0d0eb
2021-10-29 16:34:55 -07:00
Colin Cross
a44551fec6 Add PathForGoBinary
Add PathForGoBinary that uses pathForInstall to return the install
path of a GoBinaryTool.  This will replace various places that used
PathForOutput to reconstruct a path to a Go tool, and will support
moving Go tools to the Make install directory outside of the
PathForOutput directory in a future patch.

Bug: 204136549
Test: m checkbuild
Change-Id: I83a3be9f5c621975540f5ed601a0b9e2611c98b9
2021-10-29 16:34:55 -07:00
Colin Cross
b1692a3468 Remove PathForOutput from InstallPathToOnDevicePath
The next patches will make more InstallPaths use the Make output
directory, which is not inside PathForOutput.  Fix the assumption
that the InstallPath is relative to PathForOutput by storing
enough information in the InstallPath to find the on-device path
without PathForOutput.

Bug: 204136549
Test: soong tests
Change-Id: Icb3eeef3f1c72f773f333267f8a7dfc503feacb5
2021-10-29 16:34:55 -07:00
Paul Duffin
cc7a0a5a1c Merge changes I88ee9709,If2ea3fde,I657fbcde,I585a8861 am: e8412c4e7a am: fed3551805 am: 2a27960bd6 am: 8daad8f988
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1873694

Change-Id: I0028f8cd5ac1a702ccf9f0db8fb060fd3a8f12e2
2021-10-29 20:48:09 +00:00
Paul Duffin
12e311d958 Add tests for prebuilts of all API surfaces
Previously, the tests only covered checking the sdk dependencies added
when using a prebuilt current (public) and system SDKs, i.e. with
sdk_version set to "current_30" or "system_30". This change adds tests
to cover other APIs, e.g. "test_30", "module_30" and
"system_server_30". It adds tests for "module" and "system-server" up
to API level 32 as following changes will give them different behavior
as API levels less than or equal to 31 do not have a separate
core-for-system-modules.jar file for the module-lib API.

Bug: 204189791
Test: m nothing
Change-Id: I585a88615439a24abf75250114a86113b5f5da57
2021-10-29 17:57:12 +01:00
Treehugger Robot
3be5075c71 Merge "Make a pass over our codebase cleaning up non-precise / non-inclusive language." am: c9e85ca825 am: e68637799b am: 5bb9910ea6 am: df50b4ba4b
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1871701

Change-Id: I1a5d23b35737d6b7b4f3d8865d258bd85b9637a9
2021-10-28 21:57:44 +00:00
Treehugger Robot
c9e85ca825 Merge "Make a pass over our codebase cleaning up non-precise / non-inclusive language." 2021-10-28 20:51:17 +00:00
Joe Onorato
b4638c1ac3 Make a pass over our codebase cleaning up non-precise / non-inclusive language.
Test: treehugger
Bug: 204369779
Change-Id: I6e63cae824d323535cdb14b493edd868df47738d
2021-10-28 10:32:07 -07:00
Chih-hung Hsieh
dbc8d2b4ac Merge "Do not add .tidy files as RBE link inputs" am: 4dceb3705f am: 6e1b62d2b1 am: 9e2cb93d0a am: 9232e1f658
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1869384

Change-Id: I792398f51ebeda043bf4496678f43551581043db
2021-10-27 21:48:04 +00:00
Chih-hung Hsieh
4dceb3705f Merge "Do not add .tidy files as RBE link inputs" 2021-10-27 20:29:04 +00:00
Alex Márquez Pérez Muñíz Díaz Púras Thaureaux
d59bde4f5a Merge "Remove vestigial GetPrebuiltCcStaticLibraryFiles" am: 68f309abf9 am: 360cf390a3 am: 6a4a66387d am: 38d4476070
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1864754

Change-Id: I005245a5342918d92ddb5b9363367cbbe2e27e09
2021-10-26 18:14:05 +00:00
Alex Márquez Pérez Muñíz Díaz Púras Thaureaux
34d60d6672 Remove vestigial GetPrebuiltCcStaticLibraryFiles
Test: mixed_{libc,droid}.sh
Change-Id: Ie6e22e1994f8abf1b66f4abfd834bf38a1f097b2
2021-10-26 15:03:18 +00:00
Treehugger Robot
d053703fb6 Merge "Add the device config GenerateAidlNdkPlatformBackend" am: ab1312d010 am: 995bf90bb2 am: af0c8e7b22 am: 43d281097e
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1866897

Change-Id: I39f0f7e9fae93fdc85311bedb5868c6618f8c3a4
2021-10-26 01:01:38 +00:00
Chih-Hung Hsieh
3bb934f0ad Do not add .tidy files as RBE link inputs
* RBE adds implicit dependent files as inputs
  and creates too long commands.
* Adds .tidy files as validation paths.
* Change type of tidyFiles to WritablePaths.

Bug: 203577539
Test: lunch aosp_cf_arm64_phone-userdebug; USE_RBE=true WITH_TIDY=1 make
Test: USE_RBE=true WITH_TIDY=1 mm in external/skia
Change-Id: I5fc9d6f8c9c58abcd3721ca9fbae1bc785e4e609
2021-10-25 12:24:30 -07:00
Jiyong Park
d163d4d7f5 Add the device config GenerateAidlNdkPlatformBackend
The config is used to force the generation of the AIDL ndk_platform
backend which will eventually be removed in favor of the ndk backend.
The switch is needed as an escape hatch for some devices whose BSP
(outsourced and thus hardly modifiable) depends on the ndk_backend
libraries.

Bug: 161456198
Test: m
Merged-In: Ie11ca62be05754bb2593da16e1380103c670b393
Change-Id: Ie11ca62be05754bb2593da16e1380103c670b393
(cherry picked from commit 65d9718328)
2021-10-25 08:55:57 +09:00
Liz Kammer
832e8c1833 Merge "bp2build: Add support for cc_binary." am: 2dafba7da9 am: cba4259f19 am: 98eeaad1e6 am: a9aa7923f8
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1844462

Change-Id: I43bb03924ff08ededdaab79a2a844d5198bbf165
2021-10-20 15:08:02 +00:00
Liz Kammer
2dafba7da9 Merge "bp2build: Add support for cc_binary." 2021-10-20 14:02:39 +00:00
Christopher Parsons
c9dfdff54b Merge "Add OS to configuration key in mixed builds" am: c0ed1f653f am: bdf745fa16 am: cbd3804df2 am: eeb575cf4b
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1858160

Change-Id: I86f887ed184582b589593417e37d301281569e2b
2021-10-19 21:54:26 +00:00
Chris Parsons
787fb36189 Add OS to configuration key in mixed builds
This also removes the special-case filegroup from mixed builds
buildroot; no special handling is required. Since we're currently
hardcoding linux_x86_64 as our host platform, it should be fine
to continue assumping that hardcoded host for now.

Test: USE_BAZEL_ANALYSIS=1 m adbd
Change-Id: I35509f4eb33ba7a243fab4c34b35958f6f2fceab
2021-10-19 16:55:52 -04:00
Liz Kammer
2b8004b1ef bp2build: Add support for cc_binary.
Bug: 197920036
Test: build/bazel/ci/bp2build.sh
Change-Id: I2c4200967653af15a330ab8cbaf796b70d43f32d
2021-10-19 14:12:39 -04:00
Dan Willemsen
11d429ef89 Merge "Reduce modules exposed to Make in Mac builds" am: 2a109db10b am: 1b58b45545 am: 3b309cd515 am: 55d6377cd7
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1860355

Change-Id: I4b360dd6073da4a0106f55029c8e12da12885d81
2021-10-19 01:28:33 +00:00
Dan Willemsen
2a109db10b Merge "Reduce modules exposed to Make in Mac builds" 2021-10-19 00:32:54 +00:00
Liz Kammer
c7f394afd9 Merge "Add tests for defaults used in conditions_default" am: 503f65da36 am: c2d63f1fbe am: eb0718277b am: bab00c698f
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1859653

Change-Id: Iae9f1f07ea6d0bcb31491029eebce3998bf0247f
2021-10-18 23:09:51 +00:00
Liz Kammer
503f65da36 Merge "Add tests for defaults used in conditions_default" 2021-10-18 22:03:33 +00:00
Dan Willemsen
def7b5d198 Reduce modules exposed to Make in Mac builds
Device builds are no longer supported on Mac, but we do support building
various host tools, including the SDK build-tools and platform-tools
packages. These have dependencies on [java] device modules, so we don't
completely disable device modules, only hide them from Make (which makes
them more difficult to trigger from the command line).

Also fix the mac build of multiproduct_kati, so that `m blueprint_tools`
works on Mac.

Bug: 187222815
Test: `m`, `m dist`, etc on Mac
Change-Id: I92f16605d5cd173d431cbcb79081234d45cc6e2e
2021-10-18 12:44:45 -07:00
Liz Kammer
bdce0dfbdf Add tests for defaults used in conditions_default
Bug: 203123704
Test: go test soong tests
Change-Id: Ia12c51d01108ad1f311d738b182d4bb94c500810
2021-10-18 12:49:41 +00:00
Jingwen Chen
982f1144fa Denylist genrules that create the same file in the same package. am: df27b7a1e0 am: d8d15b8fcd am: 242046f5c2 am: 5d45d92e3f
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1859776

Change-Id: I6daedbba504b35549572a4419993fd33dd88a1f6
2021-10-18 08:41:47 +00:00
Jingwen Chen
df27b7a1e0 Denylist genrules that create the same file in the same package.
Test: bp2build presubmits

Bug: 194642721
Bug: 203369847
Change-Id: Id0faff5fcf4136fac5236980dd60c5d8e54d9547
2021-10-18 06:33:16 +00:00
Treehugger Robot
de46f5cc11 Merge "Add android_sdk_repo_host to build platform-tools&build-tools" am: adf2b3e68f am: e89cd9f2b5 am: 57fbf57305 am: 4dc404e3bc
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1828170

Change-Id: Iaa79cf78e10016a5fec86aadbd2f4e61e6ac87fc
2021-10-15 03:22:22 +00:00
Treehugger Robot
adf2b3e68f Merge "Add android_sdk_repo_host to build platform-tools&build-tools" 2021-10-15 02:04:45 +00:00
Liz Kammer
1cb3a4d9cc Merge "Add missing directories to bp2build." am: 47a6c59819 am: 183628579e am: 74f79ad88f am: 7e7dc00983
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1856736

Change-Id: I95fc6a6a38a12101f087d7b0d42c98241a23fb58
2021-10-14 14:57:52 +00:00
Liz Kammer
2fc348986c Add missing directories to bp2build.
Added directories with deps of adbd that were not converted and added
them to be converted via bp2build.

Test: bp2build.sh
Test: mixed_droid.sh
Change-Id: Iacb634b23e1fdc2767a0923882b71f482ebca53d
2021-10-13 17:07:41 -04:00
Lev Rumyantsev
ee83159194 Merge "Support 64-bit arm_on_x86_64" am: 1eda2bd946 am: 524b468a25 am: 2b9c2fce9a am: 4c005364c3
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1854069

Change-Id: I7c938b95a343db131f12a2a62aa24e78a45062ac
2021-10-13 20:49:57 +00:00
Lev Rumyantsev
1eda2bd946 Merge "Support 64-bit arm_on_x86_64" 2021-10-13 19:42:49 +00:00
Treehugger Robot
00e5c25973 Merge "bp2build: Add special arch-variant targets." am: 3bc7a1ba47 am: 1f211a9b88 am: 3796dae3e1 am: ebb0afdb18
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1853859

Change-Id: I438581f0541ed6dc4236f9e350bde092dc4353d1
2021-10-13 18:32:05 +00:00
Lev Rumyantsev
34581212a4 Support 64-bit arm_on_x86_64
hasArmAndroidArch only checked for 32-bit arm target and thus didn't
work properly on 64-bit only systems.

Test: CtsRsCppTestCases 64-bit only arm on x86
Bug: 194800662
Change-Id: I87332d793dcdd4859766c9067b9fd53f9e4c2516
2021-10-13 09:55:10 -07:00
Liz Kammer
fdd72e6351 bp2build: Add special arch-variant targets.
Soong supports additional arch-variant targets based on arch/os aside
from strictly arch/os names. Handle the unconverted cases based solely
on arch/os.

Test: build/bazel/ci/bp2build.sh
Change-Id: I8dc987b1aa4a4ea646dd5b03a94b84297ba6113a
2021-10-13 09:01:56 -04:00
Dan Willemsen
9fe1410213 Add android_sdk_repo_host to build platform-tools&build-tools
The Android SDK has been built with Make up until now, monolithically,
then split up into several sdk-repo zip files for different purposes.
The Mac and Windows SDKs really only need to contain the platform-tools
and build-tools pieces, but due to this monolithic sdk zip, we had to
build the whole SDK first.

This adds an `android_sdk_repo_host` module that can build these
platform-tools and build-tools zips.

Bug: 187222815
Change-Id: I55809e1d7447dd65e22461f921b2b8abb6d5f822
2021-10-13 01:25:02 -07:00
Jay Aliomer
778582f415 Added src and exclude_src to debuggable builds
Fixes: 200976245
Test: manually tested
Change-Id: I68b6230f30aa2c15e6a80010cd639ea453b4b29e
Merged-In: I68b6230f30aa2c15e6a80010cd639ea453b4b29e
(cherry picked from commit 85a8afa9e7)
2021-10-12 19:26:04 +00:00
Jay Aliomer
b9b436fe17 Added src and exclude_src to debuggable builds
Fixes: 200976245
Test: manually tested
Change-Id: I68b6230f30aa2c15e6a80010cd639ea453b4b29e
Merged-In: I68b6230f30aa2c15e6a80010cd639ea453b4b29e
(cherry picked from commit 85a8afa9e7)
2021-10-12 19:06:27 +00:00
Liz Kammer
8cdd6f007d Merge "Restrict mixed build cquery to deps of depth 2." 2021-10-08 17:04:02 +00:00
Xin Li
800112b97f Merge "Merge Android 12" 2021-10-07 23:50:21 +00:00
Jingwen Chen
8f22274297 Stop relying on target.kind in mixed builds.
target.kind was a field that existed for only a few months, and have
been removed from Bazel. This is needed to update to a newer Bazel version.

Also, this reverts filegroups to be queried for a specific arch again,
but leaving file targets in the common arch (which is correct, anyway).

Fixes: b/199363072
Test: mixed_libc
Test: presubmits
Change-Id: I3b8e5c43a39516d977d327a44a75750b2f251be3
2021-10-07 14:04:38 +00:00
Liz Kammer
c19d5cdcff Restrict mixed build cquery to deps of depth 2.
This will be the list of targets directly being requested + additional
targets necessary for mixed_root. This reduces the size of the cquery
file by ~300Kb. Additionally, it removes unnecessary targets, making it
ever so slightly easier to find what one is looking for in cquery.out
for debugging purposes.

Test: build/bazel/ci/mixed_droid.sh
Change-Id: I6d0e337c9ab7c13388459dee16415be0ab3c0506
2021-10-06 18:16:58 -04:00
Christopher Parsons
f5a385f171 Merge "Remove more out-of-date items from denylist" am: b19d4cda2e
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1844513

Change-Id: Ic7a0cebac496ca1d07145b4cd28439b4fd373e70
2021-10-04 19:44:07 +00:00
Christopher Parsons
b19d4cda2e Merge "Remove more out-of-date items from denylist" 2021-10-04 19:31:36 +00:00
Treehugger Robot
3e745e63f3 Merge "Bp2Build common properties auto-handling" am: d905146590
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1815376

Change-Id: I38f1063302ea90583a51e625076e6232b4364ab7
2021-10-04 19:20:28 +00:00
Treehugger Robot
d905146590 Merge "Bp2Build common properties auto-handling" 2021-10-04 19:02:07 +00:00
Treehugger Robot
70e2b79d9c Merge "Make RuleBuilder fail fast when passed a nil Path" am: b5e3a79358
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1844300

Change-Id: I6fe77f48ff5fd9b225bf577bc20821a05633067f
2021-10-04 18:25:44 +00:00
Treehugger Robot
b5e3a79358 Merge "Make RuleBuilder fail fast when passed a nil Path" 2021-10-04 18:12:04 +00:00