From 8cdf908be1011738b0b7f8db4234d44ba426f4d2 Mon Sep 17 00:00:00 2001 From: the-minions-of-cplu Date: Tue, 14 Dec 2021 14:20:08 +0800 Subject: [PATCH] add make_icudat.sh and compiling suuport for windows Signed-off-by: the-minions-of-cplu --- icu4c/BUILD.gn | 7 ++++++- icu4c/source/make_icudat.sh | 18 ++++++++++++++++++ 2 files changed, 24 insertions(+), 1 deletion(-) create mode 100755 icu4c/source/make_icudat.sh diff --git a/icu4c/BUILD.gn b/icu4c/BUILD.gn index db7c8827..86daba50 100755 --- a/icu4c/BUILD.gn +++ b/icu4c/BUILD.gn @@ -645,7 +645,6 @@ ohos_static_library("static_icui18n") { "-W", "-Wall", "-pedantic", - "-fPIC", "-Wpointer-arith", "-Wwrite-strings", "-Wno-error=unused-parameter", @@ -658,6 +657,12 @@ ohos_static_library("static_icui18n") { "-Wno-ignored-attributes", ] + if (is_mingw) { + cflags_cc += [ "-DWINVER=0x0601" ] + } else { + cflags_cc += [ "-fPIC" ] + } + cflags = [ "-fvisibility=hidden", "-fdata-sections", diff --git a/icu4c/source/make_icudat.sh b/icu4c/source/make_icudat.sh new file mode 100755 index 00000000..199f596c --- /dev/null +++ b/icu4c/source/make_icudat.sh @@ -0,0 +1,18 @@ +#!/bin/bash + +# Copyright (c) 2021 Huawei Device Co., Ltd. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +set -e; +ICU_DATA_BUILDTOOL_OPTS=--include_uni_core_data ./runConfigureICU Linux; +make -j8;