Add static library build
This will be used in libvulkan_arm.so, to avoid a dependency on the
system shared library.
Also make the minizip and zlib targets static on the host.
Change-Id: I29bcd9e72ebb44cb3abe4a98fc111968b4bdfdb2
diff --git a/BUILD.gn b/BUILD.gn
index 6cef35a..d36590b 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -36,9 +36,16 @@
cflags = [ "-Wno-implicit-function-declaration" ]
}
-shared_library("zlib") {
+target(default_library_type, "zlib") {
output_name = "z"
+ deps = [
+ ":zlib_static",
+ ]
+ public_configs = [ ":zlib_config" ]
+}
+
+source_set("zlib_static") {
sources = [
"adler32.c",
"compress.c",
@@ -84,7 +91,7 @@
}
}
-shared_library("minizip") {
+target(default_library_type, "minizip") {
sources = [
"contrib/minizip/crypt.h",
"contrib/minizip/ioapi.c",