diff --git a/BUILD.gn b/BUILD.gn index 46a0c18c6c1da353c988c5b6ff723ead4eaf583b..f043cbd95a2be33ce8100e46623b66ef92be09c4 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -12,7 +12,12 @@ # See the License for the specific language governing permissions and # limitations under the License. -import("//build/ohos.gni") +import("//build/config/components/ets_frontend/ets_frontend_config.gni") +if (ark_standalone_build) { + import("$build_root/ark.gni") +} else { + import("//build/ohos.gni") +} PCRE2_LIB_DIR = "//third_party/pcre2/pcre2" @@ -131,3 +136,23 @@ ohos_static_library("libpcre2_static") { part_name = "pcre2" subsystem_name = "thirdparty" } + +ohos_static_library("libpcre2_static_16") { + deps = [ ":publish_generic_file" ] + output_name = "libpcre2_static_16" + sources = pcre2_sources + sources -= [ "$PCRE2_LIB_DIR/src/pcre2_chkdint.c" ] + sources += get_target_outputs(":publish_generic_file") + public_configs = [ ":third_party_pcre2_config" ] + cflags = [ + "-D_GNU_SOURCE", + "-DHAVE_CONFIG_H", + "-DSUPPORT_PCRE2_16=1", + "-DSUPPORT_UNICODE=1", + "-DPCRE2_CODE_UNIT_WIDTH=16", + "-w", + ] + license_file = "$PCRE2_LIB_DIR/LICENCE" + part_name = "pcre2" + subsystem_name = "thirdparty" +} diff --git a/bundle.json b/bundle.json index 941c297f082f194d5ccc3a934f1d95b4cfd798e7..c4b74c8cdb5b62b472d79917985ba58448625e42 100644 --- a/bundle.json +++ b/bundle.json @@ -39,6 +39,13 @@ "header_base": "//third_party/pcre2/pcre2/src" } }, + { + "name": "//third_party/pcre2:libpcre2_static_16", + "header": { + "header_files": [], + "header_base": "//third_party/pcre2/pcre2/src" + } + }, { "name": "//third_party/pcre2:publish_generic_file" },