From 4259af166872d662d719582031eaa6905c98323e Mon Sep 17 00:00:00 2001 From: Jan Ehrhardt Date: Sat, 17 Jun 2023 22:19:34 +0200 Subject: [PATCH] Enable building PHP extension on Windows --- php/BUILD.bazel | 1 + php/ext/google/protobuf/config.w32 | 14 ++++++++++++++ 2 files changed, 15 insertions(+) create mode 100644 php/ext/google/protobuf/config.w32 diff --git a/php/BUILD.bazel b/php/BUILD.bazel index e3be2225ed888..86b19e6e02d66 100644 --- a/php/BUILD.bazel +++ b/php/BUILD.bazel @@ -148,6 +148,7 @@ pkg_files( ]) + [ "//:LICENSE", "ext/google/protobuf/config.m4", + "ext/google/protobuf/config.w32", "ext/google/protobuf/wkt.inc", ], ) diff --git a/php/ext/google/protobuf/config.w32 b/php/ext/google/protobuf/config.w32 new file mode 100644 index 0000000000000..825197c409bd5 --- /dev/null +++ b/php/ext/google/protobuf/config.w32 @@ -0,0 +1,14 @@ +ARG_ENABLE("protobuf", "whether to enable Protobuf extension", "no"); + +if (PHP_PROTOBUF != "no") { + + var PHP_PROTOBUF_SRC_ARRAY = glob(configure_module_dirname + "/third_party/utf8_range/*.c"); + var PHP_PROTOBUF_SOURCES=" "; + for (var i=0; i