summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSpandan Das <spandandas@google.com>2023-09-06 19:45:01 +0000
committerSpandan Das <spandandas@google.com>2023-09-06 19:45:01 +0000
commitf3742bbe329d1bdfa9e8dafed91b97d725fc0280 (patch)
tree99c4f4152e2d43d097b68c0115e3e5c6c7ca14af
parent381452a359d7634cf296d40105451ccb29600100 (diff)
downloadndk-f3742bbe329d1bdfa9e8dafed91b97d725fc0280.tar.gz
Create a soong module for ndk_system STL headers
This STL does not have a prebuilt, but does provide headers for compilation. Soong adds -isystem prebuilts/ndk/current/sources/cxx-stl/system/include to the compile path for modules that have stl = "ndk_system" Bazel poses stricter sandboxing constraints. In preparation for building sdk variants with Bazel, create a Soong module that explicitly specifies the .h files contributed by this STL (via export_system_include_dirs). This will be a no-op in Soong. Test: m nothing Bug: 298258442 Change-Id: If40b644fdaf23dc99a563a7265e9e4b38f8626ef
-rw-r--r--Android.bp15
1 files changed, 15 insertions, 0 deletions
diff --git a/Android.bp b/Android.bp
index 9b8550ee3..3c228674a 100644
--- a/Android.bp
+++ b/Android.bp
@@ -75,3 +75,18 @@ cc_library_static {
sdk_version: "minimum",
export_include_dirs: ["current/sources/android/cpufeatures"],
}
+
+// A module that encapsulates the header files of NDK System STL
+cc_library_headers {
+ name: "ndk_system",
+ sdk_version: "minimum",
+ sdk_variant_only: true,
+ stl: "none",
+ export_system_include_dirs: ["current/sources/cxx-stl/system/include"],
+ // the headers are available to both the platform and anyapex.
+ // this availability is required to compile jni deps of any android_app in these api domains.
+ apex_available: [
+ "//apex_available:anyapex",
+ "//apex_available:platform",
+ ],
+}