Commit Graph

85236 Commits

Author SHA1 Message Date
Pechetty Sravani (xWF)
084f2f4e4b Merge "Revert "Add an explanation to ndk_library."" into main am: 53aaadff61
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3252257

Change-Id: Ibc6ccbaebdf7a4f7e064e6c9b5696b9ea628ef4d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-09-04 06:43:36 +00:00
Pechetty Sravani (xWF)
53aaadff61 Merge "Revert "Add an explanation to ndk_library."" into main 2024-09-04 06:30:57 +00:00
Pechetty Sravani (xWF)
a27204273d Revert "Add an explanation to ndk_library."
This reverts commit ba9f9262a3.

Reason for revert: DroidMonitor created revert due to b/364440900.

Change-Id: I8661cdce1a1187459b6a0acde4c64a5aa70dcc87
2024-09-04 04:47:25 +00:00
Treehugger Robot
cc0bc1b3f9 Merge "Sandbox environment variables" into main am: 2f33c04a97
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3245994

Change-Id: I2af033a7fbbef8928553efffe79b26d55d36e96a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-09-04 02:31:56 +00:00
Treehugger Robot
2f33c04a97 Merge "Sandbox environment variables" into main 2024-09-04 02:26:58 +00:00
Spandan Das
2c20726d44 Change visibility of module sdk prebuilts to //visibility:public
To reduce pains introduced by visiblity skew between source
and prebuilts, mark them with //visibility:public

Bug: 239189932
Test: go test ./sdk
Change-Id: I47dd63bd03337bc9ec6fa364bbdcdfdfcd70b0d9
2024-09-04 01:55:22 +00:00
Jooyung Han
e1b039d184 Merge changes Ia9f2186e,Ibe567d3b into main am: 0a9eb7f657
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3247637

