summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorColin Cross <ccross@android.com>2022-02-28 22:53:49 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2022-02-28 22:53:49 +0000
commit735f8b4330b8392eb184173e5cb89d011d6c98b0 (patch)
treec940349d0d8552c3dce782e21780b100700784a0
parent7646945620e2a1a67e4fcada173fd8895f9a1ce9 (diff)
parent429fb41d5bda6940dbefd2c9e03d221fc7771dda (diff)
downloadlibcxx-735f8b4330b8392eb184173e5cb89d011d6c98b0.tar.gz
Export libc++ headers for musl sysroot am: bdf5fe7af5 am: 0b1ac82ded am: 08d4831267 am: 429fb41d5b
Original change: https://android-review.googlesource.com/c/platform/external/libcxx/+/2000213 Change-Id: Ia83d090448a2baa9c4d63446a40c0e2ab1cbc005
-rw-r--r--Android.bp29
1 files changed, 29 insertions, 0 deletions
diff --git a/Android.bp b/Android.bp
index 2fd04d37f..4b01aa28a 100644
--- a/Android.bp
+++ b/Android.bp
@@ -294,3 +294,32 @@ python_test {
},
},
}
+
+// Export libc++ headers for inclusion in the musl sysroot.
+genrule {
+ name: "libc_musl_sysroot_libc++_headers",
+ visibility: ["//external/musl"],
+ srcs: [
+ "NOTICE",
+ "include/**/*",
+ ],
+ out: ["libc_musl_sysroot_libc++_headers.zip"],
+ tools: [
+ "soong_zip",
+ "zip2zip",
+ ],
+ cmd: "LIBCXX_DIR=$$(dirname $(location NOTICE)) && " +
+ "$(location soong_zip) -o $(genDir)/sysroot.zip -symlinks=false" +
+ // NOTICE
+ " -j -f $(location NOTICE) " +
+ // headers
+ " -P include/c++ " +
+ " -C $${LIBCXX_DIR}/include " +
+ " -D $${LIBCXX_DIR}/include " +
+ " && " +
+ "$(location zip2zip) -i $(genDir)/sysroot.zip -o $(out) " +
+ " -x include/c++/CMakeLists.txt" +
+ " -x include/c++/module.modulemap " +
+ " include/**/*:include " +
+ " NOTICE:NOTICE.libc++",
+}