This commit adds the libbpf_prog soong module which is heavily based on
the bpf soong module. Due to issues encountered and concerns around
compatibility and testability of mainlined bpf modules, support for
libbpf is added as a separate module.
Specifically, when changing the bpf module from
InitAndroidArchModule(... android.MultilibCommon) to MultilibFirst, the
soong apex bpfs functionality breaks. We have not identified a good
mechanism to fix this, and as we would then be creating architecture
specific bpf program binarys, additional testing and infrastructure
would be required.
It should be noted that libbpf_prog should not be used for features
which target 32bit kernel architectures at this point, as we do not
have a mechanism to identify the kernel arch at build time. I.E. 32bit
userspace could be on either 32bit or 64bit kernel arch, and we require
arch specific includes (vmlinux.h). Therefore, we default to 32bit
userspace on 64bit kernel to match the precedence set with the legacy
bpf programs.
Example use:
libbpf_prog {
name: "xyz.o",
srcs: ["xyz.c"],
arch: {
arm: {
local_include_dirs: ["vmlinux/arm64"],
},
arm64: {
local_include_dirs: ["vmlinux/arm64"],
},
x86: {
local_include_dirs: ["vmlinux/x86_64"],
},
x86_64: {
local_include_dirs: ["vmlinux/x86_64"],
},
},
}
Bug: 359646531
Test: manual
Change-Id: Ie58515d70abee061470cf4bb803228e00d496ac3
Signed-off-by: Neill Kapron <nkapron@google.com>
This reverts commit 492e81bd0e.
Reason for revert: Droidmonitor created revert due to b/364912148.
Change-Id: Ic487ca2f4b5e650b70cfb87889d8bd112bec32c6
This reverts commit ef5739ed64.
Reason for revert: Droidmonitor created revert due to b/364665936.
Change-Id: Ia18f642492eafdbe2e78d9f753d87f243d529037
* changes:
ndk_library: limit exports
Reland "Truely re-export export_header_libs from ndk_library"
ndk_library depends on the correct arch variant of cc_library_headers
This reverts commit ba9f9262a3.
Reason for revert: DroidMonitor created revert due to b/364440900.
Change-Id: I8661cdce1a1187459b6a0acde4c64a5aa70dcc87
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
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
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
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
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
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
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
This reverts commit 88c768dd7f.
Reason for revert: not how this module type is supposed to be used
Change-Id: Iced1ad336c5fe5d630bb8e268b08d652e80f262d
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
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
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