Change-Id: Id4ffacffb58ebb547db8d2df49110b1c2d91fdf5
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-09-04 01:29:53 +00:00
Jooyung Han
0a9eb7f657 Merge changes Ia9f2186e,Ibe567d3b into main
* changes:
  Refactor around apex aconfig files (#2)
  Refactor around apex aconfig files
2024-09-04 01:23:31 +00:00
Treehugger Robot
e0ce0ce310 Merge "Add an explanation to ndk_library." into main am: 28b190bc83
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3252080

Change-Id: Id50dee31764088accf28d09d90eb6cab565e98fd
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-09-04 01:19:59 +00:00
Treehugger Robot
28b190bc83 Merge "Add an explanation to ndk_library." into main 2024-09-04 01:14:59 +00:00
Yihan Dong
b5c5c1a8de Merge "Apply apimapper instrument tool on android tests" into main am: a596b12878
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3249673

Change-Id: Ifd8f3a190c3794aed0dec5d872915fa294440db7
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-09-04 00:59:51 +00:00
Yihan Dong
a596b12878 Merge "Apply apimapper instrument tool on android tests" into main 2024-09-04 00:52:09 +00:00
Jiyong Park
c299c20911 Merge "Make overrides work in Soong" into main am: b11c99d084
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3241433

Change-Id: Idff2325ba6387c43ffcfc2ec1403d2ec9f782aae
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-09-04 00:07:03 +00:00
Jiyong Park
b11c99d084 Merge "Make overrides work in Soong" into main 2024-09-04 00:03:20 +00:00
Cole Faust
63ea1f966e Sandbox environment variables
So that the build can't access extra information unintentionally.
Particuarly ANDROID_BUILD_TOP is dangerous.

In the future PATH should be locked down as well.

Bug: 307824623
Test: Added a all_genrules target and built that
Change-Id: I88bb0efb0a82529a1c85875a53cf20c8384d07fe
2024-09-03 16:38:28 -07:00
Dan Albert
ba9f9262a3 Add an explanation to ndk_library.
Bug: http://b/357711733
Test: None
Change-Id: I56fde036f7fe49ccf8b3a47a4eaaa4abac008fc7
2024-09-03 23:05:46 +00:00
Steven Moreland
0db999c45e ndk_library: limit exports
The NDK should stand alone, and the libbinder_ndk case
is created because libbinder_ndk in the NDK used to
contain extra C++ headers, but these were moved into
the SDK to be next to AIDL. Since many modules depend
on these headers, exports are only allowed for this case.

Bug: 357711733
Test: build with neverallow breaking, for instance:

error: frameworks/wilhelm/Android.bp:56:1: module "libOpenSLES.ndk" variant "android_x86_64_silvermont_sdk_shared_21": violates neverallow requirements. Not allowed:
        module types: ["ndk_library"]
        properties matching: "Export_header_libs" matches: .is-set
        EXCEPT in dirs: ["frameworks/native/libs/binder/ndk/"]

Change-Id: I9a32d3cb7f644fb5dbc1e8072894f2f585b2cd6d
2024-09-03 23:03:37 +00:00
Treehugger Robot
13174d9627 Merge "Fix End() of Rule" into main am: aebccc735a
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3249948

Change-Id: Ia5bbbe788503cd719872ad1dbbe509887aef791b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-09-03 22:23:57 +00:00
Treehugger Robot
aebccc735a Merge "Fix End() of Rule" into main 2024-09-03 22:18:51 +00:00
Steven Moreland
bedc997c40 Reland "Truely re-export export_header_libs from ndk_library"
This reverts commit 7f1ae59d94.

Reason for revert: b/357711733, reland with allowlist

Bug: 357711733
Change-Id: I11864eb2168c4333ad5759d0d057fda8529da24e
Test: build
2024-09-03 21:52:29 +00:00
Colin Cross
ef5739ed64 Remove obsolete robolectric test runner integration
The `m Run*RoboTests` test runner is no longer supported, remove the
code to generate the Make rules for it.

Also reduce the number of combining steps by passing the extra jars
that need to be combined into the compile step.

Test: atest --host SystemUiRoboTests
Flag: EXEMPT refactor
Change-Id: Icf05079bf570bed7a10962cbf03459bd53c51f99
2024-09-03 14:52:26 -07:00
Colin Cross
9ffaf28f5f Rename collectTransitiveHeaderJars and friends to mention R8
collectTransitiveHeaderJarsForR8 visits direct dependencies and collects
all transitive libs and static_libs header jars.  The semantics of the
collected jars are odd (it collects combined jars that contain the static
libs, but also the static libs, and it collects transitive libs dependencies
of static_libs), so these are only used to expand the --library arguments
to R8.  Rename the method and all the fields it uses with a "ForR8"
suffix to avoid confusion when more transitive header jar collection is
added to support transitive classpaths.

Bug: 308016794
Test: all soong tests pass
Change-Id: I291a86fbbc2e2f088598fb309d1b992080d60941
2024-09-03 14:52:26 -07:00
Colin Cross
a6182ab2fa Move checkbuild targets of Soong modules into Soong
Pass the name of Soong's checkbuild target for each module to
Make so that it can depend on it from the main checkbuild rule.
This will give better control over which files get built, allowing
checkbuild to skip the jar combining step when transitive classpath
jars are enabled.  The per-module checkbuild targets are passed to
make instead of added directly as a dependency of checkbuild in order
to maintain the existing behavior of only building modules exposed
to make in checkbuild.

Also tweak the existing calls to CheckbuildFile and add
InstallFileWithoutCheckbuild to match the files that are
in the Make-based checkbuild.

Bug: 308016794
Test: m checkbuild
Change-Id: Ic5140819381d58f4d00f23a7a12447950c4cf268
2024-09-03 14:52:19 -07:00
Jiyong Park
f8fab9b8c6 ndk_library depends on the correct arch variant of cc_library_headers
Previously before aosp/3249712, ndk_library was assumed to depend only
on ndk_headers, which do not have any variants.

As ndk_library can now depend on cc_library_headers which has many
variants for arch, sdk, and more, the previous assumption no longer
holds.

Therefore, when ndk_library makes a dependency to its
export_lib_headers, it now uses either AddFarVariationDependency with
(for ndk_headers) or AddVariationDependency (for others) depending on
which module type it depends on.

Bug: 357711733
Test: build with  https://r.android.com/q/topic:%22no-cpp-in-ndk-2%22
Change-Id: Id0957e82736bd458e15674ffc45ca32b1e3a7250
2024-09-03 21:52:12 +00:00
Dan Albert
027708c015 Merge "Revert "Truely re-export export_header_libs from ndk_library"" into main am: fc4607a412
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3252576

Change-Id: I5e4c30c8b82754219ff2753bdde80afd07dc10d3
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-09-03 21:14:28 +00:00
Dan Albert
fc4607a412 Merge "Revert "Truely re-export export_header_libs from ndk_library"" into main 2024-09-03 21:07:54 +00:00
Dan Albert
7f1ae59d94 Revert "Truely re-export export_header_libs from ndk_library"
This reverts commit 88c768dd7f.

Reason for revert: not how this module type is supposed to be used

Change-Id: Iced1ad336c5fe5d630bb8e268b08d652e80f262d
2024-09-03 19:55:06 +00:00
Spandan Das
ed93a620c6 Merge "HideFromMake in apexTransitionMutator should respect special cases" into main am: c965be6ca2
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3249488

Change-Id: I4911340085cb4e41229a81875ff27c24c61a04ac
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-09-03 16:38:07 +00:00
Spandan Das
c965be6ca2 Merge "HideFromMake in apexTransitionMutator should respect special cases" into main 2024-09-03 16:32:29 +00:00
Min Yun
e9cc403553 Fix End() of Rule
If a directive appears in the middle of a Rule,
the Rule does not reflect its length.
This must be reflected to obtain the correct End() position of the Rule.

Change-Id: I67a78f95487829c639b0c1414ac4cc096faa6363
2024-09-03 20:36:47 +09:00
Jooyung Han
a3fddf40ca Refactor around apex aconfig files (#2)
Aconfig files are treated like other files in APEX. This way, we can
dedup the code hanlding those files (copy commands, fs_config, etc).

Bug: n/a
Test: m nothing --no-skip-soong-tests
Change-Id: Ia9f2186e4e54e92ad90c7a9c00474cb0f7519a31
2024-09-03 13:22:21 +09:00
Jooyung Han
6186ef9004 Refactor around apex aconfig files
We can iterate over the collection of apex file.

Bug: n/a
Test: m nothing --no-skip-soong-tests
Change-Id: Ibe567d3b251c54d656793dc443eb68fb9137f42f
2024-09-03 11:14:19 +09:00
Jiyong Park
a574d535b5 Make overrides work in Soong
This change adds `overrides` property to all module types. It is used
to prevent another module (or modules) from being installed or packaged.

Bug: 330141242
Test: go test ./...

Change-Id: I4f05c603f0c5dbb699d00327882c7498472b59de
2024-09-02 19:58:38 +09:00
Yi Kong
0111a27449 Remove workaround for coverage boot failure
Bug: 269981180
Change-Id: I81399836b588b7a579174b1b6700341d7108d49e
2024-09-02 07:32:41 +00:00
PODISHETTY KUMAR (xWF)
c4145fe78f Merge "Revert "Clean environment variables to account for sandbox work directory."" into main am: cdd70d268a
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3252253

Change-Id: I912d74d6db395068763a80cc2d17c019a48193f2
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-09-02 07:03:56 +00:00
PODISHETTY KUMAR (xWF)
cdd70d268a Merge "Revert "Clean environment variables to account for sandbox work directory."" into main 2024-09-02 06:57:34 +00:00
Jooyung Han
2adba487bb apex: run host_apex_verifier
For now, the tool checks .rc files:
- .rc files are okay.
- services should run binary in apex.

Bug: 223896570
Test: m <apex>
Change-Id: I469c20afeff01cf10955ff2419113d6ac2d4cf45
2024-09-02 15:30:15 +09:00
PODISHETTY KUMAR (xWF)
9543d19b4b Revert "Clean environment variables to account for sandbox work directory."
This reverts commit 0af8ea14fc.

Reason for revert: <Droidmonitor created revert due to b/363848580. Will be verifying through ABTD before submission.>

Change-Id: Iafba28897ad27df67ef8ae8904454196c482216d
2024-09-02 03:54:36 +00:00
Yihan Dong
8be09c2075 Apply apimapper instrument tool on android tests
Apimapper is a tool to instrument android tests to log potentail API calls at the run time.

The real tool is developed internally. We use a placeholder binary in
AOSP before the real tool is ready.

The tool will only take affect when the enviroment var EMMA_API_MAPPER
is set to true.

Test: m cts
Bug: 328699028

Change-Id: Iece53b8afdb9803334b7393527f4fa24e22f71a8
2024-09-02 09:02:08 +08:00
Tongbo Liu
dd10dde7df [automerger skipped] [RESTRICT AUTOMERGE] Enable build MCTS on aosp-android14 am: 7e1a854d08 -s ours am: 1b7c2078b1 -s ours
am skip reason: contains skip directive

Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3193115

Change-Id: I8f6d2fd4b5d4c2bfae410d39f8b05a9119d1cf1a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-09-01 05:55:30 +00:00
Tongbo Liu
1b7c2078b1 [automerger skipped] [RESTRICT AUTOMERGE] Enable build MCTS on aosp-android14 am: 7e1a854d08 -s ours
am skip reason: contains skip directive

Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3193115

Change-Id: Ice60a0734268d8366d755b87a418a7a4ed3f5bf0
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-09-01 05:45:19 +00:00
Taylor Santiago
9d0b2884f8 Merge "Clean environment variables to account for sandbox work directory." into main am: 3cd732bcd1
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3233564

Change-Id: I9d5c45810ab66f0df835ee44e115fcb906c50654
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-08-31 04:14:05 +00:00
Taylor Santiago
3cd732bcd1 Merge "Clean environment variables to account for sandbox work directory." into main 2024-08-31 04:04:22 +00:00
Spandan Das
afa3add57e HideFromMake in apexTransitionMutator should respect special cases
At ToT, platform variants of modules are hidden from make, unless the module
has `//apex_available:platform` in its Android.bp file. However, there
are special cases which always require the platform variant to be
visible to make - e.g. bootstrap bionic libraries.

`markPlatformAvailability` handles these special cases. This CL updates
the subsequent apexTransitionMutator to hide the platform variant when
module.NotAvailableForPlatform is true in addition to the existing
module type specific `AvailableFor` check

Test: no diff in file_list.txt
Bug: 281077552
Change-Id: Ie9d7341e206276ff96d3d64fec21b8f5dcfd6ceb
2024-08-31 02:26:35 +00:00
Steven Moreland
6c467d5473 Merge "Truely re-export export_header_libs from ndk_library" into main am: 729c770b02
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3249712

Change-Id: I1bd6c42f847ea440e3d3d2eed80d21fc122b2ba5
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-08-30 22:06:38 +00:00
Steven Moreland
729c770b02 Merge "Truely re-export export_header_libs from ndk_library" into main 2024-08-30 22:02:30 +00:00
Jihoon Kang
9e40f8f9b4 Merge "Revert^4 "Implement detecting container violations."" into main am: 7344482ff3
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3248019

Change-Id: I440053bd684fa56172b82b4012348bd0a93e84c5
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-08-30 20:21:28 +00:00
Jihoon Kang
7344482ff3 Merge "Revert^4 "Implement detecting container violations."" into main 2024-08-30 20:18:53 +00:00
Cole Faust
b93f7fe73c Add tests for configurable PostProcessors
Bug: 362579941
Test: m nothing --no-skip-soong-tests
Change-Id: Iaaff66844ebe0b2fb19148bd07562785b12cd7e9
2024-08-30 13:04:37 -07:00
Pirama Arumuga Nainar
0cfbefbf10 Add a check for -fno-integrated-as
Bug: 188684773
Test: presubmit

This flag can cause the build to invoke the `as` from the build host, which can cause problems with cross-compilation.

Change-Id: I0a2ec5a10c97534bc9cb03e76b95b8e54d2c75ba
2024-08-30 18:57:22 +00:00