diff --git a/build/third_party_gn/bounds_checking_function/BUILD.gn b/build/third_party_gn/bounds_checking_function/BUILD.gn index 24013d17b359367f79ee4ec39308a9376702325b..6821970f266c9cc57677d4187a8b088b0a7bf14b 100644 --- a/build/third_party_gn/bounds_checking_function/BUILD.gn +++ b/build/third_party_gn/bounds_checking_function/BUILD.gn @@ -10,58 +10,64 @@ # 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. +if (!defined(ark_standalone_build)) { + ark_standalone_build = false +} -import("//third_party/bounds_checking_function/libsec_src.gni") -import("$build_root/ark.gni") +if (ark_standalone_build) { + import("$build_root/ark.gni") + import("//third_party/bounds_checking_function/libsec_src.gni") + import("$build_root/ark.gni") -config("libsec_public_config") { - include_dirs = [ "//third_party/bounds_checking_function/include" ] -} + config("libsec_public_config") { + include_dirs = [ "//third_party/bounds_checking_function/include" ] + } -ohos_static_library("libsec_static") { - stack_protector_ret = false - sources = libsec_sources - public_configs = [ ":libsec_public_config" ] - cflags = [ - "-D_INC_STRING_S", - "-D_INC_WCHAR_S", - "-D_SECIMP=//", - "-D_STDIO_S_DEFINED", - "-D_INC_STDIO_S", - "-D_INC_STDLIB_S", - "-D_INC_MEMORY_S", - ] -} + ohos_static_library("libsec_static") { + stack_protector_ret = false + sources = libsec_sources + public_configs = [ ":libsec_public_config" ] + cflags = [ + "-D_INC_STRING_S", + "-D_INC_WCHAR_S", + "-D_SECIMP=//", + "-D_STDIO_S_DEFINED", + "-D_INC_STDIO_S", + "-D_INC_STDLIB_S", + "-D_INC_MEMORY_S", + ] + } -SEC_SHARED_SUBSYS_NAME = "thirdparty" -SEC_SHARED_PART_NAME = "bounds_checking_function" + SEC_SHARED_SUBSYS_NAME = "thirdparty" + SEC_SHARED_PART_NAME = "bounds_checking_function" -ohos_shared_library("libsec_shared") { - stack_protector_ret = false - sources = libsec_sources - public_configs = [ ":libsec_public_config" ] - cflags = [ - "-D_INC_STRING_S", - "-D_INC_WCHAR_S", - "-D_SECIMP=//", - "-D_STDIO_S_DEFINED", - "-D_INC_STDIO_S", - "-D_INC_STDLIB_S", - "-D_INC_MEMORY_S", - ] + ohos_shared_library("libsec_shared") { + stack_protector_ret = false + sources = libsec_sources + public_configs = [ ":libsec_public_config" ] + cflags = [ + "-D_INC_STRING_S", + "-D_INC_WCHAR_S", + "-D_SECIMP=//", + "-D_STDIO_S_DEFINED", + "-D_INC_STDIO_S", + "-D_INC_STDLIB_S", + "-D_INC_MEMORY_S", + ] - part_name = "${SEC_SHARED_PART_NAME}" - subsystem_name = "${SEC_SHARED_SUBSYS_NAME}" - install_images = [ - "system", - "updater", - ] -} -if (is_ohos && run_with_qemu) { - copy("libsec_shared_for_qemu") { - deps = [ ":libsec_shared" ] + part_name = "${SEC_SHARED_PART_NAME}" + subsystem_name = "${SEC_SHARED_SUBSYS_NAME}" + install_images = [ + "system", + "updater", + ] + } + if (is_ohos && run_with_qemu) { + copy("libsec_shared_for_qemu") { + deps = [ ":libsec_shared" ] - sources = [ "${root_out_dir}/${SEC_SHARED_SUBSYS_NAME}/${SEC_SHARED_PART_NAME}/libsec_shared.so" ] - outputs = [ "${root_out_dir}/${so_dir_for_qemu}/lib/libsec_shared.so" ] + sources = [ "${root_out_dir}/${SEC_SHARED_SUBSYS_NAME}/${SEC_SHARED_PART_NAME}/libsec_shared.so" ] + outputs = [ "${root_out_dir}/${so_dir_for_qemu}/lib/libsec_shared.so" ] + } } -} +} \ No newline at end of file diff --git a/build/third_party_gn/cJSON/BUILD.gn b/build/third_party_gn/cJSON/BUILD.gn index 8d37da1d172a8ff66ef9c9ecec1960887ed52966..fd7125f56b264698c2bddd1a060c22fd0bf62bd3 100644 --- a/build/third_party_gn/cJSON/BUILD.gn +++ b/build/third_party_gn/cJSON/BUILD.gn @@ -10,27 +10,32 @@ #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. - -import("$build_root/ark.gni") -config("cJSON_config") { - include_dirs = [ "//third_party/cJSON" ] - defines = [ "CJSON_NESTING_LIMIT=(128)" ] -} -ohos_static_library("cjson_static") { - stack_protector_ret = false - sources = [ "//third_party/cJSON/cJSON.c" ] - public_configs = [ ":cJSON_config" ] - part_name = "cJSON" - subsystem_name = "thirdparty" +if (!defined(ark_standalone_build)) { + ark_standalone_build = false } -ohos_shared_library("cjson") { - stack_protector_ret = false - deps = [ ":cjson_static" ] - public_configs = [ ":cJSON_config" ] - part_name = "cJSON" - subsystem_name = "thirdparty" - install_images = [ - "system", - "updater", - ] + +if (ark_standalone_build) { + import("$build_root/ark.gni") + config("cJSON_config") { + include_dirs = [ "//third_party/cJSON" ] + defines = [ "CJSON_NESTING_LIMIT=(128)" ] + } + ohos_static_library("cjson_static") { + stack_protector_ret = false + sources = [ "//third_party/cJSON/cJSON.c" ] + public_configs = [ ":cJSON_config" ] + part_name = "cJSON" + subsystem_name = "thirdparty" + } + ohos_shared_library("cjson") { + stack_protector_ret = false + deps = [ ":cjson_static" ] + public_configs = [ ":cJSON_config" ] + part_name = "cJSON" + subsystem_name = "thirdparty" + install_images = [ + "system", + "updater", + ] + } } diff --git a/build/third_party_gn/icu/icu4c/BUILD.gn b/build/third_party_gn/icu/icu4c/BUILD.gn index 67d5a36aff5ae0f08a6358f4c6a7e1d678635678..0293829adcd9189a97c1c3e06e97dc0eebf14f5e 100644 --- a/build/third_party_gn/icu/icu4c/BUILD.gn +++ b/build/third_party_gn/icu/icu4c/BUILD.gn @@ -10,779 +10,780 @@ # 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. +if (!defined(ark_standalone_build)) { + ark_standalone_build = false +} if (ark_standalone_build) { import("$build_root/ark.gni") -} else { - import("//build/ohos.gni") -} - -config("icu_config") { - include_dirs = [ - "//third_party/icu/icu4c/source/common", - "//third_party/icu/icu4c/source/i18n", - "//third_party/icu/icu4c/source", - ] -} - -config("static_icustubdata_all_deps_config") { - include_dirs = [ "//third_party/icu/icu4c/source/common" ] -} - -ohos_static_library("static_icustubdata") { - configs = [ - ":icu_config", - "$build_root/config/compiler:rtti", - ] - sources = [ "//third_party/icu/icu4c/source/stubdata/stubdata.cpp" ] - - cflags_cc = [ - "-O3", - "-W", - "-Wall", - "-pedantic", - "-Wpointer-arith", - "-Wwrite-strings", - "-std=c++11", - "-Wno-ignored-attributes", - "-Wno-deprecated-declarations", - ] - output_dir = "${root_out_dir}/third_party/icu/stubdata" - output_name = "stubdata" - part_name = "icu" - subsystem_name = "thirdparty" -} -icu_common_source = [ - "//third_party/icu/icu4c/source/common/ubiditransform.cpp", - "//third_party/icu/icu4c/source/common/locutil.cpp", - "//third_party/icu/icu4c/source/common/cstring.cpp", - "//third_party/icu/icu4c/source/common/rbbiscan.cpp", - "//third_party/icu/icu4c/source/common/utrie.cpp", - "//third_party/icu/icu4c/source/common/cwchar.cpp", - "//third_party/icu/icu4c/source/common/bytestriebuilder.cpp", - "//third_party/icu/icu4c/source/common/umapfile.cpp", - "//third_party/icu/icu4c/source/common/uenum.cpp", - "//third_party/icu/icu4c/source/common/putil.cpp", - "//third_party/icu/icu4c/source/common/bytestrieiterator.cpp", - "//third_party/icu/icu4c/source/common/unifunct.cpp", - "//third_party/icu/icu4c/source/common/rbbistbl.cpp", - "//third_party/icu/icu4c/source/common/bytestrie.cpp", - "//third_party/icu/icu4c/source/common/ucptrie.cpp", - "//third_party/icu/icu4c/source/common/errorcode.cpp", - "//third_party/icu/icu4c/source/common/unames.cpp", - "//third_party/icu/icu4c/source/common/restrace.cpp", - "//third_party/icu/icu4c/source/common/util.cpp", - "//third_party/icu/icu4c/source/common/sharedobject.cpp", - "//third_party/icu/icu4c/source/common/bmpset.cpp", - "//third_party/icu/icu4c/source/common/servlk.cpp", - "//third_party/icu/icu4c/source/common/ustrcase_locale.cpp", - "//third_party/icu/icu4c/source/common/localeprioritylist.cpp", - "//third_party/icu/icu4c/source/common/ucnvbocu.cpp", - "//third_party/icu/icu4c/source/common/ucharstrieiterator.cpp", - "//third_party/icu/icu4c/source/common/unisetspan.cpp", - "//third_party/icu/icu4c/source/common/locavailable.cpp", - "//third_party/icu/icu4c/source/common/unistr.cpp", - "//third_party/icu/icu4c/source/common/ustr_wcs.cpp", - "//third_party/icu/icu4c/source/common/ucnv_err.cpp", - "//third_party/icu/icu4c/source/common/ucnv_lmb.cpp", - "//third_party/icu/icu4c/source/common/rbbidata.cpp", - "//third_party/icu/icu4c/source/common/uarrsort.cpp", - "//third_party/icu/icu4c/source/common/ucnv2022.cpp", - "//third_party/icu/icu4c/source/common/uresbund.cpp", - "//third_party/icu/icu4c/source/common/ucnvsel.cpp", - "//third_party/icu/icu4c/source/common/unistr_titlecase_brkiter.cpp", - "//third_party/icu/icu4c/source/common/loadednormalizer2impl.cpp", - "//third_party/icu/icu4c/source/common/ustring.cpp", - "//third_party/icu/icu4c/source/common/unifilt.cpp", - "//third_party/icu/icu4c/source/common/ubrk.cpp", - "//third_party/icu/icu4c/source/common/bytesinkutil.cpp", - "//third_party/icu/icu4c/source/common/localebuilder.cpp", - "//third_party/icu/icu4c/source/common/rbbi_cache.cpp", - "//third_party/icu/icu4c/source/common/ucnvhz.cpp", - "//third_party/icu/icu4c/source/common/uniset_closure.cpp", - "//third_party/icu/icu4c/source/common/uloc.cpp", - "//third_party/icu/icu4c/source/common/utypes.cpp", - "//third_party/icu/icu4c/source/common/ucnv_u16.cpp", - "//third_party/icu/icu4c/source/common/uniset_props.cpp", - "//third_party/icu/icu4c/source/common/locbased.cpp", - "//third_party/icu/icu4c/source/common/unistr_cnv.cpp", - "//third_party/icu/icu4c/source/common/ucnv_ct.cpp", - "//third_party/icu/icu4c/source/common/unormcmp.cpp", - "//third_party/icu/icu4c/source/common/wintz.cpp", - "//third_party/icu/icu4c/source/common/ruleiter.cpp", - "//third_party/icu/icu4c/source/common/utrie2.cpp", - "//third_party/icu/icu4c/source/common/locresdata.cpp", - "//third_party/icu/icu4c/source/common/ucnv_u8.cpp", - "//third_party/icu/icu4c/source/common/uscript_props.cpp", - "//third_party/icu/icu4c/source/common/locdspnm.cpp", - "//third_party/icu/icu4c/source/common/locid.cpp", - "//third_party/icu/icu4c/source/common/rbbitblb.cpp", - "//third_party/icu/icu4c/source/common/icudataver.cpp", - "//third_party/icu/icu4c/source/common/ubidi.cpp", - "//third_party/icu/icu4c/source/common/brkiter.cpp", - "//third_party/icu/icu4c/source/common/uvectr32.cpp", - "//third_party/icu/icu4c/source/common/usc_impl.cpp", - "//third_party/icu/icu4c/source/common/normlzr.cpp", - "//third_party/icu/icu4c/source/common/icuplug.cpp", - "//third_party/icu/icu4c/source/common/uvector.cpp", - "//third_party/icu/icu4c/source/common/ucnv_set.cpp", - "//third_party/icu/icu4c/source/common/udataswp.cpp", - "//third_party/icu/icu4c/source/common/uhash_us.cpp", - "//third_party/icu/icu4c/source/common/rbbisetb.cpp", - "//third_party/icu/icu4c/source/common/ubidi_props.cpp", - "//third_party/icu/icu4c/source/common/ucmndata.cpp", - "//third_party/icu/icu4c/source/common/locdistance.cpp", - "//third_party/icu/icu4c/source/common/serv.cpp", - "//third_party/icu/icu4c/source/common/utrie_swap.cpp", - "//third_party/icu/icu4c/source/common/uchar.cpp", - "//third_party/icu/icu4c/source/common/uloc_tag.cpp", - "//third_party/icu/icu4c/source/common/ustr_titlecase_brkiter.cpp", - "//third_party/icu/icu4c/source/common/pluralmap.cpp", - "//third_party/icu/icu4c/source/common/lsr.cpp", - "//third_party/icu/icu4c/source/common/uhash.cpp", - "//third_party/icu/icu4c/source/common/propname.cpp", - "//third_party/icu/icu4c/source/common/ucnvlat1.cpp", - "//third_party/icu/icu4c/source/common/ucnv_ext.cpp", - "//third_party/icu/icu4c/source/common/ubidiln.cpp", - "//third_party/icu/icu4c/source/common/ucnv_cb.cpp", - "//third_party/icu/icu4c/source/common/static_unicode_sets.cpp", - "//third_party/icu/icu4c/source/common/dictbe.cpp", - "//third_party/icu/icu4c/source/common/stringtriebuilder.cpp", - "//third_party/icu/icu4c/source/common/uvectr64.cpp", - "//third_party/icu/icu4c/source/common/patternprops.cpp", - "//third_party/icu/icu4c/source/common/propsvec.cpp", - "//third_party/icu/icu4c/source/common/ustrenum.cpp", - "//third_party/icu/icu4c/source/common/ucnv_u32.cpp", - "//third_party/icu/icu4c/source/common/ustr_cnv.cpp", - "//third_party/icu/icu4c/source/common/edits.cpp", - "//third_party/icu/icu4c/source/common/loclikely.cpp", - "//third_party/icu/icu4c/source/common/parsepos.cpp", - "//third_party/icu/icu4c/source/common/loclikelysubtags.cpp", - "//third_party/icu/icu4c/source/common/uloc_keytype.cpp", - "//third_party/icu/icu4c/source/common/appendable.cpp", - "//third_party/icu/icu4c/source/common/filteredbrk.cpp", - "//third_party/icu/icu4c/source/common/ucharstrie.cpp", - "//third_party/icu/icu4c/source/common/uiter.cpp", - "//third_party/icu/icu4c/source/common/messagepattern.cpp", - "//third_party/icu/icu4c/source/common/servrbf.cpp", - "//third_party/icu/icu4c/source/common/rbbirb.cpp", - "//third_party/icu/icu4c/source/common/uinit.cpp", - "//third_party/icu/icu4c/source/common/stringpiece.cpp", - "//third_party/icu/icu4c/source/common/normalizer2impl.cpp", - "//third_party/icu/icu4c/source/common/ucharstriebuilder.cpp", - "//third_party/icu/icu4c/source/common/uobject.cpp", - "//third_party/icu/icu4c/source/common/ushape.cpp", - "//third_party/icu/icu4c/source/common/ucasemap.cpp", - "//third_party/icu/icu4c/source/common/uinvchar.cpp", - "//third_party/icu/icu4c/source/common/utf_impl.cpp", - "//third_party/icu/icu4c/source/common/ustack.cpp", - "//third_party/icu/icu4c/source/common/characterproperties.cpp", - "//third_party/icu/icu4c/source/common/rbbi.cpp", - "//third_party/icu/icu4c/source/common/ucasemap_titlecase_brkiter.cpp", - "//third_party/icu/icu4c/source/common/caniter.cpp", - "//third_party/icu/icu4c/source/common/ucnv_bld.cpp", - "//third_party/icu/icu4c/source/common/ucln_cmn.cpp", - "//third_party/icu/icu4c/source/common/chariter.cpp", - "//third_party/icu/icu4c/source/common/punycode.cpp", - "//third_party/icu/icu4c/source/common/ustrtrns.cpp", - "//third_party/icu/icu4c/source/common/ucnvmbcs.cpp", - "//third_party/icu/icu4c/source/common/bytestream.cpp", - "//third_party/icu/icu4c/source/common/servlkf.cpp", - "//third_party/icu/icu4c/source/common/udatamem.cpp", - "//third_party/icu/icu4c/source/common/ucnv_io.cpp", - "//third_party/icu/icu4c/source/common/dtintrv.cpp", - "//third_party/icu/icu4c/source/common/cstr.cpp", - "//third_party/icu/icu4c/source/common/ulist.cpp", - "//third_party/icu/icu4c/source/common/ucnvisci.cpp", - "//third_party/icu/icu4c/source/common/brkeng.cpp", - "//third_party/icu/icu4c/source/common/localematcher.cpp", - "//third_party/icu/icu4c/source/common/umutablecptrie.cpp", - "//third_party/icu/icu4c/source/common/locdispnames.cpp", - "//third_party/icu/icu4c/source/common/uchriter.cpp", - "//third_party/icu/icu4c/source/common/uresdata.cpp", - "//third_party/icu/icu4c/source/common/unifiedcache.cpp", - "//third_party/icu/icu4c/source/common/dictionarydata.cpp", - "//third_party/icu/icu4c/source/common/uscript.cpp", - "//third_party/icu/icu4c/source/common/ucnv_u7.cpp", - "//third_party/icu/icu4c/source/common/unistr_case.cpp", - "//third_party/icu/icu4c/source/common/ucat.cpp", - "//third_party/icu/icu4c/source/common/resource.cpp", - "//third_party/icu/icu4c/source/common/usprep.cpp", - "//third_party/icu/icu4c/source/common/ucnvdisp.cpp", - "//third_party/icu/icu4c/source/common/uniset.cpp", - "//third_party/icu/icu4c/source/common/ucnv.cpp", - "//third_party/icu/icu4c/source/common/ucnvscsu.cpp", - "//third_party/icu/icu4c/source/common/uset_props.cpp", - "//third_party/icu/icu4c/source/common/umutex.cpp", - "//third_party/icu/icu4c/source/common/ucnv_cnv.cpp", - "//third_party/icu/icu4c/source/common/locmap.cpp", - "//third_party/icu/icu4c/source/common/resbund.cpp", - "//third_party/icu/icu4c/source/common/filterednormalizer2.cpp", - "//third_party/icu/icu4c/source/common/uprops.cpp", - "//third_party/icu/icu4c/source/common/schriter.cpp", - "//third_party/icu/icu4c/source/common/simpleformatter.cpp", - "//third_party/icu/icu4c/source/common/uts46.cpp", - "//third_party/icu/icu4c/source/common/ucol_swp.cpp", - "//third_party/icu/icu4c/source/common/udata.cpp", - "//third_party/icu/icu4c/source/common/ustrfmt.cpp", - "//third_party/icu/icu4c/source/common/servslkf.cpp", - "//third_party/icu/icu4c/source/common/servls.cpp", - "//third_party/icu/icu4c/source/common/unistr_props.cpp", - "//third_party/icu/icu4c/source/common/utrace.cpp", - "//third_party/icu/icu4c/source/common/utrie2_builder.cpp", - "//third_party/icu/icu4c/source/common/ucase.cpp", - "//third_party/icu/icu4c/source/common/cmemory.cpp", - "//third_party/icu/icu4c/source/common/uset.cpp", - "//third_party/icu/icu4c/source/common/unistr_case_locale.cpp", - "//third_party/icu/icu4c/source/common/ures_cnv.cpp", - "//third_party/icu/icu4c/source/common/charstr.cpp", - "//third_party/icu/icu4c/source/common/uidna.cpp", - "//third_party/icu/icu4c/source/common/normalizer2.cpp", - "//third_party/icu/icu4c/source/common/resbund_cnv.cpp", - "//third_party/icu/icu4c/source/common/umath.cpp", - "//third_party/icu/icu4c/source/common/utext.cpp", - "//third_party/icu/icu4c/source/common/ucurr.cpp", - "//third_party/icu/icu4c/source/common/util_props.cpp", - "//third_party/icu/icu4c/source/common/unorm.cpp", - "//third_party/icu/icu4c/source/common/ubidiwrt.cpp", - "//third_party/icu/icu4c/source/common/usetiter.cpp", - "//third_party/icu/icu4c/source/common/rbbinode.cpp", - "//third_party/icu/icu4c/source/common/ustrcase.cpp", - "//third_party/icu/icu4c/source/common/servnotf.cpp", - "//third_party/icu/icu4c/source/common/emojiprops.cpp", - "//third_party/icu/icu4c/source/common/lstmbe.cpp", - "//third_party/icu/icu4c/source/ohos/init_data.cpp", -] - -icu_i18n_source = [ - "//third_party/icu/icu4c/source/i18n/number_capi.cpp", - "//third_party/icu/icu4c/source/i18n/upluralrules.cpp", - "//third_party/icu/icu4c/source/i18n/numparse_currency.cpp", - "//third_party/icu/icu4c/source/i18n/ufieldpositer.cpp", - "//third_party/icu/icu4c/source/i18n/number_output.cpp", - "//third_party/icu/icu4c/source/i18n/number_currencysymbols.cpp", - "//third_party/icu/icu4c/source/i18n/curramt.cpp", - "//third_party/icu/icu4c/source/i18n/alphaindex.cpp", - "//third_party/icu/icu4c/source/i18n/indiancal.cpp", - "//third_party/icu/icu4c/source/i18n/dayperiodrules.cpp", - "//third_party/icu/icu4c/source/i18n/displayoptions.cpp", - "//third_party/icu/icu4c/source/i18n/quantityformatter.cpp", - "//third_party/icu/icu4c/source/i18n/collationfastlatinbuilder.cpp", - "//third_party/icu/icu4c/source/i18n/csrucode.cpp", - "//third_party/icu/icu4c/source/i18n/measunit_extra.cpp", - "//third_party/icu/icu4c/source/i18n/ethpccal.cpp", - "//third_party/icu/icu4c/source/i18n/anytrans.cpp", - "//third_party/icu/icu4c/source/i18n/number_scientific.cpp", - "//third_party/icu/icu4c/source/i18n/cpdtrans.cpp", - "//third_party/icu/icu4c/source/i18n/regexst.cpp", - "//third_party/icu/icu4c/source/i18n/numfmt.cpp", - "//third_party/icu/icu4c/source/i18n/formattedvalue.cpp", - "//third_party/icu/icu4c/source/i18n/unesctrn.cpp", - "//third_party/icu/icu4c/source/i18n/ucoleitr.cpp", - "//third_party/icu/icu4c/source/i18n/tmutamt.cpp", - "//third_party/icu/icu4c/source/i18n/transreg.cpp", - "//third_party/icu/icu4c/source/i18n/unum.cpp", - "//third_party/icu/icu4c/source/i18n/number_longnames.cpp", - "//third_party/icu/icu4c/source/i18n/numparse_affixes.cpp", - "//third_party/icu/icu4c/source/i18n/plurrule.cpp", - "//third_party/icu/icu4c/source/i18n/zrule.cpp", - "//third_party/icu/icu4c/source/i18n/collationrootelements.cpp", - "//third_party/icu/icu4c/source/i18n/currunit.cpp", - "//third_party/icu/icu4c/source/i18n/funcrepl.cpp", - "//third_party/icu/icu4c/source/i18n/collationdatareader.cpp", - "//third_party/icu/icu4c/source/i18n/buddhcal.cpp", - "//third_party/icu/icu4c/source/i18n/number_decimalquantity.cpp", - "//third_party/icu/icu4c/source/i18n/scriptset.cpp", - "//third_party/icu/icu4c/source/i18n/fmtable.cpp", - "//third_party/icu/icu4c/source/i18n/regextxt.cpp", - "//third_party/icu/icu4c/source/i18n/bocsu.cpp", - "//third_party/icu/icu4c/source/i18n/olsontz.cpp", - "//third_party/icu/icu4c/source/i18n/utmscale.cpp", - "//third_party/icu/icu4c/source/i18n/ucol.cpp", - "//third_party/icu/icu4c/source/i18n/currfmt.cpp", - "//third_party/icu/icu4c/source/i18n/hebrwcal.cpp", - "//third_party/icu/icu4c/source/i18n/ucol_sit.cpp", - "//third_party/icu/icu4c/source/i18n/rbnf.cpp", - "//third_party/icu/icu4c/source/i18n/decContext.cpp", - "//third_party/icu/icu4c/source/i18n/collationdatawriter.cpp", - "//third_party/icu/icu4c/source/i18n/csr2022.cpp", - "//third_party/icu/icu4c/source/i18n/dtrule.cpp", - "//third_party/icu/icu4c/source/i18n/numparse_validators.cpp", - "//third_party/icu/icu4c/source/i18n/numparse_parsednumber.cpp", - "//third_party/icu/icu4c/source/i18n/double-conversion-fast-dtoa.cpp", - "//third_party/icu/icu4c/source/i18n/choicfmt.cpp", - "//third_party/icu/icu4c/source/i18n/format.cpp", - "//third_party/icu/icu4c/source/i18n/reldatefmt.cpp", - "//third_party/icu/icu4c/source/i18n/double-conversion-double-to-string.cpp", - "//third_party/icu/icu4c/source/i18n/rbt_data.cpp", - "//third_party/icu/icu4c/source/i18n/smpdtfmt.cpp", - "//third_party/icu/icu4c/source/i18n/double-conversion-bignum-dtoa.cpp", - "//third_party/icu/icu4c/source/i18n/number_padding.cpp", - "//third_party/icu/icu4c/source/i18n/vtzone.cpp", - "//third_party/icu/icu4c/source/i18n/region.cpp", - "//third_party/icu/icu4c/source/i18n/coptccal.cpp", - "//third_party/icu/icu4c/source/i18n/datefmt.cpp", - "//third_party/icu/icu4c/source/i18n/formatted_string_builder.cpp", - "//third_party/icu/icu4c/source/i18n/numparse_impl.cpp", - "//third_party/icu/icu4c/source/i18n/plurfmt.cpp", - "//third_party/icu/icu4c/source/i18n/rematch.cpp", - "//third_party/icu/icu4c/source/i18n/simpletz.cpp", - "//third_party/icu/icu4c/source/i18n/search.cpp", - "//third_party/icu/icu4c/source/i18n/number_mapper.cpp", - "//third_party/icu/icu4c/source/i18n/inputext.cpp", - "//third_party/icu/icu4c/source/i18n/dtptngen.cpp", - "//third_party/icu/icu4c/source/i18n/coleitr.cpp", - "//third_party/icu/icu4c/source/i18n/collationweights.cpp", - "//third_party/icu/icu4c/source/i18n/number_modifiers.cpp", - "//third_party/icu/icu4c/source/i18n/scientificnumberformatter.cpp", - "//third_party/icu/icu4c/source/i18n/vzone.cpp", - "//third_party/icu/icu4c/source/i18n/fphdlimp.cpp", - "//third_party/icu/icu4c/source/i18n/udatpg.cpp", - "//third_party/icu/icu4c/source/i18n/collationfcd.cpp", - "//third_party/icu/icu4c/source/i18n/tridpars.cpp", - "//third_party/icu/icu4c/source/i18n/csmatch.cpp", - "//third_party/icu/icu4c/source/i18n/dangical.cpp", - "//third_party/icu/icu4c/source/i18n/ulocdata.cpp", - "//third_party/icu/icu4c/source/i18n/double-conversion-strtod.cpp", - "//third_party/icu/icu4c/source/i18n/erarules.cpp", - "//third_party/icu/icu4c/source/i18n/numsys.cpp", - "//third_party/icu/icu4c/source/i18n/csdetect.cpp", - "//third_party/icu/icu4c/source/i18n/japancal.cpp", - "//third_party/icu/icu4c/source/i18n/collation.cpp", - "//third_party/icu/icu4c/source/i18n/uregex.cpp", - "//third_party/icu/icu4c/source/i18n/timezone.cpp", - "//third_party/icu/icu4c/source/i18n/strmatch.cpp", - "//third_party/icu/icu4c/source/i18n/decNumber.cpp", - "//third_party/icu/icu4c/source/i18n/nortrans.cpp", - "//third_party/icu/icu4c/source/i18n/sortkey.cpp", - "//third_party/icu/icu4c/source/i18n/ulistformatter.cpp", - "//third_party/icu/icu4c/source/i18n/tzgnames.cpp", - "//third_party/icu/icu4c/source/i18n/number_multiplier.cpp", - "//third_party/icu/icu4c/source/i18n/ztrans.cpp", - "//third_party/icu/icu4c/source/i18n/persncal.cpp", - "//third_party/icu/icu4c/source/i18n/number_utils.cpp", - "//third_party/icu/icu4c/source/i18n/csrmbcs.cpp", - "//third_party/icu/icu4c/source/i18n/taiwncal.cpp", - "//third_party/icu/icu4c/source/i18n/dtitvinf.cpp", - "//third_party/icu/icu4c/source/i18n/astro.cpp", - "//third_party/icu/icu4c/source/i18n/number_patternmodifier.cpp", - "//third_party/icu/icu4c/source/i18n/rulebasedcollator.cpp", - "//third_party/icu/icu4c/source/i18n/msgfmt.cpp", - "//third_party/icu/icu4c/source/i18n/stsearch.cpp", - "//third_party/icu/icu4c/source/i18n/number_affixutils.cpp", - "//third_party/icu/icu4c/source/i18n/quant.cpp", - "//third_party/icu/icu4c/source/i18n/calendar.cpp", - "//third_party/icu/icu4c/source/i18n/collationroot.cpp", - "//third_party/icu/icu4c/source/i18n/rbt_rule.cpp", - "//third_party/icu/icu4c/source/i18n/number_compact.cpp", - "//third_party/icu/icu4c/source/i18n/name2uni.cpp", - "//third_party/icu/icu4c/source/i18n/chnsecal.cpp", - "//third_party/icu/icu4c/source/i18n/csrutf8.cpp", - "//third_party/icu/icu4c/source/i18n/basictz.cpp", - "//third_party/icu/icu4c/source/i18n/reldtfmt.cpp", - "//third_party/icu/icu4c/source/i18n/nultrans.cpp", - "//third_party/icu/icu4c/source/i18n/number_grouping.cpp", - "//third_party/icu/icu4c/source/i18n/number_symbolswrapper.cpp", - "//third_party/icu/icu4c/source/i18n/number_usageprefs.cpp", - "//third_party/icu/icu4c/source/i18n/numrange_capi.cpp", - "//third_party/icu/icu4c/source/i18n/pluralranges.cpp", - "//third_party/icu/icu4c/source/i18n/units_complexconverter.cpp", - "//third_party/icu/icu4c/source/i18n/units_converter.cpp", - "//third_party/icu/icu4c/source/i18n/units_data.cpp", - "//third_party/icu/icu4c/source/i18n/units_router.cpp", - "//third_party/icu/icu4c/source/i18n/rbt_pars.cpp", - "//third_party/icu/icu4c/source/i18n/winnmfmt.cpp", - "//third_party/icu/icu4c/source/i18n/uregexc.cpp", - "//third_party/icu/icu4c/source/i18n/fpositer.cpp", - "//third_party/icu/icu4c/source/i18n/tmutfmt.cpp", - "//third_party/icu/icu4c/source/i18n/compactdecimalformat.cpp", - "//third_party/icu/icu4c/source/i18n/numparse_decimal.cpp", - "//third_party/icu/icu4c/source/i18n/number_notation.cpp", - "//third_party/icu/icu4c/source/i18n/uspoof_conf.cpp", - "//third_party/icu/icu4c/source/i18n/utf16collationiterator.cpp", - "//third_party/icu/icu4c/source/i18n/udat.cpp", - "//third_party/icu/icu4c/source/i18n/number_skeletons.cpp", - "//third_party/icu/icu4c/source/i18n/utrans.cpp", - "//third_party/icu/icu4c/source/i18n/number_rounding.cpp", - "//third_party/icu/icu4c/source/i18n/double-conversion-bignum.cpp", - "//third_party/icu/icu4c/source/i18n/number_asformat.cpp", - "//third_party/icu/icu4c/source/i18n/double-conversion-string-to-double.cpp", - "//third_party/icu/icu4c/source/i18n/rbtz.cpp", - "//third_party/icu/icu4c/source/i18n/csrsbcs.cpp", - "//third_party/icu/icu4c/source/i18n/selfmt.cpp", - "//third_party/icu/icu4c/source/i18n/tztrans.cpp", - "//third_party/icu/icu4c/source/i18n/uspoof_impl.cpp", - "//third_party/icu/icu4c/source/i18n/regeximp.cpp", - "//third_party/icu/icu4c/source/i18n/measure.cpp", - "//third_party/icu/icu4c/source/i18n/fmtable_cnv.cpp", - "//third_party/icu/icu4c/source/i18n/uspoof.cpp", - "//third_party/icu/icu4c/source/i18n/gregoimp.cpp", - "//third_party/icu/icu4c/source/i18n/umsg.cpp", - "//third_party/icu/icu4c/source/i18n/numparse_symbols.cpp", - "//third_party/icu/icu4c/source/i18n/numrange_impl.cpp", - "//third_party/icu/icu4c/source/i18n/collationtailoring.cpp", - "//third_party/icu/icu4c/source/i18n/double-conversion-cached-powers.cpp", - "//third_party/icu/icu4c/source/i18n/udateintervalformat.cpp", - "//third_party/icu/icu4c/source/i18n/uni2name.cpp", - "//third_party/icu/icu4c/source/i18n/casetrn.cpp", - "//third_party/icu/icu4c/source/i18n/windtfmt.cpp", - "//third_party/icu/icu4c/source/i18n/listformatter.cpp", - "//third_party/icu/icu4c/source/i18n/uregion.cpp", - "//third_party/icu/icu4c/source/i18n/usearch.cpp", - "//third_party/icu/icu4c/source/i18n/brktrans.cpp", - "//third_party/icu/icu4c/source/i18n/gender.cpp", - "//third_party/icu/icu4c/source/i18n/collationruleparser.cpp", - "//third_party/icu/icu4c/source/i18n/rbt.cpp", - "//third_party/icu/icu4c/source/i18n/tzfmt.cpp", - "//third_party/icu/icu4c/source/i18n/dtfmtsym.cpp", - "//third_party/icu/icu4c/source/i18n/tolowtrn.cpp", - "//third_party/icu/icu4c/source/i18n/collationdatabuilder.cpp", - "//third_party/icu/icu4c/source/i18n/unumsys.cpp", - "//third_party/icu/icu4c/source/i18n/csrecog.cpp", - "//third_party/icu/icu4c/source/i18n/collationfastlatin.cpp", - "//third_party/icu/icu4c/source/i18n/esctrn.cpp", - "//third_party/icu/icu4c/source/i18n/collationdata.cpp", - "//third_party/icu/icu4c/source/i18n/titletrn.cpp", - "//third_party/icu/icu4c/source/i18n/ucal.cpp", - "//third_party/icu/icu4c/source/i18n/regexcmp.cpp", - "//third_party/icu/icu4c/source/i18n/wintzimpl.cpp", - "//third_party/icu/icu4c/source/i18n/decimfmt.cpp", - "//third_party/icu/icu4c/source/i18n/tmunit.cpp", - "//third_party/icu/icu4c/source/i18n/number_integerwidth.cpp", - "//third_party/icu/icu4c/source/i18n/ucsdet.cpp", - "//third_party/icu/icu4c/source/i18n/uspoof_build.cpp", - "//third_party/icu/icu4c/source/i18n/ucln_in.cpp", - "//third_party/icu/icu4c/source/i18n/measfmt.cpp", - "//third_party/icu/icu4c/source/i18n/formattedval_iterimpl.cpp", - "//third_party/icu/icu4c/source/i18n/toupptrn.cpp", - "//third_party/icu/icu4c/source/i18n/translit.cpp", - "//third_party/icu/icu4c/source/i18n/dtitvfmt.cpp", - "//third_party/icu/icu4c/source/i18n/dcfmtsym.cpp", - "//third_party/icu/icu4c/source/i18n/islamcal.cpp", - "//third_party/icu/icu4c/source/i18n/numrange_fluent.cpp", - "//third_party/icu/icu4c/source/i18n/gregocal.cpp", - "//third_party/icu/icu4c/source/i18n/zonemeta.cpp", - "//third_party/icu/icu4c/source/i18n/collationbuilder.cpp", - "//third_party/icu/icu4c/source/i18n/string_segment.cpp", - "//third_party/icu/icu4c/source/i18n/collationkeys.cpp", - "//third_party/icu/icu4c/source/i18n/coll.cpp", - "//third_party/icu/icu4c/source/i18n/uitercollationiterator.cpp", - "//third_party/icu/icu4c/source/i18n/nfsubs.cpp", - "//third_party/icu/icu4c/source/i18n/smpdtfst.cpp", - "//third_party/icu/icu4c/source/i18n/collationsettings.cpp", - "//third_party/icu/icu4c/source/i18n/formattedval_sbimpl.cpp", - "//third_party/icu/icu4c/source/i18n/strrepl.cpp", - "//third_party/icu/icu4c/source/i18n/standardplural.cpp", - "//third_party/icu/icu4c/source/i18n/ucol_res.cpp", - "//third_party/icu/icu4c/source/i18n/repattrn.cpp", - "//third_party/icu/icu4c/source/i18n/tznames_impl.cpp", - "//third_party/icu/icu4c/source/i18n/numparse_compositions.cpp", - "//third_party/icu/icu4c/source/i18n/rbt_set.cpp", - "//third_party/icu/icu4c/source/i18n/currpinf.cpp", - "//third_party/icu/icu4c/source/i18n/collationsets.cpp", - "//third_party/icu/icu4c/source/i18n/cecal.cpp", - "//third_party/icu/icu4c/source/i18n/tzrule.cpp", - "//third_party/icu/icu4c/source/i18n/collationiterator.cpp", - "//third_party/icu/icu4c/source/i18n/numparse_scientific.cpp", - "//third_party/icu/icu4c/source/i18n/number_patternstring.cpp", - "//third_party/icu/icu4c/source/i18n/utf8collationiterator.cpp", - "//third_party/icu/icu4c/source/i18n/sharedbreakiterator.cpp", - "//third_party/icu/icu4c/source/i18n/number_fluent.cpp", - "//third_party/icu/icu4c/source/i18n/measunit.cpp", - "//third_party/icu/icu4c/source/i18n/collationcompare.cpp", - "//third_party/icu/icu4c/source/i18n/number_formatimpl.cpp", - "//third_party/icu/icu4c/source/i18n/number_decimfmtprops.cpp", - "//third_party/icu/icu4c/source/i18n/nfrs.cpp", - "//third_party/icu/icu4c/source/i18n/tznames.cpp", - "//third_party/icu/icu4c/source/i18n/remtrans.cpp", - "//third_party/icu/icu4c/source/i18n/nfrule.cpp", -] + config("icu_config") { + include_dirs = [ + "//third_party/icu/icu4c/source/common", + "//third_party/icu/icu4c/source/i18n", + "//third_party/icu/icu4c/source", + ] + } -ohos_shared_library("shared_icuuc") { - ldflags = [ - "-shared", - "-lm", - ] + config("static_icustubdata_all_deps_config") { + include_dirs = [ "//third_party/icu/icu4c/source/common" ] + } - configs = [ - ":icu_config", - "$build_root/config/compiler:rtti", - ] - all_dependent_configs = [ ":static_icustubdata_all_deps_config" ] - defines = [ - "U_ATTRIBUTE_DEPRECATED=", - "U_COMMON_IMPLEMENTATION", - "UPRV_BLOCK_MACRO_BEGIN=", - "UPRV_BLOCK_MACRO_END=", - "UCONFIG_USE_WINDOWS_LCID_MAPPING_API=0", - "_REENTRANT", - ] - sources = icu_common_source - deps = [ ":static_icustubdata" ] - cflags_cc = [ - "-O3", - "-W", - "-Wall", - "-pedantic", - "-Wpointer-arith", - "-Wwrite-strings", - "-Wno-error=unused-parameter", - "-Wno-error=unused-const-variable", - "-Wno-error=unneeded-internal-declaration", - "-std=c++11", - "-Wno-ignored-attributes", - "-Wno-unused-but-set-variable", - "-Wno-deprecated-declarations", - ] + ohos_static_library("static_icustubdata") { + configs = [ + ":icu_config", + "$build_root/config/compiler:rtti", + ] + sources = [ "//third_party/icu/icu4c/source/stubdata/stubdata.cpp" ] - if (is_standard_system || ark_standalone_build) { + cflags_cc = [ + "-O3", + "-W", + "-Wall", + "-pedantic", + "-Wpointer-arith", + "-Wwrite-strings", + "-std=c++11", + "-Wno-ignored-attributes", + "-Wno-deprecated-declarations", + ] + output_dir = "${root_out_dir}/third_party/icu/stubdata" + output_name = "stubdata" part_name = "icu" subsystem_name = "thirdparty" - } else { - part_name = "i18n" - subsystem_name = "global" } - innerapi_tags = [ "platformsdk" ] - install_images = [ system_base_dir ] - relative_install_dir = "platformsdk" - output_name = "hmicuuc" - install_enable = true -} + icu_common_source = [ + "//third_party/icu/icu4c/source/common/ubiditransform.cpp", + "//third_party/icu/icu4c/source/common/locutil.cpp", + "//third_party/icu/icu4c/source/common/cstring.cpp", + "//third_party/icu/icu4c/source/common/rbbiscan.cpp", + "//third_party/icu/icu4c/source/common/utrie.cpp", + "//third_party/icu/icu4c/source/common/cwchar.cpp", + "//third_party/icu/icu4c/source/common/bytestriebuilder.cpp", + "//third_party/icu/icu4c/source/common/umapfile.cpp", + "//third_party/icu/icu4c/source/common/uenum.cpp", + "//third_party/icu/icu4c/source/common/putil.cpp", + "//third_party/icu/icu4c/source/common/bytestrieiterator.cpp", + "//third_party/icu/icu4c/source/common/unifunct.cpp", + "//third_party/icu/icu4c/source/common/rbbistbl.cpp", + "//third_party/icu/icu4c/source/common/bytestrie.cpp", + "//third_party/icu/icu4c/source/common/ucptrie.cpp", + "//third_party/icu/icu4c/source/common/errorcode.cpp", + "//third_party/icu/icu4c/source/common/unames.cpp", + "//third_party/icu/icu4c/source/common/restrace.cpp", + "//third_party/icu/icu4c/source/common/util.cpp", + "//third_party/icu/icu4c/source/common/sharedobject.cpp", + "//third_party/icu/icu4c/source/common/bmpset.cpp", + "//third_party/icu/icu4c/source/common/servlk.cpp", + "//third_party/icu/icu4c/source/common/ustrcase_locale.cpp", + "//third_party/icu/icu4c/source/common/localeprioritylist.cpp", + "//third_party/icu/icu4c/source/common/ucnvbocu.cpp", + "//third_party/icu/icu4c/source/common/ucharstrieiterator.cpp", + "//third_party/icu/icu4c/source/common/unisetspan.cpp", + "//third_party/icu/icu4c/source/common/locavailable.cpp", + "//third_party/icu/icu4c/source/common/unistr.cpp", + "//third_party/icu/icu4c/source/common/ustr_wcs.cpp", + "//third_party/icu/icu4c/source/common/ucnv_err.cpp", + "//third_party/icu/icu4c/source/common/ucnv_lmb.cpp", + "//third_party/icu/icu4c/source/common/rbbidata.cpp", + "//third_party/icu/icu4c/source/common/uarrsort.cpp", + "//third_party/icu/icu4c/source/common/ucnv2022.cpp", + "//third_party/icu/icu4c/source/common/uresbund.cpp", + "//third_party/icu/icu4c/source/common/ucnvsel.cpp", + "//third_party/icu/icu4c/source/common/unistr_titlecase_brkiter.cpp", + "//third_party/icu/icu4c/source/common/loadednormalizer2impl.cpp", + "//third_party/icu/icu4c/source/common/ustring.cpp", + "//third_party/icu/icu4c/source/common/unifilt.cpp", + "//third_party/icu/icu4c/source/common/ubrk.cpp", + "//third_party/icu/icu4c/source/common/bytesinkutil.cpp", + "//third_party/icu/icu4c/source/common/localebuilder.cpp", + "//third_party/icu/icu4c/source/common/rbbi_cache.cpp", + "//third_party/icu/icu4c/source/common/ucnvhz.cpp", + "//third_party/icu/icu4c/source/common/uniset_closure.cpp", + "//third_party/icu/icu4c/source/common/uloc.cpp", + "//third_party/icu/icu4c/source/common/utypes.cpp", + "//third_party/icu/icu4c/source/common/ucnv_u16.cpp", + "//third_party/icu/icu4c/source/common/uniset_props.cpp", + "//third_party/icu/icu4c/source/common/locbased.cpp", + "//third_party/icu/icu4c/source/common/unistr_cnv.cpp", + "//third_party/icu/icu4c/source/common/ucnv_ct.cpp", + "//third_party/icu/icu4c/source/common/unormcmp.cpp", + "//third_party/icu/icu4c/source/common/wintz.cpp", + "//third_party/icu/icu4c/source/common/ruleiter.cpp", + "//third_party/icu/icu4c/source/common/utrie2.cpp", + "//third_party/icu/icu4c/source/common/locresdata.cpp", + "//third_party/icu/icu4c/source/common/ucnv_u8.cpp", + "//third_party/icu/icu4c/source/common/uscript_props.cpp", + "//third_party/icu/icu4c/source/common/locdspnm.cpp", + "//third_party/icu/icu4c/source/common/locid.cpp", + "//third_party/icu/icu4c/source/common/rbbitblb.cpp", + "//third_party/icu/icu4c/source/common/icudataver.cpp", + "//third_party/icu/icu4c/source/common/ubidi.cpp", + "//third_party/icu/icu4c/source/common/brkiter.cpp", + "//third_party/icu/icu4c/source/common/uvectr32.cpp", + "//third_party/icu/icu4c/source/common/usc_impl.cpp", + "//third_party/icu/icu4c/source/common/normlzr.cpp", + "//third_party/icu/icu4c/source/common/icuplug.cpp", + "//third_party/icu/icu4c/source/common/uvector.cpp", + "//third_party/icu/icu4c/source/common/ucnv_set.cpp", + "//third_party/icu/icu4c/source/common/udataswp.cpp", + "//third_party/icu/icu4c/source/common/uhash_us.cpp", + "//third_party/icu/icu4c/source/common/rbbisetb.cpp", + "//third_party/icu/icu4c/source/common/ubidi_props.cpp", + "//third_party/icu/icu4c/source/common/ucmndata.cpp", + "//third_party/icu/icu4c/source/common/locdistance.cpp", + "//third_party/icu/icu4c/source/common/serv.cpp", + "//third_party/icu/icu4c/source/common/utrie_swap.cpp", + "//third_party/icu/icu4c/source/common/uchar.cpp", + "//third_party/icu/icu4c/source/common/uloc_tag.cpp", + "//third_party/icu/icu4c/source/common/ustr_titlecase_brkiter.cpp", + "//third_party/icu/icu4c/source/common/pluralmap.cpp", + "//third_party/icu/icu4c/source/common/lsr.cpp", + "//third_party/icu/icu4c/source/common/uhash.cpp", + "//third_party/icu/icu4c/source/common/propname.cpp", + "//third_party/icu/icu4c/source/common/ucnvlat1.cpp", + "//third_party/icu/icu4c/source/common/ucnv_ext.cpp", + "//third_party/icu/icu4c/source/common/ubidiln.cpp", + "//third_party/icu/icu4c/source/common/ucnv_cb.cpp", + "//third_party/icu/icu4c/source/common/static_unicode_sets.cpp", + "//third_party/icu/icu4c/source/common/dictbe.cpp", + "//third_party/icu/icu4c/source/common/stringtriebuilder.cpp", + "//third_party/icu/icu4c/source/common/uvectr64.cpp", + "//third_party/icu/icu4c/source/common/patternprops.cpp", + "//third_party/icu/icu4c/source/common/propsvec.cpp", + "//third_party/icu/icu4c/source/common/ustrenum.cpp", + "//third_party/icu/icu4c/source/common/ucnv_u32.cpp", + "//third_party/icu/icu4c/source/common/ustr_cnv.cpp", + "//third_party/icu/icu4c/source/common/edits.cpp", + "//third_party/icu/icu4c/source/common/loclikely.cpp", + "//third_party/icu/icu4c/source/common/parsepos.cpp", + "//third_party/icu/icu4c/source/common/loclikelysubtags.cpp", + "//third_party/icu/icu4c/source/common/uloc_keytype.cpp", + "//third_party/icu/icu4c/source/common/appendable.cpp", + "//third_party/icu/icu4c/source/common/filteredbrk.cpp", + "//third_party/icu/icu4c/source/common/ucharstrie.cpp", + "//third_party/icu/icu4c/source/common/uiter.cpp", + "//third_party/icu/icu4c/source/common/messagepattern.cpp", + "//third_party/icu/icu4c/source/common/servrbf.cpp", + "//third_party/icu/icu4c/source/common/rbbirb.cpp", + "//third_party/icu/icu4c/source/common/uinit.cpp", + "//third_party/icu/icu4c/source/common/stringpiece.cpp", + "//third_party/icu/icu4c/source/common/normalizer2impl.cpp", + "//third_party/icu/icu4c/source/common/ucharstriebuilder.cpp", + "//third_party/icu/icu4c/source/common/uobject.cpp", + "//third_party/icu/icu4c/source/common/ushape.cpp", + "//third_party/icu/icu4c/source/common/ucasemap.cpp", + "//third_party/icu/icu4c/source/common/uinvchar.cpp", + "//third_party/icu/icu4c/source/common/utf_impl.cpp", + "//third_party/icu/icu4c/source/common/ustack.cpp", + "//third_party/icu/icu4c/source/common/characterproperties.cpp", + "//third_party/icu/icu4c/source/common/rbbi.cpp", + "//third_party/icu/icu4c/source/common/ucasemap_titlecase_brkiter.cpp", + "//third_party/icu/icu4c/source/common/caniter.cpp", + "//third_party/icu/icu4c/source/common/ucnv_bld.cpp", + "//third_party/icu/icu4c/source/common/ucln_cmn.cpp", + "//third_party/icu/icu4c/source/common/chariter.cpp", + "//third_party/icu/icu4c/source/common/punycode.cpp", + "//third_party/icu/icu4c/source/common/ustrtrns.cpp", + "//third_party/icu/icu4c/source/common/ucnvmbcs.cpp", + "//third_party/icu/icu4c/source/common/bytestream.cpp", + "//third_party/icu/icu4c/source/common/servlkf.cpp", + "//third_party/icu/icu4c/source/common/udatamem.cpp", + "//third_party/icu/icu4c/source/common/ucnv_io.cpp", + "//third_party/icu/icu4c/source/common/dtintrv.cpp", + "//third_party/icu/icu4c/source/common/cstr.cpp", + "//third_party/icu/icu4c/source/common/ulist.cpp", + "//third_party/icu/icu4c/source/common/ucnvisci.cpp", + "//third_party/icu/icu4c/source/common/brkeng.cpp", + "//third_party/icu/icu4c/source/common/localematcher.cpp", + "//third_party/icu/icu4c/source/common/umutablecptrie.cpp", + "//third_party/icu/icu4c/source/common/locdispnames.cpp", + "//third_party/icu/icu4c/source/common/uchriter.cpp", + "//third_party/icu/icu4c/source/common/uresdata.cpp", + "//third_party/icu/icu4c/source/common/unifiedcache.cpp", + "//third_party/icu/icu4c/source/common/dictionarydata.cpp", + "//third_party/icu/icu4c/source/common/uscript.cpp", + "//third_party/icu/icu4c/source/common/ucnv_u7.cpp", + "//third_party/icu/icu4c/source/common/unistr_case.cpp", + "//third_party/icu/icu4c/source/common/ucat.cpp", + "//third_party/icu/icu4c/source/common/resource.cpp", + "//third_party/icu/icu4c/source/common/usprep.cpp", + "//third_party/icu/icu4c/source/common/ucnvdisp.cpp", + "//third_party/icu/icu4c/source/common/uniset.cpp", + "//third_party/icu/icu4c/source/common/ucnv.cpp", + "//third_party/icu/icu4c/source/common/ucnvscsu.cpp", + "//third_party/icu/icu4c/source/common/uset_props.cpp", + "//third_party/icu/icu4c/source/common/umutex.cpp", + "//third_party/icu/icu4c/source/common/ucnv_cnv.cpp", + "//third_party/icu/icu4c/source/common/locmap.cpp", + "//third_party/icu/icu4c/source/common/resbund.cpp", + "//third_party/icu/icu4c/source/common/filterednormalizer2.cpp", + "//third_party/icu/icu4c/source/common/uprops.cpp", + "//third_party/icu/icu4c/source/common/schriter.cpp", + "//third_party/icu/icu4c/source/common/simpleformatter.cpp", + "//third_party/icu/icu4c/source/common/uts46.cpp", + "//third_party/icu/icu4c/source/common/ucol_swp.cpp", + "//third_party/icu/icu4c/source/common/udata.cpp", + "//third_party/icu/icu4c/source/common/ustrfmt.cpp", + "//third_party/icu/icu4c/source/common/servslkf.cpp", + "//third_party/icu/icu4c/source/common/servls.cpp", + "//third_party/icu/icu4c/source/common/unistr_props.cpp", + "//third_party/icu/icu4c/source/common/utrace.cpp", + "//third_party/icu/icu4c/source/common/utrie2_builder.cpp", + "//third_party/icu/icu4c/source/common/ucase.cpp", + "//third_party/icu/icu4c/source/common/cmemory.cpp", + "//third_party/icu/icu4c/source/common/uset.cpp", + "//third_party/icu/icu4c/source/common/unistr_case_locale.cpp", + "//third_party/icu/icu4c/source/common/ures_cnv.cpp", + "//third_party/icu/icu4c/source/common/charstr.cpp", + "//third_party/icu/icu4c/source/common/uidna.cpp", + "//third_party/icu/icu4c/source/common/normalizer2.cpp", + "//third_party/icu/icu4c/source/common/resbund_cnv.cpp", + "//third_party/icu/icu4c/source/common/umath.cpp", + "//third_party/icu/icu4c/source/common/utext.cpp", + "//third_party/icu/icu4c/source/common/ucurr.cpp", + "//third_party/icu/icu4c/source/common/util_props.cpp", + "//third_party/icu/icu4c/source/common/unorm.cpp", + "//third_party/icu/icu4c/source/common/ubidiwrt.cpp", + "//third_party/icu/icu4c/source/common/usetiter.cpp", + "//third_party/icu/icu4c/source/common/rbbinode.cpp", + "//third_party/icu/icu4c/source/common/ustrcase.cpp", + "//third_party/icu/icu4c/source/common/servnotf.cpp", + "//third_party/icu/icu4c/source/common/emojiprops.cpp", + "//third_party/icu/icu4c/source/common/lstmbe.cpp", + "//third_party/icu/icu4c/source/ohos/init_data.cpp", + ] -ohos_shared_library("shared_icui18n") { - ldflags = [ - "-shared", - "-lm", + icu_i18n_source = [ + "//third_party/icu/icu4c/source/i18n/number_capi.cpp", + "//third_party/icu/icu4c/source/i18n/upluralrules.cpp", + "//third_party/icu/icu4c/source/i18n/numparse_currency.cpp", + "//third_party/icu/icu4c/source/i18n/ufieldpositer.cpp", + "//third_party/icu/icu4c/source/i18n/number_output.cpp", + "//third_party/icu/icu4c/source/i18n/number_currencysymbols.cpp", + "//third_party/icu/icu4c/source/i18n/curramt.cpp", + "//third_party/icu/icu4c/source/i18n/alphaindex.cpp", + "//third_party/icu/icu4c/source/i18n/indiancal.cpp", + "//third_party/icu/icu4c/source/i18n/dayperiodrules.cpp", + "//third_party/icu/icu4c/source/i18n/displayoptions.cpp", + "//third_party/icu/icu4c/source/i18n/quantityformatter.cpp", + "//third_party/icu/icu4c/source/i18n/collationfastlatinbuilder.cpp", + "//third_party/icu/icu4c/source/i18n/csrucode.cpp", + "//third_party/icu/icu4c/source/i18n/measunit_extra.cpp", + "//third_party/icu/icu4c/source/i18n/ethpccal.cpp", + "//third_party/icu/icu4c/source/i18n/anytrans.cpp", + "//third_party/icu/icu4c/source/i18n/number_scientific.cpp", + "//third_party/icu/icu4c/source/i18n/cpdtrans.cpp", + "//third_party/icu/icu4c/source/i18n/regexst.cpp", + "//third_party/icu/icu4c/source/i18n/numfmt.cpp", + "//third_party/icu/icu4c/source/i18n/formattedvalue.cpp", + "//third_party/icu/icu4c/source/i18n/unesctrn.cpp", + "//third_party/icu/icu4c/source/i18n/ucoleitr.cpp", + "//third_party/icu/icu4c/source/i18n/tmutamt.cpp", + "//third_party/icu/icu4c/source/i18n/transreg.cpp", + "//third_party/icu/icu4c/source/i18n/unum.cpp", + "//third_party/icu/icu4c/source/i18n/number_longnames.cpp", + "//third_party/icu/icu4c/source/i18n/numparse_affixes.cpp", + "//third_party/icu/icu4c/source/i18n/plurrule.cpp", + "//third_party/icu/icu4c/source/i18n/zrule.cpp", + "//third_party/icu/icu4c/source/i18n/collationrootelements.cpp", + "//third_party/icu/icu4c/source/i18n/currunit.cpp", + "//third_party/icu/icu4c/source/i18n/funcrepl.cpp", + "//third_party/icu/icu4c/source/i18n/collationdatareader.cpp", + "//third_party/icu/icu4c/source/i18n/buddhcal.cpp", + "//third_party/icu/icu4c/source/i18n/number_decimalquantity.cpp", + "//third_party/icu/icu4c/source/i18n/scriptset.cpp", + "//third_party/icu/icu4c/source/i18n/fmtable.cpp", + "//third_party/icu/icu4c/source/i18n/regextxt.cpp", + "//third_party/icu/icu4c/source/i18n/bocsu.cpp", + "//third_party/icu/icu4c/source/i18n/olsontz.cpp", + "//third_party/icu/icu4c/source/i18n/utmscale.cpp", + "//third_party/icu/icu4c/source/i18n/ucol.cpp", + "//third_party/icu/icu4c/source/i18n/currfmt.cpp", + "//third_party/icu/icu4c/source/i18n/hebrwcal.cpp", + "//third_party/icu/icu4c/source/i18n/ucol_sit.cpp", + "//third_party/icu/icu4c/source/i18n/rbnf.cpp", + "//third_party/icu/icu4c/source/i18n/decContext.cpp", + "//third_party/icu/icu4c/source/i18n/collationdatawriter.cpp", + "//third_party/icu/icu4c/source/i18n/csr2022.cpp", + "//third_party/icu/icu4c/source/i18n/dtrule.cpp", + "//third_party/icu/icu4c/source/i18n/numparse_validators.cpp", + "//third_party/icu/icu4c/source/i18n/numparse_parsednumber.cpp", + "//third_party/icu/icu4c/source/i18n/double-conversion-fast-dtoa.cpp", + "//third_party/icu/icu4c/source/i18n/choicfmt.cpp", + "//third_party/icu/icu4c/source/i18n/format.cpp", + "//third_party/icu/icu4c/source/i18n/reldatefmt.cpp", + "//third_party/icu/icu4c/source/i18n/double-conversion-double-to-string.cpp", + "//third_party/icu/icu4c/source/i18n/rbt_data.cpp", + "//third_party/icu/icu4c/source/i18n/smpdtfmt.cpp", + "//third_party/icu/icu4c/source/i18n/double-conversion-bignum-dtoa.cpp", + "//third_party/icu/icu4c/source/i18n/number_padding.cpp", + "//third_party/icu/icu4c/source/i18n/vtzone.cpp", + "//third_party/icu/icu4c/source/i18n/region.cpp", + "//third_party/icu/icu4c/source/i18n/coptccal.cpp", + "//third_party/icu/icu4c/source/i18n/datefmt.cpp", + "//third_party/icu/icu4c/source/i18n/formatted_string_builder.cpp", + "//third_party/icu/icu4c/source/i18n/numparse_impl.cpp", + "//third_party/icu/icu4c/source/i18n/plurfmt.cpp", + "//third_party/icu/icu4c/source/i18n/rematch.cpp", + "//third_party/icu/icu4c/source/i18n/simpletz.cpp", + "//third_party/icu/icu4c/source/i18n/search.cpp", + "//third_party/icu/icu4c/source/i18n/number_mapper.cpp", + "//third_party/icu/icu4c/source/i18n/inputext.cpp", + "//third_party/icu/icu4c/source/i18n/dtptngen.cpp", + "//third_party/icu/icu4c/source/i18n/coleitr.cpp", + "//third_party/icu/icu4c/source/i18n/collationweights.cpp", + "//third_party/icu/icu4c/source/i18n/number_modifiers.cpp", + "//third_party/icu/icu4c/source/i18n/scientificnumberformatter.cpp", + "//third_party/icu/icu4c/source/i18n/vzone.cpp", + "//third_party/icu/icu4c/source/i18n/fphdlimp.cpp", + "//third_party/icu/icu4c/source/i18n/udatpg.cpp", + "//third_party/icu/icu4c/source/i18n/collationfcd.cpp", + "//third_party/icu/icu4c/source/i18n/tridpars.cpp", + "//third_party/icu/icu4c/source/i18n/csmatch.cpp", + "//third_party/icu/icu4c/source/i18n/dangical.cpp", + "//third_party/icu/icu4c/source/i18n/ulocdata.cpp", + "//third_party/icu/icu4c/source/i18n/double-conversion-strtod.cpp", + "//third_party/icu/icu4c/source/i18n/erarules.cpp", + "//third_party/icu/icu4c/source/i18n/numsys.cpp", + "//third_party/icu/icu4c/source/i18n/csdetect.cpp", + "//third_party/icu/icu4c/source/i18n/japancal.cpp", + "//third_party/icu/icu4c/source/i18n/collation.cpp", + "//third_party/icu/icu4c/source/i18n/uregex.cpp", + "//third_party/icu/icu4c/source/i18n/timezone.cpp", + "//third_party/icu/icu4c/source/i18n/strmatch.cpp", + "//third_party/icu/icu4c/source/i18n/decNumber.cpp", + "//third_party/icu/icu4c/source/i18n/nortrans.cpp", + "//third_party/icu/icu4c/source/i18n/sortkey.cpp", + "//third_party/icu/icu4c/source/i18n/ulistformatter.cpp", + "//third_party/icu/icu4c/source/i18n/tzgnames.cpp", + "//third_party/icu/icu4c/source/i18n/number_multiplier.cpp", + "//third_party/icu/icu4c/source/i18n/ztrans.cpp", + "//third_party/icu/icu4c/source/i18n/persncal.cpp", + "//third_party/icu/icu4c/source/i18n/number_utils.cpp", + "//third_party/icu/icu4c/source/i18n/csrmbcs.cpp", + "//third_party/icu/icu4c/source/i18n/taiwncal.cpp", + "//third_party/icu/icu4c/source/i18n/dtitvinf.cpp", + "//third_party/icu/icu4c/source/i18n/astro.cpp", + "//third_party/icu/icu4c/source/i18n/number_patternmodifier.cpp", + "//third_party/icu/icu4c/source/i18n/rulebasedcollator.cpp", + "//third_party/icu/icu4c/source/i18n/msgfmt.cpp", + "//third_party/icu/icu4c/source/i18n/stsearch.cpp", + "//third_party/icu/icu4c/source/i18n/number_affixutils.cpp", + "//third_party/icu/icu4c/source/i18n/quant.cpp", + "//third_party/icu/icu4c/source/i18n/calendar.cpp", + "//third_party/icu/icu4c/source/i18n/collationroot.cpp", + "//third_party/icu/icu4c/source/i18n/rbt_rule.cpp", + "//third_party/icu/icu4c/source/i18n/number_compact.cpp", + "//third_party/icu/icu4c/source/i18n/name2uni.cpp", + "//third_party/icu/icu4c/source/i18n/chnsecal.cpp", + "//third_party/icu/icu4c/source/i18n/csrutf8.cpp", + "//third_party/icu/icu4c/source/i18n/basictz.cpp", + "//third_party/icu/icu4c/source/i18n/reldtfmt.cpp", + "//third_party/icu/icu4c/source/i18n/nultrans.cpp", + "//third_party/icu/icu4c/source/i18n/number_grouping.cpp", + "//third_party/icu/icu4c/source/i18n/number_symbolswrapper.cpp", + "//third_party/icu/icu4c/source/i18n/number_usageprefs.cpp", + "//third_party/icu/icu4c/source/i18n/numrange_capi.cpp", + "//third_party/icu/icu4c/source/i18n/pluralranges.cpp", + "//third_party/icu/icu4c/source/i18n/units_complexconverter.cpp", + "//third_party/icu/icu4c/source/i18n/units_converter.cpp", + "//third_party/icu/icu4c/source/i18n/units_data.cpp", + "//third_party/icu/icu4c/source/i18n/units_router.cpp", + "//third_party/icu/icu4c/source/i18n/rbt_pars.cpp", + "//third_party/icu/icu4c/source/i18n/winnmfmt.cpp", + "//third_party/icu/icu4c/source/i18n/uregexc.cpp", + "//third_party/icu/icu4c/source/i18n/fpositer.cpp", + "//third_party/icu/icu4c/source/i18n/tmutfmt.cpp", + "//third_party/icu/icu4c/source/i18n/compactdecimalformat.cpp", + "//third_party/icu/icu4c/source/i18n/numparse_decimal.cpp", + "//third_party/icu/icu4c/source/i18n/number_notation.cpp", + "//third_party/icu/icu4c/source/i18n/uspoof_conf.cpp", + "//third_party/icu/icu4c/source/i18n/utf16collationiterator.cpp", + "//third_party/icu/icu4c/source/i18n/udat.cpp", + "//third_party/icu/icu4c/source/i18n/number_skeletons.cpp", + "//third_party/icu/icu4c/source/i18n/utrans.cpp", + "//third_party/icu/icu4c/source/i18n/number_rounding.cpp", + "//third_party/icu/icu4c/source/i18n/double-conversion-bignum.cpp", + "//third_party/icu/icu4c/source/i18n/number_asformat.cpp", + "//third_party/icu/icu4c/source/i18n/double-conversion-string-to-double.cpp", + "//third_party/icu/icu4c/source/i18n/rbtz.cpp", + "//third_party/icu/icu4c/source/i18n/csrsbcs.cpp", + "//third_party/icu/icu4c/source/i18n/selfmt.cpp", + "//third_party/icu/icu4c/source/i18n/tztrans.cpp", + "//third_party/icu/icu4c/source/i18n/uspoof_impl.cpp", + "//third_party/icu/icu4c/source/i18n/regeximp.cpp", + "//third_party/icu/icu4c/source/i18n/measure.cpp", + "//third_party/icu/icu4c/source/i18n/fmtable_cnv.cpp", + "//third_party/icu/icu4c/source/i18n/uspoof.cpp", + "//third_party/icu/icu4c/source/i18n/gregoimp.cpp", + "//third_party/icu/icu4c/source/i18n/umsg.cpp", + "//third_party/icu/icu4c/source/i18n/numparse_symbols.cpp", + "//third_party/icu/icu4c/source/i18n/numrange_impl.cpp", + "//third_party/icu/icu4c/source/i18n/collationtailoring.cpp", + "//third_party/icu/icu4c/source/i18n/double-conversion-cached-powers.cpp", + "//third_party/icu/icu4c/source/i18n/udateintervalformat.cpp", + "//third_party/icu/icu4c/source/i18n/uni2name.cpp", + "//third_party/icu/icu4c/source/i18n/casetrn.cpp", + "//third_party/icu/icu4c/source/i18n/windtfmt.cpp", + "//third_party/icu/icu4c/source/i18n/listformatter.cpp", + "//third_party/icu/icu4c/source/i18n/uregion.cpp", + "//third_party/icu/icu4c/source/i18n/usearch.cpp", + "//third_party/icu/icu4c/source/i18n/brktrans.cpp", + "//third_party/icu/icu4c/source/i18n/gender.cpp", + "//third_party/icu/icu4c/source/i18n/collationruleparser.cpp", + "//third_party/icu/icu4c/source/i18n/rbt.cpp", + "//third_party/icu/icu4c/source/i18n/tzfmt.cpp", + "//third_party/icu/icu4c/source/i18n/dtfmtsym.cpp", + "//third_party/icu/icu4c/source/i18n/tolowtrn.cpp", + "//third_party/icu/icu4c/source/i18n/collationdatabuilder.cpp", + "//third_party/icu/icu4c/source/i18n/unumsys.cpp", + "//third_party/icu/icu4c/source/i18n/csrecog.cpp", + "//third_party/icu/icu4c/source/i18n/collationfastlatin.cpp", + "//third_party/icu/icu4c/source/i18n/esctrn.cpp", + "//third_party/icu/icu4c/source/i18n/collationdata.cpp", + "//third_party/icu/icu4c/source/i18n/titletrn.cpp", + "//third_party/icu/icu4c/source/i18n/ucal.cpp", + "//third_party/icu/icu4c/source/i18n/regexcmp.cpp", + "//third_party/icu/icu4c/source/i18n/wintzimpl.cpp", + "//third_party/icu/icu4c/source/i18n/decimfmt.cpp", + "//third_party/icu/icu4c/source/i18n/tmunit.cpp", + "//third_party/icu/icu4c/source/i18n/number_integerwidth.cpp", + "//third_party/icu/icu4c/source/i18n/ucsdet.cpp", + "//third_party/icu/icu4c/source/i18n/uspoof_build.cpp", + "//third_party/icu/icu4c/source/i18n/ucln_in.cpp", + "//third_party/icu/icu4c/source/i18n/measfmt.cpp", + "//third_party/icu/icu4c/source/i18n/formattedval_iterimpl.cpp", + "//third_party/icu/icu4c/source/i18n/toupptrn.cpp", + "//third_party/icu/icu4c/source/i18n/translit.cpp", + "//third_party/icu/icu4c/source/i18n/dtitvfmt.cpp", + "//third_party/icu/icu4c/source/i18n/dcfmtsym.cpp", + "//third_party/icu/icu4c/source/i18n/islamcal.cpp", + "//third_party/icu/icu4c/source/i18n/numrange_fluent.cpp", + "//third_party/icu/icu4c/source/i18n/gregocal.cpp", + "//third_party/icu/icu4c/source/i18n/zonemeta.cpp", + "//third_party/icu/icu4c/source/i18n/collationbuilder.cpp", + "//third_party/icu/icu4c/source/i18n/string_segment.cpp", + "//third_party/icu/icu4c/source/i18n/collationkeys.cpp", + "//third_party/icu/icu4c/source/i18n/coll.cpp", + "//third_party/icu/icu4c/source/i18n/uitercollationiterator.cpp", + "//third_party/icu/icu4c/source/i18n/nfsubs.cpp", + "//third_party/icu/icu4c/source/i18n/smpdtfst.cpp", + "//third_party/icu/icu4c/source/i18n/collationsettings.cpp", + "//third_party/icu/icu4c/source/i18n/formattedval_sbimpl.cpp", + "//third_party/icu/icu4c/source/i18n/strrepl.cpp", + "//third_party/icu/icu4c/source/i18n/standardplural.cpp", + "//third_party/icu/icu4c/source/i18n/ucol_res.cpp", + "//third_party/icu/icu4c/source/i18n/repattrn.cpp", + "//third_party/icu/icu4c/source/i18n/tznames_impl.cpp", + "//third_party/icu/icu4c/source/i18n/numparse_compositions.cpp", + "//third_party/icu/icu4c/source/i18n/rbt_set.cpp", + "//third_party/icu/icu4c/source/i18n/currpinf.cpp", + "//third_party/icu/icu4c/source/i18n/collationsets.cpp", + "//third_party/icu/icu4c/source/i18n/cecal.cpp", + "//third_party/icu/icu4c/source/i18n/tzrule.cpp", + "//third_party/icu/icu4c/source/i18n/collationiterator.cpp", + "//third_party/icu/icu4c/source/i18n/numparse_scientific.cpp", + "//third_party/icu/icu4c/source/i18n/number_patternstring.cpp", + "//third_party/icu/icu4c/source/i18n/utf8collationiterator.cpp", + "//third_party/icu/icu4c/source/i18n/sharedbreakiterator.cpp", + "//third_party/icu/icu4c/source/i18n/number_fluent.cpp", + "//third_party/icu/icu4c/source/i18n/measunit.cpp", + "//third_party/icu/icu4c/source/i18n/collationcompare.cpp", + "//third_party/icu/icu4c/source/i18n/number_formatimpl.cpp", + "//third_party/icu/icu4c/source/i18n/number_decimfmtprops.cpp", + "//third_party/icu/icu4c/source/i18n/nfrs.cpp", + "//third_party/icu/icu4c/source/i18n/tznames.cpp", + "//third_party/icu/icu4c/source/i18n/remtrans.cpp", + "//third_party/icu/icu4c/source/i18n/nfrule.cpp", ] - if (current_os == "ios") { - ldflags += [ - "-Wl", - "-install_name", - "@rpath/libhmicui18n.framework/libhmicui18n", + + ohos_shared_library("shared_icuuc") { + ldflags = [ + "-shared", + "-lm", ] - } - sources = icu_i18n_source - configs = [ - ":icu_config", - "$build_root/config/compiler:rtti", - ] - deps = [ ":shared_icuuc" ] - defines = [ - "U_ATTRIBUTE_DEPRECATED=", - "U_I18N_IMPLEMENTATION", - "UPRV_BLOCK_MACRO_BEGIN=", - "UPRV_BLOCK_MACRO_END=", - "_REENTRANT", - "PIC", - ] - cflags_cc = [ - "-O3", - "-W", - "-Wall", - "-pedantic", - "-Wpointer-arith", - "-Wno-error=unused-parameter", - "-Wno-error=unused-const-variable", - "-Wno-error=implicit-float-conversion", - "-Wno-error=unneeded-internal-declaration", - "-Wwrite-strings", - "-std=c++11", - "-Wno-ignored-attributes", - "-Wno-unused-but-set-variable", - "-Wno-deprecated-declarations", - ] - if (!is_mingw) { - cflags_cc += [ "-fPIC" ] - ldflags += [ "-ldl" ] - } - if (is_standard_system || ark_standalone_build) { - part_name = "icu" - subsystem_name = "thirdparty" - } else { - part_name = "i18n" - subsystem_name = "global" - } + configs = [ + ":icu_config", + "$build_root/config/compiler:rtti", + ] + all_dependent_configs = [ ":static_icustubdata_all_deps_config" ] + defines = [ + "U_ATTRIBUTE_DEPRECATED=", + "U_COMMON_IMPLEMENTATION", + "UPRV_BLOCK_MACRO_BEGIN=", + "UPRV_BLOCK_MACRO_END=", + "UCONFIG_USE_WINDOWS_LCID_MAPPING_API=0", + "_REENTRANT", + ] + sources = icu_common_source + deps = [ ":static_icustubdata" ] + cflags_cc = [ + "-O3", + "-W", + "-Wall", + "-pedantic", + "-Wpointer-arith", + "-Wwrite-strings", + "-Wno-error=unused-parameter", + "-Wno-error=unused-const-variable", + "-Wno-error=unneeded-internal-declaration", + "-std=c++11", + "-Wno-ignored-attributes", + "-Wno-unused-but-set-variable", + "-Wno-deprecated-declarations", + ] - innerapi_tags = [ "platformsdk" ] - install_images = [ system_base_dir ] - relative_install_dir = "platformsdk" - output_name = "hmicui18n" - install_enable = true -} + if (is_standard_system || ark_standalone_build) { + part_name = "icu" + subsystem_name = "thirdparty" + } else { + part_name = "i18n" + subsystem_name = "global" + } -if (current_os == "ios") { - ohos_combine_darwin_framework("libhmicui18n") { - deps = [ ":shared_icui18n" ] - subsystem_name = "thirdparty" - part_name = "icu" + innerapi_tags = [ "platformsdk" ] + install_images = [ system_base_dir ] + relative_install_dir = "platformsdk" + output_name = "hmicuuc" + install_enable = true } -} -ohos_source_set("static_icuuc") { - configs = [ - ":icu_config", - "$build_root/config/compiler:rtti", - ] + ohos_shared_library("shared_icui18n") { + ldflags = [ + "-shared", + "-lm", + ] + if (current_os == "ios") { + ldflags += [ + "-Wl", + "-install_name", + "@rpath/libhmicui18n.framework/libhmicui18n", + ] + } + sources = icu_i18n_source + configs = [ + ":icu_config", + "$build_root/config/compiler:rtti", + ] + deps = [ ":shared_icuuc" ] + defines = [ + "U_ATTRIBUTE_DEPRECATED=", + "U_I18N_IMPLEMENTATION", + "UPRV_BLOCK_MACRO_BEGIN=", + "UPRV_BLOCK_MACRO_END=", + "_REENTRANT", + "PIC", + ] + cflags_cc = [ + "-O3", + "-W", + "-Wall", + "-pedantic", + "-Wpointer-arith", + "-Wno-error=unused-parameter", + "-Wno-error=unused-const-variable", + "-Wno-error=implicit-float-conversion", + "-Wno-error=unneeded-internal-declaration", + "-Wwrite-strings", + "-std=c++11", + "-Wno-ignored-attributes", + "-Wno-unused-but-set-variable", + "-Wno-deprecated-declarations", + ] + if (!is_mingw) { + cflags_cc += [ "-fPIC" ] + ldflags += [ "-ldl" ] + } - if (!(defined(is_arkui_x) && is_arkui_x) || - current_toolchain == host_toolchain) { - deps = [ ":static_icustubdata" ] + if (is_standard_system || ark_standalone_build) { + part_name = "icu" + subsystem_name = "thirdparty" + } else { + part_name = "i18n" + subsystem_name = "global" + } + + innerapi_tags = [ "platformsdk" ] + install_images = [ system_base_dir ] + relative_install_dir = "platformsdk" + output_name = "hmicui18n" + install_enable = true } - defines = [ - "U_ATTRIBUTE_DEPRECATED=", - "U_COMMON_IMPLEMENTATION", - "U_STATIC_IMPLEMENTATION", - "UPRV_BLOCK_MACRO_BEGIN=", - "UPRV_BLOCK_MACRO_END=", - "UCONFIG_USE_WINDOWS_LCID_MAPPING_API=0", - "_REENTRANT", - ] - sources = icu_common_source - cflags_cc = [ - "-W", - "-Wall", - "-pedantic", - "-Wpointer-arith", - "-Wwrite-strings", - "-std=c++11", - "-Wno-error=unused-parameter", - "-Wno-error=unused-const-variable", - "-Wno-error=unneeded-internal-declaration", - "-fvisibility-inlines-hidden", - "-Wno-unused-function", - "-Wno-ignored-attributes", - "-Wno-unused-but-set-variable", - "-Wno-deprecated-declarations", - ] + if (current_os == "ios") { + ohos_combine_darwin_framework("libhmicui18n") { + deps = [ ":shared_icui18n" ] + subsystem_name = "thirdparty" + part_name = "icu" + } + } - cflags = [ - "-fdata-sections", - "-ffunction-sections", - "-Wno-unused-function", - ] + ohos_source_set("static_icuuc") { + configs = [ + ":icu_config", + "$build_root/config/compiler:rtti", + ] - ldflags = [ - "-static", - "-ldl", - "-lm", - ] + if (!(defined(is_arkui_x) && is_arkui_x) || + current_toolchain == host_toolchain) { + deps = [ ":static_icustubdata" ] + } - output_name = "hmicuuc" -} + defines = [ + "U_ATTRIBUTE_DEPRECATED=", + "U_COMMON_IMPLEMENTATION", + "U_STATIC_IMPLEMENTATION", + "UPRV_BLOCK_MACRO_BEGIN=", + "UPRV_BLOCK_MACRO_END=", + "UCONFIG_USE_WINDOWS_LCID_MAPPING_API=0", + "_REENTRANT", + ] + sources = icu_common_source + cflags_cc = [ + "-W", + "-Wall", + "-pedantic", + "-Wpointer-arith", + "-Wwrite-strings", + "-std=c++11", + "-Wno-error=unused-parameter", + "-Wno-error=unused-const-variable", + "-Wno-error=unneeded-internal-declaration", + "-fvisibility-inlines-hidden", + "-Wno-unused-function", + "-Wno-ignored-attributes", + "-Wno-unused-but-set-variable", + "-Wno-deprecated-declarations", + ] -ohos_source_set("static_icui18n") { - sources = icu_i18n_source - configs = [ - ":icu_config", - "$build_root/config/compiler:rtti", - ] - deps = [ ":static_icuuc" ] - defines = [ - "U_ATTRIBUTE_DEPRECATED=", - "U_I18N_IMPLEMENTATION", - "U_STATIC_IMPLEMENTATION", - "UPRV_BLOCK_MACRO_BEGIN=", - "UPRV_BLOCK_MACRO_END=", - "_REENTRANT", - "PIC", - ] + cflags = [ + "-fdata-sections", + "-ffunction-sections", + "-Wno-unused-function", + ] - cflags_cc = [ - "-W", - "-Wall", - "-pedantic", - "-Wpointer-arith", - "-Wwrite-strings", - "-Wno-error=unused-parameter", - "-Wno-error=unused-const-variable", - "-Wno-error=implicit-float-conversion", - "-Wno-error=unneeded-internal-declaration", - "-std=c++11", - "-fvisibility-inlines-hidden", - "-fno-exceptions", - "-Wno-ignored-attributes", - "-Wno-unused-but-set-variable", - "-Wno-deprecated-declarations", - ] + ldflags = [ + "-static", + "-ldl", + "-lm", + ] - if (is_mingw) { - cflags_cc += [ "-DWINVER=0x0601" ] - } else { - cflags_cc += [ "-fPIC" ] + output_name = "hmicuuc" } - cflags = [ - "-fdata-sections", - "-ffunction-sections", - ] + ohos_source_set("static_icui18n") { + sources = icu_i18n_source + configs = [ + ":icu_config", + "$build_root/config/compiler:rtti", + ] + deps = [ ":static_icuuc" ] + defines = [ + "U_ATTRIBUTE_DEPRECATED=", + "U_I18N_IMPLEMENTATION", + "U_STATIC_IMPLEMENTATION", + "UPRV_BLOCK_MACRO_BEGIN=", + "UPRV_BLOCK_MACRO_END=", + "_REENTRANT", + "PIC", + ] - ldflags = [ - "-static", - "-ldl", - "-lm", - ] - output_name = "hmicui18n" -} + cflags_cc = [ + "-W", + "-Wall", + "-pedantic", + "-Wpointer-arith", + "-Wwrite-strings", + "-Wno-error=unused-parameter", + "-Wno-error=unused-const-variable", + "-Wno-error=implicit-float-conversion", + "-Wno-error=unneeded-internal-declaration", + "-std=c++11", + "-fvisibility-inlines-hidden", + "-fno-exceptions", + "-Wno-ignored-attributes", + "-Wno-unused-but-set-variable", + "-Wno-deprecated-declarations", + ] -ohos_static_library("static_icu") { - configs = [ - ":icu_config", - "$build_root/config/compiler:rtti", - ] + if (is_mingw) { + cflags_cc += [ "-DWINVER=0x0601" ] + } else { + cflags_cc += [ "-fPIC" ] + } - defines = [ - "U_ATTRIBUTE_DEPRECATED=", - "U_COMMON_IMPLEMENTATION", - "U_I18N_IMPLEMENTATION", - "U_STATIC_IMPLEMENTATION", - "UPRV_BLOCK_MACRO_BEGIN=", - "UPRV_BLOCK_MACRO_END=", - "UCONFIG_USE_WINDOWS_LCID_MAPPING_API=0", - "_REENTRANT", - ] - sources = icu_common_source - sources += icu_i18n_source - sources += [ "//third_party/icu/ohos_icu4j/data/lite/icudt72l_dat.S" ] - cflags_cc = [ - "-W", - "-Wall", - "-pedantic", - "-Wpointer-arith", - "-Wwrite-strings", - "-std=c++11", - "-Wno-error=unused-parameter", - "-Wno-error=unused-const-variable", - "-Wno-error=unneeded-internal-declaration", - "-fvisibility-inlines-hidden", - "-Wno-unused-function", - "-Wno-ignored-attributes", - "-Wno-unused-but-set-variable", - "-Wno-deprecated-declarations", - ] + cflags = [ + "-fdata-sections", + "-ffunction-sections", + ] - cflags = [ - "-fvisibility=hidden", - "-fdata-sections", - "-ffunction-sections", - "-Wno-unused-function", - ] + ldflags = [ + "-static", + "-ldl", + "-lm", + ] + output_name = "hmicui18n" + } - ldflags = [ - "-static", - "-ldl", - "-lm", - ] + ohos_static_library("static_icu") { + configs = [ + ":icu_config", + "$build_root/config/compiler:rtti", + ] - output_name = "hmicu" - if (is_standard_system || ark_standalone_build) { - part_name = "icu" - subsystem_name = "thirdparty" - } else { - part_name = "i18n" - subsystem_name = "global" + defines = [ + "U_ATTRIBUTE_DEPRECATED=", + "U_COMMON_IMPLEMENTATION", + "U_I18N_IMPLEMENTATION", + "U_STATIC_IMPLEMENTATION", + "UPRV_BLOCK_MACRO_BEGIN=", + "UPRV_BLOCK_MACRO_END=", + "UCONFIG_USE_WINDOWS_LCID_MAPPING_API=0", + "_REENTRANT", + ] + sources = icu_common_source + sources += icu_i18n_source + sources += [ "//third_party/icu/ohos_icu4j/data/lite/icudt72l_dat.S" ] + cflags_cc = [ + "-W", + "-Wall", + "-pedantic", + "-Wpointer-arith", + "-Wwrite-strings", + "-std=c++11", + "-Wno-error=unused-parameter", + "-Wno-error=unused-const-variable", + "-Wno-error=unneeded-internal-declaration", + "-fvisibility-inlines-hidden", + "-Wno-unused-function", + "-Wno-ignored-attributes", + "-Wno-unused-but-set-variable", + "-Wno-deprecated-declarations", + ] + + cflags = [ + "-fvisibility=hidden", + "-fdata-sections", + "-ffunction-sections", + "-Wno-unused-function", + ] + + ldflags = [ + "-static", + "-ldl", + "-lm", + ] + + output_name = "hmicu" + if (is_standard_system || ark_standalone_build) { + part_name = "icu" + subsystem_name = "thirdparty" + } else { + part_name = "i18n" + subsystem_name = "global" + } } -} +} \ No newline at end of file diff --git a/build/third_party_gn/json/BUILD.gn b/build/third_party_gn/json/BUILD.gn index a98b76d0adbb26594e61e913cc8b06b3fc7773b5..5f9e108358f90c089eeb481408a92b081f173967 100755 --- a/build/third_party_gn/json/BUILD.gn +++ b/build/third_party_gn/json/BUILD.gn @@ -10,21 +10,25 @@ # 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. +if (!defined(ark_standalone_build)) { + ark_standalone_build = false +} -import("$build_root/ark.gni") - -config("nlohmann_json_config") { - include_dirs = [ - "//third_party/json/single_include/", - "//third_party/json/single_include/nlohmann", - ] +if (ark_standalone_build) { + import("$build_root/ark.gni") + config("nlohmann_json_config") { + include_dirs = [ + "//third_party/json/single_include/", + "//third_party/json/single_include/nlohmann", + ] - cflags_cc = [ "-fexceptions" ] - cflags_objcc = cflags_cc -} + cflags_cc = [ "-fexceptions" ] + cflags_objcc = cflags_cc + } -ohos_static_library("nlohmann_json_static") { - public_configs = [ ":nlohmann_json_config" ] - part_name = "json" - subsystem_name = "thirdparty" + ohos_static_library("nlohmann_json_static") { + public_configs = [ ":nlohmann_json_config" ] + part_name = "json" + subsystem_name = "thirdparty" + } } diff --git a/build/third_party_gn/libuv/BUILD.gn b/build/third_party_gn/libuv/BUILD.gn index 5bb82bb0329b9ebb64dce4d017162908d2fb0217..93c18924ed72b87b4abf951ec159e928617792de 100644 --- a/build/third_party_gn/libuv/BUILD.gn +++ b/build/third_party_gn/libuv/BUILD.gn @@ -10,217 +10,222 @@ # 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. - -import("$build_root/ark.gni") - -common_source = [ - "//third_party/libuv/src/fs-poll.c", - "//third_party/libuv/src/idna.c", - "//third_party/libuv/src/inet.c", - "//third_party/libuv/src/random.c", - "//third_party/libuv/src/strscpy.c", - "//third_party/libuv/src/threadpool.c", - "//third_party/libuv/src/thread-common.c", - "//third_party/libuv/src/timer.c", - "//third_party/libuv/src/uv-common.c", - "//third_party/libuv/src/uv-data-getter-setters.c", - "//third_party/libuv/src/version.c", - "//third_party/libuv/src/strtok.c", -] -if (!is_mingw && !is_win) { - nonwin_srcs = [ - "//third_party/libuv/src/unix/async.c", - "//third_party/libuv/src/unix/core.c", - "//third_party/libuv/src/unix/dl.c", - "//third_party/libuv/src/unix/fs.c", - "//third_party/libuv/src/unix/getaddrinfo.c", - "//third_party/libuv/src/unix/getnameinfo.c", - "//third_party/libuv/src/unix/loop.c", - "//third_party/libuv/src/unix/loop-watcher.c", - "//third_party/libuv/src/unix/pipe.c", - "//third_party/libuv/src/unix/poll.c", - "//third_party/libuv/src/unix/process.c", - "//third_party/libuv/src/unix/random-devurandom.c", - "//third_party/libuv/src/unix/signal.c", - "//third_party/libuv/src/unix/stream.c", - "//third_party/libuv/src/unix/tcp.c", - "//third_party/libuv/src/unix/thread.c", - "//third_party/libuv/src/unix/tty.c", - "//third_party/libuv/src/unix/udp.c", - ] +if (!defined(ark_standalone_build)) { + ark_standalone_build = false } -# This is the configuration needed to use libuv. -config("libuv_config") { - include_dirs = [ - "//third_party/libuv/include", - "//third_party/libuv/src", - "//third_party/libuv/src/unix", +if (ark_standalone_build) { + import("$build_root/ark.gni") + + common_source = [ + "//third_party/libuv/src/fs-poll.c", + "//third_party/libuv/src/idna.c", + "//third_party/libuv/src/inet.c", + "//third_party/libuv/src/random.c", + "//third_party/libuv/src/strscpy.c", + "//third_party/libuv/src/threadpool.c", + "//third_party/libuv/src/thread-common.c", + "//third_party/libuv/src/timer.c", + "//third_party/libuv/src/uv-common.c", + "//third_party/libuv/src/uv-data-getter-setters.c", + "//third_party/libuv/src/version.c", + "//third_party/libuv/src/strtok.c", ] - defines = [] - cflags = [ "-Wno-unused-parameter" ] - if (is_linux || is_ohos) { - cflags += [ - "-Wno-incompatible-pointer-types", - "-D_GNU_SOURCE", - "-D_POSIX_C_SOURCE=200112", + if (!is_mingw && !is_win) { + nonwin_srcs = [ + "//third_party/libuv/src/unix/async.c", + "//third_party/libuv/src/unix/core.c", + "//third_party/libuv/src/unix/dl.c", + "//third_party/libuv/src/unix/fs.c", + "//third_party/libuv/src/unix/getaddrinfo.c", + "//third_party/libuv/src/unix/getnameinfo.c", + "//third_party/libuv/src/unix/loop.c", + "//third_party/libuv/src/unix/loop-watcher.c", + "//third_party/libuv/src/unix/pipe.c", + "//third_party/libuv/src/unix/poll.c", + "//third_party/libuv/src/unix/process.c", + "//third_party/libuv/src/unix/random-devurandom.c", + "//third_party/libuv/src/unix/signal.c", + "//third_party/libuv/src/unix/stream.c", + "//third_party/libuv/src/unix/tcp.c", + "//third_party/libuv/src/unix/thread.c", + "//third_party/libuv/src/unix/tty.c", + "//third_party/libuv/src/unix/udp.c", ] + } - # Adding NDEBUG macro manually to avoid compilation - # error in debug version, FIX ME - # https://gitee.com/openharmony/build/pulls/1206/files - defines += [ "NDEBUG" ] - } else if (is_mingw || is_win) { - cflags += [ - "-Wno-missing-braces", - "-Wno-implicit-function-declaration", - "-Wno-error=return-type", - "-Wno-error=sign-compare", - "-Wno-error=unused-variable", - "-Wno-error=unknown-pragmas", - "-Wno-unused-variable", + # This is the configuration needed to use libuv. + config("libuv_config") { + include_dirs = [ + "//third_party/libuv/include", + "//third_party/libuv/src", + "//third_party/libuv/src/unix", ] - defines += [ - "WIN32_LEAN_AND_MEAN", - "_WIN32_WINNT=0x0600", + defines = [] + cflags = [ "-Wno-unused-parameter" ] + if (is_linux || is_ohos) { + cflags += [ + "-Wno-incompatible-pointer-types", + "-D_GNU_SOURCE", + "-D_POSIX_C_SOURCE=200112", + ] + + # Adding NDEBUG macro manually to avoid compilation + # error in debug version, FIX ME + # https://gitee.com/openharmony/build/pulls/1206/files + defines += [ "NDEBUG" ] + } else if (is_mingw || is_win) { + cflags += [ + "-Wno-missing-braces", + "-Wno-implicit-function-declaration", + "-Wno-error=return-type", + "-Wno-error=sign-compare", + "-Wno-error=unused-variable", + "-Wno-error=unknown-pragmas", + "-Wno-unused-variable", + ] + defines += [ + "WIN32_LEAN_AND_MEAN", + "_WIN32_WINNT=0x0600", + ] + + # Adding NDEBUG macro manually to avoid compilation + # error in debug version, FIX ME + # https://gitee.com/openharmony/build/pulls/1206/files + defines += [ "NDEBUG" ] + + libs = [ + "psapi", + "user32", + "advapi32", + "iphlpapi", + "userenv", + "ws2_32", + ] + } else if (is_android) { + defines += [ "_GNU_SOURCE" ] + } + } + + # This is the configuration used to build libuv itself. + # It should not be needed outside of this library. + config("libuv_private_config") { + visibility = [ ":*" ] + include_dirs = [ + "//third_party/libuv/include", + "//third_party/libuv/src", + "//third_party/libuv/src/unix", ] # Adding NDEBUG macro manually to avoid compilation # error in debug version, FIX ME # https://gitee.com/openharmony/build/pulls/1206/files - defines += [ "NDEBUG" ] - - libs = [ - "psapi", - "user32", - "advapi32", - "iphlpapi", - "userenv", - "ws2_32", - ] - } else if (is_android) { - defines += [ "_GNU_SOURCE" ] + defines = [ "NDEBUG" ] } -} - -# This is the configuration used to build libuv itself. -# It should not be needed outside of this library. -config("libuv_private_config") { - visibility = [ ":*" ] - include_dirs = [ - "//third_party/libuv/include", - "//third_party/libuv/src", - "//third_party/libuv/src/unix", - ] - # Adding NDEBUG macro manually to avoid compilation - # error in debug version, FIX ME - # https://gitee.com/openharmony/build/pulls/1206/files - defines = [ "NDEBUG" ] -} - -ohos_source_set("libuv_source") { - stack_protector_ret = false - configs = [ ":libuv_config" ] - sources = common_source - external_deps = [] - if (is_mac || (defined(is_ios) && is_ios)) { - sources += nonwin_srcs + [ - "//third_party/libuv/src/unix/bsd-ifaddrs.c", - "//third_party/libuv/src/unix/kqueue.c", - "//third_party/libuv/src/unix/random-getentropy.c", - "//third_party/libuv/src/unix/darwin-proctitle.c", - "//third_party/libuv/src/unix/darwin.c", - "//third_party/libuv/src/unix/fsevents.c", - "//third_party/libuv/src/unix/os390-proctitle.c", - "//third_party/libuv/src/unix/log_unix.c", - "//third_party/libuv/src/unix/trace_unix.c", - ] - } else if (is_mingw || is_win) { - sources += [ - "//third_party/libuv/src/win/async.c", - "//third_party/libuv/src/win/core.c", - "//third_party/libuv/src/win/detect-wakeup.c", - "//third_party/libuv/src/win/dl.c", - "//third_party/libuv/src/win/error.c", - "//third_party/libuv/src/win/fs-event.c", - "//third_party/libuv/src/win/fs.c", - "//third_party/libuv/src/win/getaddrinfo.c", - "//third_party/libuv/src/win/getnameinfo.c", - "//third_party/libuv/src/win/handle.c", - "//third_party/libuv/src/win/log_win.c", - "//third_party/libuv/src/win/loop-watcher.c", - "//third_party/libuv/src/win/pipe.c", - "//third_party/libuv/src/win/poll.c", - "//third_party/libuv/src/win/process-stdio.c", - "//third_party/libuv/src/win/process.c", - "//third_party/libuv/src/win/signal.c", - "//third_party/libuv/src/win/snprintf.c", - "//third_party/libuv/src/win/stream.c", - "//third_party/libuv/src/win/tcp.c", - "//third_party/libuv/src/win/thread.c", - "//third_party/libuv/src/win/trace_win.c", - "//third_party/libuv/src/win/tty.c", - "//third_party/libuv/src/win/udp.c", - "//third_party/libuv/src/win/util.c", - "//third_party/libuv/src/win/winapi.c", - "//third_party/libuv/src/win/winsock.c", - ] - } else if (is_ohos || (defined(is_android) && is_android)) { - sources += nonwin_srcs + [ - "//third_party/libuv/src/unix/linux.c", - "//third_party/libuv/src/unix/procfs-exepath.c", - "//third_party/libuv/src/unix/random-getentropy.c", - "//third_party/libuv/src/unix/random-getrandom.c", - "//third_party/libuv/src/unix/random-sysctl-linux.c", - "//third_party/libuv/src/unix/proctitle.c", - ] - sources += [ - "src/log_ohos.c", - "src/trace_ohos.c", - ] - } else if (is_linux) { - sources += nonwin_srcs + [ - "//third_party/libuv/src/unix/linux.c", - "//third_party/libuv/src/unix/procfs-exepath.c", - "//third_party/libuv/src/unix/random-getrandom.c", - "//third_party/libuv/src/unix/random-sysctl-linux.c", - "//third_party/libuv/src/unix/proctitle.c", - "//third_party/libuv/src/unix/log_unix.c", - "//third_party/libuv/src/unix/trace_unix.c", - ] - } else { - sources += nonwin_srcs + [ - "//third_party/libuv/src/unix/linux.c", - "//third_party/libuv/src/unix/procfs-exepath.c", - "//third_party/libuv/src/unix/random-getrandom.c", - "//third_party/libuv/src/unix/random-sysctl-linux.c", - "//third_party/libuv/src/unix/proctitle.c", - ] + ohos_source_set("libuv_source") { + stack_protector_ret = false + configs = [ ":libuv_config" ] + sources = common_source + external_deps = [] + if (is_mac || (defined(is_ios) && is_ios)) { + sources += nonwin_srcs + [ + "//third_party/libuv/src/unix/bsd-ifaddrs.c", + "//third_party/libuv/src/unix/kqueue.c", + "//third_party/libuv/src/unix/random-getentropy.c", + "//third_party/libuv/src/unix/darwin-proctitle.c", + "//third_party/libuv/src/unix/darwin.c", + "//third_party/libuv/src/unix/fsevents.c", + "//third_party/libuv/src/unix/os390-proctitle.c", + "//third_party/libuv/src/unix/log_unix.c", + "//third_party/libuv/src/unix/trace_unix.c", + ] + } else if (is_mingw || is_win) { + sources += [ + "//third_party/libuv/src/win/async.c", + "//third_party/libuv/src/win/core.c", + "//third_party/libuv/src/win/detect-wakeup.c", + "//third_party/libuv/src/win/dl.c", + "//third_party/libuv/src/win/error.c", + "//third_party/libuv/src/win/fs-event.c", + "//third_party/libuv/src/win/fs.c", + "//third_party/libuv/src/win/getaddrinfo.c", + "//third_party/libuv/src/win/getnameinfo.c", + "//third_party/libuv/src/win/handle.c", + "//third_party/libuv/src/win/log_win.c", + "//third_party/libuv/src/win/loop-watcher.c", + "//third_party/libuv/src/win/pipe.c", + "//third_party/libuv/src/win/poll.c", + "//third_party/libuv/src/win/process-stdio.c", + "//third_party/libuv/src/win/process.c", + "//third_party/libuv/src/win/signal.c", + "//third_party/libuv/src/win/snprintf.c", + "//third_party/libuv/src/win/stream.c", + "//third_party/libuv/src/win/tcp.c", + "//third_party/libuv/src/win/thread.c", + "//third_party/libuv/src/win/trace_win.c", + "//third_party/libuv/src/win/tty.c", + "//third_party/libuv/src/win/udp.c", + "//third_party/libuv/src/win/util.c", + "//third_party/libuv/src/win/winapi.c", + "//third_party/libuv/src/win/winsock.c", + ] + } else if (is_ohos || (defined(is_android) && is_android)) { + sources += nonwin_srcs + [ + "//third_party/libuv/src/unix/linux.c", + "//third_party/libuv/src/unix/procfs-exepath.c", + "//third_party/libuv/src/unix/random-getentropy.c", + "//third_party/libuv/src/unix/random-getrandom.c", + "//third_party/libuv/src/unix/random-sysctl-linux.c", + "//third_party/libuv/src/unix/proctitle.c", + ] + sources += [ + "src/log_ohos.c", + "src/trace_ohos.c", + ] + } else if (is_linux) { + sources += nonwin_srcs + [ + "//third_party/libuv/src/unix/linux.c", + "//third_party/libuv/src/unix/procfs-exepath.c", + "//third_party/libuv/src/unix/random-getrandom.c", + "//third_party/libuv/src/unix/random-sysctl-linux.c", + "//third_party/libuv/src/unix/proctitle.c", + "//third_party/libuv/src/unix/log_unix.c", + "//third_party/libuv/src/unix/trace_unix.c", + ] + } else { + sources += nonwin_srcs + [ + "//third_party/libuv/src/unix/linux.c", + "//third_party/libuv/src/unix/procfs-exepath.c", + "//third_party/libuv/src/unix/random-getrandom.c", + "//third_party/libuv/src/unix/random-sysctl-linux.c", + "//third_party/libuv/src/unix/proctitle.c", + ] + } + subsystem_name = "thirdparty" + part_name = "libuv" } - subsystem_name = "thirdparty" - part_name = "libuv" -} -ohos_static_library("uv_static") { - stack_protector_ret = false - deps = [ ":libuv_source" ] - public_configs = [ ":libuv_config" ] - subsystem_name = "thirdparty" - part_name = "libuv" -} + ohos_static_library("uv_static") { + stack_protector_ret = false + deps = [ ":libuv_source" ] + public_configs = [ ":libuv_config" ] + subsystem_name = "thirdparty" + part_name = "libuv" + } -ohos_shared_library("uv") { - stack_protector_ret = false - deps = [ ":libuv_source" ] - public_configs = [ ":libuv_config" ] - subsystem_name = "thirdparty" - part_name = "libuv" - if (is_ohos) { - output_extension = "so" + ohos_shared_library("uv") { + stack_protector_ret = false + deps = [ ":libuv_source" ] + public_configs = [ ":libuv_config" ] + subsystem_name = "thirdparty" + part_name = "libuv" + if (is_ohos) { + output_extension = "so" + } + install_images = [ + "system", + "updater", + ] } - install_images = [ - "system", - "updater", - ] -} +} \ No newline at end of file diff --git a/build/third_party_gn/musl/BUILD.gn b/build/third_party_gn/musl/BUILD.gn index 73729d5e92377a16ae8e6babd52f13a4ce55a8f4..9189743c60671c07b096a0e863db55542c350a7e 100644 --- a/build/third_party_gn/musl/BUILD.gn +++ b/build/third_party_gn/musl/BUILD.gn @@ -10,319 +10,324 @@ # 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. +if (!defined(ark_standalone_build)) { + ark_standalone_build = false +} -import("$build_root/third_party_gn/musl/musl_template.gni") +if (ark_standalone_build) { + import("$build_root/third_party_gn/musl/musl_template.gni") -musl_libs("soft_libs") { -} + musl_libs("soft_libs") { + } -group("musl_headers") { - deps = [ - ":FreeBSD_copy", - ":copy_uapi_file", - ":create_alltypes_h_file", - ":create_syscall_h_file", - ":create_version_h_file", - ":musl_copy_inc_arpa_file", - ":musl_copy_inc_hook_file", - ":musl_copy_inc_net_file", - ":musl_copy_inc_netinet_file", - ":musl_copy_inc_netpacket_file", - ] -} + group("musl_headers") { + deps = [ + ":FreeBSD_copy", + ":copy_uapi_file", + ":create_alltypes_h_file", + ":create_syscall_h_file", + ":create_version_h_file", + ":musl_copy_inc_arpa_file", + ":musl_copy_inc_hook_file", + ":musl_copy_inc_net_file", + ":musl_copy_inc_netinet_file", + ":musl_copy_inc_netpacket_file", + ] + } -action("create_porting_src") { - script = "//third_party/musl/scripts/porting.sh" - - sources_dir = [ "//third_party/musl" ] - - outdir = [ "${target_out_dir}/${musl_ported_dir}" ] - - src_files = musl_src_arch_file - src_files += musl_src_file - src_files += musl_src_ldso - src_files += musl_inc_bits_files - src_files += musl_inc_arpa_files - src_files += musl_inc_net_files - src_files += musl_inc_netinet_files - src_files += musl_inc_netpacket_files - src_files += musl_inc_scsi_files - src_files += musl_inc_sys_files - src_files += musl_inc_fortify_files - src_files += musl_inc_root_files - src_files += musl_inc_info_files - src_files += musl_inc_trace_files - - src_files += [ - "crt/Scrt1.c", - "crt/crt1.c", - "crt/rcrt1.c", - "tools/mkalltypes.sed", - "arch/${musl_arch}/bits/alltypes.h.in", - "arch/${musl_arch}/bits/syscall.h.in", - "include/alltypes.h.in", - "VERSION", - "tools/version.sh", - "tools/install.sh", - "scripts/install.py", - "scripts/create_alltypes.sh", - "scripts/create_vesion.sh", - "scripts/create_syscall.sh", - ] - src_files += [ - "crt/${musl_arch}/crti.s", - "crt/${musl_arch}/crtn.s", - ] - - args = [ "-i" ] + rebase_path(sources_dir) - args += [ "-o" ] + rebase_path(outdir) - args += [ "-p" ] + [ "${musl_target_os}" ] - foreach(i, src_files) { - foreach(s, musl_src_files_ext) { - if (i == s) { - src_files -= [ "${s}" ] + action("create_porting_src") { + script = "//third_party/musl/scripts/porting.sh" + + sources_dir = [ "//third_party/musl" ] + + outdir = [ "${target_out_dir}/${musl_ported_dir}" ] + + src_files = musl_src_arch_file + src_files += musl_src_file + src_files += musl_src_ldso + src_files += musl_inc_bits_files + src_files += musl_inc_arpa_files + src_files += musl_inc_net_files + src_files += musl_inc_netinet_files + src_files += musl_inc_netpacket_files + src_files += musl_inc_scsi_files + src_files += musl_inc_sys_files + src_files += musl_inc_fortify_files + src_files += musl_inc_root_files + src_files += musl_inc_info_files + src_files += musl_inc_trace_files + + src_files += [ + "crt/Scrt1.c", + "crt/crt1.c", + "crt/rcrt1.c", + "tools/mkalltypes.sed", + "arch/${musl_arch}/bits/alltypes.h.in", + "arch/${musl_arch}/bits/syscall.h.in", + "include/alltypes.h.in", + "VERSION", + "tools/version.sh", + "tools/install.sh", + "scripts/install.py", + "scripts/create_alltypes.sh", + "scripts/create_vesion.sh", + "scripts/create_syscall.sh", + ] + src_files += [ + "crt/${musl_arch}/crti.s", + "crt/${musl_arch}/crtn.s", + ] + + args = [ "-i" ] + rebase_path(sources_dir) + args += [ "-o" ] + rebase_path(outdir) + args += [ "-p" ] + [ "${musl_target_os}" ] + foreach(i, src_files) { + foreach(s, musl_src_files_ext) { + if (i == s) { + src_files -= [ "${s}" ] + } } } - } - outputs = [] - foreach(s, src_files) { - outputs += [ "${target_out_dir}/${musl_ported_dir}/${s}" ] - } + outputs = [] + foreach(s, src_files) { + outputs += [ "${target_out_dir}/${musl_ported_dir}/${s}" ] + } - foreach(s, musl_src_files_ext) { - outputs += [ "${target_out_dir}/${musl_ported_dir}/${s}" ] - } + foreach(s, musl_src_files_ext) { + outputs += [ "${target_out_dir}/${musl_ported_dir}/${s}" ] + } - inputs = [] - foreach(i, src_files) { - foreach(s, musl_src_linux_files) { - if (i == s) { - src_files -= [ "${s}" ] + inputs = [] + foreach(i, src_files) { + foreach(s, musl_src_linux_files) { + if (i == s) { + src_files -= [ "${s}" ] + } } } - } - foreach(s, src_files) { - inputs += [ "${musl_dir}/${s}" ] - } + foreach(s, src_files) { + inputs += [ "${musl_dir}/${s}" ] + } - foreach(s, musl_src_files_ext) { - inputs += [ "${musl_dir}/${s}" ] + foreach(s, musl_src_files_ext) { + inputs += [ "${musl_dir}/${s}" ] + } } -} -action("create_alltypes_h_file") { - script = "${target_out_dir}/${musl_ported_dir}/scripts/create_alltypes.sh" + action("create_alltypes_h_file") { + script = "${target_out_dir}/${musl_ported_dir}/scripts/create_alltypes.sh" - sources = [ "${target_out_dir}/${musl_ported_dir}/tools/mkalltypes.sed" ] + sources = [ "${target_out_dir}/${musl_ported_dir}/tools/mkalltypes.sed" ] - sources += [ - "${target_out_dir}/${musl_ported_dir}/arch/${musl_arch}/bits/alltypes.h.in", - "${target_out_dir}/${musl_ported_dir}/include/alltypes.h.in", - ] + sources += [ + "${target_out_dir}/${musl_ported_dir}/arch/${musl_arch}/bits/alltypes.h.in", + "${target_out_dir}/${musl_ported_dir}/include/alltypes.h.in", + ] - outputs = [ "${target_out_dir}/${musl_inc_out_dir}/bits/alltypes.h" ] + outputs = [ "${target_out_dir}/${musl_inc_out_dir}/bits/alltypes.h" ] - args = [ "-o" ] + rebase_path(outputs, root_build_dir) + - rebase_path(sources, root_build_dir) + args = [ "-o" ] + rebase_path(outputs, root_build_dir) + + rebase_path(sources, root_build_dir) - deps = [ ":create_porting_src" ] -} + deps = [ ":create_porting_src" ] + } -action("create_version_h_file") { - script = "${target_out_dir}/${musl_ported_dir}/scripts/create_vesion.sh" + action("create_version_h_file") { + script = "${target_out_dir}/${musl_ported_dir}/scripts/create_vesion.sh" - sources = [ - "${target_out_dir}/${musl_ported_dir}/VERSION", - "${target_out_dir}/${musl_ported_dir}/tools/version.sh", - ] + sources = [ + "${target_out_dir}/${musl_ported_dir}/VERSION", + "${target_out_dir}/${musl_ported_dir}/tools/version.sh", + ] - outputs = [ "${target_out_dir}/${musl_inc_out_dir}/version.h" ] + outputs = [ "${target_out_dir}/${musl_inc_out_dir}/version.h" ] - args = - rebase_path(sources, root_build_dir) + - [ rebase_path("${target_out_dir}/${musl_inc_out_dir}", root_build_dir) ] + args = + rebase_path(sources, root_build_dir) + + [ rebase_path("${target_out_dir}/${musl_inc_out_dir}", root_build_dir) ] - deps = [ ":create_porting_src" ] -} + deps = [ ":create_porting_src" ] + } -action("create_syscall_h_file") { - script = "${target_out_dir}/${musl_ported_dir}/scripts/create_syscall.sh" + action("create_syscall_h_file") { + script = "${target_out_dir}/${musl_ported_dir}/scripts/create_syscall.sh" - sources = [ - "${target_out_dir}/${musl_ported_dir}/arch/${musl_arch}/bits/syscall.h.in", - ] + sources = [ + "${target_out_dir}/${musl_ported_dir}/arch/${musl_arch}/bits/syscall.h.in", + ] - outputs = [ "${target_out_dir}/${musl_inc_out_dir}/bits/syscall.h" ] + outputs = [ "${target_out_dir}/${musl_inc_out_dir}/bits/syscall.h" ] - args = rebase_path(sources, root_build_dir) + - rebase_path(outputs, root_build_dir) + args = rebase_path(sources, root_build_dir) + + rebase_path(outputs, root_build_dir) - deps = [ ":create_porting_src" ] -} + deps = [ ":create_porting_src" ] + } -uapi_from = "local" -uapi_full_path = rebase_path(musl_uapi_dir) -arguments_uapi = [ "-c" ] + uapi_from = "local" + uapi_full_path = rebase_path(musl_uapi_dir) + arguments_uapi = [ "-c" ] -# exclude these files because they need special treatment -if (uapi_from == "make") { - exclude_files = "^asm\$|^scsi\$" -} else { - exclude_files = "^asm-arm\$|^asm-arm64\$|^scsi\$" -} + # exclude these files because they need special treatment + if (uapi_from == "make") { + exclude_files = "^asm\$|^scsi\$" + } else { + exclude_files = "^asm-arm\$|^asm-arm64\$|^scsi\$" + } -arguments_uapi += - [ "ls ${uapi_full_path} | grep -Ev " + "\"" + "${exclude_files}" + "\"" ] -uspi_files = exec_script("/bin/sh", arguments_uapi, "list lines") + arguments_uapi += + [ "ls ${uapi_full_path} | grep -Ev " + "\"" + "${exclude_files}" + "\"" ] + uspi_files = exec_script("/bin/sh", arguments_uapi, "list lines") -# Generate a copy target for each file -foreach(file, uspi_files) { - copy("copy_uapi_${file}") { - sources = [ "${musl_uapi_dir}/${file}" ] - outputs = [ "${target_out_dir}/${musl_inc_out_dir}/${file}" ] + # Generate a copy target for each file + foreach(file, uspi_files) { + copy("copy_uapi_${file}") { + sources = [ "${musl_uapi_dir}/${file}" ] + outputs = [ "${target_out_dir}/${musl_inc_out_dir}/${file}" ] + } } -} -group("copy_uapi_scsi") { - deps = [] - sources = [] - outputs = [] - uapi_scsi_dir = rebase_path("${musl_uapi_dir}/scsi") - arguments_scsi = [ "-c" ] - arguments_scsi += [ "ls ${uapi_scsi_dir}" ] - uapi_scsi_files = exec_script("/bin/sh", arguments_scsi, "list lines") - - # Generate a copy target for each file in scsi dir to avoid being influenced by musl_copy_inc_scsi output - foreach(file, uapi_scsi_files) { - copy("copy_uapi_scsi_${file}") { - sources += [ "${musl_uapi_dir}/scsi/${file}" ] - outputs += [ "${target_out_dir}/${musl_inc_out_dir}/scsi/${file}" ] + group("copy_uapi_scsi") { + deps = [] + sources = [] + outputs = [] + uapi_scsi_dir = rebase_path("${musl_uapi_dir}/scsi") + arguments_scsi = [ "-c" ] + arguments_scsi += [ "ls ${uapi_scsi_dir}" ] + uapi_scsi_files = exec_script("/bin/sh", arguments_scsi, "list lines") + + # Generate a copy target for each file in scsi dir to avoid being influenced by musl_copy_inc_scsi output + foreach(file, uapi_scsi_files) { + copy("copy_uapi_scsi_${file}") { + sources += [ "${musl_uapi_dir}/scsi/${file}" ] + outputs += [ "${target_out_dir}/${musl_inc_out_dir}/scsi/${file}" ] + } + deps += [ ":copy_uapi_scsi_${file}" ] } - deps += [ ":copy_uapi_scsi_${file}" ] } -} -copy("copy_uapi_asm") { - if (uapi_from == "local") { - if ("${musl_arch}" == "arm") { - file_name = "asm-arm" - } else { # aarch64 and x86_64 use same file - file_name = "asm-arm64" + copy("copy_uapi_asm") { + if (uapi_from == "local") { + if ("${musl_arch}" == "arm") { + file_name = "asm-arm" + } else { # aarch64 and x86_64 use same file + file_name = "asm-arm64" + } + sources = [ "${musl_uapi_dir}/${file_name}/asm" ] + } else { + sources = [ "${musl_uapi_dir}/asm" ] } - sources = [ "${musl_uapi_dir}/${file_name}/asm" ] - } else { - sources = [ "${musl_uapi_dir}/asm" ] + outputs = [ "${target_out_dir}/${musl_inc_out_dir}/asm" ] } - outputs = [ "${target_out_dir}/${musl_inc_out_dir}/asm" ] -} -group("copy_uapi_file") { - deps = [ ":copy_uapi_scsi" ] + group("copy_uapi_file") { + deps = [ ":copy_uapi_scsi" ] - # We need do different processing for asm according to the source of uapi - deps += [ ":copy_uapi_asm" ] - foreach(file, uspi_files) { - deps += [ ":copy_uapi_${file}" ] + # We need do different processing for asm according to the source of uapi + deps += [ ":copy_uapi_asm" ] + foreach(file, uspi_files) { + deps += [ ":copy_uapi_${file}" ] + } } -} -copy("musl_copy_inc_hook_file") { - sources = musl_inc_hook_files - outputs = [ "${target_out_dir}/${musl_inc_out_dir}/{{source_file_part}}" ] -} + copy("musl_copy_inc_hook_file") { + sources = musl_inc_hook_files + outputs = [ "${target_out_dir}/${musl_inc_out_dir}/{{source_file_part}}" ] + } -copy("musl_copy_inc_bits") { - sources = [] - sources_bits = musl_inc_bits_files - foreach(s, sources_bits) { - sources += [ "${target_out_dir}/${musl_ported_dir}/${s}" ] + copy("musl_copy_inc_bits") { + sources = [] + sources_bits = musl_inc_bits_files + foreach(s, sources_bits) { + sources += [ "${target_out_dir}/${musl_ported_dir}/${s}" ] + } + outputs = + [ "${target_out_dir}/${musl_inc_out_dir}/bits/{{source_file_part}}" ] + deps = [ ":create_porting_src" ] } - outputs = - [ "${target_out_dir}/${musl_inc_out_dir}/bits/{{source_file_part}}" ] - deps = [ ":create_porting_src" ] -} -copy("musl_copy_inc_fortify") { - sources = [] - sources_fortify = musl_inc_fortify_files - foreach(s, sources_fortify) { - sources += [ "${target_out_dir}/${musl_ported_dir}/${s}" ] + copy("musl_copy_inc_fortify") { + sources = [] + sources_fortify = musl_inc_fortify_files + foreach(s, sources_fortify) { + sources += [ "${target_out_dir}/${musl_ported_dir}/${s}" ] + } + outputs = + [ "${target_out_dir}/${musl_inc_out_dir}/fortify/{{source_file_part}}" ] + deps = [ ":create_porting_src" ] } - outputs = - [ "${target_out_dir}/${musl_inc_out_dir}/fortify/{{source_file_part}}" ] - deps = [ ":create_porting_src" ] -} -copy("musl_copy_inc_root") { - sources = [] - sources_inc_root = musl_inc_root_files - foreach(s, sources_inc_root) { - sources += [ "${target_out_dir}/${musl_ported_dir}/${s}" ] + copy("musl_copy_inc_root") { + sources = [] + sources_inc_root = musl_inc_root_files + foreach(s, sources_inc_root) { + sources += [ "${target_out_dir}/${musl_ported_dir}/${s}" ] + } + outputs = [ "${target_out_dir}/${musl_inc_out_dir}/{{source_file_part}}" ] + deps = [ ":create_porting_src" ] } - outputs = [ "${target_out_dir}/${musl_inc_out_dir}/{{source_file_part}}" ] - deps = [ ":create_porting_src" ] -} -copy("musl_copy_inc_sys") { - sources = [] - sources_inc_sys = musl_inc_sys_files - foreach(s, sources_inc_sys) { - sources += [ "${target_out_dir}/${musl_ported_dir}/${s}" ] + copy("musl_copy_inc_sys") { + sources = [] + sources_inc_sys = musl_inc_sys_files + foreach(s, sources_inc_sys) { + sources += [ "${target_out_dir}/${musl_ported_dir}/${s}" ] + } + outputs = [ "${target_out_dir}/${musl_inc_out_dir}/sys/{{source_file_part}}" ] + deps = [ ":create_porting_src" ] } - outputs = [ "${target_out_dir}/${musl_inc_out_dir}/sys/{{source_file_part}}" ] - deps = [ ":create_porting_src" ] -} -copy("musl_copy_inc_netinet_file") { - sources = [] - sources_netinet_file = musl_inc_netinet_files - foreach(s, sources_netinet_file) { - sources += [ "${target_out_dir}/${musl_ported_dir}/${s}" ] + copy("musl_copy_inc_netinet_file") { + sources = [] + sources_netinet_file = musl_inc_netinet_files + foreach(s, sources_netinet_file) { + sources += [ "${target_out_dir}/${musl_ported_dir}/${s}" ] + } + outputs = + [ "${target_out_dir}/${musl_inc_out_dir}/netinet/{{source_file_part}}" ] + deps = [ ":create_porting_src" ] } - outputs = - [ "${target_out_dir}/${musl_inc_out_dir}/netinet/{{source_file_part}}" ] - deps = [ ":create_porting_src" ] -} -copy("musl_copy_inc_arpa_file") { - sources = [] - sources_arpa_file = musl_inc_arpa_files - foreach(s, sources_arpa_file) { - sources += [ "${target_out_dir}/${musl_ported_dir}/${s}" ] + copy("musl_copy_inc_arpa_file") { + sources = [] + sources_arpa_file = musl_inc_arpa_files + foreach(s, sources_arpa_file) { + sources += [ "${target_out_dir}/${musl_ported_dir}/${s}" ] + } + outputs = + [ "${target_out_dir}/${musl_inc_out_dir}/arpa/{{source_file_part}}" ] + deps = [ ":create_porting_src" ] } - outputs = - [ "${target_out_dir}/${musl_inc_out_dir}/arpa/{{source_file_part}}" ] - deps = [ ":create_porting_src" ] -} -copy("musl_copy_inc_net_file") { - sources = [] - sources_net_file = musl_inc_net_files - foreach(s, sources_net_file) { - sources += [ "${target_out_dir}/${musl_ported_dir}/${s}" ] + copy("musl_copy_inc_net_file") { + sources = [] + sources_net_file = musl_inc_net_files + foreach(s, sources_net_file) { + sources += [ "${target_out_dir}/${musl_ported_dir}/${s}" ] + } + outputs = [ "${target_out_dir}/${musl_inc_out_dir}/net/{{source_file_part}}" ] + deps = [ ":create_porting_src" ] } - outputs = [ "${target_out_dir}/${musl_inc_out_dir}/net/{{source_file_part}}" ] - deps = [ ":create_porting_src" ] -} -copy("musl_copy_inc_netpacket_file") { - sources = [] - sources_netpacket_file = musl_inc_netpacket_files - foreach(s, sources_netpacket_file) { - sources += [ "${target_out_dir}/${musl_ported_dir}/${s}" ] + copy("musl_copy_inc_netpacket_file") { + sources = [] + sources_netpacket_file = musl_inc_netpacket_files + foreach(s, sources_netpacket_file) { + sources += [ "${target_out_dir}/${musl_ported_dir}/${s}" ] + } + outputs = + [ "${target_out_dir}/${musl_inc_out_dir}/netpacket/{{source_file_part}}" ] + deps = [ ":create_porting_src" ] } - outputs = - [ "${target_out_dir}/${musl_inc_out_dir}/netpacket/{{source_file_part}}" ] - deps = [ ":create_porting_src" ] -} -group("FreeBSD_copy") { - deps = [ ":FreeBSD_sys_headers" ] -} + group("FreeBSD_copy") { + deps = [ ":FreeBSD_sys_headers" ] + } -copy("FreeBSD_sys_headers") { - sources = freebsd_sys_headers - outputs = [ "${target_out_dir}/${musl_inc_out_dir}/sys/{{source_file_part}}" ] - deps = [ ":create_porting_src" ] -} + copy("FreeBSD_sys_headers") { + sources = freebsd_sys_headers + outputs = [ "${target_out_dir}/${musl_inc_out_dir}/sys/{{source_file_part}}" ] + deps = [ ":create_porting_src" ] + } +} \ No newline at end of file diff --git a/build/third_party_gn/openssl/BUILD.gn b/build/third_party_gn/openssl/BUILD.gn index cae0e8ea69d4ef5c96eb868b3671c7ee6ae3b524..94b0d323d8458e39625ebf1ab90dbdbfb2f326c1 100644 --- a/build/third_party_gn/openssl/BUILD.gn +++ b/build/third_party_gn/openssl/BUILD.gn @@ -10,1900 +10,1905 @@ # 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. - -import("$build_root/ark.gni") - -print("openssl detecting os now...") -print("current_cpu = ${current_cpu}") -print("current_os = ${current_os}") -print("host_os = ${host_os}") -openssl_selected_platform = "" -print("is_mingw = ${is_mingw}") -if (current_cpu == "arm" && !(current_os == "linux" || host_os == "mac")) { - print("openssl selected linux-armv4") - openssl_selected_platform = "linux-armv4" -} else if (current_cpu == "arm64" && - (!(current_os == "linux" || host_os == "mac") || - current_os == "ohos")) { - print("openssl selected linux-aarch64") - openssl_selected_platform = "linux-aarch64" -} else if ((current_cpu == "x64" || current_cpu == "x86_64") && - (current_os == "mac" || current_os == "ios")) { - # compilation for ios depends the platform - print("openssl selected darwin64-x86_64-cc") - openssl_selected_platform = "darwin64-x86_64-cc" -} else if (current_cpu == "arm64" && - (current_os == "mac" || current_os == "ios")) { - # ios and macos both use the platform - print("openssl selected darwin64-arm64-cc") - openssl_selected_platform = "darwin64-arm64-cc" -} else if ((current_cpu == "x64" || current_cpu == "x86_64") && - current_os != "mingw") { - print("openssl selected linux-x86_64") - openssl_selected_platform = "linux-x86_64" -} else if (is_mingw) { - print("openssl selected mingw64") - openssl_selected_platform = "mingw64" -} else if (current_cpu == "arm" && current_os == "android") { - print("openssl selected linux-armv4") - openssl_selected_platform = "linux-armv4" -} else if (current_cpu == "arm64" && current_os == "android") { - print("openssl selected linux-aarch64") - openssl_selected_platform = "linux-aarch64" -} -print( - "openssl detecting os done. openssl_selected_platform = ${openssl_selected_platform}") - -openssl_selected_platform_full_path = - "${target_out_dir}/build_all_generated/${openssl_selected_platform}" - -# 升级修改适配检查点1 libcrypto 不同平台汇编代码 -libcrypto_build_all_generated_linux_armv4_sources = [ - "${openssl_selected_platform_full_path}/crypto/aes/aes-armv4.S", - "${openssl_selected_platform_full_path}/crypto/aes/aesv8-armx.S", - "${openssl_selected_platform_full_path}/crypto/aes/bsaes-armv7.S", - "${openssl_selected_platform_full_path}/crypto/armv4cpuid.S", - "${openssl_selected_platform_full_path}/crypto/bn/armv4-gf2m.S", - "${openssl_selected_platform_full_path}/crypto/bn/armv4-mont.S", - "${openssl_selected_platform_full_path}/crypto/chacha/chacha-armv4.S", - "${openssl_selected_platform_full_path}/crypto/ec/ecp_nistz256-armv4.S", - "${openssl_selected_platform_full_path}/crypto/modes/ghash-armv4.S", - "${openssl_selected_platform_full_path}/crypto/modes/ghashv8-armx.S", - "${openssl_selected_platform_full_path}/crypto/poly1305/poly1305-armv4.S", - "${openssl_selected_platform_full_path}/crypto/sha/keccak1600-armv4.S", - "${openssl_selected_platform_full_path}/crypto/sha/sha1-armv4-large.S", - "${openssl_selected_platform_full_path}/crypto/sha/sha256-armv4.S", - "${openssl_selected_platform_full_path}/crypto/sha/sha512-armv4.S", -] - -# 升级修改适配检查点2 libcrypto 不同平台汇编代码 -libcrypto_build_all_generated_linux_aarch64_sources = [ - "${openssl_selected_platform_full_path}/crypto/aes/aesv8-armx.S", - "${openssl_selected_platform_full_path}/crypto/aes/vpaes-armv8.S", - "${openssl_selected_platform_full_path}/crypto/arm64cpuid.S", - "${openssl_selected_platform_full_path}/crypto/bn/armv8-mont.S", - "${openssl_selected_platform_full_path}/crypto/chacha/chacha-armv8.S", - "${openssl_selected_platform_full_path}/crypto/ec/ecp_nistz256-armv8.S", - "${openssl_selected_platform_full_path}/crypto/modes/aes-gcm-armv8_64.S", - "${openssl_selected_platform_full_path}/crypto/modes/ghashv8-armx.S", - "${openssl_selected_platform_full_path}/crypto/poly1305/poly1305-armv8.S", - "${openssl_selected_platform_full_path}/crypto/sha/keccak1600-armv8.S", - "${openssl_selected_platform_full_path}/crypto/sha/sha1-armv8.S", - "${openssl_selected_platform_full_path}/crypto/sha/sha256-armv8.S", - "${openssl_selected_platform_full_path}/crypto/sha/sha512-armv8.S", -] - -# 升级修改适配检查点3 libcrypto 不同平台汇编代码 -libcrypto_build_all_generated_darwin64_x86_64_cc_sources = [ - "${openssl_selected_platform_full_path}/crypto/aes/aes-x86_64.s", - "${openssl_selected_platform_full_path}/crypto/aes/aesni-mb-x86_64.s", - "${openssl_selected_platform_full_path}/crypto/aes/aesni-sha1-x86_64.s", - "${openssl_selected_platform_full_path}/crypto/aes/aesni-sha256-x86_64.s", - "${openssl_selected_platform_full_path}/crypto/aes/aesni-x86_64.s", - "${openssl_selected_platform_full_path}/crypto/aes/bsaes-x86_64.s", - "${openssl_selected_platform_full_path}/crypto/aes/vpaes-x86_64.s", - "${openssl_selected_platform_full_path}/crypto/bn/rsaz-avx2.s", - "${openssl_selected_platform_full_path}/crypto/bn/rsaz-avx512.s", - "${openssl_selected_platform_full_path}/crypto/bn/rsaz-x86_64.s", - "${openssl_selected_platform_full_path}/crypto/bn/x86_64-gf2m.s", - "${openssl_selected_platform_full_path}/crypto/bn/x86_64-mont.s", - "${openssl_selected_platform_full_path}/crypto/bn/x86_64-mont5.s", - "${openssl_selected_platform_full_path}/crypto/camellia/cmll-x86_64.s", - "${openssl_selected_platform_full_path}/crypto/chacha/chacha-x86_64.s", - "${openssl_selected_platform_full_path}/crypto/ec/ecp_nistz256-x86_64.s", - "${openssl_selected_platform_full_path}/crypto/ec/x25519-x86_64.s", - "${openssl_selected_platform_full_path}/crypto/md5/md5-x86_64.s", - "${openssl_selected_platform_full_path}/crypto/modes/aesni-gcm-x86_64.s", - "${openssl_selected_platform_full_path}/crypto/modes/ghash-x86_64.s", - "${openssl_selected_platform_full_path}/crypto/poly1305/poly1305-x86_64.s", - "${openssl_selected_platform_full_path}/crypto/rc4/rc4-md5-x86_64.s", - "${openssl_selected_platform_full_path}/crypto/rc4/rc4-x86_64.s", - "${openssl_selected_platform_full_path}/crypto/sha/keccak1600-x86_64.s", - "${openssl_selected_platform_full_path}/crypto/sha/sha1-mb-x86_64.s", - "${openssl_selected_platform_full_path}/crypto/sha/sha1-x86_64.s", - "${openssl_selected_platform_full_path}/crypto/sha/sha256-mb-x86_64.s", - "${openssl_selected_platform_full_path}/crypto/sha/sha256-x86_64.s", - "${openssl_selected_platform_full_path}/crypto/sha/sha512-x86_64.s", - "${openssl_selected_platform_full_path}/crypto/whrlpool/wp-x86_64.s", - "${openssl_selected_platform_full_path}/crypto/x86_64cpuid.s", - "${openssl_selected_platform_full_path}/engines/e_padlock-x86_64.s", -] - -# 升级修改适配检查点4 libcrypto 不同平台汇编代码 -libcrypto_build_all_generated_darwin64_arm64_cc_sources = [ - "${openssl_selected_platform_full_path}/crypto/aes/aesv8-armx.S", - "${openssl_selected_platform_full_path}/crypto/aes/vpaes-armv8.S", - "${openssl_selected_platform_full_path}/crypto/arm64cpuid.S", - "${openssl_selected_platform_full_path}/crypto/bn/armv8-mont.S", - "${openssl_selected_platform_full_path}/crypto/chacha/chacha-armv8.S", - "${openssl_selected_platform_full_path}/crypto/ec/ecp_nistz256-armv8.S", - "${openssl_selected_platform_full_path}/crypto/modes/aes-gcm-armv8_64.S", - "${openssl_selected_platform_full_path}/crypto/modes/ghashv8-armx.S", - "${openssl_selected_platform_full_path}/crypto/poly1305/poly1305-armv8.S", - "${openssl_selected_platform_full_path}/crypto/sha/keccak1600-armv8.S", - "${openssl_selected_platform_full_path}/crypto/sha/sha1-armv8.S", - "${openssl_selected_platform_full_path}/crypto/sha/sha256-armv8.S", - "${openssl_selected_platform_full_path}/crypto/sha/sha512-armv8.S", -] - -# 升级修改适配检查点5 libcrypto 不同平台汇编代码 -libcrypto_build_all_generated_linux_x86_64_sources = [ - "${openssl_selected_platform_full_path}/crypto/aes/aes-x86_64.s", - "${openssl_selected_platform_full_path}/crypto/aes/aesni-mb-x86_64.s", - "${openssl_selected_platform_full_path}/crypto/aes/aesni-sha1-x86_64.s", - "${openssl_selected_platform_full_path}/crypto/aes/aesni-sha256-x86_64.s", - "${openssl_selected_platform_full_path}/crypto/aes/aesni-x86_64.s", - "${openssl_selected_platform_full_path}/crypto/aes/bsaes-x86_64.s", - "${openssl_selected_platform_full_path}/crypto/aes/vpaes-x86_64.s", - "${openssl_selected_platform_full_path}/crypto/bn/rsaz-avx2.s", - "${openssl_selected_platform_full_path}/crypto/bn/rsaz-avx512.s", - "${openssl_selected_platform_full_path}/crypto/bn/rsaz-x86_64.s", - "${openssl_selected_platform_full_path}/crypto/bn/x86_64-gf2m.s", - "${openssl_selected_platform_full_path}/crypto/bn/x86_64-mont.s", - "${openssl_selected_platform_full_path}/crypto/bn/x86_64-mont5.s", - "${openssl_selected_platform_full_path}/crypto/camellia/cmll-x86_64.s", - "${openssl_selected_platform_full_path}/crypto/chacha/chacha-x86_64.s", - "${openssl_selected_platform_full_path}/crypto/ec/ecp_nistz256-x86_64.s", - "${openssl_selected_platform_full_path}/crypto/ec/x25519-x86_64.s", - "${openssl_selected_platform_full_path}/crypto/md5/md5-x86_64.s", - "${openssl_selected_platform_full_path}/crypto/modes/aesni-gcm-x86_64.s", - "${openssl_selected_platform_full_path}/crypto/modes/ghash-x86_64.s", - "${openssl_selected_platform_full_path}/crypto/poly1305/poly1305-x86_64.s", - "${openssl_selected_platform_full_path}/crypto/rc4/rc4-md5-x86_64.s", - "${openssl_selected_platform_full_path}/crypto/rc4/rc4-x86_64.s", - "${openssl_selected_platform_full_path}/crypto/sha/keccak1600-x86_64.s", - "${openssl_selected_platform_full_path}/crypto/sha/sha1-mb-x86_64.s", - "${openssl_selected_platform_full_path}/crypto/sha/sha1-x86_64.s", - "${openssl_selected_platform_full_path}/crypto/sha/sha256-mb-x86_64.s", - "${openssl_selected_platform_full_path}/crypto/sha/sha256-x86_64.s", - "${openssl_selected_platform_full_path}/crypto/sha/sha512-x86_64.s", - "${openssl_selected_platform_full_path}/crypto/whrlpool/wp-x86_64.s", - "${openssl_selected_platform_full_path}/crypto/x86_64cpuid.s", - "${openssl_selected_platform_full_path}/engines/e_padlock-x86_64.s", -] - -# 升级修改适配检查点6 libcrypto 不同平台汇编代码 -libcrypto_build_all_generated_mingw64_sources = [ - "${openssl_selected_platform_full_path}/crypto/aes/aes-x86_64.s", - "${openssl_selected_platform_full_path}/crypto/aes/aesni-mb-x86_64.s", - "${openssl_selected_platform_full_path}/crypto/aes/aesni-sha1-x86_64.s", - "${openssl_selected_platform_full_path}/crypto/aes/aesni-sha256-x86_64.s", - "${openssl_selected_platform_full_path}/crypto/aes/aesni-x86_64.s", - "${openssl_selected_platform_full_path}/crypto/aes/bsaes-x86_64.s", - "${openssl_selected_platform_full_path}/crypto/aes/vpaes-x86_64.s", - "${openssl_selected_platform_full_path}/crypto/bn/rsaz-avx2.s", - "${openssl_selected_platform_full_path}/crypto/bn/rsaz-avx512.s", - "${openssl_selected_platform_full_path}/crypto/bn/rsaz-x86_64.s", - "${openssl_selected_platform_full_path}/crypto/bn/x86_64-gf2m.s", - "${openssl_selected_platform_full_path}/crypto/bn/x86_64-mont.s", - "${openssl_selected_platform_full_path}/crypto/bn/x86_64-mont5.s", - "${openssl_selected_platform_full_path}/crypto/camellia/cmll-x86_64.s", - "${openssl_selected_platform_full_path}/crypto/chacha/chacha-x86_64.s", - "${openssl_selected_platform_full_path}/crypto/ec/ecp_nistz256-x86_64.s", - "${openssl_selected_platform_full_path}/crypto/ec/x25519-x86_64.s", - "${openssl_selected_platform_full_path}/crypto/md5/md5-x86_64.s", - "${openssl_selected_platform_full_path}/crypto/modes/aesni-gcm-x86_64.s", - "${openssl_selected_platform_full_path}/crypto/modes/ghash-x86_64.s", - "${openssl_selected_platform_full_path}/crypto/poly1305/poly1305-x86_64.s", - "${openssl_selected_platform_full_path}/crypto/rc4/rc4-md5-x86_64.s", - "${openssl_selected_platform_full_path}/crypto/rc4/rc4-x86_64.s", - "${openssl_selected_platform_full_path}/crypto/sha/keccak1600-x86_64.s", - "${openssl_selected_platform_full_path}/crypto/sha/sha1-mb-x86_64.s", - "${openssl_selected_platform_full_path}/crypto/sha/sha1-x86_64.s", - "${openssl_selected_platform_full_path}/crypto/sha/sha256-mb-x86_64.s", - "${openssl_selected_platform_full_path}/crypto/sha/sha256-x86_64.s", - "${openssl_selected_platform_full_path}/crypto/sha/sha512-x86_64.s", - "${openssl_selected_platform_full_path}/crypto/whrlpool/wp-x86_64.s", - "${openssl_selected_platform_full_path}/crypto/x86_64cpuid.s", - "${openssl_selected_platform_full_path}/engines/e_padlock-x86_64.s", -] - -libcrypto_build_all_generated_selected_platform_sources = [] -if (openssl_selected_platform == "linux-armv4") { - libcrypto_build_all_generated_selected_platform_sources += - libcrypto_build_all_generated_linux_armv4_sources -} else if (openssl_selected_platform == "linux-aarch64") { - libcrypto_build_all_generated_selected_platform_sources += - libcrypto_build_all_generated_linux_aarch64_sources -} else if (openssl_selected_platform == "darwin64-x86_64-cc") { - libcrypto_build_all_generated_selected_platform_sources += - libcrypto_build_all_generated_darwin64_x86_64_cc_sources -} else if (openssl_selected_platform == "darwin64-arm64-cc") { - libcrypto_build_all_generated_selected_platform_sources += - libcrypto_build_all_generated_darwin64_arm64_cc_sources -} else if (openssl_selected_platform == "linux-x86_64") { - libcrypto_build_all_generated_selected_platform_sources += - libcrypto_build_all_generated_linux_x86_64_sources -} else if (openssl_selected_platform == "mingw64") { - libcrypto_build_all_generated_selected_platform_sources += - libcrypto_build_all_generated_mingw64_sources +if (!defined(ark_standalone_build)) { + ark_standalone_build = false } -# 升级修改适配检查点7 libcommon 生成的源码列表 -libcommon_build_all_generated_selected_platform_sources = [ - "${openssl_selected_platform_full_path}/providers/common/der/der_digests_gen.c", - "${openssl_selected_platform_full_path}/providers/common/der/der_dsa_gen.c", - "${openssl_selected_platform_full_path}/providers/common/der/der_ec_gen.c", - "${openssl_selected_platform_full_path}/providers/common/der/der_ecx_gen.c", - "${openssl_selected_platform_full_path}/providers/common/der/der_rsa_gen.c", - "${openssl_selected_platform_full_path}/providers/common/der/der_wrap_gen.c", -] - -# 升级修改适配检查点8 libdefault 生成的源码列表 -libdefault_build_all_generated_selected_platform_sources = [ - "${openssl_selected_platform_full_path}/providers/common/der/der_sm2_gen.c", -] - -# We make use of both exec_script and action to build openssl build_all_generated items. -# -# Some modules use openssl in an incorrect way, leading to the confusing building sequences, -# so the user modules building fail because openssl headers have not been generated at the building time. -# The exec_script in the global area will be executed before ninja command, -# and it ensures that the headers is generated properly before the building of any modules. -# -# Openssl generate some assembly codes before it is building. -# The sources list in BUILD.gn include the assembly codes. -# The gn build system requires that all items in sources list should be the output of another build item. -# So we use an empty action to generate the assembly codes. -# Actually we generate the assembly codes in exec_script, not in action. -# -# The gn build system requires the script in exec_script and action should be python script, -# so we invoke the shell script in python script -print(exec_script( - rebase_path("//third_party/openssl/run_command.py"), - [ - rebase_path( - "//third_party/openssl/make_openssl_build_all_generated.sh"), - rebase_path("//third_party/openssl"), - rebase_path("${target_out_dir}/build_all_generated"), - openssl_selected_platform, - ], - "string", - [])) -action("openssl_build_all_generated") { - script = rebase_path("//third_party/openssl/empty.py") - outputs = [] - outputs += libcommon_build_all_generated_selected_platform_sources - outputs += libdefault_build_all_generated_selected_platform_sources - outputs += libcrypto_build_all_generated_selected_platform_sources - outputs += [ "${openssl_selected_platform_full_path}/apps/progs.c" ] - if (openssl_selected_platform == "mingw64") { - outputs += [ "${openssl_selected_platform_full_path}/apps/openssl.rc" ] +if (ark_standalone_build) { + import("$build_root/ark.gni") + + print("openssl detecting os now...") + print("current_cpu = ${current_cpu}") + print("current_os = ${current_os}") + print("host_os = ${host_os}") + openssl_selected_platform = "" + print("is_mingw = ${is_mingw}") + if (current_cpu == "arm" && !(current_os == "linux" || host_os == "mac")) { + print("openssl selected linux-armv4") + openssl_selected_platform = "linux-armv4" + } else if (current_cpu == "arm64" && + (!(current_os == "linux" || host_os == "mac") || + current_os == "ohos")) { + print("openssl selected linux-aarch64") + openssl_selected_platform = "linux-aarch64" + } else if ((current_cpu == "x64" || current_cpu == "x86_64") && + (current_os == "mac" || current_os == "ios")) { + # compilation for ios depends the platform + print("openssl selected darwin64-x86_64-cc") + openssl_selected_platform = "darwin64-x86_64-cc" + } else if (current_cpu == "arm64" && + (current_os == "mac" || current_os == "ios")) { + # ios and macos both use the platform + print("openssl selected darwin64-arm64-cc") + openssl_selected_platform = "darwin64-arm64-cc" + } else if ((current_cpu == "x64" || current_cpu == "x86_64") && + current_os != "mingw") { + print("openssl selected linux-x86_64") + openssl_selected_platform = "linux-x86_64" + } else if (is_mingw) { + print("openssl selected mingw64") + openssl_selected_platform = "mingw64" + } else if (current_cpu == "arm" && current_os == "android") { + print("openssl selected linux-armv4") + openssl_selected_platform = "linux-armv4" + } else if (current_cpu == "arm64" && current_os == "android") { + print("openssl selected linux-aarch64") + openssl_selected_platform = "linux-aarch64" } -} + print( + "openssl detecting os done. openssl_selected_platform = ${openssl_selected_platform}") + + openssl_selected_platform_full_path = + "${target_out_dir}/build_all_generated/${openssl_selected_platform}" + + # 升级修改适配检查点1 libcrypto 不同平台汇编代码 + libcrypto_build_all_generated_linux_armv4_sources = [ + "${openssl_selected_platform_full_path}/crypto/aes/aes-armv4.S", + "${openssl_selected_platform_full_path}/crypto/aes/aesv8-armx.S", + "${openssl_selected_platform_full_path}/crypto/aes/bsaes-armv7.S", + "${openssl_selected_platform_full_path}/crypto/armv4cpuid.S", + "${openssl_selected_platform_full_path}/crypto/bn/armv4-gf2m.S", + "${openssl_selected_platform_full_path}/crypto/bn/armv4-mont.S", + "${openssl_selected_platform_full_path}/crypto/chacha/chacha-armv4.S", + "${openssl_selected_platform_full_path}/crypto/ec/ecp_nistz256-armv4.S", + "${openssl_selected_platform_full_path}/crypto/modes/ghash-armv4.S", + "${openssl_selected_platform_full_path}/crypto/modes/ghashv8-armx.S", + "${openssl_selected_platform_full_path}/crypto/poly1305/poly1305-armv4.S", + "${openssl_selected_platform_full_path}/crypto/sha/keccak1600-armv4.S", + "${openssl_selected_platform_full_path}/crypto/sha/sha1-armv4-large.S", + "${openssl_selected_platform_full_path}/crypto/sha/sha256-armv4.S", + "${openssl_selected_platform_full_path}/crypto/sha/sha512-armv4.S", + ] -openssl_internal_cflags = [ - "-Wall", - - # ../../third_party/openssl/crypto/o_str.c:309:9: error: incompatible integer to pointer conversion assigning to 'char *' from 'int' [-Werror,-Wint-conversion] - # err = strerror_r(errnum, buf, buflen); - # ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - "-Wno-error=int-conversion", - - # ../../third_party/openssl/crypto/bn/bn_conv.c:92:34: error: implicit conversion from 'unsigned long long' to 'unsigned long' changes value from 10000000000000000000 to 2313682944 [-Werror,-Wconstant-conversion] - # *lp = BN_div_word(t, BN_DEC_CONV); - # ~~~~~~~~~~~ ^~~~~~~~~~~ - "-Wno-error=constant-conversion", - - # ../../third_party/openssl/crypto/bn/bn_exp.c:382:38: error: shift count >= width of type [-Werror,-Wshift-count-overflow] - # if (m->d[j - 1] & (((BN_ULONG)1) << (BN_BITS2 - 1))) { - # ^ ~~~~~~~~~~~~~~ - "-Wno-error=shift-count-overflow", - - # ../../third_party/openssl/crypto/conf/conf_def.c:31:11: error: 'stat' macro redefined [-Werror,-Wmacro-redefined] - # # define stat _stat - # ^ - # ../../prebuilts/mingw-w64/ohos/linux-x86_64/clang-mingw/x86_64-w64-mingw32/include/sys/stat.h:279:9: note: previous definition is here - # #define stat _stat64 - # ^ - # 1 error generated. - "-Wno-error=macro-redefined", - - "-Wno-error=implicit-fallthrough", - "-Wno-error=sign-compare", - - # Fix llvm-15 build error - "-Wno-unused-but-set-variable", -] - -# 升级修改适配检查点9 内部公共头文件目录列表 -crypto_config_common_private_include_dirs = [ - "//third_party/openssl/", - "//third_party/openssl/apps/include", - "//third_party/openssl/crypto", - "//third_party/openssl/crypto/bn", - "//third_party/openssl/crypto/ec", - "//third_party/openssl/crypto/ec/curve448", - "//third_party/openssl/crypto/modes", - "//third_party/openssl/crypto/rsa", - "//third_party/openssl/include", - "//third_party/openssl/providers/common/include", - "//third_party/openssl/providers/common/include/prov", - "//third_party/openssl/providers/implementations/include", - "${openssl_selected_platform_full_path}/apps", - "${openssl_selected_platform_full_path}/crypto", - "${openssl_selected_platform_full_path}/include", - "${openssl_selected_platform_full_path}/include/crypto", - "${openssl_selected_platform_full_path}/include/openssl", - "${openssl_selected_platform_full_path}/providers/common/include", - "${openssl_selected_platform_full_path}/providers/common/include/prov", -] -crypto_config_common_public_include_dirs = [ - "//third_party/openssl/include", - "${openssl_selected_platform_full_path}/include", -] - -# located at /system/etc/ -ohos_prebuilt_etc("openssl.cnf") { - source = "//third_party/openssl/open_harmony_openssl_config/openssl.cnf" - subsystem_name = "thirdparty" - part_name = "openssl" -} + # 升级修改适配检查点2 libcrypto 不同平台汇编代码 + libcrypto_build_all_generated_linux_aarch64_sources = [ + "${openssl_selected_platform_full_path}/crypto/aes/aesv8-armx.S", + "${openssl_selected_platform_full_path}/crypto/aes/vpaes-armv8.S", + "${openssl_selected_platform_full_path}/crypto/arm64cpuid.S", + "${openssl_selected_platform_full_path}/crypto/bn/armv8-mont.S", + "${openssl_selected_platform_full_path}/crypto/chacha/chacha-armv8.S", + "${openssl_selected_platform_full_path}/crypto/ec/ecp_nistz256-armv8.S", + "${openssl_selected_platform_full_path}/crypto/modes/aes-gcm-armv8_64.S", + "${openssl_selected_platform_full_path}/crypto/modes/ghashv8-armx.S", + "${openssl_selected_platform_full_path}/crypto/poly1305/poly1305-armv8.S", + "${openssl_selected_platform_full_path}/crypto/sha/keccak1600-armv8.S", + "${openssl_selected_platform_full_path}/crypto/sha/sha1-armv8.S", + "${openssl_selected_platform_full_path}/crypto/sha/sha256-armv8.S", + "${openssl_selected_platform_full_path}/crypto/sha/sha512-armv8.S", + ] -# 升级修改适配检查点10 内部公共编译选项宏列表 -crypto_config_common_cflags = [ - "-Wa,--noexecstack", - "-DNDEBUG", - "-DOPENSSL_BUILDING_OPENSSL", - "-DOPENSSL_CPUID_OBJ", - "-DOPENSSL_PIC", - - # use `openssl version -a` cmd to see runtime OPENSSLDIR, ENGINESDIR, MODULESDIR value - - # the origin value generated by Configure - # linux-armv4, linux-aarch64, darwin64-x86_64-cc, darwin64-arm64-cc - # /usr/local/lib/engines-3 - # linux-x86_64, mingw64 - # /usr/local/lib64/engines-3 - "-DENGINESDIR=\"\"", - - # the origin value generated by Configure - # linux-armv4, linux-aarch64, darwin64-x86_64-cc, darwin64-arm64-cc - # /usr/local/lib/ossl-modules - # linux-x86_64, mingw64 - # /usr/local/lib64/ossl-modules - "-DMODULESDIR=\"\"", - - # the origin value generated by Configure - # /usr/local/ssl - # we set the variable as the following to locate openssl.cnf - "-DOPENSSLDIR=\"/system/etc\"", - - "-DSTATIC_LEGACY", -] - -# 升级修改适配检查点11 内部不同平台编译选项列表 -crypto_config_linux_armv4_cflags = [ - "-DOPENSSL_USE_NODELETE", - "-fPIC", - "-pthread", - - "-DAES_ASM", - "-DBSAES_ASM", - "-DECP_NISTZ256_ASM", - "-DGHASH_ASM", - "-DKECCAK1600_ASM", - "-DOPENSSL_BN_ASM_GF2m", - "-DOPENSSL_BN_ASM_MONT", - "-DPOLY1305_ASM", - "-DSHA1_ASM", - "-DSHA256_ASM", - "-DSHA512_ASM", -] - -# 升级修改适配检查点12 内部不同平台编译选项列表 -crypto_config_linux_aarch64_cflags = [ - "-DOPENSSL_USE_NODELETE", - "-fPIC", - "-pthread", - - "-DECP_NISTZ256_ASM", - "-DKECCAK1600_ASM", - "-DOPENSSL_BN_ASM_MONT", - "-DPOLY1305_ASM", - "-DSHA1_ASM", - "-DSHA256_ASM", - "-DSHA512_ASM", - "-DVPAES_ASM", -] - -# 升级修改适配检查点13 内部不同平台编译选项列表 -crypto_config_darwin64_x86_64_cc_cflags = [ - "-fPIC", - "-DL_ENDIAN", - "-D_REENTRANT", - "-DOPENSSL_IA32_SSE2", - - "-DAES_ASM", - "-DBSAES_ASM", - "-DCMLL_ASM", - "-DECP_NISTZ256_ASM", - "-DGHASH_ASM", - "-DKECCAK1600_ASM", - "-DMD5_ASM", - "-DOPENSSL_BN_ASM_GF2m", - "-DOPENSSL_BN_ASM_MONT", - "-DOPENSSL_BN_ASM_MONT5", - "-DPADLOCK_ASM", - "-DPOLY1305_ASM", - "-DSHA1_ASM", - "-DSHA256_ASM", - "-DSHA512_ASM", - "-DVPAES_ASM", - "-DWHIRLPOOL_ASM", - "-DX25519_ASM", -] - -# 升级修改适配检查点14 内部不同平台编译选项列表 -crypto_config_darwin64_arm64_cc_cflags = [ - "-DL_ENDIAN", - "-D_REENTRANT", - "-fPIC", - - "-DECP_NISTZ256_ASM", - "-DKECCAK1600_ASM", - "-DOPENSSL_BN_ASM_MONT", - "-DPOLY1305_ASM", - "-DSHA1_ASM", - "-DSHA256_ASM", - "-DSHA512_ASM", - "-DVPAES_ASM", -] - -# 升级修改适配检查点15 内部不同平台编译选项列表 -crypto_config_linux_x86_64_cflags = [ - "-DL_ENDIAN", - "-DOPENSSL_IA32_SSE2", - "-DOPENSSL_USE_NODELETE", - "-fPIC", - "-m64", - "-pthread", - - "-DAES_ASM", - "-DBSAES_ASM", - "-DCMLL_ASM", - "-DECP_NISTZ256_ASM", - "-DGHASH_ASM", - "-DKECCAK1600_ASM", - "-DMD5_ASM", - "-DOPENSSL_BN_ASM_GF2m", - "-DOPENSSL_BN_ASM_MONT", - "-DOPENSSL_BN_ASM_MONT5", - "-DPADLOCK_ASM", - "-DPOLY1305_ASM", - "-DSHA1_ASM", - "-DSHA256_ASM", - "-DSHA512_ASM", - "-DVPAES_ASM", - "-DWHIRLPOOL_ASM", - "-DX25519_ASM", -] - -# 升级修改适配检查点16 内部不同平台编译选项列表 -crypto_config_mingw64_cflags = [ - "-D_MT", - "-D_UNICODE", - "-DL_ENDIAN", - "-DOPENSSL_IA32_SSE2", - "-DUNICODE", - "-DWIN32_LEAN_AND_MEAN", - "-m64", - - "-DAES_ASM", - "-DBSAES_ASM", - "-DCMLL_ASM", - "-DECP_NISTZ256_ASM", - "-DGHASH_ASM", - "-DKECCAK1600_ASM", - "-DMD5_ASM", - "-DOPENSSL_BN_ASM_GF2m", - "-DOPENSSL_BN_ASM_MONT", - "-DOPENSSL_BN_ASM_MONT5", - "-DPADLOCK_ASM", - "-DPOLY1305_ASM", - "-DSHA1_ASM", - "-DSHA256_ASM", - "-DSHA512_ASM", - "-DVPAES_ASM", - "-DWHIRLPOOL_ASM", - "-DX25519_ASM", -] - -crypto_config_current_platform_cflags = [] -if (openssl_selected_platform == "linux-armv4") { - crypto_config_current_platform_cflags += crypto_config_linux_armv4_cflags -} else if (openssl_selected_platform == "linux-aarch64") { - crypto_config_current_platform_cflags += crypto_config_linux_aarch64_cflags -} else if (openssl_selected_platform == "darwin64-x86_64-cc") { - crypto_config_current_platform_cflags += - crypto_config_darwin64_x86_64_cc_cflags -} else if (openssl_selected_platform == "darwin64-arm64-cc") { - crypto_config_current_platform_cflags += - crypto_config_darwin64_arm64_cc_cflags -} else if (openssl_selected_platform == "linux-x86_64") { - crypto_config_current_platform_cflags += crypto_config_linux_x86_64_cflags -} else if (openssl_selected_platform == "mingw64") { - crypto_config_current_platform_cflags += crypto_config_mingw64_cflags -} + # 升级修改适配检查点3 libcrypto 不同平台汇编代码 + libcrypto_build_all_generated_darwin64_x86_64_cc_sources = [ + "${openssl_selected_platform_full_path}/crypto/aes/aes-x86_64.s", + "${openssl_selected_platform_full_path}/crypto/aes/aesni-mb-x86_64.s", + "${openssl_selected_platform_full_path}/crypto/aes/aesni-sha1-x86_64.s", + "${openssl_selected_platform_full_path}/crypto/aes/aesni-sha256-x86_64.s", + "${openssl_selected_platform_full_path}/crypto/aes/aesni-x86_64.s", + "${openssl_selected_platform_full_path}/crypto/aes/bsaes-x86_64.s", + "${openssl_selected_platform_full_path}/crypto/aes/vpaes-x86_64.s", + "${openssl_selected_platform_full_path}/crypto/bn/rsaz-avx2.s", + "${openssl_selected_platform_full_path}/crypto/bn/rsaz-avx512.s", + "${openssl_selected_platform_full_path}/crypto/bn/rsaz-x86_64.s", + "${openssl_selected_platform_full_path}/crypto/bn/x86_64-gf2m.s", + "${openssl_selected_platform_full_path}/crypto/bn/x86_64-mont.s", + "${openssl_selected_platform_full_path}/crypto/bn/x86_64-mont5.s", + "${openssl_selected_platform_full_path}/crypto/camellia/cmll-x86_64.s", + "${openssl_selected_platform_full_path}/crypto/chacha/chacha-x86_64.s", + "${openssl_selected_platform_full_path}/crypto/ec/ecp_nistz256-x86_64.s", + "${openssl_selected_platform_full_path}/crypto/ec/x25519-x86_64.s", + "${openssl_selected_platform_full_path}/crypto/md5/md5-x86_64.s", + "${openssl_selected_platform_full_path}/crypto/modes/aesni-gcm-x86_64.s", + "${openssl_selected_platform_full_path}/crypto/modes/ghash-x86_64.s", + "${openssl_selected_platform_full_path}/crypto/poly1305/poly1305-x86_64.s", + "${openssl_selected_platform_full_path}/crypto/rc4/rc4-md5-x86_64.s", + "${openssl_selected_platform_full_path}/crypto/rc4/rc4-x86_64.s", + "${openssl_selected_platform_full_path}/crypto/sha/keccak1600-x86_64.s", + "${openssl_selected_platform_full_path}/crypto/sha/sha1-mb-x86_64.s", + "${openssl_selected_platform_full_path}/crypto/sha/sha1-x86_64.s", + "${openssl_selected_platform_full_path}/crypto/sha/sha256-mb-x86_64.s", + "${openssl_selected_platform_full_path}/crypto/sha/sha256-x86_64.s", + "${openssl_selected_platform_full_path}/crypto/sha/sha512-x86_64.s", + "${openssl_selected_platform_full_path}/crypto/whrlpool/wp-x86_64.s", + "${openssl_selected_platform_full_path}/crypto/x86_64cpuid.s", + "${openssl_selected_platform_full_path}/engines/e_padlock-x86_64.s", + ] -mingw32_libs_path = [] -mingw32_libs = [] -if (is_mingw || is_win) { - mingw32_libs_path += [ "//prebuilts/mingw-w64/ohos/linux-x86_64/clang-mingw/x86_64-w64-mingw32/lib" ] - mingw32_libs += [ - "ws2_32", - "crypt32", + # 升级修改适配检查点4 libcrypto 不同平台汇编代码 + libcrypto_build_all_generated_darwin64_arm64_cc_sources = [ + "${openssl_selected_platform_full_path}/crypto/aes/aesv8-armx.S", + "${openssl_selected_platform_full_path}/crypto/aes/vpaes-armv8.S", + "${openssl_selected_platform_full_path}/crypto/arm64cpuid.S", + "${openssl_selected_platform_full_path}/crypto/bn/armv8-mont.S", + "${openssl_selected_platform_full_path}/crypto/chacha/chacha-armv8.S", + "${openssl_selected_platform_full_path}/crypto/ec/ecp_nistz256-armv8.S", + "${openssl_selected_platform_full_path}/crypto/modes/aes-gcm-armv8_64.S", + "${openssl_selected_platform_full_path}/crypto/modes/ghashv8-armx.S", + "${openssl_selected_platform_full_path}/crypto/poly1305/poly1305-armv8.S", + "${openssl_selected_platform_full_path}/crypto/sha/keccak1600-armv8.S", + "${openssl_selected_platform_full_path}/crypto/sha/sha1-armv8.S", + "${openssl_selected_platform_full_path}/crypto/sha/sha256-armv8.S", + "${openssl_selected_platform_full_path}/crypto/sha/sha512-armv8.S", ] -} -config("crypto_config_private") { - include_dirs = crypto_config_common_private_include_dirs - cflags = crypto_config_common_cflags + crypto_config_current_platform_cflags + - openssl_internal_cflags - lib_dirs = mingw32_libs_path - libs = mingw32_libs -} + # 升级修改适配检查点5 libcrypto 不同平台汇编代码 + libcrypto_build_all_generated_linux_x86_64_sources = [ + "${openssl_selected_platform_full_path}/crypto/aes/aes-x86_64.s", + "${openssl_selected_platform_full_path}/crypto/aes/aesni-mb-x86_64.s", + "${openssl_selected_platform_full_path}/crypto/aes/aesni-sha1-x86_64.s", + "${openssl_selected_platform_full_path}/crypto/aes/aesni-sha256-x86_64.s", + "${openssl_selected_platform_full_path}/crypto/aes/aesni-x86_64.s", + "${openssl_selected_platform_full_path}/crypto/aes/bsaes-x86_64.s", + "${openssl_selected_platform_full_path}/crypto/aes/vpaes-x86_64.s", + "${openssl_selected_platform_full_path}/crypto/bn/rsaz-avx2.s", + "${openssl_selected_platform_full_path}/crypto/bn/rsaz-avx512.s", + "${openssl_selected_platform_full_path}/crypto/bn/rsaz-x86_64.s", + "${openssl_selected_platform_full_path}/crypto/bn/x86_64-gf2m.s", + "${openssl_selected_platform_full_path}/crypto/bn/x86_64-mont.s", + "${openssl_selected_platform_full_path}/crypto/bn/x86_64-mont5.s", + "${openssl_selected_platform_full_path}/crypto/camellia/cmll-x86_64.s", + "${openssl_selected_platform_full_path}/crypto/chacha/chacha-x86_64.s", + "${openssl_selected_platform_full_path}/crypto/ec/ecp_nistz256-x86_64.s", + "${openssl_selected_platform_full_path}/crypto/ec/x25519-x86_64.s", + "${openssl_selected_platform_full_path}/crypto/md5/md5-x86_64.s", + "${openssl_selected_platform_full_path}/crypto/modes/aesni-gcm-x86_64.s", + "${openssl_selected_platform_full_path}/crypto/modes/ghash-x86_64.s", + "${openssl_selected_platform_full_path}/crypto/poly1305/poly1305-x86_64.s", + "${openssl_selected_platform_full_path}/crypto/rc4/rc4-md5-x86_64.s", + "${openssl_selected_platform_full_path}/crypto/rc4/rc4-x86_64.s", + "${openssl_selected_platform_full_path}/crypto/sha/keccak1600-x86_64.s", + "${openssl_selected_platform_full_path}/crypto/sha/sha1-mb-x86_64.s", + "${openssl_selected_platform_full_path}/crypto/sha/sha1-x86_64.s", + "${openssl_selected_platform_full_path}/crypto/sha/sha256-mb-x86_64.s", + "${openssl_selected_platform_full_path}/crypto/sha/sha256-x86_64.s", + "${openssl_selected_platform_full_path}/crypto/sha/sha512-x86_64.s", + "${openssl_selected_platform_full_path}/crypto/whrlpool/wp-x86_64.s", + "${openssl_selected_platform_full_path}/crypto/x86_64cpuid.s", + "${openssl_selected_platform_full_path}/engines/e_padlock-x86_64.s", + ] -config("crypto_config_public") { - include_dirs = crypto_config_common_public_include_dirs - libs = mingw32_libs -} + # 升级修改适配检查点6 libcrypto 不同平台汇编代码 + libcrypto_build_all_generated_mingw64_sources = [ + "${openssl_selected_platform_full_path}/crypto/aes/aes-x86_64.s", + "${openssl_selected_platform_full_path}/crypto/aes/aesni-mb-x86_64.s", + "${openssl_selected_platform_full_path}/crypto/aes/aesni-sha1-x86_64.s", + "${openssl_selected_platform_full_path}/crypto/aes/aesni-sha256-x86_64.s", + "${openssl_selected_platform_full_path}/crypto/aes/aesni-x86_64.s", + "${openssl_selected_platform_full_path}/crypto/aes/bsaes-x86_64.s", + "${openssl_selected_platform_full_path}/crypto/aes/vpaes-x86_64.s", + "${openssl_selected_platform_full_path}/crypto/bn/rsaz-avx2.s", + "${openssl_selected_platform_full_path}/crypto/bn/rsaz-avx512.s", + "${openssl_selected_platform_full_path}/crypto/bn/rsaz-x86_64.s", + "${openssl_selected_platform_full_path}/crypto/bn/x86_64-gf2m.s", + "${openssl_selected_platform_full_path}/crypto/bn/x86_64-mont.s", + "${openssl_selected_platform_full_path}/crypto/bn/x86_64-mont5.s", + "${openssl_selected_platform_full_path}/crypto/camellia/cmll-x86_64.s", + "${openssl_selected_platform_full_path}/crypto/chacha/chacha-x86_64.s", + "${openssl_selected_platform_full_path}/crypto/ec/ecp_nistz256-x86_64.s", + "${openssl_selected_platform_full_path}/crypto/ec/x25519-x86_64.s", + "${openssl_selected_platform_full_path}/crypto/md5/md5-x86_64.s", + "${openssl_selected_platform_full_path}/crypto/modes/aesni-gcm-x86_64.s", + "${openssl_selected_platform_full_path}/crypto/modes/ghash-x86_64.s", + "${openssl_selected_platform_full_path}/crypto/poly1305/poly1305-x86_64.s", + "${openssl_selected_platform_full_path}/crypto/rc4/rc4-md5-x86_64.s", + "${openssl_selected_platform_full_path}/crypto/rc4/rc4-x86_64.s", + "${openssl_selected_platform_full_path}/crypto/sha/keccak1600-x86_64.s", + "${openssl_selected_platform_full_path}/crypto/sha/sha1-mb-x86_64.s", + "${openssl_selected_platform_full_path}/crypto/sha/sha1-x86_64.s", + "${openssl_selected_platform_full_path}/crypto/sha/sha256-mb-x86_64.s", + "${openssl_selected_platform_full_path}/crypto/sha/sha256-x86_64.s", + "${openssl_selected_platform_full_path}/crypto/sha/sha512-x86_64.s", + "${openssl_selected_platform_full_path}/crypto/whrlpool/wp-x86_64.s", + "${openssl_selected_platform_full_path}/crypto/x86_64cpuid.s", + "${openssl_selected_platform_full_path}/engines/e_padlock-x86_64.s", + ] + + libcrypto_build_all_generated_selected_platform_sources = [] + if (openssl_selected_platform == "linux-armv4") { + libcrypto_build_all_generated_selected_platform_sources += + libcrypto_build_all_generated_linux_armv4_sources + } else if (openssl_selected_platform == "linux-aarch64") { + libcrypto_build_all_generated_selected_platform_sources += + libcrypto_build_all_generated_linux_aarch64_sources + } else if (openssl_selected_platform == "darwin64-x86_64-cc") { + libcrypto_build_all_generated_selected_platform_sources += + libcrypto_build_all_generated_darwin64_x86_64_cc_sources + } else if (openssl_selected_platform == "darwin64-arm64-cc") { + libcrypto_build_all_generated_selected_platform_sources += + libcrypto_build_all_generated_darwin64_arm64_cc_sources + } else if (openssl_selected_platform == "linux-x86_64") { + libcrypto_build_all_generated_selected_platform_sources += + libcrypto_build_all_generated_linux_x86_64_sources + } else if (openssl_selected_platform == "mingw64") { + libcrypto_build_all_generated_selected_platform_sources += + libcrypto_build_all_generated_mingw64_sources + } + + # 升级修改适配检查点7 libcommon 生成的源码列表 + libcommon_build_all_generated_selected_platform_sources = [ + "${openssl_selected_platform_full_path}/providers/common/der/der_digests_gen.c", + "${openssl_selected_platform_full_path}/providers/common/der/der_dsa_gen.c", + "${openssl_selected_platform_full_path}/providers/common/der/der_ec_gen.c", + "${openssl_selected_platform_full_path}/providers/common/der/der_ecx_gen.c", + "${openssl_selected_platform_full_path}/providers/common/der/der_rsa_gen.c", + "${openssl_selected_platform_full_path}/providers/common/der/der_wrap_gen.c", + ] + + # 升级修改适配检查点8 libdefault 生成的源码列表 + libdefault_build_all_generated_selected_platform_sources = [ + "${openssl_selected_platform_full_path}/providers/common/der/der_sm2_gen.c", + ] + + # We make use of both exec_script and action to build openssl build_all_generated items. + # + # Some modules use openssl in an incorrect way, leading to the confusing building sequences, + # so the user modules building fail because openssl headers have not been generated at the building time. + # The exec_script in the global area will be executed before ninja command, + # and it ensures that the headers is generated properly before the building of any modules. + # + # Openssl generate some assembly codes before it is building. + # The sources list in BUILD.gn include the assembly codes. + # The gn build system requires that all items in sources list should be the output of another build item. + # So we use an empty action to generate the assembly codes. + # Actually we generate the assembly codes in exec_script, not in action. + # + # The gn build system requires the script in exec_script and action should be python script, + # so we invoke the shell script in python script + print(exec_script( + rebase_path("//third_party/openssl/run_command.py"), + [ + rebase_path( + "//third_party/openssl/make_openssl_build_all_generated.sh"), + rebase_path("//third_party/openssl"), + rebase_path("${target_out_dir}/build_all_generated"), + openssl_selected_platform, + ], + "string", + [])) + action("openssl_build_all_generated") { + script = rebase_path("//third_party/openssl/empty.py") + outputs = [] + outputs += libcommon_build_all_generated_selected_platform_sources + outputs += libdefault_build_all_generated_selected_platform_sources + outputs += libcrypto_build_all_generated_selected_platform_sources + outputs += [ "${openssl_selected_platform_full_path}/apps/progs.c" ] + if (openssl_selected_platform == "mingw64") { + outputs += [ "${openssl_selected_platform_full_path}/apps/openssl.rc" ] + } + } + + openssl_internal_cflags = [ + "-Wall", + + # ../../third_party/openssl/crypto/o_str.c:309:9: error: incompatible integer to pointer conversion assigning to 'char *' from 'int' [-Werror,-Wint-conversion] + # err = strerror_r(errnum, buf, buflen); + # ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + "-Wno-error=int-conversion", + + # ../../third_party/openssl/crypto/bn/bn_conv.c:92:34: error: implicit conversion from 'unsigned long long' to 'unsigned long' changes value from 10000000000000000000 to 2313682944 [-Werror,-Wconstant-conversion] + # *lp = BN_div_word(t, BN_DEC_CONV); + # ~~~~~~~~~~~ ^~~~~~~~~~~ + "-Wno-error=constant-conversion", + + # ../../third_party/openssl/crypto/bn/bn_exp.c:382:38: error: shift count >= width of type [-Werror,-Wshift-count-overflow] + # if (m->d[j - 1] & (((BN_ULONG)1) << (BN_BITS2 - 1))) { + # ^ ~~~~~~~~~~~~~~ + "-Wno-error=shift-count-overflow", + + # ../../third_party/openssl/crypto/conf/conf_def.c:31:11: error: 'stat' macro redefined [-Werror,-Wmacro-redefined] + # # define stat _stat + # ^ + # ../../prebuilts/mingw-w64/ohos/linux-x86_64/clang-mingw/x86_64-w64-mingw32/include/sys/stat.h:279:9: note: previous definition is here + # #define stat _stat64 + # ^ + # 1 error generated. + "-Wno-error=macro-redefined", + + "-Wno-error=implicit-fallthrough", + "-Wno-error=sign-compare", + + # Fix llvm-15 build error + "-Wno-unused-but-set-variable", + ] + + # 升级修改适配检查点9 内部公共头文件目录列表 + crypto_config_common_private_include_dirs = [ + "//third_party/openssl/", + "//third_party/openssl/apps/include", + "//third_party/openssl/crypto", + "//third_party/openssl/crypto/bn", + "//third_party/openssl/crypto/ec", + "//third_party/openssl/crypto/ec/curve448", + "//third_party/openssl/crypto/modes", + "//third_party/openssl/crypto/rsa", + "//third_party/openssl/include", + "//third_party/openssl/providers/common/include", + "//third_party/openssl/providers/common/include/prov", + "//third_party/openssl/providers/implementations/include", + "${openssl_selected_platform_full_path}/apps", + "${openssl_selected_platform_full_path}/crypto", + "${openssl_selected_platform_full_path}/include", + "${openssl_selected_platform_full_path}/include/crypto", + "${openssl_selected_platform_full_path}/include/openssl", + "${openssl_selected_platform_full_path}/providers/common/include", + "${openssl_selected_platform_full_path}/providers/common/include/prov", + ] + crypto_config_common_public_include_dirs = [ + "//third_party/openssl/include", + "${openssl_selected_platform_full_path}/include", + ] + + # located at /system/etc/ + ohos_prebuilt_etc("openssl.cnf") { + source = "//third_party/openssl/open_harmony_openssl_config/openssl.cnf" + subsystem_name = "thirdparty" + part_name = "openssl" + } -# 升级修改适配检查点17 libcommon 原目录源码列表 -libcommon_common_sources = [ - "//third_party/openssl/providers/common/der/der_dsa_key.c", - "//third_party/openssl/providers/common/der/der_dsa_sig.c", - "//third_party/openssl/providers/common/der/der_ec_key.c", - "//third_party/openssl/providers/common/der/der_ec_sig.c", - "//third_party/openssl/providers/common/der/der_ecx_key.c", - "//third_party/openssl/providers/common/der/der_rsa_key.c", - "//third_party/openssl/providers/common/provider_ctx.c", - "//third_party/openssl/providers/common/provider_err.c", - "//third_party/openssl/providers/implementations/ciphers/ciphercommon.c", - "//third_party/openssl/providers/implementations/ciphers/ciphercommon_block.c", - "//third_party/openssl/providers/implementations/ciphers/ciphercommon_ccm.c", - "//third_party/openssl/providers/implementations/ciphers/ciphercommon_ccm_hw.c", - "//third_party/openssl/providers/implementations/ciphers/ciphercommon_gcm.c", - "//third_party/openssl/providers/implementations/ciphers/ciphercommon_gcm_hw.c", - "//third_party/openssl/providers/implementations/ciphers/ciphercommon_hw.c", - "//third_party/openssl/providers/implementations/digests/digestcommon.c", - "//third_party/openssl/ssl/record/tls_pad.c", -] - -# 升级修改适配检查点18 libdefault 原目录源码列表 -libdefault_common_sources = [ - "//third_party/openssl/providers/common/bio_prov.c", - "//third_party/openssl/providers/common/capabilities.c", - "//third_party/openssl/providers/common/der/der_rsa_sig.c", - "//third_party/openssl/providers/common/der/der_sm2_key.c", - "//third_party/openssl/providers/common/der/der_sm2_sig.c", - "//third_party/openssl/providers/common/digest_to_nid.c", - "//third_party/openssl/providers/common/provider_seeding.c", - "//third_party/openssl/providers/common/provider_util.c", - "//third_party/openssl/providers/common/securitycheck.c", - "//third_party/openssl/providers/common/securitycheck_default.c", - "//third_party/openssl/providers/implementations/asymciphers/rsa_enc.c", - "//third_party/openssl/providers/implementations/asymciphers/sm2_enc.c", - "//third_party/openssl/providers/implementations/ciphers/cipher_aes.c", - "//third_party/openssl/providers/implementations/ciphers/cipher_aes_cbc_hmac_sha.c", - "//third_party/openssl/providers/implementations/ciphers/cipher_aes_cbc_hmac_sha1_hw.c", - "//third_party/openssl/providers/implementations/ciphers/cipher_aes_cbc_hmac_sha256_hw.c", - "//third_party/openssl/providers/implementations/ciphers/cipher_aes_ccm.c", - "//third_party/openssl/providers/implementations/ciphers/cipher_aes_ccm_hw.c", - "//third_party/openssl/providers/implementations/ciphers/cipher_aes_gcm.c", - "//third_party/openssl/providers/implementations/ciphers/cipher_aes_gcm_hw.c", - "//third_party/openssl/providers/implementations/ciphers/cipher_aes_hw.c", - "//third_party/openssl/providers/implementations/ciphers/cipher_aes_ocb.c", - "//third_party/openssl/providers/implementations/ciphers/cipher_aes_ocb_hw.c", - "//third_party/openssl/providers/implementations/ciphers/cipher_aes_siv.c", - "//third_party/openssl/providers/implementations/ciphers/cipher_aes_siv_hw.c", - "//third_party/openssl/providers/implementations/ciphers/cipher_aes_wrp.c", - "//third_party/openssl/providers/implementations/ciphers/cipher_aes_xts.c", - "//third_party/openssl/providers/implementations/ciphers/cipher_aes_xts_fips.c", - "//third_party/openssl/providers/implementations/ciphers/cipher_aes_xts_hw.c", - "//third_party/openssl/providers/implementations/ciphers/cipher_aria.c", - "//third_party/openssl/providers/implementations/ciphers/cipher_aria_ccm.c", - "//third_party/openssl/providers/implementations/ciphers/cipher_aria_ccm_hw.c", - "//third_party/openssl/providers/implementations/ciphers/cipher_aria_gcm.c", - "//third_party/openssl/providers/implementations/ciphers/cipher_aria_gcm_hw.c", - "//third_party/openssl/providers/implementations/ciphers/cipher_aria_hw.c", - "//third_party/openssl/providers/implementations/ciphers/cipher_camellia.c", - "//third_party/openssl/providers/implementations/ciphers/cipher_camellia_hw.c", - "//third_party/openssl/providers/implementations/ciphers/cipher_chacha20.c", - "//third_party/openssl/providers/implementations/ciphers/cipher_chacha20_hw.c", - "//third_party/openssl/providers/implementations/ciphers/cipher_chacha20_poly1305.c", - "//third_party/openssl/providers/implementations/ciphers/cipher_chacha20_poly1305_hw.c", - "//third_party/openssl/providers/implementations/ciphers/cipher_cts.c", - "//third_party/openssl/providers/implementations/ciphers/cipher_null.c", - "//third_party/openssl/providers/implementations/ciphers/cipher_sm4.c", - "//third_party/openssl/providers/implementations/ciphers/cipher_sm4_ccm.c", - "//third_party/openssl/providers/implementations/ciphers/cipher_sm4_ccm_hw.c", - "//third_party/openssl/providers/implementations/ciphers/cipher_sm4_gcm.c", - "//third_party/openssl/providers/implementations/ciphers/cipher_sm4_gcm_hw.c", - "//third_party/openssl/providers/implementations/ciphers/cipher_sm4_hw.c", - "//third_party/openssl/providers/implementations/ciphers/cipher_tdes.c", - "//third_party/openssl/providers/implementations/ciphers/cipher_tdes_common.c", - "//third_party/openssl/providers/implementations/ciphers/cipher_tdes_default.c", - "//third_party/openssl/providers/implementations/ciphers/cipher_tdes_default_hw.c", - "//third_party/openssl/providers/implementations/ciphers/cipher_tdes_hw.c", - "//third_party/openssl/providers/implementations/ciphers/cipher_tdes_wrap.c", - "//third_party/openssl/providers/implementations/ciphers/cipher_tdes_wrap_hw.c", - "//third_party/openssl/providers/implementations/digests/blake2_prov.c", - "//third_party/openssl/providers/implementations/digests/blake2b_prov.c", - "//third_party/openssl/providers/implementations/digests/blake2s_prov.c", - "//third_party/openssl/providers/implementations/digests/md5_prov.c", - "//third_party/openssl/providers/implementations/digests/md5_sha1_prov.c", - "//third_party/openssl/providers/implementations/digests/null_prov.c", - "//third_party/openssl/providers/implementations/digests/ripemd_prov.c", - "//third_party/openssl/providers/implementations/digests/sha2_prov.c", - "//third_party/openssl/providers/implementations/digests/sha3_prov.c", - "//third_party/openssl/providers/implementations/digests/sm3_prov.c", - "//third_party/openssl/providers/implementations/encode_decode/decode_der2key.c", - "//third_party/openssl/providers/implementations/encode_decode/decode_epki2pki.c", - "//third_party/openssl/providers/implementations/encode_decode/decode_msblob2key.c", - "//third_party/openssl/providers/implementations/encode_decode/decode_pem2der.c", - "//third_party/openssl/providers/implementations/encode_decode/decode_pvk2key.c", - "//third_party/openssl/providers/implementations/encode_decode/decode_spki2typespki.c", - "//third_party/openssl/providers/implementations/encode_decode/encode_key2any.c", - "//third_party/openssl/providers/implementations/encode_decode/encode_key2blob.c", - "//third_party/openssl/providers/implementations/encode_decode/encode_key2ms.c", - "//third_party/openssl/providers/implementations/encode_decode/encode_key2text.c", - "//third_party/openssl/providers/implementations/encode_decode/endecoder_common.c", - "//third_party/openssl/providers/implementations/exchange/dh_exch.c", - "//third_party/openssl/providers/implementations/exchange/ecdh_exch.c", - "//third_party/openssl/providers/implementations/exchange/ecx_exch.c", - "//third_party/openssl/providers/implementations/exchange/kdf_exch.c", - "//third_party/openssl/providers/implementations/kdfs/hkdf.c", - "//third_party/openssl/providers/implementations/kdfs/kbkdf.c", - "//third_party/openssl/providers/implementations/kdfs/krb5kdf.c", - "//third_party/openssl/providers/implementations/kdfs/pbkdf2.c", - "//third_party/openssl/providers/implementations/kdfs/pbkdf2_fips.c", - "//third_party/openssl/providers/implementations/kdfs/pkcs12kdf.c", - "//third_party/openssl/providers/implementations/kdfs/scrypt.c", - "//third_party/openssl/providers/implementations/kdfs/sshkdf.c", - "//third_party/openssl/providers/implementations/kdfs/sskdf.c", - "//third_party/openssl/providers/implementations/kdfs/tls1_prf.c", - "//third_party/openssl/providers/implementations/kdfs/x942kdf.c", - "//third_party/openssl/providers/implementations/kem/rsa_kem.c", - "//third_party/openssl/providers/implementations/keymgmt/dh_kmgmt.c", - "//third_party/openssl/providers/implementations/keymgmt/dsa_kmgmt.c", - "//third_party/openssl/providers/implementations/keymgmt/ec_kmgmt.c", - "//third_party/openssl/providers/implementations/keymgmt/ecx_kmgmt.c", - "//third_party/openssl/providers/implementations/keymgmt/kdf_legacy_kmgmt.c", - "//third_party/openssl/providers/implementations/keymgmt/mac_legacy_kmgmt.c", - "//third_party/openssl/providers/implementations/keymgmt/rsa_kmgmt.c", - "//third_party/openssl/providers/implementations/macs/blake2b_mac.c", - "//third_party/openssl/providers/implementations/macs/blake2s_mac.c", - "//third_party/openssl/providers/implementations/macs/cmac_prov.c", - "//third_party/openssl/providers/implementations/macs/gmac_prov.c", - "//third_party/openssl/providers/implementations/macs/hmac_prov.c", - "//third_party/openssl/providers/implementations/macs/kmac_prov.c", - "//third_party/openssl/providers/implementations/macs/poly1305_prov.c", - "//third_party/openssl/providers/implementations/macs/siphash_prov.c", - "//third_party/openssl/providers/implementations/rands/crngt.c", - "//third_party/openssl/providers/implementations/rands/drbg.c", - "//third_party/openssl/providers/implementations/rands/drbg_ctr.c", - "//third_party/openssl/providers/implementations/rands/drbg_hash.c", - "//third_party/openssl/providers/implementations/rands/drbg_hmac.c", - "//third_party/openssl/providers/implementations/rands/seed_src.c", - "//third_party/openssl/providers/implementations/rands/seeding/rand_cpu_x86.c", - "//third_party/openssl/providers/implementations/rands/seeding/rand_tsc.c", - "//third_party/openssl/providers/implementations/rands/seeding/rand_unix.c", - "//third_party/openssl/providers/implementations/rands/seeding/rand_win.c", - "//third_party/openssl/providers/implementations/rands/test_rng.c", - "//third_party/openssl/providers/implementations/signature/dsa_sig.c", - "//third_party/openssl/providers/implementations/signature/ecdsa_sig.c", - "//third_party/openssl/providers/implementations/signature/eddsa_sig.c", - "//third_party/openssl/providers/implementations/signature/mac_legacy_sig.c", - "//third_party/openssl/providers/implementations/signature/rsa_sig.c", - "//third_party/openssl/providers/implementations/signature/sm2_sig.c", - "//third_party/openssl/providers/implementations/storemgmt/file_store.c", - "//third_party/openssl/providers/implementations/storemgmt/file_store_any2obj.c", - "//third_party/openssl/ssl/s3_cbc.c", -] - -# 升级修改适配检查点19 liblegacy 源码列表 -liblegacy_sources = [ - "//third_party/openssl/providers/implementations/ciphers/cipher_blowfish.c", - "//third_party/openssl/providers/implementations/ciphers/cipher_blowfish_hw.c", - "//third_party/openssl/providers/implementations/ciphers/cipher_cast5.c", - "//third_party/openssl/providers/implementations/ciphers/cipher_cast5_hw.c", - "//third_party/openssl/providers/implementations/ciphers/cipher_des.c", - "//third_party/openssl/providers/implementations/ciphers/cipher_des_hw.c", - "//third_party/openssl/providers/implementations/ciphers/cipher_desx.c", - "//third_party/openssl/providers/implementations/ciphers/cipher_desx_hw.c", - "//third_party/openssl/providers/implementations/ciphers/cipher_idea.c", - "//third_party/openssl/providers/implementations/ciphers/cipher_idea_hw.c", - "//third_party/openssl/providers/implementations/ciphers/cipher_rc2.c", - "//third_party/openssl/providers/implementations/ciphers/cipher_rc2_hw.c", - "//third_party/openssl/providers/implementations/ciphers/cipher_rc4.c", - "//third_party/openssl/providers/implementations/ciphers/cipher_rc4_hmac_md5.c", - "//third_party/openssl/providers/implementations/ciphers/cipher_rc4_hmac_md5_hw.c", - "//third_party/openssl/providers/implementations/ciphers/cipher_rc4_hw.c", - "//third_party/openssl/providers/implementations/ciphers/cipher_seed.c", - "//third_party/openssl/providers/implementations/ciphers/cipher_seed_hw.c", - "//third_party/openssl/providers/implementations/digests/md4_prov.c", - "//third_party/openssl/providers/implementations/digests/mdc2_prov.c", - "//third_party/openssl/providers/implementations/digests/wp_prov.c", - "//third_party/openssl/providers/implementations/kdfs/pbkdf1.c", -] - -ohos_source_set("crypto_source") { - subsystem_name = "thirdparty" - part_name = "openssl" - - # 升级修改适配检查点20 libcrypto 原目录源码列表 - sources = [ - "//third_party/openssl/crypto/aes/aes_cfb.c", - "//third_party/openssl/crypto/aes/aes_ecb.c", - "//third_party/openssl/crypto/aes/aes_ige.c", - "//third_party/openssl/crypto/aes/aes_misc.c", - "//third_party/openssl/crypto/aes/aes_ofb.c", - "//third_party/openssl/crypto/aes/aes_wrap.c", - "//third_party/openssl/crypto/aria/aria.c", - "//third_party/openssl/crypto/asn1/a_bitstr.c", - "//third_party/openssl/crypto/asn1/a_d2i_fp.c", - "//third_party/openssl/crypto/asn1/a_digest.c", - "//third_party/openssl/crypto/asn1/a_dup.c", - "//third_party/openssl/crypto/asn1/a_gentm.c", - "//third_party/openssl/crypto/asn1/a_i2d_fp.c", - "//third_party/openssl/crypto/asn1/a_int.c", - "//third_party/openssl/crypto/asn1/a_mbstr.c", - "//third_party/openssl/crypto/asn1/a_object.c", - "//third_party/openssl/crypto/asn1/a_octet.c", - "//third_party/openssl/crypto/asn1/a_print.c", - "//third_party/openssl/crypto/asn1/a_sign.c", - "//third_party/openssl/crypto/asn1/a_strex.c", - "//third_party/openssl/crypto/asn1/a_strnid.c", - "//third_party/openssl/crypto/asn1/a_time.c", - "//third_party/openssl/crypto/asn1/a_type.c", - "//third_party/openssl/crypto/asn1/a_utctm.c", - "//third_party/openssl/crypto/asn1/a_utf8.c", - "//third_party/openssl/crypto/asn1/a_verify.c", - "//third_party/openssl/crypto/asn1/ameth_lib.c", - "//third_party/openssl/crypto/asn1/asn1_err.c", - "//third_party/openssl/crypto/asn1/asn1_gen.c", - "//third_party/openssl/crypto/asn1/asn1_item_list.c", - "//third_party/openssl/crypto/asn1/asn1_lib.c", - "//third_party/openssl/crypto/asn1/asn1_parse.c", - "//third_party/openssl/crypto/asn1/asn_mime.c", - "//third_party/openssl/crypto/asn1/asn_moid.c", - "//third_party/openssl/crypto/asn1/asn_mstbl.c", - "//third_party/openssl/crypto/asn1/asn_pack.c", - "//third_party/openssl/crypto/asn1/bio_asn1.c", - "//third_party/openssl/crypto/asn1/bio_ndef.c", - "//third_party/openssl/crypto/asn1/d2i_param.c", - "//third_party/openssl/crypto/asn1/d2i_pr.c", - "//third_party/openssl/crypto/asn1/d2i_pu.c", - "//third_party/openssl/crypto/asn1/evp_asn1.c", - "//third_party/openssl/crypto/asn1/f_int.c", - "//third_party/openssl/crypto/asn1/f_string.c", - "//third_party/openssl/crypto/asn1/i2d_evp.c", - "//third_party/openssl/crypto/asn1/n_pkey.c", - "//third_party/openssl/crypto/asn1/nsseq.c", - "//third_party/openssl/crypto/asn1/p5_pbe.c", - "//third_party/openssl/crypto/asn1/p5_pbev2.c", - "//third_party/openssl/crypto/asn1/p5_scrypt.c", - "//third_party/openssl/crypto/asn1/p8_pkey.c", - "//third_party/openssl/crypto/asn1/t_bitst.c", - "//third_party/openssl/crypto/asn1/t_pkey.c", - "//third_party/openssl/crypto/asn1/t_spki.c", - "//third_party/openssl/crypto/asn1/tasn_dec.c", - "//third_party/openssl/crypto/asn1/tasn_enc.c", - "//third_party/openssl/crypto/asn1/tasn_fre.c", - "//third_party/openssl/crypto/asn1/tasn_new.c", - "//third_party/openssl/crypto/asn1/tasn_prn.c", - "//third_party/openssl/crypto/asn1/tasn_scn.c", - "//third_party/openssl/crypto/asn1/tasn_typ.c", - "//third_party/openssl/crypto/asn1/tasn_utl.c", - "//third_party/openssl/crypto/asn1/x_algor.c", - "//third_party/openssl/crypto/asn1/x_bignum.c", - "//third_party/openssl/crypto/asn1/x_info.c", - "//third_party/openssl/crypto/asn1/x_int64.c", - "//third_party/openssl/crypto/asn1/x_long.c", - "//third_party/openssl/crypto/asn1/x_pkey.c", - "//third_party/openssl/crypto/asn1/x_sig.c", - "//third_party/openssl/crypto/asn1/x_spki.c", - "//third_party/openssl/crypto/asn1/x_val.c", - "//third_party/openssl/crypto/asn1_dsa.c", - "//third_party/openssl/crypto/async/arch/async_null.c", - "//third_party/openssl/crypto/async/arch/async_posix.c", - "//third_party/openssl/crypto/async/arch/async_win.c", - "//third_party/openssl/crypto/async/async.c", - "//third_party/openssl/crypto/async/async_err.c", - "//third_party/openssl/crypto/async/async_wait.c", - "//third_party/openssl/crypto/bf/bf_cfb64.c", - "//third_party/openssl/crypto/bf/bf_ecb.c", - "//third_party/openssl/crypto/bf/bf_enc.c", - "//third_party/openssl/crypto/bf/bf_ofb64.c", - "//third_party/openssl/crypto/bf/bf_skey.c", - "//third_party/openssl/crypto/bio/bf_buff.c", - "//third_party/openssl/crypto/bio/bf_lbuf.c", - "//third_party/openssl/crypto/bio/bf_nbio.c", - "//third_party/openssl/crypto/bio/bf_null.c", - "//third_party/openssl/crypto/bio/bf_prefix.c", - "//third_party/openssl/crypto/bio/bf_readbuff.c", - "//third_party/openssl/crypto/bio/bio_addr.c", - "//third_party/openssl/crypto/bio/bio_cb.c", - "//third_party/openssl/crypto/bio/bio_dump.c", - "//third_party/openssl/crypto/bio/bio_err.c", - "//third_party/openssl/crypto/bio/bio_lib.c", - "//third_party/openssl/crypto/bio/bio_meth.c", - "//third_party/openssl/crypto/bio/bio_print.c", - "//third_party/openssl/crypto/bio/bio_sock.c", - "//third_party/openssl/crypto/bio/bio_sock2.c", - "//third_party/openssl/crypto/bio/bss_acpt.c", - "//third_party/openssl/crypto/bio/bss_bio.c", - "//third_party/openssl/crypto/bio/bss_conn.c", - "//third_party/openssl/crypto/bio/bss_core.c", - "//third_party/openssl/crypto/bio/bss_dgram.c", - "//third_party/openssl/crypto/bio/bss_fd.c", - "//third_party/openssl/crypto/bio/bss_file.c", - "//third_party/openssl/crypto/bio/bss_log.c", - "//third_party/openssl/crypto/bio/bss_mem.c", - "//third_party/openssl/crypto/bio/bss_null.c", - "//third_party/openssl/crypto/bio/bss_sock.c", - "//third_party/openssl/crypto/bio/ossl_core_bio.c", - "//third_party/openssl/crypto/bn/bn_add.c", - "//third_party/openssl/crypto/bn/bn_blind.c", - "//third_party/openssl/crypto/bn/bn_const.c", - "//third_party/openssl/crypto/bn/bn_conv.c", - "//third_party/openssl/crypto/bn/bn_ctx.c", - "//third_party/openssl/crypto/bn/bn_depr.c", - "//third_party/openssl/crypto/bn/bn_dh.c", - "//third_party/openssl/crypto/bn/bn_div.c", - "//third_party/openssl/crypto/bn/bn_err.c", - "//third_party/openssl/crypto/bn/bn_exp.c", - "//third_party/openssl/crypto/bn/bn_exp2.c", - "//third_party/openssl/crypto/bn/bn_gcd.c", - "//third_party/openssl/crypto/bn/bn_gf2m.c", - "//third_party/openssl/crypto/bn/bn_intern.c", - "//third_party/openssl/crypto/bn/bn_kron.c", - "//third_party/openssl/crypto/bn/bn_lib.c", - "//third_party/openssl/crypto/bn/bn_mod.c", - "//third_party/openssl/crypto/bn/bn_mont.c", - "//third_party/openssl/crypto/bn/bn_mpi.c", - "//third_party/openssl/crypto/bn/bn_mul.c", - "//third_party/openssl/crypto/bn/bn_nist.c", - "//third_party/openssl/crypto/bn/bn_prime.c", - "//third_party/openssl/crypto/bn/bn_print.c", - "//third_party/openssl/crypto/bn/bn_rand.c", - "//third_party/openssl/crypto/bn/bn_recp.c", - "//third_party/openssl/crypto/bn/bn_rsa_fips186_4.c", - "//third_party/openssl/crypto/bn/bn_shift.c", - "//third_party/openssl/crypto/bn/bn_sqr.c", - "//third_party/openssl/crypto/bn/bn_sqrt.c", - "//third_party/openssl/crypto/bn/bn_srp.c", - "//third_party/openssl/crypto/bn/bn_word.c", - "//third_party/openssl/crypto/bn/bn_x931p.c", - "//third_party/openssl/crypto/bsearch.c", - "//third_party/openssl/crypto/buffer/buf_err.c", - "//third_party/openssl/crypto/buffer/buffer.c", - "//third_party/openssl/crypto/camellia/cmll_cfb.c", - "//third_party/openssl/crypto/camellia/cmll_ctr.c", - "//third_party/openssl/crypto/camellia/cmll_ecb.c", - "//third_party/openssl/crypto/camellia/cmll_misc.c", - "//third_party/openssl/crypto/camellia/cmll_ofb.c", - "//third_party/openssl/crypto/cast/c_cfb64.c", - "//third_party/openssl/crypto/cast/c_ecb.c", - "//third_party/openssl/crypto/cast/c_enc.c", - "//third_party/openssl/crypto/cast/c_ofb64.c", - "//third_party/openssl/crypto/cast/c_skey.c", - "//third_party/openssl/crypto/cmac/cmac.c", - "//third_party/openssl/crypto/cmp/cmp_asn.c", - "//third_party/openssl/crypto/cmp/cmp_client.c", - "//third_party/openssl/crypto/cmp/cmp_ctx.c", - "//third_party/openssl/crypto/cmp/cmp_err.c", - "//third_party/openssl/crypto/cmp/cmp_hdr.c", - "//third_party/openssl/crypto/cmp/cmp_http.c", - "//third_party/openssl/crypto/cmp/cmp_msg.c", - "//third_party/openssl/crypto/cmp/cmp_protect.c", - "//third_party/openssl/crypto/cmp/cmp_server.c", - "//third_party/openssl/crypto/cmp/cmp_status.c", - "//third_party/openssl/crypto/cmp/cmp_util.c", - "//third_party/openssl/crypto/cmp/cmp_vfy.c", - "//third_party/openssl/crypto/cms/cms_asn1.c", - "//third_party/openssl/crypto/cms/cms_att.c", - "//third_party/openssl/crypto/cms/cms_cd.c", - "//third_party/openssl/crypto/cms/cms_dd.c", - "//third_party/openssl/crypto/cms/cms_dh.c", - "//third_party/openssl/crypto/cms/cms_ec.c", - "//third_party/openssl/crypto/cms/cms_enc.c", - "//third_party/openssl/crypto/cms/cms_env.c", - "//third_party/openssl/crypto/cms/cms_err.c", - "//third_party/openssl/crypto/cms/cms_ess.c", - "//third_party/openssl/crypto/cms/cms_io.c", - "//third_party/openssl/crypto/cms/cms_kari.c", - "//third_party/openssl/crypto/cms/cms_lib.c", - "//third_party/openssl/crypto/cms/cms_pwri.c", - "//third_party/openssl/crypto/cms/cms_rsa.c", - "//third_party/openssl/crypto/cms/cms_sd.c", - "//third_party/openssl/crypto/cms/cms_smime.c", - "//third_party/openssl/crypto/comp/c_zlib.c", - "//third_party/openssl/crypto/comp/comp_err.c", - "//third_party/openssl/crypto/comp/comp_lib.c", - "//third_party/openssl/crypto/conf/conf_api.c", - "//third_party/openssl/crypto/conf/conf_def.c", - "//third_party/openssl/crypto/conf/conf_err.c", - "//third_party/openssl/crypto/conf/conf_lib.c", - "//third_party/openssl/crypto/conf/conf_mall.c", - "//third_party/openssl/crypto/conf/conf_mod.c", - "//third_party/openssl/crypto/conf/conf_sap.c", - "//third_party/openssl/crypto/conf/conf_ssl.c", - "//third_party/openssl/crypto/context.c", - "//third_party/openssl/crypto/core_algorithm.c", - "//third_party/openssl/crypto/core_fetch.c", - "//third_party/openssl/crypto/core_namemap.c", - "//third_party/openssl/crypto/cpt_err.c", - "//third_party/openssl/crypto/cpuid.c", - "//third_party/openssl/crypto/crmf/crmf_asn.c", - "//third_party/openssl/crypto/crmf/crmf_err.c", - "//third_party/openssl/crypto/crmf/crmf_lib.c", - "//third_party/openssl/crypto/crmf/crmf_pbm.c", - "//third_party/openssl/crypto/cryptlib.c", - "//third_party/openssl/crypto/ct/ct_b64.c", - "//third_party/openssl/crypto/ct/ct_err.c", - "//third_party/openssl/crypto/ct/ct_log.c", - "//third_party/openssl/crypto/ct/ct_oct.c", - "//third_party/openssl/crypto/ct/ct_policy.c", - "//third_party/openssl/crypto/ct/ct_prn.c", - "//third_party/openssl/crypto/ct/ct_sct.c", - "//third_party/openssl/crypto/ct/ct_sct_ctx.c", - "//third_party/openssl/crypto/ct/ct_vfy.c", - "//third_party/openssl/crypto/ct/ct_x509v3.c", - "//third_party/openssl/crypto/ctype.c", - "//third_party/openssl/crypto/cversion.c", - "//third_party/openssl/crypto/der_writer.c", - "//third_party/openssl/crypto/des/cbc_cksm.c", - "//third_party/openssl/crypto/des/cbc_enc.c", - "//third_party/openssl/crypto/des/cfb64ede.c", - "//third_party/openssl/crypto/des/cfb64enc.c", - "//third_party/openssl/crypto/des/cfb_enc.c", - "//third_party/openssl/crypto/des/des_enc.c", - "//third_party/openssl/crypto/des/ecb3_enc.c", - "//third_party/openssl/crypto/des/ecb_enc.c", - "//third_party/openssl/crypto/des/fcrypt.c", - "//third_party/openssl/crypto/des/fcrypt_b.c", - "//third_party/openssl/crypto/des/ofb64ede.c", - "//third_party/openssl/crypto/des/ofb64enc.c", - "//third_party/openssl/crypto/des/ofb_enc.c", - "//third_party/openssl/crypto/des/pcbc_enc.c", - "//third_party/openssl/crypto/des/qud_cksm.c", - "//third_party/openssl/crypto/des/rand_key.c", - "//third_party/openssl/crypto/des/set_key.c", - "//third_party/openssl/crypto/des/str2key.c", - "//third_party/openssl/crypto/des/xcbc_enc.c", - "//third_party/openssl/crypto/dh/dh_ameth.c", - "//third_party/openssl/crypto/dh/dh_asn1.c", - "//third_party/openssl/crypto/dh/dh_backend.c", - "//third_party/openssl/crypto/dh/dh_check.c", - "//third_party/openssl/crypto/dh/dh_depr.c", - "//third_party/openssl/crypto/dh/dh_err.c", - "//third_party/openssl/crypto/dh/dh_gen.c", - "//third_party/openssl/crypto/dh/dh_group_params.c", - "//third_party/openssl/crypto/dh/dh_kdf.c", - "//third_party/openssl/crypto/dh/dh_key.c", - "//third_party/openssl/crypto/dh/dh_lib.c", - "//third_party/openssl/crypto/dh/dh_meth.c", - "//third_party/openssl/crypto/dh/dh_pmeth.c", - "//third_party/openssl/crypto/dh/dh_prn.c", - "//third_party/openssl/crypto/dh/dh_rfc5114.c", - "//third_party/openssl/crypto/dsa/dsa_ameth.c", - "//third_party/openssl/crypto/dsa/dsa_asn1.c", - "//third_party/openssl/crypto/dsa/dsa_backend.c", - "//third_party/openssl/crypto/dsa/dsa_check.c", - "//third_party/openssl/crypto/dsa/dsa_depr.c", - "//third_party/openssl/crypto/dsa/dsa_err.c", - "//third_party/openssl/crypto/dsa/dsa_gen.c", - "//third_party/openssl/crypto/dsa/dsa_key.c", - "//third_party/openssl/crypto/dsa/dsa_lib.c", - "//third_party/openssl/crypto/dsa/dsa_meth.c", - "//third_party/openssl/crypto/dsa/dsa_ossl.c", - "//third_party/openssl/crypto/dsa/dsa_pmeth.c", - "//third_party/openssl/crypto/dsa/dsa_prn.c", - "//third_party/openssl/crypto/dsa/dsa_sign.c", - "//third_party/openssl/crypto/dsa/dsa_vrf.c", - "//third_party/openssl/crypto/dso/dso_dl.c", - "//third_party/openssl/crypto/dso/dso_dlfcn.c", - "//third_party/openssl/crypto/dso/dso_err.c", - "//third_party/openssl/crypto/dso/dso_lib.c", - "//third_party/openssl/crypto/dso/dso_openssl.c", - "//third_party/openssl/crypto/dso/dso_vms.c", - "//third_party/openssl/crypto/dso/dso_win32.c", - "//third_party/openssl/crypto/ebcdic.c", - "//third_party/openssl/crypto/ec/curve25519.c", - "//third_party/openssl/crypto/ec/curve448/arch_32/f_impl32.c", - "//third_party/openssl/crypto/ec/curve448/arch_64/f_impl64.c", - "//third_party/openssl/crypto/ec/curve448/curve448.c", - "//third_party/openssl/crypto/ec/curve448/curve448_tables.c", - "//third_party/openssl/crypto/ec/curve448/eddsa.c", - "//third_party/openssl/crypto/ec/curve448/f_generic.c", - "//third_party/openssl/crypto/ec/curve448/scalar.c", - "//third_party/openssl/crypto/ec/ec2_oct.c", - "//third_party/openssl/crypto/ec/ec2_smpl.c", - "//third_party/openssl/crypto/ec/ec_ameth.c", - "//third_party/openssl/crypto/ec/ec_asn1.c", - "//third_party/openssl/crypto/ec/ec_backend.c", - "//third_party/openssl/crypto/ec/ec_check.c", - "//third_party/openssl/crypto/ec/ec_curve.c", - "//third_party/openssl/crypto/ec/ec_cvt.c", - "//third_party/openssl/crypto/ec/ec_deprecated.c", - "//third_party/openssl/crypto/ec/ec_err.c", - "//third_party/openssl/crypto/ec/ec_key.c", - "//third_party/openssl/crypto/ec/ec_kmeth.c", - "//third_party/openssl/crypto/ec/ec_lib.c", - "//third_party/openssl/crypto/ec/ec_mult.c", - "//third_party/openssl/crypto/ec/ec_oct.c", - "//third_party/openssl/crypto/ec/ec_pmeth.c", - "//third_party/openssl/crypto/ec/ec_print.c", - "//third_party/openssl/crypto/ec/ecdh_kdf.c", - "//third_party/openssl/crypto/ec/ecdh_ossl.c", - "//third_party/openssl/crypto/ec/ecdsa_ossl.c", - "//third_party/openssl/crypto/ec/ecdsa_sign.c", - "//third_party/openssl/crypto/ec/ecdsa_vrf.c", - "//third_party/openssl/crypto/ec/eck_prn.c", - "//third_party/openssl/crypto/ec/ecp_mont.c", - "//third_party/openssl/crypto/ec/ecp_nist.c", - "//third_party/openssl/crypto/ec/ecp_nistz256.c", - "//third_party/openssl/crypto/ec/ecp_oct.c", - "//third_party/openssl/crypto/ec/ecp_smpl.c", - "//third_party/openssl/crypto/ec/ecx_backend.c", - "//third_party/openssl/crypto/ec/ecx_key.c", - "//third_party/openssl/crypto/ec/ecx_meth.c", - "//third_party/openssl/crypto/encode_decode/decoder_err.c", - "//third_party/openssl/crypto/encode_decode/decoder_lib.c", - "//third_party/openssl/crypto/encode_decode/decoder_meth.c", - "//third_party/openssl/crypto/encode_decode/decoder_pkey.c", - "//third_party/openssl/crypto/encode_decode/encoder_err.c", - "//third_party/openssl/crypto/encode_decode/encoder_lib.c", - "//third_party/openssl/crypto/encode_decode/encoder_meth.c", - "//third_party/openssl/crypto/encode_decode/encoder_pkey.c", - "//third_party/openssl/crypto/engine/eng_all.c", - "//third_party/openssl/crypto/engine/eng_cnf.c", - "//third_party/openssl/crypto/engine/eng_ctrl.c", - "//third_party/openssl/crypto/engine/eng_dyn.c", - "//third_party/openssl/crypto/engine/eng_err.c", - "//third_party/openssl/crypto/engine/eng_fat.c", - "//third_party/openssl/crypto/engine/eng_init.c", - "//third_party/openssl/crypto/engine/eng_lib.c", - "//third_party/openssl/crypto/engine/eng_list.c", - "//third_party/openssl/crypto/engine/eng_openssl.c", - "//third_party/openssl/crypto/engine/eng_pkey.c", - "//third_party/openssl/crypto/engine/eng_rdrand.c", - "//third_party/openssl/crypto/engine/eng_table.c", - "//third_party/openssl/crypto/engine/tb_asnmth.c", - "//third_party/openssl/crypto/engine/tb_cipher.c", - "//third_party/openssl/crypto/engine/tb_dh.c", - "//third_party/openssl/crypto/engine/tb_digest.c", - "//third_party/openssl/crypto/engine/tb_dsa.c", - "//third_party/openssl/crypto/engine/tb_eckey.c", - "//third_party/openssl/crypto/engine/tb_pkmeth.c", - "//third_party/openssl/crypto/engine/tb_rand.c", - "//third_party/openssl/crypto/engine/tb_rsa.c", - "//third_party/openssl/crypto/err/err.c", - "//third_party/openssl/crypto/err/err_all.c", - "//third_party/openssl/crypto/err/err_all_legacy.c", - "//third_party/openssl/crypto/err/err_blocks.c", - "//third_party/openssl/crypto/err/err_prn.c", - "//third_party/openssl/crypto/ess/ess_asn1.c", - "//third_party/openssl/crypto/ess/ess_err.c", - "//third_party/openssl/crypto/ess/ess_lib.c", - "//third_party/openssl/crypto/evp/asymcipher.c", - "//third_party/openssl/crypto/evp/bio_b64.c", - "//third_party/openssl/crypto/evp/bio_enc.c", - "//third_party/openssl/crypto/evp/bio_md.c", - "//third_party/openssl/crypto/evp/bio_ok.c", - "//third_party/openssl/crypto/evp/c_allc.c", - "//third_party/openssl/crypto/evp/c_alld.c", - "//third_party/openssl/crypto/evp/cmeth_lib.c", - "//third_party/openssl/crypto/evp/ctrl_params_translate.c", - "//third_party/openssl/crypto/evp/dh_ctrl.c", - "//third_party/openssl/crypto/evp/dh_support.c", - "//third_party/openssl/crypto/evp/digest.c", - "//third_party/openssl/crypto/evp/dsa_ctrl.c", - "//third_party/openssl/crypto/evp/e_aes.c", - "//third_party/openssl/crypto/evp/e_aes_cbc_hmac_sha1.c", - "//third_party/openssl/crypto/evp/e_aes_cbc_hmac_sha256.c", - "//third_party/openssl/crypto/evp/e_aria.c", - "//third_party/openssl/crypto/evp/e_bf.c", - "//third_party/openssl/crypto/evp/e_camellia.c", - "//third_party/openssl/crypto/evp/e_cast.c", - "//third_party/openssl/crypto/evp/e_chacha20_poly1305.c", - "//third_party/openssl/crypto/evp/e_des.c", - "//third_party/openssl/crypto/evp/e_des3.c", - "//third_party/openssl/crypto/evp/e_idea.c", - "//third_party/openssl/crypto/evp/e_null.c", - "//third_party/openssl/crypto/evp/e_old.c", - "//third_party/openssl/crypto/evp/e_rc2.c", - "//third_party/openssl/crypto/evp/e_rc4.c", - "//third_party/openssl/crypto/evp/e_rc4_hmac_md5.c", - "//third_party/openssl/crypto/evp/e_rc5.c", - "//third_party/openssl/crypto/evp/e_seed.c", - "//third_party/openssl/crypto/evp/e_sm4.c", - "//third_party/openssl/crypto/evp/e_xcbc_d.c", - "//third_party/openssl/crypto/evp/ec_ctrl.c", - "//third_party/openssl/crypto/evp/ec_support.c", - "//third_party/openssl/crypto/evp/encode.c", - "//third_party/openssl/crypto/evp/evp_cnf.c", - "//third_party/openssl/crypto/evp/evp_enc.c", - "//third_party/openssl/crypto/evp/evp_err.c", - "//third_party/openssl/crypto/evp/evp_fetch.c", - "//third_party/openssl/crypto/evp/evp_key.c", - "//third_party/openssl/crypto/evp/evp_lib.c", - "//third_party/openssl/crypto/evp/evp_pbe.c", - "//third_party/openssl/crypto/evp/evp_pkey.c", - "//third_party/openssl/crypto/evp/evp_rand.c", - "//third_party/openssl/crypto/evp/evp_utils.c", - "//third_party/openssl/crypto/evp/exchange.c", - "//third_party/openssl/crypto/evp/kdf_lib.c", - "//third_party/openssl/crypto/evp/kdf_meth.c", - "//third_party/openssl/crypto/evp/kem.c", - "//third_party/openssl/crypto/evp/keymgmt_lib.c", - "//third_party/openssl/crypto/evp/keymgmt_meth.c", - "//third_party/openssl/crypto/evp/legacy_blake2.c", - "//third_party/openssl/crypto/evp/legacy_md4.c", - "//third_party/openssl/crypto/evp/legacy_md5.c", - "//third_party/openssl/crypto/evp/legacy_md5_sha1.c", - "//third_party/openssl/crypto/evp/legacy_mdc2.c", - "//third_party/openssl/crypto/evp/legacy_ripemd.c", - "//third_party/openssl/crypto/evp/legacy_sha.c", - "//third_party/openssl/crypto/evp/legacy_wp.c", - "//third_party/openssl/crypto/evp/m_null.c", - "//third_party/openssl/crypto/evp/m_sigver.c", - "//third_party/openssl/crypto/evp/mac_lib.c", - "//third_party/openssl/crypto/evp/mac_meth.c", - "//third_party/openssl/crypto/evp/names.c", - "//third_party/openssl/crypto/evp/p5_crpt.c", - "//third_party/openssl/crypto/evp/p5_crpt2.c", - "//third_party/openssl/crypto/evp/p_dec.c", - "//third_party/openssl/crypto/evp/p_enc.c", - "//third_party/openssl/crypto/evp/p_legacy.c", - "//third_party/openssl/crypto/evp/p_lib.c", - "//third_party/openssl/crypto/evp/p_open.c", - "//third_party/openssl/crypto/evp/p_seal.c", - "//third_party/openssl/crypto/evp/p_sign.c", - "//third_party/openssl/crypto/evp/p_verify.c", - "//third_party/openssl/crypto/evp/pbe_scrypt.c", - "//third_party/openssl/crypto/evp/pmeth_check.c", - "//third_party/openssl/crypto/evp/pmeth_gn.c", - "//third_party/openssl/crypto/evp/pmeth_lib.c", - "//third_party/openssl/crypto/evp/signature.c", - "//third_party/openssl/crypto/ex_data.c", - "//third_party/openssl/crypto/ffc/ffc_backend.c", - "//third_party/openssl/crypto/ffc/ffc_dh.c", - "//third_party/openssl/crypto/ffc/ffc_key_generate.c", - "//third_party/openssl/crypto/ffc/ffc_key_validate.c", - "//third_party/openssl/crypto/ffc/ffc_params.c", - "//third_party/openssl/crypto/ffc/ffc_params_generate.c", - "//third_party/openssl/crypto/ffc/ffc_params_validate.c", - "//third_party/openssl/crypto/getenv.c", - "//third_party/openssl/crypto/hmac/hmac.c", - "//third_party/openssl/crypto/http/http_client.c", - "//third_party/openssl/crypto/http/http_err.c", - "//third_party/openssl/crypto/http/http_lib.c", - "//third_party/openssl/crypto/idea/i_cbc.c", - "//third_party/openssl/crypto/idea/i_cfb64.c", - "//third_party/openssl/crypto/idea/i_ecb.c", - "//third_party/openssl/crypto/idea/i_ofb64.c", - "//third_party/openssl/crypto/idea/i_skey.c", - "//third_party/openssl/crypto/info.c", - "//third_party/openssl/crypto/init.c", - "//third_party/openssl/crypto/initthread.c", - "//third_party/openssl/crypto/kdf/kdf_err.c", - "//third_party/openssl/crypto/lhash/lh_stats.c", - "//third_party/openssl/crypto/lhash/lhash.c", - "//third_party/openssl/crypto/md4/md4_dgst.c", - "//third_party/openssl/crypto/md4/md4_one.c", - "//third_party/openssl/crypto/md5/md5_dgst.c", - "//third_party/openssl/crypto/md5/md5_one.c", - "//third_party/openssl/crypto/md5/md5_sha1.c", - "//third_party/openssl/crypto/mdc2/mdc2_one.c", - "//third_party/openssl/crypto/mdc2/mdc2dgst.c", - "//third_party/openssl/crypto/mem.c", - "//third_party/openssl/crypto/mem_sec.c", - "//third_party/openssl/crypto/modes/cbc128.c", - "//third_party/openssl/crypto/modes/ccm128.c", - "//third_party/openssl/crypto/modes/cfb128.c", - "//third_party/openssl/crypto/modes/ctr128.c", - "//third_party/openssl/crypto/modes/cts128.c", - "//third_party/openssl/crypto/modes/gcm128.c", - "//third_party/openssl/crypto/modes/ocb128.c", - "//third_party/openssl/crypto/modes/ofb128.c", - "//third_party/openssl/crypto/modes/siv128.c", - "//third_party/openssl/crypto/modes/wrap128.c", - "//third_party/openssl/crypto/modes/xts128.c", - "//third_party/openssl/crypto/o_dir.c", - "//third_party/openssl/crypto/o_fopen.c", - "//third_party/openssl/crypto/o_init.c", - "//third_party/openssl/crypto/o_str.c", - "//third_party/openssl/crypto/o_time.c", - "//third_party/openssl/crypto/objects/o_names.c", - "//third_party/openssl/crypto/objects/obj_dat.c", - "//third_party/openssl/crypto/objects/obj_err.c", - "//third_party/openssl/crypto/objects/obj_lib.c", - "//third_party/openssl/crypto/objects/obj_xref.c", - "//third_party/openssl/crypto/ocsp/ocsp_asn.c", - "//third_party/openssl/crypto/ocsp/ocsp_cl.c", - "//third_party/openssl/crypto/ocsp/ocsp_err.c", - "//third_party/openssl/crypto/ocsp/ocsp_ext.c", - "//third_party/openssl/crypto/ocsp/ocsp_http.c", - "//third_party/openssl/crypto/ocsp/ocsp_lib.c", - "//third_party/openssl/crypto/ocsp/ocsp_prn.c", - "//third_party/openssl/crypto/ocsp/ocsp_srv.c", - "//third_party/openssl/crypto/ocsp/ocsp_vfy.c", - "//third_party/openssl/crypto/ocsp/v3_ocsp.c", - "//third_party/openssl/crypto/packet.c", - "//third_party/openssl/crypto/param_build.c", - "//third_party/openssl/crypto/param_build_set.c", - "//third_party/openssl/crypto/params.c", - "//third_party/openssl/crypto/params_dup.c", - "//third_party/openssl/crypto/params_from_text.c", - "//third_party/openssl/crypto/passphrase.c", - "//third_party/openssl/crypto/pem/pem_all.c", - "//third_party/openssl/crypto/pem/pem_err.c", - "//third_party/openssl/crypto/pem/pem_info.c", - "//third_party/openssl/crypto/pem/pem_lib.c", - "//third_party/openssl/crypto/pem/pem_oth.c", - "//third_party/openssl/crypto/pem/pem_pk8.c", - "//third_party/openssl/crypto/pem/pem_pkey.c", - "//third_party/openssl/crypto/pem/pem_sign.c", - "//third_party/openssl/crypto/pem/pem_x509.c", - "//third_party/openssl/crypto/pem/pem_xaux.c", - "//third_party/openssl/crypto/pem/pvkfmt.c", - "//third_party/openssl/crypto/pkcs12/p12_add.c", - "//third_party/openssl/crypto/pkcs12/p12_asn.c", - "//third_party/openssl/crypto/pkcs12/p12_attr.c", - "//third_party/openssl/crypto/pkcs12/p12_crpt.c", - "//third_party/openssl/crypto/pkcs12/p12_crt.c", - "//third_party/openssl/crypto/pkcs12/p12_decr.c", - "//third_party/openssl/crypto/pkcs12/p12_init.c", - "//third_party/openssl/crypto/pkcs12/p12_key.c", - "//third_party/openssl/crypto/pkcs12/p12_kiss.c", - "//third_party/openssl/crypto/pkcs12/p12_mutl.c", - "//third_party/openssl/crypto/pkcs12/p12_npas.c", - "//third_party/openssl/crypto/pkcs12/p12_p8d.c", - "//third_party/openssl/crypto/pkcs12/p12_p8e.c", - "//third_party/openssl/crypto/pkcs12/p12_sbag.c", - "//third_party/openssl/crypto/pkcs12/p12_utl.c", - "//third_party/openssl/crypto/pkcs12/pk12err.c", - "//third_party/openssl/crypto/pkcs7/bio_pk7.c", - "//third_party/openssl/crypto/pkcs7/pk7_asn1.c", - "//third_party/openssl/crypto/pkcs7/pk7_attr.c", - "//third_party/openssl/crypto/pkcs7/pk7_doit.c", - "//third_party/openssl/crypto/pkcs7/pk7_lib.c", - "//third_party/openssl/crypto/pkcs7/pk7_mime.c", - "//third_party/openssl/crypto/pkcs7/pk7_smime.c", - "//third_party/openssl/crypto/pkcs7/pkcs7err.c", - "//third_party/openssl/crypto/poly1305/poly1305.c", - "//third_party/openssl/crypto/property/defn_cache.c", - "//third_party/openssl/crypto/property/property.c", - "//third_party/openssl/crypto/property/property_err.c", - "//third_party/openssl/crypto/property/property_parse.c", - "//third_party/openssl/crypto/property/property_query.c", - "//third_party/openssl/crypto/property/property_string.c", - "//third_party/openssl/crypto/provider.c", - "//third_party/openssl/crypto/provider_child.c", - "//third_party/openssl/crypto/provider_conf.c", - "//third_party/openssl/crypto/provider_core.c", - "//third_party/openssl/crypto/provider_predefined.c", - "//third_party/openssl/crypto/punycode.c", - "//third_party/openssl/crypto/rand/prov_seed.c", - "//third_party/openssl/crypto/rand/rand_deprecated.c", - "//third_party/openssl/crypto/rand/rand_err.c", - "//third_party/openssl/crypto/rand/rand_lib.c", - "//third_party/openssl/crypto/rand/rand_meth.c", - "//third_party/openssl/crypto/rand/rand_pool.c", - "//third_party/openssl/crypto/rand/randfile.c", - "//third_party/openssl/crypto/rc2/rc2_cbc.c", - "//third_party/openssl/crypto/rc2/rc2_ecb.c", - "//third_party/openssl/crypto/rc2/rc2_skey.c", - "//third_party/openssl/crypto/rc2/rc2cfb64.c", - "//third_party/openssl/crypto/rc2/rc2ofb64.c", - "//third_party/openssl/crypto/ripemd/rmd_dgst.c", - "//third_party/openssl/crypto/ripemd/rmd_one.c", - "//third_party/openssl/crypto/rsa/rsa_ameth.c", - "//third_party/openssl/crypto/rsa/rsa_asn1.c", - "//third_party/openssl/crypto/rsa/rsa_backend.c", - "//third_party/openssl/crypto/rsa/rsa_chk.c", - "//third_party/openssl/crypto/rsa/rsa_crpt.c", - "//third_party/openssl/crypto/rsa/rsa_depr.c", - "//third_party/openssl/crypto/rsa/rsa_err.c", - "//third_party/openssl/crypto/rsa/rsa_gen.c", - "//third_party/openssl/crypto/rsa/rsa_lib.c", - "//third_party/openssl/crypto/rsa/rsa_meth.c", - "//third_party/openssl/crypto/rsa/rsa_mp.c", - "//third_party/openssl/crypto/rsa/rsa_mp_names.c", - "//third_party/openssl/crypto/rsa/rsa_none.c", - "//third_party/openssl/crypto/rsa/rsa_oaep.c", - "//third_party/openssl/crypto/rsa/rsa_ossl.c", - "//third_party/openssl/crypto/rsa/rsa_pk1.c", - "//third_party/openssl/crypto/rsa/rsa_pmeth.c", - "//third_party/openssl/crypto/rsa/rsa_prn.c", - "//third_party/openssl/crypto/rsa/rsa_pss.c", - "//third_party/openssl/crypto/rsa/rsa_saos.c", - "//third_party/openssl/crypto/rsa/rsa_schemes.c", - "//third_party/openssl/crypto/rsa/rsa_sign.c", - "//third_party/openssl/crypto/rsa/rsa_sp800_56b_check.c", - "//third_party/openssl/crypto/rsa/rsa_sp800_56b_gen.c", - "//third_party/openssl/crypto/rsa/rsa_x931.c", - "//third_party/openssl/crypto/rsa/rsa_x931g.c", - "//third_party/openssl/crypto/seed/seed.c", - "//third_party/openssl/crypto/seed/seed_cbc.c", - "//third_party/openssl/crypto/seed/seed_cfb.c", - "//third_party/openssl/crypto/seed/seed_ecb.c", - "//third_party/openssl/crypto/seed/seed_ofb.c", - "//third_party/openssl/crypto/self_test_core.c", - "//third_party/openssl/crypto/sha/sha1_one.c", - "//third_party/openssl/crypto/sha/sha1dgst.c", - "//third_party/openssl/crypto/sha/sha256.c", - "//third_party/openssl/crypto/sha/sha3.c", - "//third_party/openssl/crypto/sha/sha512.c", - "//third_party/openssl/crypto/siphash/siphash.c", - "//third_party/openssl/crypto/sm2/sm2_crypt.c", - "//third_party/openssl/crypto/sm2/sm2_err.c", - "//third_party/openssl/crypto/sm2/sm2_key.c", - "//third_party/openssl/crypto/sm2/sm2_sign.c", - "//third_party/openssl/crypto/sm3/legacy_sm3.c", - "//third_party/openssl/crypto/sm3/sm3.c", - "//third_party/openssl/crypto/sm4/sm4.c", - "//third_party/openssl/crypto/sparse_array.c", - "//third_party/openssl/crypto/srp/srp_lib.c", - "//third_party/openssl/crypto/srp/srp_vfy.c", - "//third_party/openssl/crypto/stack/stack.c", - "//third_party/openssl/crypto/store/store_err.c", - "//third_party/openssl/crypto/store/store_init.c", - "//third_party/openssl/crypto/store/store_lib.c", - "//third_party/openssl/crypto/store/store_meth.c", - "//third_party/openssl/crypto/store/store_register.c", - "//third_party/openssl/crypto/store/store_result.c", - "//third_party/openssl/crypto/store/store_strings.c", - "//third_party/openssl/crypto/threads_lib.c", - "//third_party/openssl/crypto/threads_none.c", - "//third_party/openssl/crypto/threads_pthread.c", - "//third_party/openssl/crypto/threads_win.c", - "//third_party/openssl/crypto/trace.c", - "//third_party/openssl/crypto/ts/ts_asn1.c", - "//third_party/openssl/crypto/ts/ts_conf.c", - "//third_party/openssl/crypto/ts/ts_err.c", - "//third_party/openssl/crypto/ts/ts_lib.c", - "//third_party/openssl/crypto/ts/ts_req_print.c", - "//third_party/openssl/crypto/ts/ts_req_utils.c", - "//third_party/openssl/crypto/ts/ts_rsp_print.c", - "//third_party/openssl/crypto/ts/ts_rsp_sign.c", - "//third_party/openssl/crypto/ts/ts_rsp_utils.c", - "//third_party/openssl/crypto/ts/ts_rsp_verify.c", - "//third_party/openssl/crypto/ts/ts_verify_ctx.c", - "//third_party/openssl/crypto/txt_db/txt_db.c", - "//third_party/openssl/crypto/ui/ui_err.c", - "//third_party/openssl/crypto/ui/ui_lib.c", - "//third_party/openssl/crypto/ui/ui_null.c", - "//third_party/openssl/crypto/ui/ui_openssl.c", - "//third_party/openssl/crypto/ui/ui_util.c", - "//third_party/openssl/crypto/uid.c", - "//third_party/openssl/crypto/whrlpool/wp_dgst.c", - "//third_party/openssl/crypto/x509/by_dir.c", - "//third_party/openssl/crypto/x509/by_file.c", - "//third_party/openssl/crypto/x509/by_store.c", - "//third_party/openssl/crypto/x509/pcy_cache.c", - "//third_party/openssl/crypto/x509/pcy_data.c", - "//third_party/openssl/crypto/x509/pcy_lib.c", - "//third_party/openssl/crypto/x509/pcy_map.c", - "//third_party/openssl/crypto/x509/pcy_node.c", - "//third_party/openssl/crypto/x509/pcy_tree.c", - "//third_party/openssl/crypto/x509/t_crl.c", - "//third_party/openssl/crypto/x509/t_req.c", - "//third_party/openssl/crypto/x509/t_x509.c", - "//third_party/openssl/crypto/x509/v3_addr.c", - "//third_party/openssl/crypto/x509/v3_admis.c", - "//third_party/openssl/crypto/x509/v3_akeya.c", - "//third_party/openssl/crypto/x509/v3_akid.c", - "//third_party/openssl/crypto/x509/v3_asid.c", - "//third_party/openssl/crypto/x509/v3_bcons.c", - "//third_party/openssl/crypto/x509/v3_bitst.c", - "//third_party/openssl/crypto/x509/v3_conf.c", - "//third_party/openssl/crypto/x509/v3_cpols.c", - "//third_party/openssl/crypto/x509/v3_crld.c", - "//third_party/openssl/crypto/x509/v3_enum.c", - "//third_party/openssl/crypto/x509/v3_extku.c", - "//third_party/openssl/crypto/x509/v3_genn.c", - "//third_party/openssl/crypto/x509/v3_ia5.c", - "//third_party/openssl/crypto/x509/v3_info.c", - "//third_party/openssl/crypto/x509/v3_int.c", - "//third_party/openssl/crypto/x509/v3_ist.c", - "//third_party/openssl/crypto/x509/v3_lib.c", - "//third_party/openssl/crypto/x509/v3_ncons.c", - "//third_party/openssl/crypto/x509/v3_pci.c", - "//third_party/openssl/crypto/x509/v3_pcia.c", - "//third_party/openssl/crypto/x509/v3_pcons.c", - "//third_party/openssl/crypto/x509/v3_pku.c", - "//third_party/openssl/crypto/x509/v3_pmaps.c", - "//third_party/openssl/crypto/x509/v3_prn.c", - "//third_party/openssl/crypto/x509/v3_purp.c", - "//third_party/openssl/crypto/x509/v3_san.c", - "//third_party/openssl/crypto/x509/v3_skid.c", - "//third_party/openssl/crypto/x509/v3_sxnet.c", - "//third_party/openssl/crypto/x509/v3_tlsf.c", - "//third_party/openssl/crypto/x509/v3_utf8.c", - "//third_party/openssl/crypto/x509/v3_utl.c", - "//third_party/openssl/crypto/x509/v3err.c", - "//third_party/openssl/crypto/x509/x509_att.c", - "//third_party/openssl/crypto/x509/x509_cmp.c", - "//third_party/openssl/crypto/x509/x509_d2.c", - "//third_party/openssl/crypto/x509/x509_def.c", - "//third_party/openssl/crypto/x509/x509_err.c", - "//third_party/openssl/crypto/x509/x509_ext.c", - "//third_party/openssl/crypto/x509/x509_lu.c", - "//third_party/openssl/crypto/x509/x509_meth.c", - "//third_party/openssl/crypto/x509/x509_obj.c", - "//third_party/openssl/crypto/x509/x509_r2x.c", - "//third_party/openssl/crypto/x509/x509_req.c", - "//third_party/openssl/crypto/x509/x509_set.c", - "//third_party/openssl/crypto/x509/x509_trust.c", - "//third_party/openssl/crypto/x509/x509_txt.c", - "//third_party/openssl/crypto/x509/x509_v3.c", - "//third_party/openssl/crypto/x509/x509_vfy.c", - "//third_party/openssl/crypto/x509/x509_vpm.c", - "//third_party/openssl/crypto/x509/x509cset.c", - "//third_party/openssl/crypto/x509/x509name.c", - "//third_party/openssl/crypto/x509/x509rset.c", - "//third_party/openssl/crypto/x509/x509spki.c", - "//third_party/openssl/crypto/x509/x509type.c", - "//third_party/openssl/crypto/x509/x_all.c", - "//third_party/openssl/crypto/x509/x_attrib.c", - "//third_party/openssl/crypto/x509/x_crl.c", - "//third_party/openssl/crypto/x509/x_exten.c", - "//third_party/openssl/crypto/x509/x_name.c", - "//third_party/openssl/crypto/x509/x_pubkey.c", - "//third_party/openssl/crypto/x509/x_req.c", - "//third_party/openssl/crypto/x509/x_x509.c", - "//third_party/openssl/crypto/x509/x_x509a.c", - "//third_party/openssl/engines/e_capi.c", - "//third_party/openssl/engines/e_padlock.c", - "//third_party/openssl/providers/baseprov.c", - "//third_party/openssl/providers/defltprov.c", - "//third_party/openssl/providers/legacyprov.c", - "//third_party/openssl/providers/nullprov.c", - "//third_party/openssl/providers/prov_running.c", + # 升级修改适配检查点10 内部公共编译选项宏列表 + crypto_config_common_cflags = [ + "-Wa,--noexecstack", + "-DNDEBUG", + "-DOPENSSL_BUILDING_OPENSSL", + "-DOPENSSL_CPUID_OBJ", + "-DOPENSSL_PIC", + + # use `openssl version -a` cmd to see runtime OPENSSLDIR, ENGINESDIR, MODULESDIR value + + # the origin value generated by Configure + # linux-armv4, linux-aarch64, darwin64-x86_64-cc, darwin64-arm64-cc + # /usr/local/lib/engines-3 + # linux-x86_64, mingw64 + # /usr/local/lib64/engines-3 + "-DENGINESDIR=\"\"", + + # the origin value generated by Configure + # linux-armv4, linux-aarch64, darwin64-x86_64-cc, darwin64-arm64-cc + # /usr/local/lib/ossl-modules + # linux-x86_64, mingw64 + # /usr/local/lib64/ossl-modules + "-DMODULESDIR=\"\"", + + # the origin value generated by Configure + # /usr/local/ssl + # we set the variable as the following to locate openssl.cnf + "-DOPENSSLDIR=\"/system/etc\"", + + "-DSTATIC_LEGACY", ] - sources += libcommon_common_sources - sources += libcommon_build_all_generated_selected_platform_sources - sources += libdefault_common_sources - sources += libdefault_build_all_generated_selected_platform_sources - sources += libcrypto_build_all_generated_selected_platform_sources - sources += liblegacy_sources + # 升级修改适配检查点11 内部不同平台编译选项列表 + crypto_config_linux_armv4_cflags = [ + "-DOPENSSL_USE_NODELETE", + "-fPIC", + "-pthread", + + "-DAES_ASM", + "-DBSAES_ASM", + "-DECP_NISTZ256_ASM", + "-DGHASH_ASM", + "-DKECCAK1600_ASM", + "-DOPENSSL_BN_ASM_GF2m", + "-DOPENSSL_BN_ASM_MONT", + "-DPOLY1305_ASM", + "-DSHA1_ASM", + "-DSHA256_ASM", + "-DSHA512_ASM", + ] + + # 升级修改适配检查点12 内部不同平台编译选项列表 + crypto_config_linux_aarch64_cflags = [ + "-DOPENSSL_USE_NODELETE", + "-fPIC", + "-pthread", + + "-DECP_NISTZ256_ASM", + "-DKECCAK1600_ASM", + "-DOPENSSL_BN_ASM_MONT", + "-DPOLY1305_ASM", + "-DSHA1_ASM", + "-DSHA256_ASM", + "-DSHA512_ASM", + "-DVPAES_ASM", + ] + + # 升级修改适配检查点13 内部不同平台编译选项列表 + crypto_config_darwin64_x86_64_cc_cflags = [ + "-fPIC", + "-DL_ENDIAN", + "-D_REENTRANT", + "-DOPENSSL_IA32_SSE2", + + "-DAES_ASM", + "-DBSAES_ASM", + "-DCMLL_ASM", + "-DECP_NISTZ256_ASM", + "-DGHASH_ASM", + "-DKECCAK1600_ASM", + "-DMD5_ASM", + "-DOPENSSL_BN_ASM_GF2m", + "-DOPENSSL_BN_ASM_MONT", + "-DOPENSSL_BN_ASM_MONT5", + "-DPADLOCK_ASM", + "-DPOLY1305_ASM", + "-DSHA1_ASM", + "-DSHA256_ASM", + "-DSHA512_ASM", + "-DVPAES_ASM", + "-DWHIRLPOOL_ASM", + "-DX25519_ASM", + ] + + # 升级修改适配检查点14 内部不同平台编译选项列表 + crypto_config_darwin64_arm64_cc_cflags = [ + "-DL_ENDIAN", + "-D_REENTRANT", + "-fPIC", + + "-DECP_NISTZ256_ASM", + "-DKECCAK1600_ASM", + "-DOPENSSL_BN_ASM_MONT", + "-DPOLY1305_ASM", + "-DSHA1_ASM", + "-DSHA256_ASM", + "-DSHA512_ASM", + "-DVPAES_ASM", + ] + + # 升级修改适配检查点15 内部不同平台编译选项列表 + crypto_config_linux_x86_64_cflags = [ + "-DL_ENDIAN", + "-DOPENSSL_IA32_SSE2", + "-DOPENSSL_USE_NODELETE", + "-fPIC", + "-m64", + "-pthread", + + "-DAES_ASM", + "-DBSAES_ASM", + "-DCMLL_ASM", + "-DECP_NISTZ256_ASM", + "-DGHASH_ASM", + "-DKECCAK1600_ASM", + "-DMD5_ASM", + "-DOPENSSL_BN_ASM_GF2m", + "-DOPENSSL_BN_ASM_MONT", + "-DOPENSSL_BN_ASM_MONT5", + "-DPADLOCK_ASM", + "-DPOLY1305_ASM", + "-DSHA1_ASM", + "-DSHA256_ASM", + "-DSHA512_ASM", + "-DVPAES_ASM", + "-DWHIRLPOOL_ASM", + "-DX25519_ASM", + ] + + # 升级修改适配检查点16 内部不同平台编译选项列表 + crypto_config_mingw64_cflags = [ + "-D_MT", + "-D_UNICODE", + "-DL_ENDIAN", + "-DOPENSSL_IA32_SSE2", + "-DUNICODE", + "-DWIN32_LEAN_AND_MEAN", + "-m64", + + "-DAES_ASM", + "-DBSAES_ASM", + "-DCMLL_ASM", + "-DECP_NISTZ256_ASM", + "-DGHASH_ASM", + "-DKECCAK1600_ASM", + "-DMD5_ASM", + "-DOPENSSL_BN_ASM_GF2m", + "-DOPENSSL_BN_ASM_MONT", + "-DOPENSSL_BN_ASM_MONT5", + "-DPADLOCK_ASM", + "-DPOLY1305_ASM", + "-DSHA1_ASM", + "-DSHA256_ASM", + "-DSHA512_ASM", + "-DVPAES_ASM", + "-DWHIRLPOOL_ASM", + "-DX25519_ASM", + ] + + crypto_config_current_platform_cflags = [] if (openssl_selected_platform == "linux-armv4") { - # 升级修改适配检查点21 libcrypto 不同平台c源码列表 - sources += [ - "//third_party/openssl/crypto/aes/aes_cbc.c", - "//third_party/openssl/crypto/armcap.c", - "//third_party/openssl/crypto/bn/bn_asm.c", - "//third_party/openssl/crypto/camellia/camellia.c", - "//third_party/openssl/crypto/camellia/cmll_cbc.c", - "//third_party/openssl/crypto/rc4/rc4_enc.c", - "//third_party/openssl/crypto/rc4/rc4_skey.c", - "//third_party/openssl/crypto/whrlpool/wp_block.c", - "//third_party/openssl/engines/e_afalg.c", - ] + crypto_config_current_platform_cflags += crypto_config_linux_armv4_cflags } else if (openssl_selected_platform == "linux-aarch64") { - # 升级修改适配检查点22 libcrypto 不同平台c源码列表 - sources += [ - "//third_party/openssl/crypto/aes/aes_cbc.c", - "//third_party/openssl/crypto/aes/aes_core.c", - "//third_party/openssl/crypto/armcap.c", - "//third_party/openssl/crypto/bn/bn_asm.c", - "//third_party/openssl/crypto/camellia/camellia.c", - "//third_party/openssl/crypto/camellia/cmll_cbc.c", - "//third_party/openssl/crypto/rc4/rc4_enc.c", - "//third_party/openssl/crypto/rc4/rc4_skey.c", - "//third_party/openssl/crypto/whrlpool/wp_block.c", - "//third_party/openssl/engines/e_afalg.c", - ] + crypto_config_current_platform_cflags += crypto_config_linux_aarch64_cflags } else if (openssl_selected_platform == "darwin64-x86_64-cc") { - # 升级修改适配检查点23 libcrypto 不同平台c源码列表 - sources += [ - "//third_party/openssl/crypto/bn/asm/x86_64-gcc.c", - "//third_party/openssl/crypto/bn/rsaz_exp.c", - "//third_party/openssl/crypto/bn/rsaz_exp_x2.c", - ] + crypto_config_current_platform_cflags += + crypto_config_darwin64_x86_64_cc_cflags } else if (openssl_selected_platform == "darwin64-arm64-cc") { - # 升级修改适配检查点24 libcrypto 不同平台c源码列表 - sources += [ - "//third_party/openssl/crypto/aes/aes_cbc.c", - "//third_party/openssl/crypto/aes/aes_core.c", - "//third_party/openssl/crypto/armcap.c", - "//third_party/openssl/crypto/bn/bn_asm.c", - "//third_party/openssl/crypto/camellia/camellia.c", - "//third_party/openssl/crypto/camellia/cmll_cbc.c", - "//third_party/openssl/crypto/rc4/rc4_enc.c", - "//third_party/openssl/crypto/rc4/rc4_skey.c", - "//third_party/openssl/crypto/whrlpool/wp_block.c", - ] + crypto_config_current_platform_cflags += + crypto_config_darwin64_arm64_cc_cflags } else if (openssl_selected_platform == "linux-x86_64") { - # 升级修改适配检查点25 libcrypto 不同平台c源码列表 - sources += [ - "//third_party/openssl/crypto/bn/asm/x86_64-gcc.c", - "//third_party/openssl/crypto/bn/rsaz_exp.c", - "//third_party/openssl/crypto/bn/rsaz_exp_x2.c", - "//third_party/openssl/engines/e_afalg.c", - ] + crypto_config_current_platform_cflags += crypto_config_linux_x86_64_cflags } else if (openssl_selected_platform == "mingw64") { - # 升级修改适配检查点26 libcrypto 不同平台c源码列表 - sources += [ - "//third_party/openssl/crypto/bn/asm/x86_64-gcc.c", - "//third_party/openssl/crypto/bn/rsaz_exp.c", - "//third_party/openssl/crypto/bn/rsaz_exp_x2.c", + crypto_config_current_platform_cflags += crypto_config_mingw64_cflags + } + + mingw32_libs_path = [] + mingw32_libs = [] + if (is_mingw || is_win) { + mingw32_libs_path += [ "//prebuilts/mingw-w64/ohos/linux-x86_64/clang-mingw/x86_64-w64-mingw32/lib" ] + mingw32_libs += [ + "ws2_32", + "crypt32", ] } - configs = [ ":crypto_config_private" ] - public_configs = [ ":crypto_config_public" ] - deps = [ ":openssl_build_all_generated" ] -} + config("crypto_config_private") { + include_dirs = crypto_config_common_private_include_dirs + cflags = crypto_config_common_cflags + crypto_config_current_platform_cflags + + openssl_internal_cflags + lib_dirs = mingw32_libs_path + libs = mingw32_libs + } -ohos_static_library("libcrypto_static") { - subsystem_name = "thirdparty" - part_name = "openssl" - deps = [ ":crypto_source" ] - public_configs = [ ":crypto_config_public" ] - complete_static_lib = true -} + config("crypto_config_public") { + include_dirs = crypto_config_common_public_include_dirs + libs = mingw32_libs + } + + # 升级修改适配检查点17 libcommon 原目录源码列表 + libcommon_common_sources = [ + "//third_party/openssl/providers/common/der/der_dsa_key.c", + "//third_party/openssl/providers/common/der/der_dsa_sig.c", + "//third_party/openssl/providers/common/der/der_ec_key.c", + "//third_party/openssl/providers/common/der/der_ec_sig.c", + "//third_party/openssl/providers/common/der/der_ecx_key.c", + "//third_party/openssl/providers/common/der/der_rsa_key.c", + "//third_party/openssl/providers/common/provider_ctx.c", + "//third_party/openssl/providers/common/provider_err.c", + "//third_party/openssl/providers/implementations/ciphers/ciphercommon.c", + "//third_party/openssl/providers/implementations/ciphers/ciphercommon_block.c", + "//third_party/openssl/providers/implementations/ciphers/ciphercommon_ccm.c", + "//third_party/openssl/providers/implementations/ciphers/ciphercommon_ccm_hw.c", + "//third_party/openssl/providers/implementations/ciphers/ciphercommon_gcm.c", + "//third_party/openssl/providers/implementations/ciphers/ciphercommon_gcm_hw.c", + "//third_party/openssl/providers/implementations/ciphers/ciphercommon_hw.c", + "//third_party/openssl/providers/implementations/digests/digestcommon.c", + "//third_party/openssl/ssl/record/tls_pad.c", + ] + + # 升级修改适配检查点18 libdefault 原目录源码列表 + libdefault_common_sources = [ + "//third_party/openssl/providers/common/bio_prov.c", + "//third_party/openssl/providers/common/capabilities.c", + "//third_party/openssl/providers/common/der/der_rsa_sig.c", + "//third_party/openssl/providers/common/der/der_sm2_key.c", + "//third_party/openssl/providers/common/der/der_sm2_sig.c", + "//third_party/openssl/providers/common/digest_to_nid.c", + "//third_party/openssl/providers/common/provider_seeding.c", + "//third_party/openssl/providers/common/provider_util.c", + "//third_party/openssl/providers/common/securitycheck.c", + "//third_party/openssl/providers/common/securitycheck_default.c", + "//third_party/openssl/providers/implementations/asymciphers/rsa_enc.c", + "//third_party/openssl/providers/implementations/asymciphers/sm2_enc.c", + "//third_party/openssl/providers/implementations/ciphers/cipher_aes.c", + "//third_party/openssl/providers/implementations/ciphers/cipher_aes_cbc_hmac_sha.c", + "//third_party/openssl/providers/implementations/ciphers/cipher_aes_cbc_hmac_sha1_hw.c", + "//third_party/openssl/providers/implementations/ciphers/cipher_aes_cbc_hmac_sha256_hw.c", + "//third_party/openssl/providers/implementations/ciphers/cipher_aes_ccm.c", + "//third_party/openssl/providers/implementations/ciphers/cipher_aes_ccm_hw.c", + "//third_party/openssl/providers/implementations/ciphers/cipher_aes_gcm.c", + "//third_party/openssl/providers/implementations/ciphers/cipher_aes_gcm_hw.c", + "//third_party/openssl/providers/implementations/ciphers/cipher_aes_hw.c", + "//third_party/openssl/providers/implementations/ciphers/cipher_aes_ocb.c", + "//third_party/openssl/providers/implementations/ciphers/cipher_aes_ocb_hw.c", + "//third_party/openssl/providers/implementations/ciphers/cipher_aes_siv.c", + "//third_party/openssl/providers/implementations/ciphers/cipher_aes_siv_hw.c", + "//third_party/openssl/providers/implementations/ciphers/cipher_aes_wrp.c", + "//third_party/openssl/providers/implementations/ciphers/cipher_aes_xts.c", + "//third_party/openssl/providers/implementations/ciphers/cipher_aes_xts_fips.c", + "//third_party/openssl/providers/implementations/ciphers/cipher_aes_xts_hw.c", + "//third_party/openssl/providers/implementations/ciphers/cipher_aria.c", + "//third_party/openssl/providers/implementations/ciphers/cipher_aria_ccm.c", + "//third_party/openssl/providers/implementations/ciphers/cipher_aria_ccm_hw.c", + "//third_party/openssl/providers/implementations/ciphers/cipher_aria_gcm.c", + "//third_party/openssl/providers/implementations/ciphers/cipher_aria_gcm_hw.c", + "//third_party/openssl/providers/implementations/ciphers/cipher_aria_hw.c", + "//third_party/openssl/providers/implementations/ciphers/cipher_camellia.c", + "//third_party/openssl/providers/implementations/ciphers/cipher_camellia_hw.c", + "//third_party/openssl/providers/implementations/ciphers/cipher_chacha20.c", + "//third_party/openssl/providers/implementations/ciphers/cipher_chacha20_hw.c", + "//third_party/openssl/providers/implementations/ciphers/cipher_chacha20_poly1305.c", + "//third_party/openssl/providers/implementations/ciphers/cipher_chacha20_poly1305_hw.c", + "//third_party/openssl/providers/implementations/ciphers/cipher_cts.c", + "//third_party/openssl/providers/implementations/ciphers/cipher_null.c", + "//third_party/openssl/providers/implementations/ciphers/cipher_sm4.c", + "//third_party/openssl/providers/implementations/ciphers/cipher_sm4_ccm.c", + "//third_party/openssl/providers/implementations/ciphers/cipher_sm4_ccm_hw.c", + "//third_party/openssl/providers/implementations/ciphers/cipher_sm4_gcm.c", + "//third_party/openssl/providers/implementations/ciphers/cipher_sm4_gcm_hw.c", + "//third_party/openssl/providers/implementations/ciphers/cipher_sm4_hw.c", + "//third_party/openssl/providers/implementations/ciphers/cipher_tdes.c", + "//third_party/openssl/providers/implementations/ciphers/cipher_tdes_common.c", + "//third_party/openssl/providers/implementations/ciphers/cipher_tdes_default.c", + "//third_party/openssl/providers/implementations/ciphers/cipher_tdes_default_hw.c", + "//third_party/openssl/providers/implementations/ciphers/cipher_tdes_hw.c", + "//third_party/openssl/providers/implementations/ciphers/cipher_tdes_wrap.c", + "//third_party/openssl/providers/implementations/ciphers/cipher_tdes_wrap_hw.c", + "//third_party/openssl/providers/implementations/digests/blake2_prov.c", + "//third_party/openssl/providers/implementations/digests/blake2b_prov.c", + "//third_party/openssl/providers/implementations/digests/blake2s_prov.c", + "//third_party/openssl/providers/implementations/digests/md5_prov.c", + "//third_party/openssl/providers/implementations/digests/md5_sha1_prov.c", + "//third_party/openssl/providers/implementations/digests/null_prov.c", + "//third_party/openssl/providers/implementations/digests/ripemd_prov.c", + "//third_party/openssl/providers/implementations/digests/sha2_prov.c", + "//third_party/openssl/providers/implementations/digests/sha3_prov.c", + "//third_party/openssl/providers/implementations/digests/sm3_prov.c", + "//third_party/openssl/providers/implementations/encode_decode/decode_der2key.c", + "//third_party/openssl/providers/implementations/encode_decode/decode_epki2pki.c", + "//third_party/openssl/providers/implementations/encode_decode/decode_msblob2key.c", + "//third_party/openssl/providers/implementations/encode_decode/decode_pem2der.c", + "//third_party/openssl/providers/implementations/encode_decode/decode_pvk2key.c", + "//third_party/openssl/providers/implementations/encode_decode/decode_spki2typespki.c", + "//third_party/openssl/providers/implementations/encode_decode/encode_key2any.c", + "//third_party/openssl/providers/implementations/encode_decode/encode_key2blob.c", + "//third_party/openssl/providers/implementations/encode_decode/encode_key2ms.c", + "//third_party/openssl/providers/implementations/encode_decode/encode_key2text.c", + "//third_party/openssl/providers/implementations/encode_decode/endecoder_common.c", + "//third_party/openssl/providers/implementations/exchange/dh_exch.c", + "//third_party/openssl/providers/implementations/exchange/ecdh_exch.c", + "//third_party/openssl/providers/implementations/exchange/ecx_exch.c", + "//third_party/openssl/providers/implementations/exchange/kdf_exch.c", + "//third_party/openssl/providers/implementations/kdfs/hkdf.c", + "//third_party/openssl/providers/implementations/kdfs/kbkdf.c", + "//third_party/openssl/providers/implementations/kdfs/krb5kdf.c", + "//third_party/openssl/providers/implementations/kdfs/pbkdf2.c", + "//third_party/openssl/providers/implementations/kdfs/pbkdf2_fips.c", + "//third_party/openssl/providers/implementations/kdfs/pkcs12kdf.c", + "//third_party/openssl/providers/implementations/kdfs/scrypt.c", + "//third_party/openssl/providers/implementations/kdfs/sshkdf.c", + "//third_party/openssl/providers/implementations/kdfs/sskdf.c", + "//third_party/openssl/providers/implementations/kdfs/tls1_prf.c", + "//third_party/openssl/providers/implementations/kdfs/x942kdf.c", + "//third_party/openssl/providers/implementations/kem/rsa_kem.c", + "//third_party/openssl/providers/implementations/keymgmt/dh_kmgmt.c", + "//third_party/openssl/providers/implementations/keymgmt/dsa_kmgmt.c", + "//third_party/openssl/providers/implementations/keymgmt/ec_kmgmt.c", + "//third_party/openssl/providers/implementations/keymgmt/ecx_kmgmt.c", + "//third_party/openssl/providers/implementations/keymgmt/kdf_legacy_kmgmt.c", + "//third_party/openssl/providers/implementations/keymgmt/mac_legacy_kmgmt.c", + "//third_party/openssl/providers/implementations/keymgmt/rsa_kmgmt.c", + "//third_party/openssl/providers/implementations/macs/blake2b_mac.c", + "//third_party/openssl/providers/implementations/macs/blake2s_mac.c", + "//third_party/openssl/providers/implementations/macs/cmac_prov.c", + "//third_party/openssl/providers/implementations/macs/gmac_prov.c", + "//third_party/openssl/providers/implementations/macs/hmac_prov.c", + "//third_party/openssl/providers/implementations/macs/kmac_prov.c", + "//third_party/openssl/providers/implementations/macs/poly1305_prov.c", + "//third_party/openssl/providers/implementations/macs/siphash_prov.c", + "//third_party/openssl/providers/implementations/rands/crngt.c", + "//third_party/openssl/providers/implementations/rands/drbg.c", + "//third_party/openssl/providers/implementations/rands/drbg_ctr.c", + "//third_party/openssl/providers/implementations/rands/drbg_hash.c", + "//third_party/openssl/providers/implementations/rands/drbg_hmac.c", + "//third_party/openssl/providers/implementations/rands/seed_src.c", + "//third_party/openssl/providers/implementations/rands/seeding/rand_cpu_x86.c", + "//third_party/openssl/providers/implementations/rands/seeding/rand_tsc.c", + "//third_party/openssl/providers/implementations/rands/seeding/rand_unix.c", + "//third_party/openssl/providers/implementations/rands/seeding/rand_win.c", + "//third_party/openssl/providers/implementations/rands/test_rng.c", + "//third_party/openssl/providers/implementations/signature/dsa_sig.c", + "//third_party/openssl/providers/implementations/signature/ecdsa_sig.c", + "//third_party/openssl/providers/implementations/signature/eddsa_sig.c", + "//third_party/openssl/providers/implementations/signature/mac_legacy_sig.c", + "//third_party/openssl/providers/implementations/signature/rsa_sig.c", + "//third_party/openssl/providers/implementations/signature/sm2_sig.c", + "//third_party/openssl/providers/implementations/storemgmt/file_store.c", + "//third_party/openssl/providers/implementations/storemgmt/file_store_any2obj.c", + "//third_party/openssl/ssl/s3_cbc.c", + ] + + # 升级修改适配检查点19 liblegacy 源码列表 + liblegacy_sources = [ + "//third_party/openssl/providers/implementations/ciphers/cipher_blowfish.c", + "//third_party/openssl/providers/implementations/ciphers/cipher_blowfish_hw.c", + "//third_party/openssl/providers/implementations/ciphers/cipher_cast5.c", + "//third_party/openssl/providers/implementations/ciphers/cipher_cast5_hw.c", + "//third_party/openssl/providers/implementations/ciphers/cipher_des.c", + "//third_party/openssl/providers/implementations/ciphers/cipher_des_hw.c", + "//third_party/openssl/providers/implementations/ciphers/cipher_desx.c", + "//third_party/openssl/providers/implementations/ciphers/cipher_desx_hw.c", + "//third_party/openssl/providers/implementations/ciphers/cipher_idea.c", + "//third_party/openssl/providers/implementations/ciphers/cipher_idea_hw.c", + "//third_party/openssl/providers/implementations/ciphers/cipher_rc2.c", + "//third_party/openssl/providers/implementations/ciphers/cipher_rc2_hw.c", + "//third_party/openssl/providers/implementations/ciphers/cipher_rc4.c", + "//third_party/openssl/providers/implementations/ciphers/cipher_rc4_hmac_md5.c", + "//third_party/openssl/providers/implementations/ciphers/cipher_rc4_hmac_md5_hw.c", + "//third_party/openssl/providers/implementations/ciphers/cipher_rc4_hw.c", + "//third_party/openssl/providers/implementations/ciphers/cipher_seed.c", + "//third_party/openssl/providers/implementations/ciphers/cipher_seed_hw.c", + "//third_party/openssl/providers/implementations/digests/md4_prov.c", + "//third_party/openssl/providers/implementations/digests/mdc2_prov.c", + "//third_party/openssl/providers/implementations/digests/wp_prov.c", + "//third_party/openssl/providers/implementations/kdfs/pbkdf1.c", + ] + + ohos_source_set("crypto_source") { + subsystem_name = "thirdparty" + part_name = "openssl" + + # 升级修改适配检查点20 libcrypto 原目录源码列表 + sources = [ + "//third_party/openssl/crypto/aes/aes_cfb.c", + "//third_party/openssl/crypto/aes/aes_ecb.c", + "//third_party/openssl/crypto/aes/aes_ige.c", + "//third_party/openssl/crypto/aes/aes_misc.c", + "//third_party/openssl/crypto/aes/aes_ofb.c", + "//third_party/openssl/crypto/aes/aes_wrap.c", + "//third_party/openssl/crypto/aria/aria.c", + "//third_party/openssl/crypto/asn1/a_bitstr.c", + "//third_party/openssl/crypto/asn1/a_d2i_fp.c", + "//third_party/openssl/crypto/asn1/a_digest.c", + "//third_party/openssl/crypto/asn1/a_dup.c", + "//third_party/openssl/crypto/asn1/a_gentm.c", + "//third_party/openssl/crypto/asn1/a_i2d_fp.c", + "//third_party/openssl/crypto/asn1/a_int.c", + "//third_party/openssl/crypto/asn1/a_mbstr.c", + "//third_party/openssl/crypto/asn1/a_object.c", + "//third_party/openssl/crypto/asn1/a_octet.c", + "//third_party/openssl/crypto/asn1/a_print.c", + "//third_party/openssl/crypto/asn1/a_sign.c", + "//third_party/openssl/crypto/asn1/a_strex.c", + "//third_party/openssl/crypto/asn1/a_strnid.c", + "//third_party/openssl/crypto/asn1/a_time.c", + "//third_party/openssl/crypto/asn1/a_type.c", + "//third_party/openssl/crypto/asn1/a_utctm.c", + "//third_party/openssl/crypto/asn1/a_utf8.c", + "//third_party/openssl/crypto/asn1/a_verify.c", + "//third_party/openssl/crypto/asn1/ameth_lib.c", + "//third_party/openssl/crypto/asn1/asn1_err.c", + "//third_party/openssl/crypto/asn1/asn1_gen.c", + "//third_party/openssl/crypto/asn1/asn1_item_list.c", + "//third_party/openssl/crypto/asn1/asn1_lib.c", + "//third_party/openssl/crypto/asn1/asn1_parse.c", + "//third_party/openssl/crypto/asn1/asn_mime.c", + "//third_party/openssl/crypto/asn1/asn_moid.c", + "//third_party/openssl/crypto/asn1/asn_mstbl.c", + "//third_party/openssl/crypto/asn1/asn_pack.c", + "//third_party/openssl/crypto/asn1/bio_asn1.c", + "//third_party/openssl/crypto/asn1/bio_ndef.c", + "//third_party/openssl/crypto/asn1/d2i_param.c", + "//third_party/openssl/crypto/asn1/d2i_pr.c", + "//third_party/openssl/crypto/asn1/d2i_pu.c", + "//third_party/openssl/crypto/asn1/evp_asn1.c", + "//third_party/openssl/crypto/asn1/f_int.c", + "//third_party/openssl/crypto/asn1/f_string.c", + "//third_party/openssl/crypto/asn1/i2d_evp.c", + "//third_party/openssl/crypto/asn1/n_pkey.c", + "//third_party/openssl/crypto/asn1/nsseq.c", + "//third_party/openssl/crypto/asn1/p5_pbe.c", + "//third_party/openssl/crypto/asn1/p5_pbev2.c", + "//third_party/openssl/crypto/asn1/p5_scrypt.c", + "//third_party/openssl/crypto/asn1/p8_pkey.c", + "//third_party/openssl/crypto/asn1/t_bitst.c", + "//third_party/openssl/crypto/asn1/t_pkey.c", + "//third_party/openssl/crypto/asn1/t_spki.c", + "//third_party/openssl/crypto/asn1/tasn_dec.c", + "//third_party/openssl/crypto/asn1/tasn_enc.c", + "//third_party/openssl/crypto/asn1/tasn_fre.c", + "//third_party/openssl/crypto/asn1/tasn_new.c", + "//third_party/openssl/crypto/asn1/tasn_prn.c", + "//third_party/openssl/crypto/asn1/tasn_scn.c", + "//third_party/openssl/crypto/asn1/tasn_typ.c", + "//third_party/openssl/crypto/asn1/tasn_utl.c", + "//third_party/openssl/crypto/asn1/x_algor.c", + "//third_party/openssl/crypto/asn1/x_bignum.c", + "//third_party/openssl/crypto/asn1/x_info.c", + "//third_party/openssl/crypto/asn1/x_int64.c", + "//third_party/openssl/crypto/asn1/x_long.c", + "//third_party/openssl/crypto/asn1/x_pkey.c", + "//third_party/openssl/crypto/asn1/x_sig.c", + "//third_party/openssl/crypto/asn1/x_spki.c", + "//third_party/openssl/crypto/asn1/x_val.c", + "//third_party/openssl/crypto/asn1_dsa.c", + "//third_party/openssl/crypto/async/arch/async_null.c", + "//third_party/openssl/crypto/async/arch/async_posix.c", + "//third_party/openssl/crypto/async/arch/async_win.c", + "//third_party/openssl/crypto/async/async.c", + "//third_party/openssl/crypto/async/async_err.c", + "//third_party/openssl/crypto/async/async_wait.c", + "//third_party/openssl/crypto/bf/bf_cfb64.c", + "//third_party/openssl/crypto/bf/bf_ecb.c", + "//third_party/openssl/crypto/bf/bf_enc.c", + "//third_party/openssl/crypto/bf/bf_ofb64.c", + "//third_party/openssl/crypto/bf/bf_skey.c", + "//third_party/openssl/crypto/bio/bf_buff.c", + "//third_party/openssl/crypto/bio/bf_lbuf.c", + "//third_party/openssl/crypto/bio/bf_nbio.c", + "//third_party/openssl/crypto/bio/bf_null.c", + "//third_party/openssl/crypto/bio/bf_prefix.c", + "//third_party/openssl/crypto/bio/bf_readbuff.c", + "//third_party/openssl/crypto/bio/bio_addr.c", + "//third_party/openssl/crypto/bio/bio_cb.c", + "//third_party/openssl/crypto/bio/bio_dump.c", + "//third_party/openssl/crypto/bio/bio_err.c", + "//third_party/openssl/crypto/bio/bio_lib.c", + "//third_party/openssl/crypto/bio/bio_meth.c", + "//third_party/openssl/crypto/bio/bio_print.c", + "//third_party/openssl/crypto/bio/bio_sock.c", + "//third_party/openssl/crypto/bio/bio_sock2.c", + "//third_party/openssl/crypto/bio/bss_acpt.c", + "//third_party/openssl/crypto/bio/bss_bio.c", + "//third_party/openssl/crypto/bio/bss_conn.c", + "//third_party/openssl/crypto/bio/bss_core.c", + "//third_party/openssl/crypto/bio/bss_dgram.c", + "//third_party/openssl/crypto/bio/bss_fd.c", + "//third_party/openssl/crypto/bio/bss_file.c", + "//third_party/openssl/crypto/bio/bss_log.c", + "//third_party/openssl/crypto/bio/bss_mem.c", + "//third_party/openssl/crypto/bio/bss_null.c", + "//third_party/openssl/crypto/bio/bss_sock.c", + "//third_party/openssl/crypto/bio/ossl_core_bio.c", + "//third_party/openssl/crypto/bn/bn_add.c", + "//third_party/openssl/crypto/bn/bn_blind.c", + "//third_party/openssl/crypto/bn/bn_const.c", + "//third_party/openssl/crypto/bn/bn_conv.c", + "//third_party/openssl/crypto/bn/bn_ctx.c", + "//third_party/openssl/crypto/bn/bn_depr.c", + "//third_party/openssl/crypto/bn/bn_dh.c", + "//third_party/openssl/crypto/bn/bn_div.c", + "//third_party/openssl/crypto/bn/bn_err.c", + "//third_party/openssl/crypto/bn/bn_exp.c", + "//third_party/openssl/crypto/bn/bn_exp2.c", + "//third_party/openssl/crypto/bn/bn_gcd.c", + "//third_party/openssl/crypto/bn/bn_gf2m.c", + "//third_party/openssl/crypto/bn/bn_intern.c", + "//third_party/openssl/crypto/bn/bn_kron.c", + "//third_party/openssl/crypto/bn/bn_lib.c", + "//third_party/openssl/crypto/bn/bn_mod.c", + "//third_party/openssl/crypto/bn/bn_mont.c", + "//third_party/openssl/crypto/bn/bn_mpi.c", + "//third_party/openssl/crypto/bn/bn_mul.c", + "//third_party/openssl/crypto/bn/bn_nist.c", + "//third_party/openssl/crypto/bn/bn_prime.c", + "//third_party/openssl/crypto/bn/bn_print.c", + "//third_party/openssl/crypto/bn/bn_rand.c", + "//third_party/openssl/crypto/bn/bn_recp.c", + "//third_party/openssl/crypto/bn/bn_rsa_fips186_4.c", + "//third_party/openssl/crypto/bn/bn_shift.c", + "//third_party/openssl/crypto/bn/bn_sqr.c", + "//third_party/openssl/crypto/bn/bn_sqrt.c", + "//third_party/openssl/crypto/bn/bn_srp.c", + "//third_party/openssl/crypto/bn/bn_word.c", + "//third_party/openssl/crypto/bn/bn_x931p.c", + "//third_party/openssl/crypto/bsearch.c", + "//third_party/openssl/crypto/buffer/buf_err.c", + "//third_party/openssl/crypto/buffer/buffer.c", + "//third_party/openssl/crypto/camellia/cmll_cfb.c", + "//third_party/openssl/crypto/camellia/cmll_ctr.c", + "//third_party/openssl/crypto/camellia/cmll_ecb.c", + "//third_party/openssl/crypto/camellia/cmll_misc.c", + "//third_party/openssl/crypto/camellia/cmll_ofb.c", + "//third_party/openssl/crypto/cast/c_cfb64.c", + "//third_party/openssl/crypto/cast/c_ecb.c", + "//third_party/openssl/crypto/cast/c_enc.c", + "//third_party/openssl/crypto/cast/c_ofb64.c", + "//third_party/openssl/crypto/cast/c_skey.c", + "//third_party/openssl/crypto/cmac/cmac.c", + "//third_party/openssl/crypto/cmp/cmp_asn.c", + "//third_party/openssl/crypto/cmp/cmp_client.c", + "//third_party/openssl/crypto/cmp/cmp_ctx.c", + "//third_party/openssl/crypto/cmp/cmp_err.c", + "//third_party/openssl/crypto/cmp/cmp_hdr.c", + "//third_party/openssl/crypto/cmp/cmp_http.c", + "//third_party/openssl/crypto/cmp/cmp_msg.c", + "//third_party/openssl/crypto/cmp/cmp_protect.c", + "//third_party/openssl/crypto/cmp/cmp_server.c", + "//third_party/openssl/crypto/cmp/cmp_status.c", + "//third_party/openssl/crypto/cmp/cmp_util.c", + "//third_party/openssl/crypto/cmp/cmp_vfy.c", + "//third_party/openssl/crypto/cms/cms_asn1.c", + "//third_party/openssl/crypto/cms/cms_att.c", + "//third_party/openssl/crypto/cms/cms_cd.c", + "//third_party/openssl/crypto/cms/cms_dd.c", + "//third_party/openssl/crypto/cms/cms_dh.c", + "//third_party/openssl/crypto/cms/cms_ec.c", + "//third_party/openssl/crypto/cms/cms_enc.c", + "//third_party/openssl/crypto/cms/cms_env.c", + "//third_party/openssl/crypto/cms/cms_err.c", + "//third_party/openssl/crypto/cms/cms_ess.c", + "//third_party/openssl/crypto/cms/cms_io.c", + "//third_party/openssl/crypto/cms/cms_kari.c", + "//third_party/openssl/crypto/cms/cms_lib.c", + "//third_party/openssl/crypto/cms/cms_pwri.c", + "//third_party/openssl/crypto/cms/cms_rsa.c", + "//third_party/openssl/crypto/cms/cms_sd.c", + "//third_party/openssl/crypto/cms/cms_smime.c", + "//third_party/openssl/crypto/comp/c_zlib.c", + "//third_party/openssl/crypto/comp/comp_err.c", + "//third_party/openssl/crypto/comp/comp_lib.c", + "//third_party/openssl/crypto/conf/conf_api.c", + "//third_party/openssl/crypto/conf/conf_def.c", + "//third_party/openssl/crypto/conf/conf_err.c", + "//third_party/openssl/crypto/conf/conf_lib.c", + "//third_party/openssl/crypto/conf/conf_mall.c", + "//third_party/openssl/crypto/conf/conf_mod.c", + "//third_party/openssl/crypto/conf/conf_sap.c", + "//third_party/openssl/crypto/conf/conf_ssl.c", + "//third_party/openssl/crypto/context.c", + "//third_party/openssl/crypto/core_algorithm.c", + "//third_party/openssl/crypto/core_fetch.c", + "//third_party/openssl/crypto/core_namemap.c", + "//third_party/openssl/crypto/cpt_err.c", + "//third_party/openssl/crypto/cpuid.c", + "//third_party/openssl/crypto/crmf/crmf_asn.c", + "//third_party/openssl/crypto/crmf/crmf_err.c", + "//third_party/openssl/crypto/crmf/crmf_lib.c", + "//third_party/openssl/crypto/crmf/crmf_pbm.c", + "//third_party/openssl/crypto/cryptlib.c", + "//third_party/openssl/crypto/ct/ct_b64.c", + "//third_party/openssl/crypto/ct/ct_err.c", + "//third_party/openssl/crypto/ct/ct_log.c", + "//third_party/openssl/crypto/ct/ct_oct.c", + "//third_party/openssl/crypto/ct/ct_policy.c", + "//third_party/openssl/crypto/ct/ct_prn.c", + "//third_party/openssl/crypto/ct/ct_sct.c", + "//third_party/openssl/crypto/ct/ct_sct_ctx.c", + "//third_party/openssl/crypto/ct/ct_vfy.c", + "//third_party/openssl/crypto/ct/ct_x509v3.c", + "//third_party/openssl/crypto/ctype.c", + "//third_party/openssl/crypto/cversion.c", + "//third_party/openssl/crypto/der_writer.c", + "//third_party/openssl/crypto/des/cbc_cksm.c", + "//third_party/openssl/crypto/des/cbc_enc.c", + "//third_party/openssl/crypto/des/cfb64ede.c", + "//third_party/openssl/crypto/des/cfb64enc.c", + "//third_party/openssl/crypto/des/cfb_enc.c", + "//third_party/openssl/crypto/des/des_enc.c", + "//third_party/openssl/crypto/des/ecb3_enc.c", + "//third_party/openssl/crypto/des/ecb_enc.c", + "//third_party/openssl/crypto/des/fcrypt.c", + "//third_party/openssl/crypto/des/fcrypt_b.c", + "//third_party/openssl/crypto/des/ofb64ede.c", + "//third_party/openssl/crypto/des/ofb64enc.c", + "//third_party/openssl/crypto/des/ofb_enc.c", + "//third_party/openssl/crypto/des/pcbc_enc.c", + "//third_party/openssl/crypto/des/qud_cksm.c", + "//third_party/openssl/crypto/des/rand_key.c", + "//third_party/openssl/crypto/des/set_key.c", + "//third_party/openssl/crypto/des/str2key.c", + "//third_party/openssl/crypto/des/xcbc_enc.c", + "//third_party/openssl/crypto/dh/dh_ameth.c", + "//third_party/openssl/crypto/dh/dh_asn1.c", + "//third_party/openssl/crypto/dh/dh_backend.c", + "//third_party/openssl/crypto/dh/dh_check.c", + "//third_party/openssl/crypto/dh/dh_depr.c", + "//third_party/openssl/crypto/dh/dh_err.c", + "//third_party/openssl/crypto/dh/dh_gen.c", + "//third_party/openssl/crypto/dh/dh_group_params.c", + "//third_party/openssl/crypto/dh/dh_kdf.c", + "//third_party/openssl/crypto/dh/dh_key.c", + "//third_party/openssl/crypto/dh/dh_lib.c", + "//third_party/openssl/crypto/dh/dh_meth.c", + "//third_party/openssl/crypto/dh/dh_pmeth.c", + "//third_party/openssl/crypto/dh/dh_prn.c", + "//third_party/openssl/crypto/dh/dh_rfc5114.c", + "//third_party/openssl/crypto/dsa/dsa_ameth.c", + "//third_party/openssl/crypto/dsa/dsa_asn1.c", + "//third_party/openssl/crypto/dsa/dsa_backend.c", + "//third_party/openssl/crypto/dsa/dsa_check.c", + "//third_party/openssl/crypto/dsa/dsa_depr.c", + "//third_party/openssl/crypto/dsa/dsa_err.c", + "//third_party/openssl/crypto/dsa/dsa_gen.c", + "//third_party/openssl/crypto/dsa/dsa_key.c", + "//third_party/openssl/crypto/dsa/dsa_lib.c", + "//third_party/openssl/crypto/dsa/dsa_meth.c", + "//third_party/openssl/crypto/dsa/dsa_ossl.c", + "//third_party/openssl/crypto/dsa/dsa_pmeth.c", + "//third_party/openssl/crypto/dsa/dsa_prn.c", + "//third_party/openssl/crypto/dsa/dsa_sign.c", + "//third_party/openssl/crypto/dsa/dsa_vrf.c", + "//third_party/openssl/crypto/dso/dso_dl.c", + "//third_party/openssl/crypto/dso/dso_dlfcn.c", + "//third_party/openssl/crypto/dso/dso_err.c", + "//third_party/openssl/crypto/dso/dso_lib.c", + "//third_party/openssl/crypto/dso/dso_openssl.c", + "//third_party/openssl/crypto/dso/dso_vms.c", + "//third_party/openssl/crypto/dso/dso_win32.c", + "//third_party/openssl/crypto/ebcdic.c", + "//third_party/openssl/crypto/ec/curve25519.c", + "//third_party/openssl/crypto/ec/curve448/arch_32/f_impl32.c", + "//third_party/openssl/crypto/ec/curve448/arch_64/f_impl64.c", + "//third_party/openssl/crypto/ec/curve448/curve448.c", + "//third_party/openssl/crypto/ec/curve448/curve448_tables.c", + "//third_party/openssl/crypto/ec/curve448/eddsa.c", + "//third_party/openssl/crypto/ec/curve448/f_generic.c", + "//third_party/openssl/crypto/ec/curve448/scalar.c", + "//third_party/openssl/crypto/ec/ec2_oct.c", + "//third_party/openssl/crypto/ec/ec2_smpl.c", + "//third_party/openssl/crypto/ec/ec_ameth.c", + "//third_party/openssl/crypto/ec/ec_asn1.c", + "//third_party/openssl/crypto/ec/ec_backend.c", + "//third_party/openssl/crypto/ec/ec_check.c", + "//third_party/openssl/crypto/ec/ec_curve.c", + "//third_party/openssl/crypto/ec/ec_cvt.c", + "//third_party/openssl/crypto/ec/ec_deprecated.c", + "//third_party/openssl/crypto/ec/ec_err.c", + "//third_party/openssl/crypto/ec/ec_key.c", + "//third_party/openssl/crypto/ec/ec_kmeth.c", + "//third_party/openssl/crypto/ec/ec_lib.c", + "//third_party/openssl/crypto/ec/ec_mult.c", + "//third_party/openssl/crypto/ec/ec_oct.c", + "//third_party/openssl/crypto/ec/ec_pmeth.c", + "//third_party/openssl/crypto/ec/ec_print.c", + "//third_party/openssl/crypto/ec/ecdh_kdf.c", + "//third_party/openssl/crypto/ec/ecdh_ossl.c", + "//third_party/openssl/crypto/ec/ecdsa_ossl.c", + "//third_party/openssl/crypto/ec/ecdsa_sign.c", + "//third_party/openssl/crypto/ec/ecdsa_vrf.c", + "//third_party/openssl/crypto/ec/eck_prn.c", + "//third_party/openssl/crypto/ec/ecp_mont.c", + "//third_party/openssl/crypto/ec/ecp_nist.c", + "//third_party/openssl/crypto/ec/ecp_nistz256.c", + "//third_party/openssl/crypto/ec/ecp_oct.c", + "//third_party/openssl/crypto/ec/ecp_smpl.c", + "//third_party/openssl/crypto/ec/ecx_backend.c", + "//third_party/openssl/crypto/ec/ecx_key.c", + "//third_party/openssl/crypto/ec/ecx_meth.c", + "//third_party/openssl/crypto/encode_decode/decoder_err.c", + "//third_party/openssl/crypto/encode_decode/decoder_lib.c", + "//third_party/openssl/crypto/encode_decode/decoder_meth.c", + "//third_party/openssl/crypto/encode_decode/decoder_pkey.c", + "//third_party/openssl/crypto/encode_decode/encoder_err.c", + "//third_party/openssl/crypto/encode_decode/encoder_lib.c", + "//third_party/openssl/crypto/encode_decode/encoder_meth.c", + "//third_party/openssl/crypto/encode_decode/encoder_pkey.c", + "//third_party/openssl/crypto/engine/eng_all.c", + "//third_party/openssl/crypto/engine/eng_cnf.c", + "//third_party/openssl/crypto/engine/eng_ctrl.c", + "//third_party/openssl/crypto/engine/eng_dyn.c", + "//third_party/openssl/crypto/engine/eng_err.c", + "//third_party/openssl/crypto/engine/eng_fat.c", + "//third_party/openssl/crypto/engine/eng_init.c", + "//third_party/openssl/crypto/engine/eng_lib.c", + "//third_party/openssl/crypto/engine/eng_list.c", + "//third_party/openssl/crypto/engine/eng_openssl.c", + "//third_party/openssl/crypto/engine/eng_pkey.c", + "//third_party/openssl/crypto/engine/eng_rdrand.c", + "//third_party/openssl/crypto/engine/eng_table.c", + "//third_party/openssl/crypto/engine/tb_asnmth.c", + "//third_party/openssl/crypto/engine/tb_cipher.c", + "//third_party/openssl/crypto/engine/tb_dh.c", + "//third_party/openssl/crypto/engine/tb_digest.c", + "//third_party/openssl/crypto/engine/tb_dsa.c", + "//third_party/openssl/crypto/engine/tb_eckey.c", + "//third_party/openssl/crypto/engine/tb_pkmeth.c", + "//third_party/openssl/crypto/engine/tb_rand.c", + "//third_party/openssl/crypto/engine/tb_rsa.c", + "//third_party/openssl/crypto/err/err.c", + "//third_party/openssl/crypto/err/err_all.c", + "//third_party/openssl/crypto/err/err_all_legacy.c", + "//third_party/openssl/crypto/err/err_blocks.c", + "//third_party/openssl/crypto/err/err_prn.c", + "//third_party/openssl/crypto/ess/ess_asn1.c", + "//third_party/openssl/crypto/ess/ess_err.c", + "//third_party/openssl/crypto/ess/ess_lib.c", + "//third_party/openssl/crypto/evp/asymcipher.c", + "//third_party/openssl/crypto/evp/bio_b64.c", + "//third_party/openssl/crypto/evp/bio_enc.c", + "//third_party/openssl/crypto/evp/bio_md.c", + "//third_party/openssl/crypto/evp/bio_ok.c", + "//third_party/openssl/crypto/evp/c_allc.c", + "//third_party/openssl/crypto/evp/c_alld.c", + "//third_party/openssl/crypto/evp/cmeth_lib.c", + "//third_party/openssl/crypto/evp/ctrl_params_translate.c", + "//third_party/openssl/crypto/evp/dh_ctrl.c", + "//third_party/openssl/crypto/evp/dh_support.c", + "//third_party/openssl/crypto/evp/digest.c", + "//third_party/openssl/crypto/evp/dsa_ctrl.c", + "//third_party/openssl/crypto/evp/e_aes.c", + "//third_party/openssl/crypto/evp/e_aes_cbc_hmac_sha1.c", + "//third_party/openssl/crypto/evp/e_aes_cbc_hmac_sha256.c", + "//third_party/openssl/crypto/evp/e_aria.c", + "//third_party/openssl/crypto/evp/e_bf.c", + "//third_party/openssl/crypto/evp/e_camellia.c", + "//third_party/openssl/crypto/evp/e_cast.c", + "//third_party/openssl/crypto/evp/e_chacha20_poly1305.c", + "//third_party/openssl/crypto/evp/e_des.c", + "//third_party/openssl/crypto/evp/e_des3.c", + "//third_party/openssl/crypto/evp/e_idea.c", + "//third_party/openssl/crypto/evp/e_null.c", + "//third_party/openssl/crypto/evp/e_old.c", + "//third_party/openssl/crypto/evp/e_rc2.c", + "//third_party/openssl/crypto/evp/e_rc4.c", + "//third_party/openssl/crypto/evp/e_rc4_hmac_md5.c", + "//third_party/openssl/crypto/evp/e_rc5.c", + "//third_party/openssl/crypto/evp/e_seed.c", + "//third_party/openssl/crypto/evp/e_sm4.c", + "//third_party/openssl/crypto/evp/e_xcbc_d.c", + "//third_party/openssl/crypto/evp/ec_ctrl.c", + "//third_party/openssl/crypto/evp/ec_support.c", + "//third_party/openssl/crypto/evp/encode.c", + "//third_party/openssl/crypto/evp/evp_cnf.c", + "//third_party/openssl/crypto/evp/evp_enc.c", + "//third_party/openssl/crypto/evp/evp_err.c", + "//third_party/openssl/crypto/evp/evp_fetch.c", + "//third_party/openssl/crypto/evp/evp_key.c", + "//third_party/openssl/crypto/evp/evp_lib.c", + "//third_party/openssl/crypto/evp/evp_pbe.c", + "//third_party/openssl/crypto/evp/evp_pkey.c", + "//third_party/openssl/crypto/evp/evp_rand.c", + "//third_party/openssl/crypto/evp/evp_utils.c", + "//third_party/openssl/crypto/evp/exchange.c", + "//third_party/openssl/crypto/evp/kdf_lib.c", + "//third_party/openssl/crypto/evp/kdf_meth.c", + "//third_party/openssl/crypto/evp/kem.c", + "//third_party/openssl/crypto/evp/keymgmt_lib.c", + "//third_party/openssl/crypto/evp/keymgmt_meth.c", + "//third_party/openssl/crypto/evp/legacy_blake2.c", + "//third_party/openssl/crypto/evp/legacy_md4.c", + "//third_party/openssl/crypto/evp/legacy_md5.c", + "//third_party/openssl/crypto/evp/legacy_md5_sha1.c", + "//third_party/openssl/crypto/evp/legacy_mdc2.c", + "//third_party/openssl/crypto/evp/legacy_ripemd.c", + "//third_party/openssl/crypto/evp/legacy_sha.c", + "//third_party/openssl/crypto/evp/legacy_wp.c", + "//third_party/openssl/crypto/evp/m_null.c", + "//third_party/openssl/crypto/evp/m_sigver.c", + "//third_party/openssl/crypto/evp/mac_lib.c", + "//third_party/openssl/crypto/evp/mac_meth.c", + "//third_party/openssl/crypto/evp/names.c", + "//third_party/openssl/crypto/evp/p5_crpt.c", + "//third_party/openssl/crypto/evp/p5_crpt2.c", + "//third_party/openssl/crypto/evp/p_dec.c", + "//third_party/openssl/crypto/evp/p_enc.c", + "//third_party/openssl/crypto/evp/p_legacy.c", + "//third_party/openssl/crypto/evp/p_lib.c", + "//third_party/openssl/crypto/evp/p_open.c", + "//third_party/openssl/crypto/evp/p_seal.c", + "//third_party/openssl/crypto/evp/p_sign.c", + "//third_party/openssl/crypto/evp/p_verify.c", + "//third_party/openssl/crypto/evp/pbe_scrypt.c", + "//third_party/openssl/crypto/evp/pmeth_check.c", + "//third_party/openssl/crypto/evp/pmeth_gn.c", + "//third_party/openssl/crypto/evp/pmeth_lib.c", + "//third_party/openssl/crypto/evp/signature.c", + "//third_party/openssl/crypto/ex_data.c", + "//third_party/openssl/crypto/ffc/ffc_backend.c", + "//third_party/openssl/crypto/ffc/ffc_dh.c", + "//third_party/openssl/crypto/ffc/ffc_key_generate.c", + "//third_party/openssl/crypto/ffc/ffc_key_validate.c", + "//third_party/openssl/crypto/ffc/ffc_params.c", + "//third_party/openssl/crypto/ffc/ffc_params_generate.c", + "//third_party/openssl/crypto/ffc/ffc_params_validate.c", + "//third_party/openssl/crypto/getenv.c", + "//third_party/openssl/crypto/hmac/hmac.c", + "//third_party/openssl/crypto/http/http_client.c", + "//third_party/openssl/crypto/http/http_err.c", + "//third_party/openssl/crypto/http/http_lib.c", + "//third_party/openssl/crypto/idea/i_cbc.c", + "//third_party/openssl/crypto/idea/i_cfb64.c", + "//third_party/openssl/crypto/idea/i_ecb.c", + "//third_party/openssl/crypto/idea/i_ofb64.c", + "//third_party/openssl/crypto/idea/i_skey.c", + "//third_party/openssl/crypto/info.c", + "//third_party/openssl/crypto/init.c", + "//third_party/openssl/crypto/initthread.c", + "//third_party/openssl/crypto/kdf/kdf_err.c", + "//third_party/openssl/crypto/lhash/lh_stats.c", + "//third_party/openssl/crypto/lhash/lhash.c", + "//third_party/openssl/crypto/md4/md4_dgst.c", + "//third_party/openssl/crypto/md4/md4_one.c", + "//third_party/openssl/crypto/md5/md5_dgst.c", + "//third_party/openssl/crypto/md5/md5_one.c", + "//third_party/openssl/crypto/md5/md5_sha1.c", + "//third_party/openssl/crypto/mdc2/mdc2_one.c", + "//third_party/openssl/crypto/mdc2/mdc2dgst.c", + "//third_party/openssl/crypto/mem.c", + "//third_party/openssl/crypto/mem_sec.c", + "//third_party/openssl/crypto/modes/cbc128.c", + "//third_party/openssl/crypto/modes/ccm128.c", + "//third_party/openssl/crypto/modes/cfb128.c", + "//third_party/openssl/crypto/modes/ctr128.c", + "//third_party/openssl/crypto/modes/cts128.c", + "//third_party/openssl/crypto/modes/gcm128.c", + "//third_party/openssl/crypto/modes/ocb128.c", + "//third_party/openssl/crypto/modes/ofb128.c", + "//third_party/openssl/crypto/modes/siv128.c", + "//third_party/openssl/crypto/modes/wrap128.c", + "//third_party/openssl/crypto/modes/xts128.c", + "//third_party/openssl/crypto/o_dir.c", + "//third_party/openssl/crypto/o_fopen.c", + "//third_party/openssl/crypto/o_init.c", + "//third_party/openssl/crypto/o_str.c", + "//third_party/openssl/crypto/o_time.c", + "//third_party/openssl/crypto/objects/o_names.c", + "//third_party/openssl/crypto/objects/obj_dat.c", + "//third_party/openssl/crypto/objects/obj_err.c", + "//third_party/openssl/crypto/objects/obj_lib.c", + "//third_party/openssl/crypto/objects/obj_xref.c", + "//third_party/openssl/crypto/ocsp/ocsp_asn.c", + "//third_party/openssl/crypto/ocsp/ocsp_cl.c", + "//third_party/openssl/crypto/ocsp/ocsp_err.c", + "//third_party/openssl/crypto/ocsp/ocsp_ext.c", + "//third_party/openssl/crypto/ocsp/ocsp_http.c", + "//third_party/openssl/crypto/ocsp/ocsp_lib.c", + "//third_party/openssl/crypto/ocsp/ocsp_prn.c", + "//third_party/openssl/crypto/ocsp/ocsp_srv.c", + "//third_party/openssl/crypto/ocsp/ocsp_vfy.c", + "//third_party/openssl/crypto/ocsp/v3_ocsp.c", + "//third_party/openssl/crypto/packet.c", + "//third_party/openssl/crypto/param_build.c", + "//third_party/openssl/crypto/param_build_set.c", + "//third_party/openssl/crypto/params.c", + "//third_party/openssl/crypto/params_dup.c", + "//third_party/openssl/crypto/params_from_text.c", + "//third_party/openssl/crypto/passphrase.c", + "//third_party/openssl/crypto/pem/pem_all.c", + "//third_party/openssl/crypto/pem/pem_err.c", + "//third_party/openssl/crypto/pem/pem_info.c", + "//third_party/openssl/crypto/pem/pem_lib.c", + "//third_party/openssl/crypto/pem/pem_oth.c", + "//third_party/openssl/crypto/pem/pem_pk8.c", + "//third_party/openssl/crypto/pem/pem_pkey.c", + "//third_party/openssl/crypto/pem/pem_sign.c", + "//third_party/openssl/crypto/pem/pem_x509.c", + "//third_party/openssl/crypto/pem/pem_xaux.c", + "//third_party/openssl/crypto/pem/pvkfmt.c", + "//third_party/openssl/crypto/pkcs12/p12_add.c", + "//third_party/openssl/crypto/pkcs12/p12_asn.c", + "//third_party/openssl/crypto/pkcs12/p12_attr.c", + "//third_party/openssl/crypto/pkcs12/p12_crpt.c", + "//third_party/openssl/crypto/pkcs12/p12_crt.c", + "//third_party/openssl/crypto/pkcs12/p12_decr.c", + "//third_party/openssl/crypto/pkcs12/p12_init.c", + "//third_party/openssl/crypto/pkcs12/p12_key.c", + "//third_party/openssl/crypto/pkcs12/p12_kiss.c", + "//third_party/openssl/crypto/pkcs12/p12_mutl.c", + "//third_party/openssl/crypto/pkcs12/p12_npas.c", + "//third_party/openssl/crypto/pkcs12/p12_p8d.c", + "//third_party/openssl/crypto/pkcs12/p12_p8e.c", + "//third_party/openssl/crypto/pkcs12/p12_sbag.c", + "//third_party/openssl/crypto/pkcs12/p12_utl.c", + "//third_party/openssl/crypto/pkcs12/pk12err.c", + "//third_party/openssl/crypto/pkcs7/bio_pk7.c", + "//third_party/openssl/crypto/pkcs7/pk7_asn1.c", + "//third_party/openssl/crypto/pkcs7/pk7_attr.c", + "//third_party/openssl/crypto/pkcs7/pk7_doit.c", + "//third_party/openssl/crypto/pkcs7/pk7_lib.c", + "//third_party/openssl/crypto/pkcs7/pk7_mime.c", + "//third_party/openssl/crypto/pkcs7/pk7_smime.c", + "//third_party/openssl/crypto/pkcs7/pkcs7err.c", + "//third_party/openssl/crypto/poly1305/poly1305.c", + "//third_party/openssl/crypto/property/defn_cache.c", + "//third_party/openssl/crypto/property/property.c", + "//third_party/openssl/crypto/property/property_err.c", + "//third_party/openssl/crypto/property/property_parse.c", + "//third_party/openssl/crypto/property/property_query.c", + "//third_party/openssl/crypto/property/property_string.c", + "//third_party/openssl/crypto/provider.c", + "//third_party/openssl/crypto/provider_child.c", + "//third_party/openssl/crypto/provider_conf.c", + "//third_party/openssl/crypto/provider_core.c", + "//third_party/openssl/crypto/provider_predefined.c", + "//third_party/openssl/crypto/punycode.c", + "//third_party/openssl/crypto/rand/prov_seed.c", + "//third_party/openssl/crypto/rand/rand_deprecated.c", + "//third_party/openssl/crypto/rand/rand_err.c", + "//third_party/openssl/crypto/rand/rand_lib.c", + "//third_party/openssl/crypto/rand/rand_meth.c", + "//third_party/openssl/crypto/rand/rand_pool.c", + "//third_party/openssl/crypto/rand/randfile.c", + "//third_party/openssl/crypto/rc2/rc2_cbc.c", + "//third_party/openssl/crypto/rc2/rc2_ecb.c", + "//third_party/openssl/crypto/rc2/rc2_skey.c", + "//third_party/openssl/crypto/rc2/rc2cfb64.c", + "//third_party/openssl/crypto/rc2/rc2ofb64.c", + "//third_party/openssl/crypto/ripemd/rmd_dgst.c", + "//third_party/openssl/crypto/ripemd/rmd_one.c", + "//third_party/openssl/crypto/rsa/rsa_ameth.c", + "//third_party/openssl/crypto/rsa/rsa_asn1.c", + "//third_party/openssl/crypto/rsa/rsa_backend.c", + "//third_party/openssl/crypto/rsa/rsa_chk.c", + "//third_party/openssl/crypto/rsa/rsa_crpt.c", + "//third_party/openssl/crypto/rsa/rsa_depr.c", + "//third_party/openssl/crypto/rsa/rsa_err.c", + "//third_party/openssl/crypto/rsa/rsa_gen.c", + "//third_party/openssl/crypto/rsa/rsa_lib.c", + "//third_party/openssl/crypto/rsa/rsa_meth.c", + "//third_party/openssl/crypto/rsa/rsa_mp.c", + "//third_party/openssl/crypto/rsa/rsa_mp_names.c", + "//third_party/openssl/crypto/rsa/rsa_none.c", + "//third_party/openssl/crypto/rsa/rsa_oaep.c", + "//third_party/openssl/crypto/rsa/rsa_ossl.c", + "//third_party/openssl/crypto/rsa/rsa_pk1.c", + "//third_party/openssl/crypto/rsa/rsa_pmeth.c", + "//third_party/openssl/crypto/rsa/rsa_prn.c", + "//third_party/openssl/crypto/rsa/rsa_pss.c", + "//third_party/openssl/crypto/rsa/rsa_saos.c", + "//third_party/openssl/crypto/rsa/rsa_schemes.c", + "//third_party/openssl/crypto/rsa/rsa_sign.c", + "//third_party/openssl/crypto/rsa/rsa_sp800_56b_check.c", + "//third_party/openssl/crypto/rsa/rsa_sp800_56b_gen.c", + "//third_party/openssl/crypto/rsa/rsa_x931.c", + "//third_party/openssl/crypto/rsa/rsa_x931g.c", + "//third_party/openssl/crypto/seed/seed.c", + "//third_party/openssl/crypto/seed/seed_cbc.c", + "//third_party/openssl/crypto/seed/seed_cfb.c", + "//third_party/openssl/crypto/seed/seed_ecb.c", + "//third_party/openssl/crypto/seed/seed_ofb.c", + "//third_party/openssl/crypto/self_test_core.c", + "//third_party/openssl/crypto/sha/sha1_one.c", + "//third_party/openssl/crypto/sha/sha1dgst.c", + "//third_party/openssl/crypto/sha/sha256.c", + "//third_party/openssl/crypto/sha/sha3.c", + "//third_party/openssl/crypto/sha/sha512.c", + "//third_party/openssl/crypto/siphash/siphash.c", + "//third_party/openssl/crypto/sm2/sm2_crypt.c", + "//third_party/openssl/crypto/sm2/sm2_err.c", + "//third_party/openssl/crypto/sm2/sm2_key.c", + "//third_party/openssl/crypto/sm2/sm2_sign.c", + "//third_party/openssl/crypto/sm3/legacy_sm3.c", + "//third_party/openssl/crypto/sm3/sm3.c", + "//third_party/openssl/crypto/sm4/sm4.c", + "//third_party/openssl/crypto/sparse_array.c", + "//third_party/openssl/crypto/srp/srp_lib.c", + "//third_party/openssl/crypto/srp/srp_vfy.c", + "//third_party/openssl/crypto/stack/stack.c", + "//third_party/openssl/crypto/store/store_err.c", + "//third_party/openssl/crypto/store/store_init.c", + "//third_party/openssl/crypto/store/store_lib.c", + "//third_party/openssl/crypto/store/store_meth.c", + "//third_party/openssl/crypto/store/store_register.c", + "//third_party/openssl/crypto/store/store_result.c", + "//third_party/openssl/crypto/store/store_strings.c", + "//third_party/openssl/crypto/threads_lib.c", + "//third_party/openssl/crypto/threads_none.c", + "//third_party/openssl/crypto/threads_pthread.c", + "//third_party/openssl/crypto/threads_win.c", + "//third_party/openssl/crypto/trace.c", + "//third_party/openssl/crypto/ts/ts_asn1.c", + "//third_party/openssl/crypto/ts/ts_conf.c", + "//third_party/openssl/crypto/ts/ts_err.c", + "//third_party/openssl/crypto/ts/ts_lib.c", + "//third_party/openssl/crypto/ts/ts_req_print.c", + "//third_party/openssl/crypto/ts/ts_req_utils.c", + "//third_party/openssl/crypto/ts/ts_rsp_print.c", + "//third_party/openssl/crypto/ts/ts_rsp_sign.c", + "//third_party/openssl/crypto/ts/ts_rsp_utils.c", + "//third_party/openssl/crypto/ts/ts_rsp_verify.c", + "//third_party/openssl/crypto/ts/ts_verify_ctx.c", + "//third_party/openssl/crypto/txt_db/txt_db.c", + "//third_party/openssl/crypto/ui/ui_err.c", + "//third_party/openssl/crypto/ui/ui_lib.c", + "//third_party/openssl/crypto/ui/ui_null.c", + "//third_party/openssl/crypto/ui/ui_openssl.c", + "//third_party/openssl/crypto/ui/ui_util.c", + "//third_party/openssl/crypto/uid.c", + "//third_party/openssl/crypto/whrlpool/wp_dgst.c", + "//third_party/openssl/crypto/x509/by_dir.c", + "//third_party/openssl/crypto/x509/by_file.c", + "//third_party/openssl/crypto/x509/by_store.c", + "//third_party/openssl/crypto/x509/pcy_cache.c", + "//third_party/openssl/crypto/x509/pcy_data.c", + "//third_party/openssl/crypto/x509/pcy_lib.c", + "//third_party/openssl/crypto/x509/pcy_map.c", + "//third_party/openssl/crypto/x509/pcy_node.c", + "//third_party/openssl/crypto/x509/pcy_tree.c", + "//third_party/openssl/crypto/x509/t_crl.c", + "//third_party/openssl/crypto/x509/t_req.c", + "//third_party/openssl/crypto/x509/t_x509.c", + "//third_party/openssl/crypto/x509/v3_addr.c", + "//third_party/openssl/crypto/x509/v3_admis.c", + "//third_party/openssl/crypto/x509/v3_akeya.c", + "//third_party/openssl/crypto/x509/v3_akid.c", + "//third_party/openssl/crypto/x509/v3_asid.c", + "//third_party/openssl/crypto/x509/v3_bcons.c", + "//third_party/openssl/crypto/x509/v3_bitst.c", + "//third_party/openssl/crypto/x509/v3_conf.c", + "//third_party/openssl/crypto/x509/v3_cpols.c", + "//third_party/openssl/crypto/x509/v3_crld.c", + "//third_party/openssl/crypto/x509/v3_enum.c", + "//third_party/openssl/crypto/x509/v3_extku.c", + "//third_party/openssl/crypto/x509/v3_genn.c", + "//third_party/openssl/crypto/x509/v3_ia5.c", + "//third_party/openssl/crypto/x509/v3_info.c", + "//third_party/openssl/crypto/x509/v3_int.c", + "//third_party/openssl/crypto/x509/v3_ist.c", + "//third_party/openssl/crypto/x509/v3_lib.c", + "//third_party/openssl/crypto/x509/v3_ncons.c", + "//third_party/openssl/crypto/x509/v3_pci.c", + "//third_party/openssl/crypto/x509/v3_pcia.c", + "//third_party/openssl/crypto/x509/v3_pcons.c", + "//third_party/openssl/crypto/x509/v3_pku.c", + "//third_party/openssl/crypto/x509/v3_pmaps.c", + "//third_party/openssl/crypto/x509/v3_prn.c", + "//third_party/openssl/crypto/x509/v3_purp.c", + "//third_party/openssl/crypto/x509/v3_san.c", + "//third_party/openssl/crypto/x509/v3_skid.c", + "//third_party/openssl/crypto/x509/v3_sxnet.c", + "//third_party/openssl/crypto/x509/v3_tlsf.c", + "//third_party/openssl/crypto/x509/v3_utf8.c", + "//third_party/openssl/crypto/x509/v3_utl.c", + "//third_party/openssl/crypto/x509/v3err.c", + "//third_party/openssl/crypto/x509/x509_att.c", + "//third_party/openssl/crypto/x509/x509_cmp.c", + "//third_party/openssl/crypto/x509/x509_d2.c", + "//third_party/openssl/crypto/x509/x509_def.c", + "//third_party/openssl/crypto/x509/x509_err.c", + "//third_party/openssl/crypto/x509/x509_ext.c", + "//third_party/openssl/crypto/x509/x509_lu.c", + "//third_party/openssl/crypto/x509/x509_meth.c", + "//third_party/openssl/crypto/x509/x509_obj.c", + "//third_party/openssl/crypto/x509/x509_r2x.c", + "//third_party/openssl/crypto/x509/x509_req.c", + "//third_party/openssl/crypto/x509/x509_set.c", + "//third_party/openssl/crypto/x509/x509_trust.c", + "//third_party/openssl/crypto/x509/x509_txt.c", + "//third_party/openssl/crypto/x509/x509_v3.c", + "//third_party/openssl/crypto/x509/x509_vfy.c", + "//third_party/openssl/crypto/x509/x509_vpm.c", + "//third_party/openssl/crypto/x509/x509cset.c", + "//third_party/openssl/crypto/x509/x509name.c", + "//third_party/openssl/crypto/x509/x509rset.c", + "//third_party/openssl/crypto/x509/x509spki.c", + "//third_party/openssl/crypto/x509/x509type.c", + "//third_party/openssl/crypto/x509/x_all.c", + "//third_party/openssl/crypto/x509/x_attrib.c", + "//third_party/openssl/crypto/x509/x_crl.c", + "//third_party/openssl/crypto/x509/x_exten.c", + "//third_party/openssl/crypto/x509/x_name.c", + "//third_party/openssl/crypto/x509/x_pubkey.c", + "//third_party/openssl/crypto/x509/x_req.c", + "//third_party/openssl/crypto/x509/x_x509.c", + "//third_party/openssl/crypto/x509/x_x509a.c", + "//third_party/openssl/engines/e_capi.c", + "//third_party/openssl/engines/e_padlock.c", + "//third_party/openssl/providers/baseprov.c", + "//third_party/openssl/providers/defltprov.c", + "//third_party/openssl/providers/legacyprov.c", + "//third_party/openssl/providers/nullprov.c", + "//third_party/openssl/providers/prov_running.c", + ] + sources += libcommon_common_sources + sources += libcommon_build_all_generated_selected_platform_sources + sources += libdefault_common_sources + sources += libdefault_build_all_generated_selected_platform_sources + sources += libcrypto_build_all_generated_selected_platform_sources + sources += liblegacy_sources + + if (openssl_selected_platform == "linux-armv4") { + # 升级修改适配检查点21 libcrypto 不同平台c源码列表 + sources += [ + "//third_party/openssl/crypto/aes/aes_cbc.c", + "//third_party/openssl/crypto/armcap.c", + "//third_party/openssl/crypto/bn/bn_asm.c", + "//third_party/openssl/crypto/camellia/camellia.c", + "//third_party/openssl/crypto/camellia/cmll_cbc.c", + "//third_party/openssl/crypto/rc4/rc4_enc.c", + "//third_party/openssl/crypto/rc4/rc4_skey.c", + "//third_party/openssl/crypto/whrlpool/wp_block.c", + "//third_party/openssl/engines/e_afalg.c", + ] + } else if (openssl_selected_platform == "linux-aarch64") { + # 升级修改适配检查点22 libcrypto 不同平台c源码列表 + sources += [ + "//third_party/openssl/crypto/aes/aes_cbc.c", + "//third_party/openssl/crypto/aes/aes_core.c", + "//third_party/openssl/crypto/armcap.c", + "//third_party/openssl/crypto/bn/bn_asm.c", + "//third_party/openssl/crypto/camellia/camellia.c", + "//third_party/openssl/crypto/camellia/cmll_cbc.c", + "//third_party/openssl/crypto/rc4/rc4_enc.c", + "//third_party/openssl/crypto/rc4/rc4_skey.c", + "//third_party/openssl/crypto/whrlpool/wp_block.c", + "//third_party/openssl/engines/e_afalg.c", + ] + } else if (openssl_selected_platform == "darwin64-x86_64-cc") { + # 升级修改适配检查点23 libcrypto 不同平台c源码列表 + sources += [ + "//third_party/openssl/crypto/bn/asm/x86_64-gcc.c", + "//third_party/openssl/crypto/bn/rsaz_exp.c", + "//third_party/openssl/crypto/bn/rsaz_exp_x2.c", + ] + } else if (openssl_selected_platform == "darwin64-arm64-cc") { + # 升级修改适配检查点24 libcrypto 不同平台c源码列表 + sources += [ + "//third_party/openssl/crypto/aes/aes_cbc.c", + "//third_party/openssl/crypto/aes/aes_core.c", + "//third_party/openssl/crypto/armcap.c", + "//third_party/openssl/crypto/bn/bn_asm.c", + "//third_party/openssl/crypto/camellia/camellia.c", + "//third_party/openssl/crypto/camellia/cmll_cbc.c", + "//third_party/openssl/crypto/rc4/rc4_enc.c", + "//third_party/openssl/crypto/rc4/rc4_skey.c", + "//third_party/openssl/crypto/whrlpool/wp_block.c", + ] + } else if (openssl_selected_platform == "linux-x86_64") { + # 升级修改适配检查点25 libcrypto 不同平台c源码列表 + sources += [ + "//third_party/openssl/crypto/bn/asm/x86_64-gcc.c", + "//third_party/openssl/crypto/bn/rsaz_exp.c", + "//third_party/openssl/crypto/bn/rsaz_exp_x2.c", + "//third_party/openssl/engines/e_afalg.c", + ] + } else if (openssl_selected_platform == "mingw64") { + # 升级修改适配检查点26 libcrypto 不同平台c源码列表 + sources += [ + "//third_party/openssl/crypto/bn/asm/x86_64-gcc.c", + "//third_party/openssl/crypto/bn/rsaz_exp.c", + "//third_party/openssl/crypto/bn/rsaz_exp_x2.c", + ] + } -if (is_mingw || is_mac) { - ohos_shared_library("libcrypto_restool") { + configs = [ ":crypto_config_private" ] + public_configs = [ ":crypto_config_public" ] + deps = [ ":openssl_build_all_generated" ] + } + + ohos_static_library("libcrypto_static") { + subsystem_name = "thirdparty" + part_name = "openssl" + deps = [ ":crypto_source" ] + public_configs = [ ":crypto_config_public" ] + complete_static_lib = true + } + + if (is_mingw || is_mac) { + ohos_shared_library("libcrypto_restool") { + sources = [] + configs = [] + deps = [ ":crypto_source" ] + if (openssl_selected_platform == "mingw64") { + sources += [ "//third_party/openssl/crypto/dllmain.c" ] + configs += [ ":crypto_config_private" ] + } + subsystem_name = "thirdparty" + part_name = "openssl" + public_configs = [ ":crypto_config_public" ] + install_images = [ + "system", + "updater", + ] + } + } + + ohos_shared_library("libcrypto_shared") { sources = [] configs = [] - deps = [ ":crypto_source" ] + deps = [ + ":crypto_source", + ":openssl.cnf", + ] if (openssl_selected_platform == "mingw64") { sources += [ "//third_party/openssl/crypto/dllmain.c" ] configs += [ ":crypto_config_private" ] } + if (current_os == "ios") { + ldflags = [ + "-Wl", + "-install_name", + "@rpath/libcrypto_openssl.framework/libcrypto_openssl", + ] + output_name = "crypto_openssl" + } else { + output_name = "libcrypto_openssl" + } subsystem_name = "thirdparty" part_name = "openssl" + innerapi_tags = [ + "platformsdk", + "chipsetsdk", + ] public_configs = [ ":crypto_config_public" ] install_images = [ "system", "updater", ] } -} -ohos_shared_library("libcrypto_shared") { - sources = [] - configs = [] - deps = [ - ":crypto_source", - ":openssl.cnf", - ] - if (openssl_selected_platform == "mingw64") { - sources += [ "//third_party/openssl/crypto/dllmain.c" ] - configs += [ ":crypto_config_private" ] - } if (current_os == "ios") { - ldflags = [ - "-Wl", - "-install_name", - "@rpath/libcrypto_openssl.framework/libcrypto_openssl", - ] - output_name = "crypto_openssl" - } else { - output_name = "libcrypto_openssl" + ohos_combine_darwin_framework("libcrypto_openssl") { + deps = [ ":libcrypto_shared" ] + subsystem_name = "thirdparty" + part_name = "openssl" + } } - subsystem_name = "thirdparty" - part_name = "openssl" - innerapi_tags = [ - "platformsdk", - "chipsetsdk", - ] - public_configs = [ ":crypto_config_public" ] - install_images = [ - "system", - "updater", - ] -} -if (current_os == "ios") { - ohos_combine_darwin_framework("libcrypto_openssl") { - deps = [ ":libcrypto_shared" ] - subsystem_name = "thirdparty" - part_name = "openssl" + unused_variables = [] + unused_variables += unused_variables + unused_variables += crypto_config_common_private_include_dirs + unused_variables += crypto_config_common_public_include_dirs + unused_variables += crypto_config_common_cflags + unused_variables += crypto_config_linux_armv4_cflags + unused_variables += crypto_config_linux_aarch64_cflags + unused_variables += crypto_config_darwin64_x86_64_cc_cflags + unused_variables += crypto_config_darwin64_arm64_cc_cflags + unused_variables += crypto_config_linux_x86_64_cflags + unused_variables += crypto_config_mingw64_cflags + unused_variables += libcommon_common_sources + unused_variables += libdefault_common_sources + unused_variables += libcrypto_build_all_generated_linux_armv4_sources + unused_variables += libcrypto_build_all_generated_linux_aarch64_sources + unused_variables += libcrypto_build_all_generated_darwin64_x86_64_cc_sources + unused_variables += libcrypto_build_all_generated_darwin64_arm64_cc_sources + unused_variables += libcrypto_build_all_generated_linux_x86_64_sources + unused_variables += libcrypto_build_all_generated_mingw64_sources + + config("ssl_config_private") { + include_dirs = crypto_config_common_private_include_dirs + cflags = crypto_config_common_cflags + crypto_config_current_platform_cflags + + openssl_internal_cflags } -} -unused_variables = [] -unused_variables += unused_variables -unused_variables += crypto_config_common_private_include_dirs -unused_variables += crypto_config_common_public_include_dirs -unused_variables += crypto_config_common_cflags -unused_variables += crypto_config_linux_armv4_cflags -unused_variables += crypto_config_linux_aarch64_cflags -unused_variables += crypto_config_darwin64_x86_64_cc_cflags -unused_variables += crypto_config_darwin64_arm64_cc_cflags -unused_variables += crypto_config_linux_x86_64_cflags -unused_variables += crypto_config_mingw64_cflags -unused_variables += libcommon_common_sources -unused_variables += libdefault_common_sources -unused_variables += libcrypto_build_all_generated_linux_armv4_sources -unused_variables += libcrypto_build_all_generated_linux_aarch64_sources -unused_variables += libcrypto_build_all_generated_darwin64_x86_64_cc_sources -unused_variables += libcrypto_build_all_generated_darwin64_arm64_cc_sources -unused_variables += libcrypto_build_all_generated_linux_x86_64_sources -unused_variables += libcrypto_build_all_generated_mingw64_sources - -config("ssl_config_private") { - include_dirs = crypto_config_common_private_include_dirs - cflags = crypto_config_common_cflags + crypto_config_current_platform_cflags + - openssl_internal_cflags -} + config("ssl_config_public") { + include_dirs = crypto_config_common_public_include_dirs + } -config("ssl_config_public") { - include_dirs = crypto_config_common_public_include_dirs -} + ohos_source_set("ssl_source") { + subsystem_name = "thirdparty" + part_name = "openssl" -ohos_source_set("ssl_source") { - subsystem_name = "thirdparty" - part_name = "openssl" - - # 升级修改适配检查点27 libssl 源码列表 - sources = [ - "//third_party/openssl/ssl/bio_ssl.c", - "//third_party/openssl/ssl/d1_lib.c", - "//third_party/openssl/ssl/d1_msg.c", - "//third_party/openssl/ssl/d1_srtp.c", - "//third_party/openssl/ssl/methods.c", - "//third_party/openssl/ssl/pqueue.c", - "//third_party/openssl/ssl/record/dtls1_bitmap.c", - "//third_party/openssl/ssl/record/rec_layer_d1.c", - "//third_party/openssl/ssl/record/rec_layer_s3.c", - "//third_party/openssl/ssl/record/ssl3_buffer.c", - "//third_party/openssl/ssl/record/ssl3_record.c", - "//third_party/openssl/ssl/record/ssl3_record_tls13.c", - "//third_party/openssl/ssl/s3_enc.c", - "//third_party/openssl/ssl/s3_lib.c", - "//third_party/openssl/ssl/s3_msg.c", - "//third_party/openssl/ssl/ssl_asn1.c", - "//third_party/openssl/ssl/ssl_cert.c", - "//third_party/openssl/ssl/ssl_ciph.c", - "//third_party/openssl/ssl/ssl_conf.c", - "//third_party/openssl/ssl/ssl_err.c", - "//third_party/openssl/ssl/ssl_err_legacy.c", - "//third_party/openssl/ssl/ssl_init.c", - "//third_party/openssl/ssl/ssl_lib.c", - "//third_party/openssl/ssl/ssl_mcnf.c", - "//third_party/openssl/ssl/ssl_rsa.c", - "//third_party/openssl/ssl/ssl_rsa_legacy.c", - "//third_party/openssl/ssl/ssl_sess.c", - "//third_party/openssl/ssl/ssl_stat.c", - "//third_party/openssl/ssl/ssl_txt.c", - "//third_party/openssl/ssl/ssl_utst.c", - "//third_party/openssl/ssl/statem/extensions.c", - "//third_party/openssl/ssl/statem/extensions_clnt.c", - "//third_party/openssl/ssl/statem/extensions_cust.c", - "//third_party/openssl/ssl/statem/extensions_srvr.c", - "//third_party/openssl/ssl/statem/statem.c", - "//third_party/openssl/ssl/statem/statem_clnt.c", - "//third_party/openssl/ssl/statem/statem_dtls.c", - "//third_party/openssl/ssl/statem/statem_lib.c", - "//third_party/openssl/ssl/statem/statem_srvr.c", - "//third_party/openssl/ssl/t1_enc.c", - "//third_party/openssl/ssl/t1_lib.c", - "//third_party/openssl/ssl/t1_trce.c", - "//third_party/openssl/ssl/tls13_enc.c", - "//third_party/openssl/ssl/tls_depr.c", - "//third_party/openssl/ssl/tls_srp.c", - ] + # 升级修改适配检查点27 libssl 源码列表 + sources = [ + "//third_party/openssl/ssl/bio_ssl.c", + "//third_party/openssl/ssl/d1_lib.c", + "//third_party/openssl/ssl/d1_msg.c", + "//third_party/openssl/ssl/d1_srtp.c", + "//third_party/openssl/ssl/methods.c", + "//third_party/openssl/ssl/pqueue.c", + "//third_party/openssl/ssl/record/dtls1_bitmap.c", + "//third_party/openssl/ssl/record/rec_layer_d1.c", + "//third_party/openssl/ssl/record/rec_layer_s3.c", + "//third_party/openssl/ssl/record/ssl3_buffer.c", + "//third_party/openssl/ssl/record/ssl3_record.c", + "//third_party/openssl/ssl/record/ssl3_record_tls13.c", + "//third_party/openssl/ssl/s3_enc.c", + "//third_party/openssl/ssl/s3_lib.c", + "//third_party/openssl/ssl/s3_msg.c", + "//third_party/openssl/ssl/ssl_asn1.c", + "//third_party/openssl/ssl/ssl_cert.c", + "//third_party/openssl/ssl/ssl_ciph.c", + "//third_party/openssl/ssl/ssl_conf.c", + "//third_party/openssl/ssl/ssl_err.c", + "//third_party/openssl/ssl/ssl_err_legacy.c", + "//third_party/openssl/ssl/ssl_init.c", + "//third_party/openssl/ssl/ssl_lib.c", + "//third_party/openssl/ssl/ssl_mcnf.c", + "//third_party/openssl/ssl/ssl_rsa.c", + "//third_party/openssl/ssl/ssl_rsa_legacy.c", + "//third_party/openssl/ssl/ssl_sess.c", + "//third_party/openssl/ssl/ssl_stat.c", + "//third_party/openssl/ssl/ssl_txt.c", + "//third_party/openssl/ssl/ssl_utst.c", + "//third_party/openssl/ssl/statem/extensions.c", + "//third_party/openssl/ssl/statem/extensions_clnt.c", + "//third_party/openssl/ssl/statem/extensions_cust.c", + "//third_party/openssl/ssl/statem/extensions_srvr.c", + "//third_party/openssl/ssl/statem/statem.c", + "//third_party/openssl/ssl/statem/statem_clnt.c", + "//third_party/openssl/ssl/statem/statem_dtls.c", + "//third_party/openssl/ssl/statem/statem_lib.c", + "//third_party/openssl/ssl/statem/statem_srvr.c", + "//third_party/openssl/ssl/t1_enc.c", + "//third_party/openssl/ssl/t1_lib.c", + "//third_party/openssl/ssl/t1_trce.c", + "//third_party/openssl/ssl/tls13_enc.c", + "//third_party/openssl/ssl/tls_depr.c", + "//third_party/openssl/ssl/tls_srp.c", + ] - configs = [ ":ssl_config_private" ] - public_configs = [ ":ssl_config_public" ] - deps = [ ":openssl_build_all_generated" ] -} + configs = [ ":ssl_config_private" ] + public_configs = [ ":ssl_config_public" ] + deps = [ ":openssl_build_all_generated" ] + } -ohos_static_library("libssl_static") { - subsystem_name = "thirdparty" - part_name = "openssl" - deps = [ ":ssl_source" ] - public_configs = [ ":ssl_config_public" ] - complete_static_lib = true -} + ohos_static_library("libssl_static") { + subsystem_name = "thirdparty" + part_name = "openssl" + deps = [ ":ssl_source" ] + public_configs = [ ":ssl_config_public" ] + complete_static_lib = true + } -ohos_shared_library("libssl_shared") { - deps = [ - ":libcrypto_shared", - ":openssl.cnf", - ":ssl_source", - ] - if (current_os == "ios") { - ldflags = [ - "-Wl", - "-install_name", - "@rpath/libssl_openssl.framework/libssl_openssl", + ohos_shared_library("libssl_shared") { + deps = [ + ":libcrypto_shared", + ":openssl.cnf", + ":ssl_source", ] - output_name = "ssl_openssl" - } else { - output_name = "libssl_openssl" - } - subsystem_name = "thirdparty" - part_name = "openssl" + if (current_os == "ios") { + ldflags = [ + "-Wl", + "-install_name", + "@rpath/libssl_openssl.framework/libssl_openssl", + ] + output_name = "ssl_openssl" + } else { + output_name = "libssl_openssl" + } + subsystem_name = "thirdparty" + part_name = "openssl" - innerapi_tags = [ - "platformsdk", - "chipsetsdk", - ] - public_configs = [ - ":crypto_config_public", - ":ssl_config_public", - ] + innerapi_tags = [ + "platformsdk", + "chipsetsdk", + ] + public_configs = [ + ":crypto_config_public", + ":ssl_config_public", + ] - install_images = [ - "system", + install_images = [ + "system", - # compile libssl_openssl.z.so to the updater image for wpa to use - "updater", - ] -} + # compile libssl_openssl.z.so to the updater image for wpa to use + "updater", + ] + } -if (current_os == "ios") { - ohos_combine_darwin_framework("libssl_openssl") { - deps = [ ":libssl_shared" ] - subsystem_name = "thirdparty" - part_name = "openssl" + if (current_os == "ios") { + ohos_combine_darwin_framework("libssl_openssl") { + deps = [ ":libssl_shared" ] + subsystem_name = "thirdparty" + part_name = "openssl" + } } -} -ohos_static_library("libapps") { - # 升级修改适配检查点28 libapps 源码列表 - sources = [ - "//third_party/openssl/apps/lib/app_libctx.c", - "//third_party/openssl/apps/lib/app_params.c", - "//third_party/openssl/apps/lib/app_provider.c", - "//third_party/openssl/apps/lib/app_rand.c", - "//third_party/openssl/apps/lib/app_x509.c", - "//third_party/openssl/apps/lib/apps.c", - "//third_party/openssl/apps/lib/apps_ui.c", - "//third_party/openssl/apps/lib/columns.c", - "//third_party/openssl/apps/lib/engine.c", - "//third_party/openssl/apps/lib/engine_loader.c", - "//third_party/openssl/apps/lib/fmt.c", - "//third_party/openssl/apps/lib/http_server.c", - "//third_party/openssl/apps/lib/names.c", - "//third_party/openssl/apps/lib/opt.c", - "//third_party/openssl/apps/lib/s_cb.c", - "//third_party/openssl/apps/lib/s_socket.c", - "//third_party/openssl/apps/lib/tlssrp_depr.c", - ] - if (openssl_selected_platform == "mingw64") { - sources += [ "//third_party/openssl/apps/lib/win32_init.c" ] + ohos_static_library("libapps") { + # 升级修改适配检查点28 libapps 源码列表 + sources = [ + "//third_party/openssl/apps/lib/app_libctx.c", + "//third_party/openssl/apps/lib/app_params.c", + "//third_party/openssl/apps/lib/app_provider.c", + "//third_party/openssl/apps/lib/app_rand.c", + "//third_party/openssl/apps/lib/app_x509.c", + "//third_party/openssl/apps/lib/apps.c", + "//third_party/openssl/apps/lib/apps_ui.c", + "//third_party/openssl/apps/lib/columns.c", + "//third_party/openssl/apps/lib/engine.c", + "//third_party/openssl/apps/lib/engine_loader.c", + "//third_party/openssl/apps/lib/fmt.c", + "//third_party/openssl/apps/lib/http_server.c", + "//third_party/openssl/apps/lib/names.c", + "//third_party/openssl/apps/lib/opt.c", + "//third_party/openssl/apps/lib/s_cb.c", + "//third_party/openssl/apps/lib/s_socket.c", + "//third_party/openssl/apps/lib/tlssrp_depr.c", + ] + if (openssl_selected_platform == "mingw64") { + sources += [ "//third_party/openssl/apps/lib/win32_init.c" ] + } + subsystem_name = "thirdparty" + part_name = "openssl" + configs = [ ":crypto_config_private" ] } - subsystem_name = "thirdparty" - part_name = "openssl" - configs = [ ":crypto_config_private" ] -} -ohos_executable("openssl") { - # 升级修改适配检查点29 apps/openssl 源码列表 - sources = [ - "${openssl_selected_platform_full_path}/apps/progs.c", - "//third_party/openssl/apps/asn1parse.c", - "//third_party/openssl/apps/ca.c", - "//third_party/openssl/apps/ciphers.c", - "//third_party/openssl/apps/cmp.c", - "//third_party/openssl/apps/cms.c", - "//third_party/openssl/apps/crl.c", - "//third_party/openssl/apps/crl2pkcs7.c", - "//third_party/openssl/apps/dgst.c", - "//third_party/openssl/apps/dhparam.c", - "//third_party/openssl/apps/dsa.c", - "//third_party/openssl/apps/dsaparam.c", - "//third_party/openssl/apps/ec.c", - "//third_party/openssl/apps/ecparam.c", - "//third_party/openssl/apps/enc.c", - "//third_party/openssl/apps/engine.c", - "//third_party/openssl/apps/errstr.c", - "//third_party/openssl/apps/fipsinstall.c", - "//third_party/openssl/apps/gendsa.c", - "//third_party/openssl/apps/genpkey.c", - "//third_party/openssl/apps/genrsa.c", - "//third_party/openssl/apps/info.c", - "//third_party/openssl/apps/kdf.c", - "//third_party/openssl/apps/lib/cmp_mock_srv.c", - "//third_party/openssl/apps/list.c", - "//third_party/openssl/apps/mac.c", - "//third_party/openssl/apps/nseq.c", - "//third_party/openssl/apps/ocsp.c", - "//third_party/openssl/apps/openssl.c", - "//third_party/openssl/apps/passwd.c", - "//third_party/openssl/apps/pkcs12.c", - "//third_party/openssl/apps/pkcs7.c", - "//third_party/openssl/apps/pkcs8.c", - "//third_party/openssl/apps/pkey.c", - "//third_party/openssl/apps/pkeyparam.c", - "//third_party/openssl/apps/pkeyutl.c", - "//third_party/openssl/apps/prime.c", - "//third_party/openssl/apps/rand.c", - "//third_party/openssl/apps/rehash.c", - "//third_party/openssl/apps/req.c", - "//third_party/openssl/apps/rsa.c", - "//third_party/openssl/apps/rsautl.c", - "//third_party/openssl/apps/s_client.c", - "//third_party/openssl/apps/s_server.c", - "//third_party/openssl/apps/s_time.c", - "//third_party/openssl/apps/sess_id.c", - "//third_party/openssl/apps/smime.c", - "//third_party/openssl/apps/speed.c", - "//third_party/openssl/apps/spkac.c", - "//third_party/openssl/apps/srp.c", - "//third_party/openssl/apps/storeutl.c", - "//third_party/openssl/apps/ts.c", - "//third_party/openssl/apps/verify.c", - "//third_party/openssl/apps/version.c", - "//third_party/openssl/apps/x509.c", - ] - if (openssl_selected_platform == "mingw64") { - sources += [ "${openssl_selected_platform_full_path}/apps/openssl.rc" ] + ohos_executable("openssl") { + # 升级修改适配检查点29 apps/openssl 源码列表 + sources = [ + "${openssl_selected_platform_full_path}/apps/progs.c", + "//third_party/openssl/apps/asn1parse.c", + "//third_party/openssl/apps/ca.c", + "//third_party/openssl/apps/ciphers.c", + "//third_party/openssl/apps/cmp.c", + "//third_party/openssl/apps/cms.c", + "//third_party/openssl/apps/crl.c", + "//third_party/openssl/apps/crl2pkcs7.c", + "//third_party/openssl/apps/dgst.c", + "//third_party/openssl/apps/dhparam.c", + "//third_party/openssl/apps/dsa.c", + "//third_party/openssl/apps/dsaparam.c", + "//third_party/openssl/apps/ec.c", + "//third_party/openssl/apps/ecparam.c", + "//third_party/openssl/apps/enc.c", + "//third_party/openssl/apps/engine.c", + "//third_party/openssl/apps/errstr.c", + "//third_party/openssl/apps/fipsinstall.c", + "//third_party/openssl/apps/gendsa.c", + "//third_party/openssl/apps/genpkey.c", + "//third_party/openssl/apps/genrsa.c", + "//third_party/openssl/apps/info.c", + "//third_party/openssl/apps/kdf.c", + "//third_party/openssl/apps/lib/cmp_mock_srv.c", + "//third_party/openssl/apps/list.c", + "//third_party/openssl/apps/mac.c", + "//third_party/openssl/apps/nseq.c", + "//third_party/openssl/apps/ocsp.c", + "//third_party/openssl/apps/openssl.c", + "//third_party/openssl/apps/passwd.c", + "//third_party/openssl/apps/pkcs12.c", + "//third_party/openssl/apps/pkcs7.c", + "//third_party/openssl/apps/pkcs8.c", + "//third_party/openssl/apps/pkey.c", + "//third_party/openssl/apps/pkeyparam.c", + "//third_party/openssl/apps/pkeyutl.c", + "//third_party/openssl/apps/prime.c", + "//third_party/openssl/apps/rand.c", + "//third_party/openssl/apps/rehash.c", + "//third_party/openssl/apps/req.c", + "//third_party/openssl/apps/rsa.c", + "//third_party/openssl/apps/rsautl.c", + "//third_party/openssl/apps/s_client.c", + "//third_party/openssl/apps/s_server.c", + "//third_party/openssl/apps/s_time.c", + "//third_party/openssl/apps/sess_id.c", + "//third_party/openssl/apps/smime.c", + "//third_party/openssl/apps/speed.c", + "//third_party/openssl/apps/spkac.c", + "//third_party/openssl/apps/srp.c", + "//third_party/openssl/apps/storeutl.c", + "//third_party/openssl/apps/ts.c", + "//third_party/openssl/apps/verify.c", + "//third_party/openssl/apps/version.c", + "//third_party/openssl/apps/x509.c", + ] + if (openssl_selected_platform == "mingw64") { + sources += [ "${openssl_selected_platform_full_path}/apps/openssl.rc" ] + } + deps = [ + ":libapps", + ":libcrypto_shared", + ":libssl_shared", + ":openssl.cnf", + ":openssl_build_all_generated", + ] + subsystem_name = "thirdparty" + part_name = "openssl" + configs = [ ":crypto_config_private" ] } - deps = [ - ":libapps", - ":libcrypto_shared", - ":libssl_shared", - ":openssl.cnf", - ":openssl_build_all_generated", - ] - subsystem_name = "thirdparty" - part_name = "openssl" - configs = [ ":crypto_config_private" ] + # 升级修改适配检查点 汇总 + # + # libcommon = + # libcommon 生成的源码列表(7) + + # libcommon 原目录源码列表(17) + # + # libdefault = + # libdefault 生成的源码列表(8) + + # libdefault 原目录源码列表(18) + # + # liblegacy = + # liblegacy 源码列表(19) + # + # libcrypto = + # libcrypto 不同平台汇编代码(1,2,3,4,5,6) + + # libcrypto 不同平台c源码列表(21,22,23,24,25,26) + + # libcrypto 原目录源码列表(20) + + # libcommon + + # libdefault + + # liblegacy + # + # libssl = + # libssl 源码列表(27) + # + # libapps = + # libapps 源码列表(28) + # + # apps/openssl = + # apps/openssl 源码列表(29) + + # libapps + # + # 编译选项 = + # 内部公共头文件目录列表(9) + + # 内部公共编译选项宏列表(10) + + # 内部不同平台编译选项列表(11,12,13,14,15,16) } -# 升级修改适配检查点 汇总 -# -# libcommon = -# libcommon 生成的源码列表(7) + -# libcommon 原目录源码列表(17) -# -# libdefault = -# libdefault 生成的源码列表(8) + -# libdefault 原目录源码列表(18) -# -# liblegacy = -# liblegacy 源码列表(19) -# -# libcrypto = -# libcrypto 不同平台汇编代码(1,2,3,4,5,6) + -# libcrypto 不同平台c源码列表(21,22,23,24,25,26) + -# libcrypto 原目录源码列表(20) + -# libcommon + -# libdefault + -# liblegacy -# -# libssl = -# libssl 源码列表(27) -# -# libapps = -# libapps 源码列表(28) -# -# apps/openssl = -# apps/openssl 源码列表(29) + -# libapps -# -# 编译选项 = -# 内部公共头文件目录列表(9) + -# 内部公共编译选项宏列表(10) + -# 内部不同平台编译选项列表(11,12,13,14,15,16) diff --git a/build/third_party_gn/protobuf/BUILD.gn b/build/third_party_gn/protobuf/BUILD.gn index 60a1daf3b562517b97fcf6d4ed6e2916e55d3200..836505824b57bc2308b15ea47c5dc1d8eb574ac6 100644 --- a/build/third_party_gn/protobuf/BUILD.gn +++ b/build/third_party_gn/protobuf/BUILD.gn @@ -10,494 +10,198 @@ # 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. - -import("//developtools/profiler/build/config.gni") -import("$build_root/ark.gni") - -THIRDPARTY_PROTOBUF_SUBSYS_NAME = "thirdparty" -THIRDPARTY_PROTOBUF_PART_NAME = "protobuf" -protobuf_src_root = "//third_party/protobuf/src" - -config("protobuf_config") { - include_dirs = [ "protobuf_src_root" ] +if (!defined(ark_standalone_build)) { + ark_standalone_build = false } -ohos_shared_library("protobuf_lite") { - sources = [ - "$protobuf_src_root/google/protobuf/any_lite.cc", - "$protobuf_src_root/google/protobuf/arena.cc", - "$protobuf_src_root/google/protobuf/extension_set.cc", - "$protobuf_src_root/google/protobuf/generated_enum_util.cc", - "$protobuf_src_root/google/protobuf/generated_message_table_driven_lite.cc", - "$protobuf_src_root/google/protobuf/generated_message_util.cc", - "$protobuf_src_root/google/protobuf/implicit_weak_message.cc", - "$protobuf_src_root/google/protobuf/io/coded_stream.cc", - "$protobuf_src_root/google/protobuf/io/io_win32.cc", - "$protobuf_src_root/google/protobuf/io/strtod.cc", - "$protobuf_src_root/google/protobuf/io/zero_copy_stream.cc", - "$protobuf_src_root/google/protobuf/io/zero_copy_stream_impl.cc", - "$protobuf_src_root/google/protobuf/io/zero_copy_stream_impl_lite.cc", - "$protobuf_src_root/google/protobuf/message_lite.cc", - "$protobuf_src_root/google/protobuf/parse_context.cc", - "$protobuf_src_root/google/protobuf/repeated_field.cc", - "$protobuf_src_root/google/protobuf/stubs/bytestream.cc", - "$protobuf_src_root/google/protobuf/stubs/common.cc", - "$protobuf_src_root/google/protobuf/stubs/int128.cc", - "$protobuf_src_root/google/protobuf/stubs/status.cc", - "$protobuf_src_root/google/protobuf/stubs/statusor.cc", - "$protobuf_src_root/google/protobuf/stubs/stringpiece.cc", - "$protobuf_src_root/google/protobuf/stubs/stringprintf.cc", - "$protobuf_src_root/google/protobuf/stubs/structurally_valid.cc", - "$protobuf_src_root/google/protobuf/stubs/strutil.cc", - "$protobuf_src_root/google/protobuf/stubs/time.cc", - "$protobuf_src_root/google/protobuf/wire_format_lite.cc", - ] - if (!is_asan && !is_debug) { - version_script = "libprotobuf_lite.map" - } - include_dirs = [ - "$protobuf_src_root/google/protobuf/**/*.h", - "$protobuf_src_root/google/protobuf/**/*.inc", - "$protobuf_src_root", - ] - if (!is_mingw) { - if (current_toolchain != host_toolchain) { - external_deps = [ "hilog:libhilog" ] - } - } else { - defines = [ "_FILE_OFFSET_BITS_SET_LSEEK" ] - } - - cflags_cc = [ "-Wno-sign-compare" ] - cflags = [ - "-Wno-sign-compare", - "-D HAVE_PTHREAD", - ] +if (ark_standalone_build) { + import("//developtools/profiler/build/config.gni") + import("$build_root/ark.gni") - public_configs = [ ":protobuf_config" ] - install_enable = true - innerapi_tags = [ "platformsdk_indirect" ] - subsystem_name = "${THIRDPARTY_PROTOBUF_SUBSYS_NAME}" - part_name = "${THIRDPARTY_PROTOBUF_PART_NAME}" -} + THIRDPARTY_PROTOBUF_SUBSYS_NAME = "thirdparty" + THIRDPARTY_PROTOBUF_PART_NAME = "protobuf" + protobuf_src_root = "//third_party/protobuf/src" -ohos_static_library("protobuf_lite_static") { - sources = [ - "$protobuf_src_root/google/protobuf/any_lite.cc", - "$protobuf_src_root/google/protobuf/arena.cc", - "$protobuf_src_root/google/protobuf/extension_set.cc", - "$protobuf_src_root/google/protobuf/generated_enum_util.cc", - "$protobuf_src_root/google/protobuf/generated_message_table_driven_lite.cc", - "$protobuf_src_root/google/protobuf/generated_message_util.cc", - "$protobuf_src_root/google/protobuf/implicit_weak_message.cc", - "$protobuf_src_root/google/protobuf/io/coded_stream.cc", - "$protobuf_src_root/google/protobuf/io/io_win32.cc", - "$protobuf_src_root/google/protobuf/io/strtod.cc", - "$protobuf_src_root/google/protobuf/io/zero_copy_stream.cc", - "$protobuf_src_root/google/protobuf/io/zero_copy_stream_impl.cc", - "$protobuf_src_root/google/protobuf/io/zero_copy_stream_impl_lite.cc", - "$protobuf_src_root/google/protobuf/message_lite.cc", - "$protobuf_src_root/google/protobuf/parse_context.cc", - "$protobuf_src_root/google/protobuf/repeated_field.cc", - "$protobuf_src_root/google/protobuf/stubs/bytestream.cc", - "$protobuf_src_root/google/protobuf/stubs/common.cc", - "$protobuf_src_root/google/protobuf/stubs/int128.cc", - "$protobuf_src_root/google/protobuf/stubs/status.cc", - "$protobuf_src_root/google/protobuf/stubs/statusor.cc", - "$protobuf_src_root/google/protobuf/stubs/stringpiece.cc", - "$protobuf_src_root/google/protobuf/stubs/stringprintf.cc", - "$protobuf_src_root/google/protobuf/stubs/structurally_valid.cc", - "$protobuf_src_root/google/protobuf/stubs/strutil.cc", - "$protobuf_src_root/google/protobuf/stubs/time.cc", - "$protobuf_src_root/google/protobuf/wire_format_lite.cc", - ] - include_dirs = [ - "$protobuf_src_root/google/protobuf/**/*.h", - "$protobuf_src_root/google/protobuf/**/*.inc", - "$protobuf_src_root", - ] - if (!is_mingw) { - if (current_toolchain != host_toolchain) { - # target build, not host build - defines = [ "HAVE_HILOG" ] - external_deps = [ "hilog:libhilog" ] - } - } else { - defines = [ "_FILE_OFFSET_BITS_SET_LSEEK" ] + config("protobuf_config") { + include_dirs = [ "protobuf_src_root" ] } - cflags_cc = [ - "-Wno-sign-compare", - "-Wno-deprecated-declarations", - ] - cflags = [ - "-Wno-deprecated-declarations", - "-Wno-sign-compare", - "-D HAVE_PTHREAD", - ] - if (is_mingw) { - # ../../third_party/protobuf/src/google/protobuf/io/zero_copy_stream_impl.cc:60:9: error: 'lseek' macro redefined [-Werror,-Wmacro-redefined] - cflags += [ "-Wno-macro-redefined" ] - } - public_configs = [ ":protobuf_config" ] - subsystem_name = "${THIRDPARTY_PROTOBUF_SUBSYS_NAME}" - part_name = "${THIRDPARTY_PROTOBUF_PART_NAME}" -} + ohos_shared_library("protobuf_lite") { + sources = [ + "$protobuf_src_root/google/protobuf/any_lite.cc", + "$protobuf_src_root/google/protobuf/arena.cc", + "$protobuf_src_root/google/protobuf/extension_set.cc", + "$protobuf_src_root/google/protobuf/generated_enum_util.cc", + "$protobuf_src_root/google/protobuf/generated_message_table_driven_lite.cc", + "$protobuf_src_root/google/protobuf/generated_message_util.cc", + "$protobuf_src_root/google/protobuf/implicit_weak_message.cc", + "$protobuf_src_root/google/protobuf/io/coded_stream.cc", + "$protobuf_src_root/google/protobuf/io/io_win32.cc", + "$protobuf_src_root/google/protobuf/io/strtod.cc", + "$protobuf_src_root/google/protobuf/io/zero_copy_stream.cc", + "$protobuf_src_root/google/protobuf/io/zero_copy_stream_impl.cc", + "$protobuf_src_root/google/protobuf/io/zero_copy_stream_impl_lite.cc", + "$protobuf_src_root/google/protobuf/message_lite.cc", + "$protobuf_src_root/google/protobuf/parse_context.cc", + "$protobuf_src_root/google/protobuf/repeated_field.cc", + "$protobuf_src_root/google/protobuf/stubs/bytestream.cc", + "$protobuf_src_root/google/protobuf/stubs/common.cc", + "$protobuf_src_root/google/protobuf/stubs/int128.cc", + "$protobuf_src_root/google/protobuf/stubs/status.cc", + "$protobuf_src_root/google/protobuf/stubs/statusor.cc", + "$protobuf_src_root/google/protobuf/stubs/stringpiece.cc", + "$protobuf_src_root/google/protobuf/stubs/stringprintf.cc", + "$protobuf_src_root/google/protobuf/stubs/structurally_valid.cc", + "$protobuf_src_root/google/protobuf/stubs/strutil.cc", + "$protobuf_src_root/google/protobuf/stubs/time.cc", + "$protobuf_src_root/google/protobuf/wire_format_lite.cc", + ] + if (!is_asan && !is_debug) { + version_script = "libprotobuf_lite.map" + } + include_dirs = [ + "$protobuf_src_root/google/protobuf/**/*.h", + "$protobuf_src_root/google/protobuf/**/*.inc", + "$protobuf_src_root", + ] + if (!is_mingw) { + if (current_toolchain != host_toolchain) { + external_deps = [ "hilog:libhilog" ] + } + } else { + defines = [ "_FILE_OFFSET_BITS_SET_LSEEK" ] + } -ohos_shared_library("protobuf") { - sources = [ - "$protobuf_src_root/google/protobuf/any.cc", - "$protobuf_src_root/google/protobuf/any.pb.cc", - "$protobuf_src_root/google/protobuf/api.pb.cc", - "$protobuf_src_root/google/protobuf/compiler/importer.cc", - "$protobuf_src_root/google/protobuf/compiler/parser.cc", - "$protobuf_src_root/google/protobuf/descriptor.cc", - "$protobuf_src_root/google/protobuf/descriptor.pb.cc", - "$protobuf_src_root/google/protobuf/descriptor_database.cc", - "$protobuf_src_root/google/protobuf/duration.pb.cc", - "$protobuf_src_root/google/protobuf/dynamic_message.cc", - "$protobuf_src_root/google/protobuf/empty.pb.cc", - "$protobuf_src_root/google/protobuf/extension_set_heavy.cc", - "$protobuf_src_root/google/protobuf/field_mask.pb.cc", - "$protobuf_src_root/google/protobuf/generated_message_reflection.cc", - "$protobuf_src_root/google/protobuf/generated_message_table_driven.cc", - "$protobuf_src_root/google/protobuf/io/gzip_stream.cc", - "$protobuf_src_root/google/protobuf/io/printer.cc", - "$protobuf_src_root/google/protobuf/io/tokenizer.cc", - "$protobuf_src_root/google/protobuf/map_field.cc", - "$protobuf_src_root/google/protobuf/message.cc", - "$protobuf_src_root/google/protobuf/reflection_ops.cc", - "$protobuf_src_root/google/protobuf/service.cc", - "$protobuf_src_root/google/protobuf/source_context.pb.cc", - "$protobuf_src_root/google/protobuf/struct.pb.cc", - "$protobuf_src_root/google/protobuf/stubs/substitute.cc", - "$protobuf_src_root/google/protobuf/text_format.cc", - "$protobuf_src_root/google/protobuf/timestamp.pb.cc", - "$protobuf_src_root/google/protobuf/type.pb.cc", - "$protobuf_src_root/google/protobuf/unknown_field_set.cc", - "$protobuf_src_root/google/protobuf/util/delimited_message_util.cc", - "$protobuf_src_root/google/protobuf/util/field_comparator.cc", - "$protobuf_src_root/google/protobuf/util/field_mask_util.cc", - "$protobuf_src_root/google/protobuf/util/internal/datapiece.cc", - "$protobuf_src_root/google/protobuf/util/internal/default_value_objectwriter.cc", - "$protobuf_src_root/google/protobuf/util/internal/error_listener.cc", - "$protobuf_src_root/google/protobuf/util/internal/field_mask_utility.cc", - "$protobuf_src_root/google/protobuf/util/internal/json_escaping.cc", - "$protobuf_src_root/google/protobuf/util/internal/json_objectwriter.cc", - "$protobuf_src_root/google/protobuf/util/internal/json_stream_parser.cc", - "$protobuf_src_root/google/protobuf/util/internal/object_writer.cc", - "$protobuf_src_root/google/protobuf/util/internal/proto_writer.cc", - "$protobuf_src_root/google/protobuf/util/internal/protostream_objectsource.cc", - "$protobuf_src_root/google/protobuf/util/internal/protostream_objectwriter.cc", - "$protobuf_src_root/google/protobuf/util/internal/type_info.cc", - "$protobuf_src_root/google/protobuf/util/internal/type_info_test_helper.cc", - "$protobuf_src_root/google/protobuf/util/internal/utility.cc", - "$protobuf_src_root/google/protobuf/util/json_util.cc", - "$protobuf_src_root/google/protobuf/util/message_differencer.cc", - "$protobuf_src_root/google/protobuf/util/time_util.cc", - "$protobuf_src_root/google/protobuf/util/type_resolver_util.cc", - "$protobuf_src_root/google/protobuf/wire_format.cc", - "$protobuf_src_root/google/protobuf/wrappers.pb.cc", - ] - include_dirs = [ - "$protobuf_src_root/google/protobuf/**/*.h", - "$protobuf_src_root/google/protobuf/**/*.inc", - "$protobuf_src_root", - ] - cflags_cc = [ - "-Wno-sign-compare", - "-Wno-deprecated-declarations", - ] - cflags = [ - "-Wno-sign-compare", - "-D HAVE_PTHREAD", - "-Wno-deprecated-declarations", - ] + cflags_cc = [ "-Wno-sign-compare" ] + cflags = [ + "-Wno-sign-compare", + "-D HAVE_PTHREAD", + ] - deps = [ ":protobuf_lite" ] - if (!is_asan && !is_debug) { - version_script = "libprotobuf.map" + public_configs = [ ":protobuf_config" ] + install_enable = true + innerapi_tags = [ "platformsdk_indirect" ] + subsystem_name = "${THIRDPARTY_PROTOBUF_SUBSYS_NAME}" + part_name = "${THIRDPARTY_PROTOBUF_PART_NAME}" } - public_configs = [ ":protobuf_config" ] - install_enable = true - subsystem_name = "${THIRDPARTY_PROTOBUF_SUBSYS_NAME}" - part_name = "${THIRDPARTY_PROTOBUF_PART_NAME}" -} - -ohos_static_library("protobuf_static") { - sources = [ - "$protobuf_src_root/google/protobuf/any.cc", - "$protobuf_src_root/google/protobuf/any.pb.cc", - "$protobuf_src_root/google/protobuf/api.pb.cc", - "$protobuf_src_root/google/protobuf/compiler/importer.cc", - "$protobuf_src_root/google/protobuf/compiler/parser.cc", - "$protobuf_src_root/google/protobuf/descriptor.cc", - "$protobuf_src_root/google/protobuf/descriptor.pb.cc", - "$protobuf_src_root/google/protobuf/descriptor_database.cc", - "$protobuf_src_root/google/protobuf/duration.pb.cc", - "$protobuf_src_root/google/protobuf/dynamic_message.cc", - "$protobuf_src_root/google/protobuf/empty.pb.cc", - "$protobuf_src_root/google/protobuf/extension_set_heavy.cc", - "$protobuf_src_root/google/protobuf/field_mask.pb.cc", - "$protobuf_src_root/google/protobuf/generated_message_reflection.cc", - "$protobuf_src_root/google/protobuf/generated_message_table_driven.cc", - "$protobuf_src_root/google/protobuf/io/gzip_stream.cc", - "$protobuf_src_root/google/protobuf/io/printer.cc", - "$protobuf_src_root/google/protobuf/io/tokenizer.cc", - "$protobuf_src_root/google/protobuf/map_field.cc", - "$protobuf_src_root/google/protobuf/message.cc", - "$protobuf_src_root/google/protobuf/reflection_ops.cc", - "$protobuf_src_root/google/protobuf/service.cc", - "$protobuf_src_root/google/protobuf/source_context.pb.cc", - "$protobuf_src_root/google/protobuf/struct.pb.cc", - "$protobuf_src_root/google/protobuf/stubs/substitute.cc", - "$protobuf_src_root/google/protobuf/text_format.cc", - "$protobuf_src_root/google/protobuf/timestamp.pb.cc", - "$protobuf_src_root/google/protobuf/type.pb.cc", - "$protobuf_src_root/google/protobuf/unknown_field_set.cc", - "$protobuf_src_root/google/protobuf/util/delimited_message_util.cc", - "$protobuf_src_root/google/protobuf/util/field_comparator.cc", - "$protobuf_src_root/google/protobuf/util/field_mask_util.cc", - "$protobuf_src_root/google/protobuf/util/internal/datapiece.cc", - "$protobuf_src_root/google/protobuf/util/internal/default_value_objectwriter.cc", - "$protobuf_src_root/google/protobuf/util/internal/error_listener.cc", - "$protobuf_src_root/google/protobuf/util/internal/field_mask_utility.cc", - "$protobuf_src_root/google/protobuf/util/internal/json_escaping.cc", - "$protobuf_src_root/google/protobuf/util/internal/json_objectwriter.cc", - "$protobuf_src_root/google/protobuf/util/internal/json_stream_parser.cc", - "$protobuf_src_root/google/protobuf/util/internal/object_writer.cc", - "$protobuf_src_root/google/protobuf/util/internal/proto_writer.cc", - "$protobuf_src_root/google/protobuf/util/internal/protostream_objectsource.cc", - "$protobuf_src_root/google/protobuf/util/internal/protostream_objectwriter.cc", - "$protobuf_src_root/google/protobuf/util/internal/type_info.cc", - "$protobuf_src_root/google/protobuf/util/internal/type_info_test_helper.cc", - "$protobuf_src_root/google/protobuf/util/internal/utility.cc", - "$protobuf_src_root/google/protobuf/util/json_util.cc", - "$protobuf_src_root/google/protobuf/util/message_differencer.cc", - "$protobuf_src_root/google/protobuf/util/time_util.cc", - "$protobuf_src_root/google/protobuf/util/type_resolver_util.cc", - "$protobuf_src_root/google/protobuf/wire_format.cc", - "$protobuf_src_root/google/protobuf/wrappers.pb.cc", - ] - include_dirs = [ - "$protobuf_src_root/google/protobuf/**/*.h", - "$protobuf_src_root/google/protobuf/**/*.inc", - "$protobuf_src_root", - ] - cflags_cc = [ - "-Wno-sign-compare", - "-Wno-deprecated-declarations", - ] - cflags = [ - "-Wno-sign-compare", - "-D HAVE_PTHREAD", - "-Wno-deprecated-declarations", - ] - - deps = [ ":protobuf_lite_static" ] - - public_configs = [ ":protobuf_config" ] - subsystem_name = "${THIRDPARTY_PROTOBUF_SUBSYS_NAME}" - part_name = "${THIRDPARTY_PROTOBUF_PART_NAME}" -} - -if (current_toolchain == host_toolchain) { - ohos_shared_library("protoc_lib") { + ohos_static_library("protobuf_lite_static") { sources = [ - "$protobuf_src_root/google/protobuf/compiler/code_generator.cc", - "$protobuf_src_root/google/protobuf/compiler/command_line_interface.cc", - "$protobuf_src_root/google/protobuf/compiler/cpp/cpp_enum.cc", - "$protobuf_src_root/google/protobuf/compiler/cpp/cpp_enum_field.cc", - "$protobuf_src_root/google/protobuf/compiler/cpp/cpp_extension.cc", - "$protobuf_src_root/google/protobuf/compiler/cpp/cpp_field.cc", - "$protobuf_src_root/google/protobuf/compiler/cpp/cpp_file.cc", - "$protobuf_src_root/google/protobuf/compiler/cpp/cpp_generator.cc", - "$protobuf_src_root/google/protobuf/compiler/cpp/cpp_helpers.cc", - "$protobuf_src_root/google/protobuf/compiler/cpp/cpp_map_field.cc", - "$protobuf_src_root/google/protobuf/compiler/cpp/cpp_message.cc", - "$protobuf_src_root/google/protobuf/compiler/cpp/cpp_message_field.cc", - "$protobuf_src_root/google/protobuf/compiler/cpp/cpp_padding_optimizer.cc", - "$protobuf_src_root/google/protobuf/compiler/cpp/cpp_primitive_field.cc", - "$protobuf_src_root/google/protobuf/compiler/cpp/cpp_service.cc", - "$protobuf_src_root/google/protobuf/compiler/cpp/cpp_string_field.cc", - "$protobuf_src_root/google/protobuf/compiler/csharp/csharp_doc_comment.cc", - "$protobuf_src_root/google/protobuf/compiler/csharp/csharp_enum.cc", - "$protobuf_src_root/google/protobuf/compiler/csharp/csharp_enum_field.cc", - "$protobuf_src_root/google/protobuf/compiler/csharp/csharp_field_base.cc", - "$protobuf_src_root/google/protobuf/compiler/csharp/csharp_generator.cc", - "$protobuf_src_root/google/protobuf/compiler/csharp/csharp_helpers.cc", - "$protobuf_src_root/google/protobuf/compiler/csharp/csharp_map_field.cc", - "$protobuf_src_root/google/protobuf/compiler/csharp/csharp_message.cc", - "$protobuf_src_root/google/protobuf/compiler/csharp/csharp_message_field.cc", - "$protobuf_src_root/google/protobuf/compiler/csharp/csharp_primitive_field.cc", - "$protobuf_src_root/google/protobuf/compiler/csharp/csharp_reflection_class.cc", - "$protobuf_src_root/google/protobuf/compiler/csharp/csharp_repeated_enum_field.cc", - "$protobuf_src_root/google/protobuf/compiler/csharp/csharp_repeated_message_field.cc", - "$protobuf_src_root/google/protobuf/compiler/csharp/csharp_repeated_primitive_field.cc", - "$protobuf_src_root/google/protobuf/compiler/csharp/csharp_source_generator_base.cc", - "$protobuf_src_root/google/protobuf/compiler/csharp/csharp_wrapper_field.cc", - "$protobuf_src_root/google/protobuf/compiler/java/java_context.cc", - "$protobuf_src_root/google/protobuf/compiler/java/java_doc_comment.cc", - "$protobuf_src_root/google/protobuf/compiler/java/java_enum.cc", - "$protobuf_src_root/google/protobuf/compiler/java/java_enum_field.cc", - "$protobuf_src_root/google/protobuf/compiler/java/java_enum_field_lite.cc", - "$protobuf_src_root/google/protobuf/compiler/java/java_enum_lite.cc", - "$protobuf_src_root/google/protobuf/compiler/java/java_extension.cc", - "$protobuf_src_root/google/protobuf/compiler/java/java_extension_lite.cc", - "$protobuf_src_root/google/protobuf/compiler/java/java_field.cc", - "$protobuf_src_root/google/protobuf/compiler/java/java_file.cc", - "$protobuf_src_root/google/protobuf/compiler/java/java_generator.cc", - "$protobuf_src_root/google/protobuf/compiler/java/java_generator_factory.cc", - "$protobuf_src_root/google/protobuf/compiler/java/java_helpers.cc", - "$protobuf_src_root/google/protobuf/compiler/java/java_map_field.cc", - "$protobuf_src_root/google/protobuf/compiler/java/java_map_field_lite.cc", - "$protobuf_src_root/google/protobuf/compiler/java/java_message.cc", - "$protobuf_src_root/google/protobuf/compiler/java/java_message_builder.cc", - "$protobuf_src_root/google/protobuf/compiler/java/java_message_builder_lite.cc", - "$protobuf_src_root/google/protobuf/compiler/java/java_message_field.cc", - "$protobuf_src_root/google/protobuf/compiler/java/java_message_field_lite.cc", - "$protobuf_src_root/google/protobuf/compiler/java/java_message_lite.cc", - "$protobuf_src_root/google/protobuf/compiler/java/java_name_resolver.cc", - "$protobuf_src_root/google/protobuf/compiler/java/java_primitive_field.cc", - "$protobuf_src_root/google/protobuf/compiler/java/java_primitive_field_lite.cc", - "$protobuf_src_root/google/protobuf/compiler/java/java_service.cc", - "$protobuf_src_root/google/protobuf/compiler/java/java_shared_code_generator.cc", - "$protobuf_src_root/google/protobuf/compiler/java/java_string_field.cc", - "$protobuf_src_root/google/protobuf/compiler/java/java_string_field_lite.cc", - "$protobuf_src_root/google/protobuf/compiler/js/js_generator.cc", - "$protobuf_src_root/google/protobuf/compiler/js/well_known_types_embed.cc", - "$protobuf_src_root/google/protobuf/compiler/objectivec/objectivec_enum.cc", - "$protobuf_src_root/google/protobuf/compiler/objectivec/objectivec_enum_field.cc", - "$protobuf_src_root/google/protobuf/compiler/objectivec/objectivec_extension.cc", - "$protobuf_src_root/google/protobuf/compiler/objectivec/objectivec_field.cc", - "$protobuf_src_root/google/protobuf/compiler/objectivec/objectivec_file.cc", - "$protobuf_src_root/google/protobuf/compiler/objectivec/objectivec_generator.cc", - "$protobuf_src_root/google/protobuf/compiler/objectivec/objectivec_helpers.cc", - "$protobuf_src_root/google/protobuf/compiler/objectivec/objectivec_map_field.cc", - "$protobuf_src_root/google/protobuf/compiler/objectivec/objectivec_message.cc", - "$protobuf_src_root/google/protobuf/compiler/objectivec/objectivec_message_field.cc", - "$protobuf_src_root/google/protobuf/compiler/objectivec/objectivec_oneof.cc", - "$protobuf_src_root/google/protobuf/compiler/objectivec/objectivec_primitive_field.cc", - "$protobuf_src_root/google/protobuf/compiler/php/php_generator.cc", - "$protobuf_src_root/google/protobuf/compiler/plugin.cc", - "$protobuf_src_root/google/protobuf/compiler/plugin.pb.cc", - "$protobuf_src_root/google/protobuf/compiler/python/python_generator.cc", - "$protobuf_src_root/google/protobuf/compiler/ruby/ruby_generator.cc", - "$protobuf_src_root/google/protobuf/compiler/subprocess.cc", - "$protobuf_src_root/google/protobuf/compiler/zip_writer.cc", + "$protobuf_src_root/google/protobuf/any_lite.cc", + "$protobuf_src_root/google/protobuf/arena.cc", + "$protobuf_src_root/google/protobuf/extension_set.cc", + "$protobuf_src_root/google/protobuf/generated_enum_util.cc", + "$protobuf_src_root/google/protobuf/generated_message_table_driven_lite.cc", + "$protobuf_src_root/google/protobuf/generated_message_util.cc", + "$protobuf_src_root/google/protobuf/implicit_weak_message.cc", + "$protobuf_src_root/google/protobuf/io/coded_stream.cc", + "$protobuf_src_root/google/protobuf/io/io_win32.cc", + "$protobuf_src_root/google/protobuf/io/strtod.cc", + "$protobuf_src_root/google/protobuf/io/zero_copy_stream.cc", + "$protobuf_src_root/google/protobuf/io/zero_copy_stream_impl.cc", + "$protobuf_src_root/google/protobuf/io/zero_copy_stream_impl_lite.cc", + "$protobuf_src_root/google/protobuf/message_lite.cc", + "$protobuf_src_root/google/protobuf/parse_context.cc", + "$protobuf_src_root/google/protobuf/repeated_field.cc", + "$protobuf_src_root/google/protobuf/stubs/bytestream.cc", + "$protobuf_src_root/google/protobuf/stubs/common.cc", + "$protobuf_src_root/google/protobuf/stubs/int128.cc", + "$protobuf_src_root/google/protobuf/stubs/status.cc", + "$protobuf_src_root/google/protobuf/stubs/statusor.cc", + "$protobuf_src_root/google/protobuf/stubs/stringpiece.cc", + "$protobuf_src_root/google/protobuf/stubs/stringprintf.cc", + "$protobuf_src_root/google/protobuf/stubs/structurally_valid.cc", + "$protobuf_src_root/google/protobuf/stubs/strutil.cc", + "$protobuf_src_root/google/protobuf/stubs/time.cc", + "$protobuf_src_root/google/protobuf/wire_format_lite.cc", ] include_dirs = [ "$protobuf_src_root/google/protobuf/**/*.h", "$protobuf_src_root/google/protobuf/**/*.inc", "$protobuf_src_root", ] + if (!is_mingw) { + if (current_toolchain != host_toolchain) { + # target build, not host build + defines = [ "HAVE_HILOG" ] + external_deps = [ "hilog:libhilog" ] + } + } else { + defines = [ "_FILE_OFFSET_BITS_SET_LSEEK" ] + } + cflags_cc = [ "-Wno-sign-compare", - "-Wno-unused-function", - "-Wno-unused-private-field", "-Wno-deprecated-declarations", ] cflags = [ + "-Wno-deprecated-declarations", "-Wno-sign-compare", "-D HAVE_PTHREAD", - "-Wno-unused-function", - "-Wno-deprecated-declarations", - ] - - deps = [ - ":protobuf", - ":protobuf_lite", ] - + if (is_mingw) { + # ../../third_party/protobuf/src/google/protobuf/io/zero_copy_stream_impl.cc:60:9: error: 'lseek' macro redefined [-Werror,-Wmacro-redefined] + cflags += [ "-Wno-macro-redefined" ] + } public_configs = [ ":protobuf_config" ] subsystem_name = "${THIRDPARTY_PROTOBUF_SUBSYS_NAME}" part_name = "${THIRDPARTY_PROTOBUF_PART_NAME}" } - ohos_static_library("protoc_static_lib") { + ohos_shared_library("protobuf") { sources = [ - "$protobuf_src_root/google/protobuf/compiler/code_generator.cc", - "$protobuf_src_root/google/protobuf/compiler/command_line_interface.cc", - "$protobuf_src_root/google/protobuf/compiler/cpp/cpp_enum.cc", - "$protobuf_src_root/google/protobuf/compiler/cpp/cpp_enum_field.cc", - "$protobuf_src_root/google/protobuf/compiler/cpp/cpp_extension.cc", - "$protobuf_src_root/google/protobuf/compiler/cpp/cpp_field.cc", - "$protobuf_src_root/google/protobuf/compiler/cpp/cpp_file.cc", - "$protobuf_src_root/google/protobuf/compiler/cpp/cpp_generator.cc", - "$protobuf_src_root/google/protobuf/compiler/cpp/cpp_helpers.cc", - "$protobuf_src_root/google/protobuf/compiler/cpp/cpp_map_field.cc", - "$protobuf_src_root/google/protobuf/compiler/cpp/cpp_message.cc", - "$protobuf_src_root/google/protobuf/compiler/cpp/cpp_message_field.cc", - "$protobuf_src_root/google/protobuf/compiler/cpp/cpp_padding_optimizer.cc", - "$protobuf_src_root/google/protobuf/compiler/cpp/cpp_primitive_field.cc", - "$protobuf_src_root/google/protobuf/compiler/cpp/cpp_service.cc", - "$protobuf_src_root/google/protobuf/compiler/cpp/cpp_string_field.cc", - "$protobuf_src_root/google/protobuf/compiler/csharp/csharp_doc_comment.cc", - "$protobuf_src_root/google/protobuf/compiler/csharp/csharp_enum.cc", - "$protobuf_src_root/google/protobuf/compiler/csharp/csharp_enum_field.cc", - "$protobuf_src_root/google/protobuf/compiler/csharp/csharp_field_base.cc", - "$protobuf_src_root/google/protobuf/compiler/csharp/csharp_generator.cc", - "$protobuf_src_root/google/protobuf/compiler/csharp/csharp_helpers.cc", - "$protobuf_src_root/google/protobuf/compiler/csharp/csharp_map_field.cc", - "$protobuf_src_root/google/protobuf/compiler/csharp/csharp_message.cc", - "$protobuf_src_root/google/protobuf/compiler/csharp/csharp_message_field.cc", - "$protobuf_src_root/google/protobuf/compiler/csharp/csharp_primitive_field.cc", - "$protobuf_src_root/google/protobuf/compiler/csharp/csharp_reflection_class.cc", - "$protobuf_src_root/google/protobuf/compiler/csharp/csharp_repeated_enum_field.cc", - "$protobuf_src_root/google/protobuf/compiler/csharp/csharp_repeated_message_field.cc", - "$protobuf_src_root/google/protobuf/compiler/csharp/csharp_repeated_primitive_field.cc", - "$protobuf_src_root/google/protobuf/compiler/csharp/csharp_source_generator_base.cc", - "$protobuf_src_root/google/protobuf/compiler/csharp/csharp_wrapper_field.cc", - "$protobuf_src_root/google/protobuf/compiler/java/java_context.cc", - "$protobuf_src_root/google/protobuf/compiler/java/java_doc_comment.cc", - "$protobuf_src_root/google/protobuf/compiler/java/java_enum.cc", - "$protobuf_src_root/google/protobuf/compiler/java/java_enum_field.cc", - "$protobuf_src_root/google/protobuf/compiler/java/java_enum_field_lite.cc", - "$protobuf_src_root/google/protobuf/compiler/java/java_enum_lite.cc", - "$protobuf_src_root/google/protobuf/compiler/java/java_extension.cc", - "$protobuf_src_root/google/protobuf/compiler/java/java_extension_lite.cc", - "$protobuf_src_root/google/protobuf/compiler/java/java_field.cc", - "$protobuf_src_root/google/protobuf/compiler/java/java_file.cc", - "$protobuf_src_root/google/protobuf/compiler/java/java_generator.cc", - "$protobuf_src_root/google/protobuf/compiler/java/java_generator_factory.cc", - "$protobuf_src_root/google/protobuf/compiler/java/java_helpers.cc", - "$protobuf_src_root/google/protobuf/compiler/java/java_map_field.cc", - "$protobuf_src_root/google/protobuf/compiler/java/java_map_field_lite.cc", - "$protobuf_src_root/google/protobuf/compiler/java/java_message.cc", - "$protobuf_src_root/google/protobuf/compiler/java/java_message_builder.cc", - "$protobuf_src_root/google/protobuf/compiler/java/java_message_builder_lite.cc", - "$protobuf_src_root/google/protobuf/compiler/java/java_message_field.cc", - "$protobuf_src_root/google/protobuf/compiler/java/java_message_field_lite.cc", - "$protobuf_src_root/google/protobuf/compiler/java/java_message_lite.cc", - "$protobuf_src_root/google/protobuf/compiler/java/java_name_resolver.cc", - "$protobuf_src_root/google/protobuf/compiler/java/java_primitive_field.cc", - "$protobuf_src_root/google/protobuf/compiler/java/java_primitive_field_lite.cc", - "$protobuf_src_root/google/protobuf/compiler/java/java_service.cc", - "$protobuf_src_root/google/protobuf/compiler/java/java_shared_code_generator.cc", - "$protobuf_src_root/google/protobuf/compiler/java/java_string_field.cc", - "$protobuf_src_root/google/protobuf/compiler/java/java_string_field_lite.cc", - "$protobuf_src_root/google/protobuf/compiler/js/js_generator.cc", - "$protobuf_src_root/google/protobuf/compiler/js/well_known_types_embed.cc", - "$protobuf_src_root/google/protobuf/compiler/objectivec/objectivec_enum.cc", - "$protobuf_src_root/google/protobuf/compiler/objectivec/objectivec_enum_field.cc", - "$protobuf_src_root/google/protobuf/compiler/objectivec/objectivec_extension.cc", - "$protobuf_src_root/google/protobuf/compiler/objectivec/objectivec_field.cc", - "$protobuf_src_root/google/protobuf/compiler/objectivec/objectivec_file.cc", - "$protobuf_src_root/google/protobuf/compiler/objectivec/objectivec_generator.cc", - "$protobuf_src_root/google/protobuf/compiler/objectivec/objectivec_helpers.cc", - "$protobuf_src_root/google/protobuf/compiler/objectivec/objectivec_map_field.cc", - "$protobuf_src_root/google/protobuf/compiler/objectivec/objectivec_message.cc", - "$protobuf_src_root/google/protobuf/compiler/objectivec/objectivec_message_field.cc", - "$protobuf_src_root/google/protobuf/compiler/objectivec/objectivec_oneof.cc", - "$protobuf_src_root/google/protobuf/compiler/objectivec/objectivec_primitive_field.cc", - "$protobuf_src_root/google/protobuf/compiler/php/php_generator.cc", - "$protobuf_src_root/google/protobuf/compiler/plugin.cc", - "$protobuf_src_root/google/protobuf/compiler/plugin.pb.cc", - "$protobuf_src_root/google/protobuf/compiler/python/python_generator.cc", - "$protobuf_src_root/google/protobuf/compiler/ruby/ruby_generator.cc", - "$protobuf_src_root/google/protobuf/compiler/subprocess.cc", - "$protobuf_src_root/google/protobuf/compiler/zip_writer.cc", + "$protobuf_src_root/google/protobuf/any.cc", + "$protobuf_src_root/google/protobuf/any.pb.cc", + "$protobuf_src_root/google/protobuf/api.pb.cc", + "$protobuf_src_root/google/protobuf/compiler/importer.cc", + "$protobuf_src_root/google/protobuf/compiler/parser.cc", + "$protobuf_src_root/google/protobuf/descriptor.cc", + "$protobuf_src_root/google/protobuf/descriptor.pb.cc", + "$protobuf_src_root/google/protobuf/descriptor_database.cc", + "$protobuf_src_root/google/protobuf/duration.pb.cc", + "$protobuf_src_root/google/protobuf/dynamic_message.cc", + "$protobuf_src_root/google/protobuf/empty.pb.cc", + "$protobuf_src_root/google/protobuf/extension_set_heavy.cc", + "$protobuf_src_root/google/protobuf/field_mask.pb.cc", + "$protobuf_src_root/google/protobuf/generated_message_reflection.cc", + "$protobuf_src_root/google/protobuf/generated_message_table_driven.cc", + "$protobuf_src_root/google/protobuf/io/gzip_stream.cc", + "$protobuf_src_root/google/protobuf/io/printer.cc", + "$protobuf_src_root/google/protobuf/io/tokenizer.cc", + "$protobuf_src_root/google/protobuf/map_field.cc", + "$protobuf_src_root/google/protobuf/message.cc", + "$protobuf_src_root/google/protobuf/reflection_ops.cc", + "$protobuf_src_root/google/protobuf/service.cc", + "$protobuf_src_root/google/protobuf/source_context.pb.cc", + "$protobuf_src_root/google/protobuf/struct.pb.cc", + "$protobuf_src_root/google/protobuf/stubs/substitute.cc", + "$protobuf_src_root/google/protobuf/text_format.cc", + "$protobuf_src_root/google/protobuf/timestamp.pb.cc", + "$protobuf_src_root/google/protobuf/type.pb.cc", + "$protobuf_src_root/google/protobuf/unknown_field_set.cc", + "$protobuf_src_root/google/protobuf/util/delimited_message_util.cc", + "$protobuf_src_root/google/protobuf/util/field_comparator.cc", + "$protobuf_src_root/google/protobuf/util/field_mask_util.cc", + "$protobuf_src_root/google/protobuf/util/internal/datapiece.cc", + "$protobuf_src_root/google/protobuf/util/internal/default_value_objectwriter.cc", + "$protobuf_src_root/google/protobuf/util/internal/error_listener.cc", + "$protobuf_src_root/google/protobuf/util/internal/field_mask_utility.cc", + "$protobuf_src_root/google/protobuf/util/internal/json_escaping.cc", + "$protobuf_src_root/google/protobuf/util/internal/json_objectwriter.cc", + "$protobuf_src_root/google/protobuf/util/internal/json_stream_parser.cc", + "$protobuf_src_root/google/protobuf/util/internal/object_writer.cc", + "$protobuf_src_root/google/protobuf/util/internal/proto_writer.cc", + "$protobuf_src_root/google/protobuf/util/internal/protostream_objectsource.cc", + "$protobuf_src_root/google/protobuf/util/internal/protostream_objectwriter.cc", + "$protobuf_src_root/google/protobuf/util/internal/type_info.cc", + "$protobuf_src_root/google/protobuf/util/internal/type_info_test_helper.cc", + "$protobuf_src_root/google/protobuf/util/internal/utility.cc", + "$protobuf_src_root/google/protobuf/util/json_util.cc", + "$protobuf_src_root/google/protobuf/util/message_differencer.cc", + "$protobuf_src_root/google/protobuf/util/time_util.cc", + "$protobuf_src_root/google/protobuf/util/type_resolver_util.cc", + "$protobuf_src_root/google/protobuf/wire_format.cc", + "$protobuf_src_root/google/protobuf/wrappers.pb.cc", ] include_dirs = [ "$protobuf_src_root/google/protobuf/**/*.h", @@ -506,38 +210,85 @@ if (current_toolchain == host_toolchain) { ] cflags_cc = [ "-Wno-sign-compare", - "-Wno-unused-function", - "-Wno-unused-private-field", "-Wno-deprecated-declarations", ] cflags = [ "-Wno-sign-compare", "-D HAVE_PTHREAD", - "-Wno-unused-function", "-Wno-deprecated-declarations", ] - deps = [ - ":protobuf_lite_static", - ":protobuf_static", - ] + deps = [ ":protobuf_lite" ] + if (!is_asan && !is_debug) { + version_script = "libprotobuf.map" + } public_configs = [ ":protobuf_config" ] + install_enable = true subsystem_name = "${THIRDPARTY_PROTOBUF_SUBSYS_NAME}" part_name = "${THIRDPARTY_PROTOBUF_PART_NAME}" } -} -# Only compile the plugin for the host architecture. -if (current_toolchain == host_toolchain) { - ohos_executable("protoc") { - sources = [ "$protobuf_src_root/google/protobuf/compiler/main.cc" ] + ohos_static_library("protobuf_static") { + sources = [ + "$protobuf_src_root/google/protobuf/any.cc", + "$protobuf_src_root/google/protobuf/any.pb.cc", + "$protobuf_src_root/google/protobuf/api.pb.cc", + "$protobuf_src_root/google/protobuf/compiler/importer.cc", + "$protobuf_src_root/google/protobuf/compiler/parser.cc", + "$protobuf_src_root/google/protobuf/descriptor.cc", + "$protobuf_src_root/google/protobuf/descriptor.pb.cc", + "$protobuf_src_root/google/protobuf/descriptor_database.cc", + "$protobuf_src_root/google/protobuf/duration.pb.cc", + "$protobuf_src_root/google/protobuf/dynamic_message.cc", + "$protobuf_src_root/google/protobuf/empty.pb.cc", + "$protobuf_src_root/google/protobuf/extension_set_heavy.cc", + "$protobuf_src_root/google/protobuf/field_mask.pb.cc", + "$protobuf_src_root/google/protobuf/generated_message_reflection.cc", + "$protobuf_src_root/google/protobuf/generated_message_table_driven.cc", + "$protobuf_src_root/google/protobuf/io/gzip_stream.cc", + "$protobuf_src_root/google/protobuf/io/printer.cc", + "$protobuf_src_root/google/protobuf/io/tokenizer.cc", + "$protobuf_src_root/google/protobuf/map_field.cc", + "$protobuf_src_root/google/protobuf/message.cc", + "$protobuf_src_root/google/protobuf/reflection_ops.cc", + "$protobuf_src_root/google/protobuf/service.cc", + "$protobuf_src_root/google/protobuf/source_context.pb.cc", + "$protobuf_src_root/google/protobuf/struct.pb.cc", + "$protobuf_src_root/google/protobuf/stubs/substitute.cc", + "$protobuf_src_root/google/protobuf/text_format.cc", + "$protobuf_src_root/google/protobuf/timestamp.pb.cc", + "$protobuf_src_root/google/protobuf/type.pb.cc", + "$protobuf_src_root/google/protobuf/unknown_field_set.cc", + "$protobuf_src_root/google/protobuf/util/delimited_message_util.cc", + "$protobuf_src_root/google/protobuf/util/field_comparator.cc", + "$protobuf_src_root/google/protobuf/util/field_mask_util.cc", + "$protobuf_src_root/google/protobuf/util/internal/datapiece.cc", + "$protobuf_src_root/google/protobuf/util/internal/default_value_objectwriter.cc", + "$protobuf_src_root/google/protobuf/util/internal/error_listener.cc", + "$protobuf_src_root/google/protobuf/util/internal/field_mask_utility.cc", + "$protobuf_src_root/google/protobuf/util/internal/json_escaping.cc", + "$protobuf_src_root/google/protobuf/util/internal/json_objectwriter.cc", + "$protobuf_src_root/google/protobuf/util/internal/json_stream_parser.cc", + "$protobuf_src_root/google/protobuf/util/internal/object_writer.cc", + "$protobuf_src_root/google/protobuf/util/internal/proto_writer.cc", + "$protobuf_src_root/google/protobuf/util/internal/protostream_objectsource.cc", + "$protobuf_src_root/google/protobuf/util/internal/protostream_objectwriter.cc", + "$protobuf_src_root/google/protobuf/util/internal/type_info.cc", + "$protobuf_src_root/google/protobuf/util/internal/type_info_test_helper.cc", + "$protobuf_src_root/google/protobuf/util/internal/utility.cc", + "$protobuf_src_root/google/protobuf/util/json_util.cc", + "$protobuf_src_root/google/protobuf/util/message_differencer.cc", + "$protobuf_src_root/google/protobuf/util/time_util.cc", + "$protobuf_src_root/google/protobuf/util/type_resolver_util.cc", + "$protobuf_src_root/google/protobuf/wire_format.cc", + "$protobuf_src_root/google/protobuf/wrappers.pb.cc", + ] include_dirs = [ "$protobuf_src_root/google/protobuf/**/*.h", "$protobuf_src_root/google/protobuf/**/*.inc", "$protobuf_src_root", ] - deps = [ ":protoc_static_lib" ] cflags_cc = [ "-Wno-sign-compare", "-Wno-deprecated-declarations", @@ -547,7 +298,261 @@ if (current_toolchain == host_toolchain) { "-D HAVE_PTHREAD", "-Wno-deprecated-declarations", ] + + deps = [ ":protobuf_lite_static" ] + + public_configs = [ ":protobuf_config" ] subsystem_name = "${THIRDPARTY_PROTOBUF_SUBSYS_NAME}" part_name = "${THIRDPARTY_PROTOBUF_PART_NAME}" } -} + + if (current_toolchain == host_toolchain) { + ohos_shared_library("protoc_lib") { + sources = [ + "$protobuf_src_root/google/protobuf/compiler/code_generator.cc", + "$protobuf_src_root/google/protobuf/compiler/command_line_interface.cc", + "$protobuf_src_root/google/protobuf/compiler/cpp/cpp_enum.cc", + "$protobuf_src_root/google/protobuf/compiler/cpp/cpp_enum_field.cc", + "$protobuf_src_root/google/protobuf/compiler/cpp/cpp_extension.cc", + "$protobuf_src_root/google/protobuf/compiler/cpp/cpp_field.cc", + "$protobuf_src_root/google/protobuf/compiler/cpp/cpp_file.cc", + "$protobuf_src_root/google/protobuf/compiler/cpp/cpp_generator.cc", + "$protobuf_src_root/google/protobuf/compiler/cpp/cpp_helpers.cc", + "$protobuf_src_root/google/protobuf/compiler/cpp/cpp_map_field.cc", + "$protobuf_src_root/google/protobuf/compiler/cpp/cpp_message.cc", + "$protobuf_src_root/google/protobuf/compiler/cpp/cpp_message_field.cc", + "$protobuf_src_root/google/protobuf/compiler/cpp/cpp_padding_optimizer.cc", + "$protobuf_src_root/google/protobuf/compiler/cpp/cpp_primitive_field.cc", + "$protobuf_src_root/google/protobuf/compiler/cpp/cpp_service.cc", + "$protobuf_src_root/google/protobuf/compiler/cpp/cpp_string_field.cc", + "$protobuf_src_root/google/protobuf/compiler/csharp/csharp_doc_comment.cc", + "$protobuf_src_root/google/protobuf/compiler/csharp/csharp_enum.cc", + "$protobuf_src_root/google/protobuf/compiler/csharp/csharp_enum_field.cc", + "$protobuf_src_root/google/protobuf/compiler/csharp/csharp_field_base.cc", + "$protobuf_src_root/google/protobuf/compiler/csharp/csharp_generator.cc", + "$protobuf_src_root/google/protobuf/compiler/csharp/csharp_helpers.cc", + "$protobuf_src_root/google/protobuf/compiler/csharp/csharp_map_field.cc", + "$protobuf_src_root/google/protobuf/compiler/csharp/csharp_message.cc", + "$protobuf_src_root/google/protobuf/compiler/csharp/csharp_message_field.cc", + "$protobuf_src_root/google/protobuf/compiler/csharp/csharp_primitive_field.cc", + "$protobuf_src_root/google/protobuf/compiler/csharp/csharp_reflection_class.cc", + "$protobuf_src_root/google/protobuf/compiler/csharp/csharp_repeated_enum_field.cc", + "$protobuf_src_root/google/protobuf/compiler/csharp/csharp_repeated_message_field.cc", + "$protobuf_src_root/google/protobuf/compiler/csharp/csharp_repeated_primitive_field.cc", + "$protobuf_src_root/google/protobuf/compiler/csharp/csharp_source_generator_base.cc", + "$protobuf_src_root/google/protobuf/compiler/csharp/csharp_wrapper_field.cc", + "$protobuf_src_root/google/protobuf/compiler/java/java_context.cc", + "$protobuf_src_root/google/protobuf/compiler/java/java_doc_comment.cc", + "$protobuf_src_root/google/protobuf/compiler/java/java_enum.cc", + "$protobuf_src_root/google/protobuf/compiler/java/java_enum_field.cc", + "$protobuf_src_root/google/protobuf/compiler/java/java_enum_field_lite.cc", + "$protobuf_src_root/google/protobuf/compiler/java/java_enum_lite.cc", + "$protobuf_src_root/google/protobuf/compiler/java/java_extension.cc", + "$protobuf_src_root/google/protobuf/compiler/java/java_extension_lite.cc", + "$protobuf_src_root/google/protobuf/compiler/java/java_field.cc", + "$protobuf_src_root/google/protobuf/compiler/java/java_file.cc", + "$protobuf_src_root/google/protobuf/compiler/java/java_generator.cc", + "$protobuf_src_root/google/protobuf/compiler/java/java_generator_factory.cc", + "$protobuf_src_root/google/protobuf/compiler/java/java_helpers.cc", + "$protobuf_src_root/google/protobuf/compiler/java/java_map_field.cc", + "$protobuf_src_root/google/protobuf/compiler/java/java_map_field_lite.cc", + "$protobuf_src_root/google/protobuf/compiler/java/java_message.cc", + "$protobuf_src_root/google/protobuf/compiler/java/java_message_builder.cc", + "$protobuf_src_root/google/protobuf/compiler/java/java_message_builder_lite.cc", + "$protobuf_src_root/google/protobuf/compiler/java/java_message_field.cc", + "$protobuf_src_root/google/protobuf/compiler/java/java_message_field_lite.cc", + "$protobuf_src_root/google/protobuf/compiler/java/java_message_lite.cc", + "$protobuf_src_root/google/protobuf/compiler/java/java_name_resolver.cc", + "$protobuf_src_root/google/protobuf/compiler/java/java_primitive_field.cc", + "$protobuf_src_root/google/protobuf/compiler/java/java_primitive_field_lite.cc", + "$protobuf_src_root/google/protobuf/compiler/java/java_service.cc", + "$protobuf_src_root/google/protobuf/compiler/java/java_shared_code_generator.cc", + "$protobuf_src_root/google/protobuf/compiler/java/java_string_field.cc", + "$protobuf_src_root/google/protobuf/compiler/java/java_string_field_lite.cc", + "$protobuf_src_root/google/protobuf/compiler/js/js_generator.cc", + "$protobuf_src_root/google/protobuf/compiler/js/well_known_types_embed.cc", + "$protobuf_src_root/google/protobuf/compiler/objectivec/objectivec_enum.cc", + "$protobuf_src_root/google/protobuf/compiler/objectivec/objectivec_enum_field.cc", + "$protobuf_src_root/google/protobuf/compiler/objectivec/objectivec_extension.cc", + "$protobuf_src_root/google/protobuf/compiler/objectivec/objectivec_field.cc", + "$protobuf_src_root/google/protobuf/compiler/objectivec/objectivec_file.cc", + "$protobuf_src_root/google/protobuf/compiler/objectivec/objectivec_generator.cc", + "$protobuf_src_root/google/protobuf/compiler/objectivec/objectivec_helpers.cc", + "$protobuf_src_root/google/protobuf/compiler/objectivec/objectivec_map_field.cc", + "$protobuf_src_root/google/protobuf/compiler/objectivec/objectivec_message.cc", + "$protobuf_src_root/google/protobuf/compiler/objectivec/objectivec_message_field.cc", + "$protobuf_src_root/google/protobuf/compiler/objectivec/objectivec_oneof.cc", + "$protobuf_src_root/google/protobuf/compiler/objectivec/objectivec_primitive_field.cc", + "$protobuf_src_root/google/protobuf/compiler/php/php_generator.cc", + "$protobuf_src_root/google/protobuf/compiler/plugin.cc", + "$protobuf_src_root/google/protobuf/compiler/plugin.pb.cc", + "$protobuf_src_root/google/protobuf/compiler/python/python_generator.cc", + "$protobuf_src_root/google/protobuf/compiler/ruby/ruby_generator.cc", + "$protobuf_src_root/google/protobuf/compiler/subprocess.cc", + "$protobuf_src_root/google/protobuf/compiler/zip_writer.cc", + ] + include_dirs = [ + "$protobuf_src_root/google/protobuf/**/*.h", + "$protobuf_src_root/google/protobuf/**/*.inc", + "$protobuf_src_root", + ] + cflags_cc = [ + "-Wno-sign-compare", + "-Wno-unused-function", + "-Wno-unused-private-field", + "-Wno-deprecated-declarations", + ] + cflags = [ + "-Wno-sign-compare", + "-D HAVE_PTHREAD", + "-Wno-unused-function", + "-Wno-deprecated-declarations", + ] + + deps = [ + ":protobuf", + ":protobuf_lite", + ] + + public_configs = [ ":protobuf_config" ] + subsystem_name = "${THIRDPARTY_PROTOBUF_SUBSYS_NAME}" + part_name = "${THIRDPARTY_PROTOBUF_PART_NAME}" + } + + ohos_static_library("protoc_static_lib") { + sources = [ + "$protobuf_src_root/google/protobuf/compiler/code_generator.cc", + "$protobuf_src_root/google/protobuf/compiler/command_line_interface.cc", + "$protobuf_src_root/google/protobuf/compiler/cpp/cpp_enum.cc", + "$protobuf_src_root/google/protobuf/compiler/cpp/cpp_enum_field.cc", + "$protobuf_src_root/google/protobuf/compiler/cpp/cpp_extension.cc", + "$protobuf_src_root/google/protobuf/compiler/cpp/cpp_field.cc", + "$protobuf_src_root/google/protobuf/compiler/cpp/cpp_file.cc", + "$protobuf_src_root/google/protobuf/compiler/cpp/cpp_generator.cc", + "$protobuf_src_root/google/protobuf/compiler/cpp/cpp_helpers.cc", + "$protobuf_src_root/google/protobuf/compiler/cpp/cpp_map_field.cc", + "$protobuf_src_root/google/protobuf/compiler/cpp/cpp_message.cc", + "$protobuf_src_root/google/protobuf/compiler/cpp/cpp_message_field.cc", + "$protobuf_src_root/google/protobuf/compiler/cpp/cpp_padding_optimizer.cc", + "$protobuf_src_root/google/protobuf/compiler/cpp/cpp_primitive_field.cc", + "$protobuf_src_root/google/protobuf/compiler/cpp/cpp_service.cc", + "$protobuf_src_root/google/protobuf/compiler/cpp/cpp_string_field.cc", + "$protobuf_src_root/google/protobuf/compiler/csharp/csharp_doc_comment.cc", + "$protobuf_src_root/google/protobuf/compiler/csharp/csharp_enum.cc", + "$protobuf_src_root/google/protobuf/compiler/csharp/csharp_enum_field.cc", + "$protobuf_src_root/google/protobuf/compiler/csharp/csharp_field_base.cc", + "$protobuf_src_root/google/protobuf/compiler/csharp/csharp_generator.cc", + "$protobuf_src_root/google/protobuf/compiler/csharp/csharp_helpers.cc", + "$protobuf_src_root/google/protobuf/compiler/csharp/csharp_map_field.cc", + "$protobuf_src_root/google/protobuf/compiler/csharp/csharp_message.cc", + "$protobuf_src_root/google/protobuf/compiler/csharp/csharp_message_field.cc", + "$protobuf_src_root/google/protobuf/compiler/csharp/csharp_primitive_field.cc", + "$protobuf_src_root/google/protobuf/compiler/csharp/csharp_reflection_class.cc", + "$protobuf_src_root/google/protobuf/compiler/csharp/csharp_repeated_enum_field.cc", + "$protobuf_src_root/google/protobuf/compiler/csharp/csharp_repeated_message_field.cc", + "$protobuf_src_root/google/protobuf/compiler/csharp/csharp_repeated_primitive_field.cc", + "$protobuf_src_root/google/protobuf/compiler/csharp/csharp_source_generator_base.cc", + "$protobuf_src_root/google/protobuf/compiler/csharp/csharp_wrapper_field.cc", + "$protobuf_src_root/google/protobuf/compiler/java/java_context.cc", + "$protobuf_src_root/google/protobuf/compiler/java/java_doc_comment.cc", + "$protobuf_src_root/google/protobuf/compiler/java/java_enum.cc", + "$protobuf_src_root/google/protobuf/compiler/java/java_enum_field.cc", + "$protobuf_src_root/google/protobuf/compiler/java/java_enum_field_lite.cc", + "$protobuf_src_root/google/protobuf/compiler/java/java_enum_lite.cc", + "$protobuf_src_root/google/protobuf/compiler/java/java_extension.cc", + "$protobuf_src_root/google/protobuf/compiler/java/java_extension_lite.cc", + "$protobuf_src_root/google/protobuf/compiler/java/java_field.cc", + "$protobuf_src_root/google/protobuf/compiler/java/java_file.cc", + "$protobuf_src_root/google/protobuf/compiler/java/java_generator.cc", + "$protobuf_src_root/google/protobuf/compiler/java/java_generator_factory.cc", + "$protobuf_src_root/google/protobuf/compiler/java/java_helpers.cc", + "$protobuf_src_root/google/protobuf/compiler/java/java_map_field.cc", + "$protobuf_src_root/google/protobuf/compiler/java/java_map_field_lite.cc", + "$protobuf_src_root/google/protobuf/compiler/java/java_message.cc", + "$protobuf_src_root/google/protobuf/compiler/java/java_message_builder.cc", + "$protobuf_src_root/google/protobuf/compiler/java/java_message_builder_lite.cc", + "$protobuf_src_root/google/protobuf/compiler/java/java_message_field.cc", + "$protobuf_src_root/google/protobuf/compiler/java/java_message_field_lite.cc", + "$protobuf_src_root/google/protobuf/compiler/java/java_message_lite.cc", + "$protobuf_src_root/google/protobuf/compiler/java/java_name_resolver.cc", + "$protobuf_src_root/google/protobuf/compiler/java/java_primitive_field.cc", + "$protobuf_src_root/google/protobuf/compiler/java/java_primitive_field_lite.cc", + "$protobuf_src_root/google/protobuf/compiler/java/java_service.cc", + "$protobuf_src_root/google/protobuf/compiler/java/java_shared_code_generator.cc", + "$protobuf_src_root/google/protobuf/compiler/java/java_string_field.cc", + "$protobuf_src_root/google/protobuf/compiler/java/java_string_field_lite.cc", + "$protobuf_src_root/google/protobuf/compiler/js/js_generator.cc", + "$protobuf_src_root/google/protobuf/compiler/js/well_known_types_embed.cc", + "$protobuf_src_root/google/protobuf/compiler/objectivec/objectivec_enum.cc", + "$protobuf_src_root/google/protobuf/compiler/objectivec/objectivec_enum_field.cc", + "$protobuf_src_root/google/protobuf/compiler/objectivec/objectivec_extension.cc", + "$protobuf_src_root/google/protobuf/compiler/objectivec/objectivec_field.cc", + "$protobuf_src_root/google/protobuf/compiler/objectivec/objectivec_file.cc", + "$protobuf_src_root/google/protobuf/compiler/objectivec/objectivec_generator.cc", + "$protobuf_src_root/google/protobuf/compiler/objectivec/objectivec_helpers.cc", + "$protobuf_src_root/google/protobuf/compiler/objectivec/objectivec_map_field.cc", + "$protobuf_src_root/google/protobuf/compiler/objectivec/objectivec_message.cc", + "$protobuf_src_root/google/protobuf/compiler/objectivec/objectivec_message_field.cc", + "$protobuf_src_root/google/protobuf/compiler/objectivec/objectivec_oneof.cc", + "$protobuf_src_root/google/protobuf/compiler/objectivec/objectivec_primitive_field.cc", + "$protobuf_src_root/google/protobuf/compiler/php/php_generator.cc", + "$protobuf_src_root/google/protobuf/compiler/plugin.cc", + "$protobuf_src_root/google/protobuf/compiler/plugin.pb.cc", + "$protobuf_src_root/google/protobuf/compiler/python/python_generator.cc", + "$protobuf_src_root/google/protobuf/compiler/ruby/ruby_generator.cc", + "$protobuf_src_root/google/protobuf/compiler/subprocess.cc", + "$protobuf_src_root/google/protobuf/compiler/zip_writer.cc", + ] + include_dirs = [ + "$protobuf_src_root/google/protobuf/**/*.h", + "$protobuf_src_root/google/protobuf/**/*.inc", + "$protobuf_src_root", + ] + cflags_cc = [ + "-Wno-sign-compare", + "-Wno-unused-function", + "-Wno-unused-private-field", + "-Wno-deprecated-declarations", + ] + cflags = [ + "-Wno-sign-compare", + "-D HAVE_PTHREAD", + "-Wno-unused-function", + "-Wno-deprecated-declarations", + ] + + deps = [ + ":protobuf_lite_static", + ":protobuf_static", + ] + + public_configs = [ ":protobuf_config" ] + subsystem_name = "${THIRDPARTY_PROTOBUF_SUBSYS_NAME}" + part_name = "${THIRDPARTY_PROTOBUF_PART_NAME}" + } + } + + # Only compile the plugin for the host architecture. + if (current_toolchain == host_toolchain) { + ohos_executable("protoc") { + sources = [ "$protobuf_src_root/google/protobuf/compiler/main.cc" ] + include_dirs = [ + "$protobuf_src_root/google/protobuf/**/*.h", + "$protobuf_src_root/google/protobuf/**/*.inc", + "$protobuf_src_root", + ] + deps = [ ":protoc_static_lib" ] + cflags_cc = [ + "-Wno-sign-compare", + "-Wno-deprecated-declarations", + ] + cflags = [ + "-Wno-sign-compare", + "-D HAVE_PTHREAD", + "-Wno-deprecated-declarations", + ] + subsystem_name = "${THIRDPARTY_PROTOBUF_SUBSYS_NAME}" + part_name = "${THIRDPARTY_PROTOBUF_PART_NAME}" + } + } +} \ No newline at end of file diff --git a/build/third_party_gn/zlib/BUILD.gn b/build/third_party_gn/zlib/BUILD.gn index 8d599d6b8ae90e6cc161014db1f03ccb6ba4a2d0..0cfd79350495594371653e447354874576120a91 100644 --- a/build/third_party_gn/zlib/BUILD.gn +++ b/build/third_party_gn/zlib/BUILD.gn @@ -10,105 +10,110 @@ # 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. +if (!defined(ark_standalone_build)) { + ark_standalone_build = false +} -import("$build_root/ark.gni") +if (ark_standalone_build) { + import("$build_root/ark.gni") -config("zlib_config") { - cflags = [ - "-Wno-incompatible-pointer-types", - "-Werror", - "-Wno-strict-prototypes", - "-Wimplicit-function-declaration", - "-Wno-unused-but-set-variable", - ] -} + config("zlib_config") { + cflags = [ + "-Wno-incompatible-pointer-types", + "-Werror", + "-Wno-strict-prototypes", + "-Wimplicit-function-declaration", + "-Wno-unused-but-set-variable", + ] + } -config("zlib_public_config") { - include_dirs = [ "//third_party/zlib" ] -} + config("zlib_public_config") { + include_dirs = [ "//third_party/zlib" ] + } -ohos_static_library("libz") { - stack_protector_ret = false - sources = [ - "//third_party/zlib/adler32.c", - "//third_party/zlib/compress.c", - "//third_party/zlib/contrib/minizip/ioapi.c", - "//third_party/zlib/contrib/minizip/unzip.c", - "//third_party/zlib/contrib/minizip/zip.c", - "//third_party/zlib/crc32.c", - "//third_party/zlib/crc32.h", - "//third_party/zlib/deflate.c", - "//third_party/zlib/deflate.h", - "//third_party/zlib/gzclose.c", - "//third_party/zlib/gzguts.h", - "//third_party/zlib/gzlib.c", - "//third_party/zlib/gzread.c", - "//third_party/zlib/gzwrite.c", - "//third_party/zlib/infback.c", - "//third_party/zlib/inffast.c", - "//third_party/zlib/inffast.h", - "//third_party/zlib/inffixed.h", - "//third_party/zlib/inflate.c", - "//third_party/zlib/inflate.h", - "//third_party/zlib/inftrees.c", - "//third_party/zlib/inftrees.h", - "//third_party/zlib/trees.c", - "//third_party/zlib/trees.h", - "//third_party/zlib/uncompr.c", - "//third_party/zlib/zconf.h", - "//third_party/zlib/zlib.h", - "//third_party/zlib/zutil.c", - "//third_party/zlib/zutil.h", - ] - configs = [ ":zlib_config" ] - public_configs = [ ":zlib_public_config" ] + ohos_static_library("libz") { + stack_protector_ret = false + sources = [ + "//third_party/zlib/adler32.c", + "//third_party/zlib/compress.c", + "//third_party/zlib/contrib/minizip/ioapi.c", + "//third_party/zlib/contrib/minizip/unzip.c", + "//third_party/zlib/contrib/minizip/zip.c", + "//third_party/zlib/crc32.c", + "//third_party/zlib/crc32.h", + "//third_party/zlib/deflate.c", + "//third_party/zlib/deflate.h", + "//third_party/zlib/gzclose.c", + "//third_party/zlib/gzguts.h", + "//third_party/zlib/gzlib.c", + "//third_party/zlib/gzread.c", + "//third_party/zlib/gzwrite.c", + "//third_party/zlib/infback.c", + "//third_party/zlib/inffast.c", + "//third_party/zlib/inffast.h", + "//third_party/zlib/inffixed.h", + "//third_party/zlib/inflate.c", + "//third_party/zlib/inflate.h", + "//third_party/zlib/inftrees.c", + "//third_party/zlib/inftrees.h", + "//third_party/zlib/trees.c", + "//third_party/zlib/trees.h", + "//third_party/zlib/uncompr.c", + "//third_party/zlib/zconf.h", + "//third_party/zlib/zlib.h", + "//third_party/zlib/zutil.c", + "//third_party/zlib/zutil.h", + ] + configs = [ ":zlib_config" ] + public_configs = [ ":zlib_public_config" ] - part_name = "zlib" - subsystem_name = "thirdparty" -} + part_name = "zlib" + subsystem_name = "thirdparty" + } -ohos_shared_library("shared_libz") { - stack_protector_ret = false - sources = [ - "//third_party/zlib/adler32.c", - "//third_party/zlib/compress.c", - "//third_party/zlib/contrib/minizip/ioapi.c", - "//third_party/zlib/contrib/minizip/unzip.c", - "//third_party/zlib/contrib/minizip/zip.c", - "//third_party/zlib/crc32.c", - "//third_party/zlib/crc32.h", - "//third_party/zlib/deflate.c", - "//third_party/zlib/deflate.h", - "//third_party/zlib/gzclose.c", - "//third_party/zlib/gzguts.h", - "//third_party/zlib/gzlib.c", - "//third_party/zlib/gzread.c", - "//third_party/zlib/gzwrite.c", - "//third_party/zlib/infback.c", - "//third_party/zlib/inffast.c", - "//third_party/zlib/inffast.h", - "//third_party/zlib/inffixed.h", - "//third_party/zlib/inflate.c", - "//third_party/zlib/inflate.h", - "//third_party/zlib/inftrees.c", - "//third_party/zlib/inftrees.h", - "//third_party/zlib/trees.c", - "//third_party/zlib/trees.h", - "//third_party/zlib/uncompr.c", - "//third_party/zlib/zconf.h", - "//third_party/zlib/zlib.h", - "//third_party/zlib/zutil.c", - "//third_party/zlib/zutil.h", - ] - configs = [ ":zlib_config" ] - public_configs = [ ":zlib_public_config" ] + ohos_shared_library("shared_libz") { + stack_protector_ret = false + sources = [ + "//third_party/zlib/adler32.c", + "//third_party/zlib/compress.c", + "//third_party/zlib/contrib/minizip/ioapi.c", + "//third_party/zlib/contrib/minizip/unzip.c", + "//third_party/zlib/contrib/minizip/zip.c", + "//third_party/zlib/crc32.c", + "//third_party/zlib/crc32.h", + "//third_party/zlib/deflate.c", + "//third_party/zlib/deflate.h", + "//third_party/zlib/gzclose.c", + "//third_party/zlib/gzguts.h", + "//third_party/zlib/gzlib.c", + "//third_party/zlib/gzread.c", + "//third_party/zlib/gzwrite.c", + "//third_party/zlib/infback.c", + "//third_party/zlib/inffast.c", + "//third_party/zlib/inffast.h", + "//third_party/zlib/inffixed.h", + "//third_party/zlib/inflate.c", + "//third_party/zlib/inflate.h", + "//third_party/zlib/inftrees.c", + "//third_party/zlib/inftrees.h", + "//third_party/zlib/trees.c", + "//third_party/zlib/trees.h", + "//third_party/zlib/uncompr.c", + "//third_party/zlib/zconf.h", + "//third_party/zlib/zlib.h", + "//third_party/zlib/zutil.c", + "//third_party/zlib/zutil.h", + ] + configs = [ ":zlib_config" ] + public_configs = [ ":zlib_public_config" ] - install_images = [ - "system", - "updater", - ] + install_images = [ + "system", + "updater", + ] - innerapi_tags = [ "platformsdk" ] - part_name = "zlib" - subsystem_name = "thirdparty" + innerapi_tags = [ "platformsdk" ] + part_name = "zlib" + subsystem_name = "thirdparty" + } }