代码拉取完成,页面将自动刷新
同步操作将从 OpenHarmony/third_party_curl 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
# Copyright (C) Huawei Technologies Co., Ltd. 2020-2021. All rights reserved.
if (defined(ohos_lite)) {
import("//build/lite/config/component/lite_component.gni")
config("curl_config") {
include_dirs = [
"//third_party/curl/lib",
"//third_party/mbedtls/include",
]
}
config("curl_config_public") {
include_dirs = [
"//third_party/curl/lib",
"//third_party/curl/include",
]
}
build_ext_component("patch") {
command = "sh build.sh"
exec_path = rebase_path(".", root_build_dir)
}
source_set("curl_source") {
sources = [
"//third_party/curl/lib/altsvc.c",
"//third_party/curl/lib/amigaos.c",
"//third_party/curl/lib/asyn-ares.c",
"//third_party/curl/lib/asyn-thread.c",
"//third_party/curl/lib/base64.c",
"//third_party/curl/lib/conncache.c",
"//third_party/curl/lib/connect.c",
"//third_party/curl/lib/content_encoding.c",
"//third_party/curl/lib/cookie.c",
"//third_party/curl/lib/curl_addrinfo.c",
"//third_party/curl/lib/curl_ctype.c",
"//third_party/curl/lib/curl_des.c",
"//third_party/curl/lib/curl_endian.c",
"//third_party/curl/lib/curl_fnmatch.c",
"//third_party/curl/lib/curl_get_line.c",
"//third_party/curl/lib/curl_gethostname.c",
"//third_party/curl/lib/curl_gssapi.c",
"//third_party/curl/lib/curl_memrchr.c",
"//third_party/curl/lib/curl_multibyte.c",
"//third_party/curl/lib/curl_ntlm_core.c",
"//third_party/curl/lib/curl_ntlm_wb.c",
"//third_party/curl/lib/curl_path.c",
"//third_party/curl/lib/curl_range.c",
"//third_party/curl/lib/curl_rtmp.c",
"//third_party/curl/lib/curl_sasl.c",
"//third_party/curl/lib/curl_sspi.c",
"//third_party/curl/lib/curl_threads.c",
"//third_party/curl/lib/dict.c",
"//third_party/curl/lib/doh.c",
"//third_party/curl/lib/dotdot.c",
"//third_party/curl/lib/easy.c",
"//third_party/curl/lib/escape.c",
"//third_party/curl/lib/file.c",
"//third_party/curl/lib/fileinfo.c",
"//third_party/curl/lib/formdata.c",
"//third_party/curl/lib/ftp.c",
"//third_party/curl/lib/ftplistparser.c",
"//third_party/curl/lib/getenv.c",
"//third_party/curl/lib/getinfo.c",
"//third_party/curl/lib/gopher.c",
"//third_party/curl/lib/hash.c",
"//third_party/curl/lib/hmac.c",
"//third_party/curl/lib/hostasyn.c",
"//third_party/curl/lib/hostcheck.c",
"//third_party/curl/lib/hostip.c",
"//third_party/curl/lib/hostip4.c",
"//third_party/curl/lib/hostip6.c",
"//third_party/curl/lib/hostsyn.c",
"//third_party/curl/lib/http.c",
"//third_party/curl/lib/http2.c",
"//third_party/curl/lib/http_chunks.c",
"//third_party/curl/lib/http_digest.c",
"//third_party/curl/lib/http_negotiate.c",
"//third_party/curl/lib/http_ntlm.c",
"//third_party/curl/lib/http_proxy.c",
"//third_party/curl/lib/idn_win32.c",
"//third_party/curl/lib/if2ip.c",
"//third_party/curl/lib/imap.c",
"//third_party/curl/lib/inet_ntop.c",
"//third_party/curl/lib/inet_pton.c",
"//third_party/curl/lib/krb5.c",
"//third_party/curl/lib/ldap.c",
"//third_party/curl/lib/llist.c",
"//third_party/curl/lib/md4.c",
"//third_party/curl/lib/md5.c",
"//third_party/curl/lib/memdebug.c",
"//third_party/curl/lib/mime.c",
"//third_party/curl/lib/mprintf.c",
"//third_party/curl/lib/multi.c",
"//third_party/curl/lib/netrc.c",
"//third_party/curl/lib/non-ascii.c",
"//third_party/curl/lib/nonblock.c",
"//third_party/curl/lib/openldap.c",
"//third_party/curl/lib/parsedate.c",
"//third_party/curl/lib/pingpong.c",
"//third_party/curl/lib/pop3.c",
"//third_party/curl/lib/progress.c",
"//third_party/curl/lib/psl.c",
"//third_party/curl/lib/rand.c",
"//third_party/curl/lib/rename.c",
"//third_party/curl/lib/rtsp.c",
"//third_party/curl/lib/security.c",
"//third_party/curl/lib/select.c",
"//third_party/curl/lib/sendf.c",
"//third_party/curl/lib/setopt.c",
"//third_party/curl/lib/sha256.c",
"//third_party/curl/lib/share.c",
"//third_party/curl/lib/slist.c",
"//third_party/curl/lib/smb.c",
"//third_party/curl/lib/smtp.c",
"//third_party/curl/lib/socketpair.c",
"//third_party/curl/lib/socks.c",
"//third_party/curl/lib/socks_gssapi.c",
"//third_party/curl/lib/socks_sspi.c",
"//third_party/curl/lib/speedcheck.c",
"//third_party/curl/lib/splay.c",
"//third_party/curl/lib/strcase.c",
"//third_party/curl/lib/strdup.c",
"//third_party/curl/lib/strerror.c",
"//third_party/curl/lib/strtok.c",
"//third_party/curl/lib/strtoofft.c",
"//third_party/curl/lib/system_win32.c",
"//third_party/curl/lib/telnet.c",
"//third_party/curl/lib/tftp.c",
"//third_party/curl/lib/timeval.c",
"//third_party/curl/lib/transfer.c",
"//third_party/curl/lib/url.c",
"//third_party/curl/lib/urlapi.c",
"//third_party/curl/lib/vauth/cleartext.c",
"//third_party/curl/lib/vauth/cram.c",
"//third_party/curl/lib/vauth/digest.c",
"//third_party/curl/lib/vauth/digest_sspi.c",
"//third_party/curl/lib/vauth/krb5_gssapi.c",
"//third_party/curl/lib/vauth/krb5_sspi.c",
"//third_party/curl/lib/vauth/ntlm.c",
"//third_party/curl/lib/vauth/ntlm_sspi.c",
"//third_party/curl/lib/vauth/oauth2.c",
"//third_party/curl/lib/vauth/spnego_gssapi.c",
"//third_party/curl/lib/vauth/spnego_sspi.c",
"//third_party/curl/lib/vauth/vauth.c",
"//third_party/curl/lib/version.c",
"//third_party/curl/lib/vquic/ngtcp2.c",
"//third_party/curl/lib/vquic/quiche.c",
"//third_party/curl/lib/vssh/libssh.c",
"//third_party/curl/lib/vssh/libssh2.c",
"//third_party/curl/lib/vssh/wolfssh.c",
"//third_party/curl/lib/vtls/bearssl.c",
"//third_party/curl/lib/vtls/gskit.c",
"//third_party/curl/lib/vtls/gtls.c",
"//third_party/curl/lib/vtls/mbedtls.c",
"//third_party/curl/lib/vtls/mbedtls_threadlock.c",
"//third_party/curl/lib/vtls/mesalink.c",
"//third_party/curl/lib/vtls/nss.c",
"//third_party/curl/lib/vtls/openssl.c",
"//third_party/curl/lib/vtls/schannel.c",
"//third_party/curl/lib/vtls/schannel_verify.c",
"//third_party/curl/lib/vtls/sectransp.c",
"//third_party/curl/lib/vtls/vtls.c",
"//third_party/curl/lib/vtls/wolfssl.c",
"//third_party/curl/lib/warnless.c",
"//third_party/curl/lib/wildcard.c",
"//third_party/curl/lib/x509asn1.c",
]
cflags = [
"-DBUILDING_LIBCURL",
"-DHAVE_CONFIG_H",
"-D_GNU_SOURCE",
"-DOS=\"liteOS\"",
"-fPIC",
"-Wdeclaration-after-statement",
"-Wendif-labels",
"-Werror",
"-Wfloat-equal",
"-Winline",
"-Wmissing-declarations",
"-Wmissing-prototypes",
"-Wnested-externs",
"-Wno-format-nonliteral",
"-Wno-implicit-function-declaration",
"-Wno-int-conversion",
"-Wno-long-long",
"-Wno-multichar",
"-Wno-nested-externs",
"-Wno-sign-compare",
"-Wno-system-headers",
"-Wno-varargs",
"-Wno-overflow",
"-Wpointer-arith",
"-Wstrict-prototypes",
"-Wunused",
"-Wwrite-strings",
"-Wno-unused-variable",
"-Os",
"-ffunction-sections",
"-fdata-sections",
"-fno-unwind-tables",
"-fno-asynchronous-unwind-tables",
]
deps = [ ":patch" ]
configs += [
":curl_config",
":curl_config_public",
]
public_configs = [ ":curl_config_public" ]
}
lite_component("libcurl_shared") {
target_type = "shared_library"
features = [ ":curl_source" ]
deps = [ "//third_party/mbedtls:mbedtls_shared" ]
public_configs = [ ":curl_config_public" ]
}
} else {
import("//build/ohos.gni")
config("curl_config") {
visibility = [ ":*" ]
include_dirs = [
"//third_party/curl/include",
"//third_party/curl/lib",
]
}
ohos_source_set("curl") {
configs = [ "//third_party/curl:curl_config" ]
configs += [ "//third_party/openssl:ssl_config_public" ]
sources = [
"//third_party/curl/lib/altsvc.c",
"//third_party/curl/lib/amigaos.c",
"//third_party/curl/lib/asyn-ares.c",
"//third_party/curl/lib/asyn-thread.c",
"//third_party/curl/lib/base64.c",
"//third_party/curl/lib/conncache.c",
"//third_party/curl/lib/connect.c",
"//third_party/curl/lib/content_encoding.c",
"//third_party/curl/lib/cookie.c",
"//third_party/curl/lib/curl_addrinfo.c",
"//third_party/curl/lib/curl_ctype.c",
"//third_party/curl/lib/curl_des.c",
"//third_party/curl/lib/curl_endian.c",
"//third_party/curl/lib/curl_fnmatch.c",
"//third_party/curl/lib/curl_get_line.c",
"//third_party/curl/lib/curl_gethostname.c",
"//third_party/curl/lib/curl_gssapi.c",
"//third_party/curl/lib/curl_memrchr.c",
"//third_party/curl/lib/curl_multibyte.c",
"//third_party/curl/lib/curl_ntlm_core.c",
"//third_party/curl/lib/curl_ntlm_wb.c",
"//third_party/curl/lib/curl_path.c",
"//third_party/curl/lib/curl_range.c",
"//third_party/curl/lib/curl_rtmp.c",
"//third_party/curl/lib/curl_sasl.c",
"//third_party/curl/lib/curl_sspi.c",
"//third_party/curl/lib/curl_threads.c",
"//third_party/curl/lib/dict.c",
"//third_party/curl/lib/doh.c",
"//third_party/curl/lib/dotdot.c",
"//third_party/curl/lib/easy.c",
"//third_party/curl/lib/escape.c",
"//third_party/curl/lib/file.c",
"//third_party/curl/lib/fileinfo.c",
"//third_party/curl/lib/formdata.c",
"//third_party/curl/lib/ftp.c",
"//third_party/curl/lib/ftplistparser.c",
"//third_party/curl/lib/getenv.c",
"//third_party/curl/lib/getinfo.c",
"//third_party/curl/lib/gopher.c",
"//third_party/curl/lib/hash.c",
"//third_party/curl/lib/hmac.c",
"//third_party/curl/lib/hostasyn.c",
"//third_party/curl/lib/hostcheck.c",
"//third_party/curl/lib/hostip.c",
"//third_party/curl/lib/hostip4.c",
"//third_party/curl/lib/hostip6.c",
"//third_party/curl/lib/hostsyn.c",
"//third_party/curl/lib/http.c",
"//third_party/curl/lib/http2.c",
"//third_party/curl/lib/http_chunks.c",
"//third_party/curl/lib/http_digest.c",
"//third_party/curl/lib/http_negotiate.c",
"//third_party/curl/lib/http_ntlm.c",
"//third_party/curl/lib/http_proxy.c",
"//third_party/curl/lib/idn_win32.c",
"//third_party/curl/lib/if2ip.c",
"//third_party/curl/lib/imap.c",
"//third_party/curl/lib/inet_ntop.c",
"//third_party/curl/lib/inet_pton.c",
"//third_party/curl/lib/krb5.c",
"//third_party/curl/lib/ldap.c",
"//third_party/curl/lib/llist.c",
"//third_party/curl/lib/md4.c",
"//third_party/curl/lib/md5.c",
"//third_party/curl/lib/memdebug.c",
"//third_party/curl/lib/mime.c",
"//third_party/curl/lib/mprintf.c",
"//third_party/curl/lib/multi.c",
"//third_party/curl/lib/netrc.c",
"//third_party/curl/lib/non-ascii.c",
"//third_party/curl/lib/nonblock.c",
"//third_party/curl/lib/openldap.c",
"//third_party/curl/lib/parsedate.c",
"//third_party/curl/lib/pingpong.c",
"//third_party/curl/lib/pop3.c",
"//third_party/curl/lib/progress.c",
"//third_party/curl/lib/psl.c",
"//third_party/curl/lib/rand.c",
"//third_party/curl/lib/rename.c",
"//third_party/curl/lib/rtsp.c",
"//third_party/curl/lib/security.c",
"//third_party/curl/lib/select.c",
"//third_party/curl/lib/sendf.c",
"//third_party/curl/lib/setopt.c",
"//third_party/curl/lib/sha256.c",
"//third_party/curl/lib/share.c",
"//third_party/curl/lib/slist.c",
"//third_party/curl/lib/smb.c",
"//third_party/curl/lib/smtp.c",
"//third_party/curl/lib/socketpair.c",
"//third_party/curl/lib/socks.c",
"//third_party/curl/lib/socks_gssapi.c",
"//third_party/curl/lib/socks_sspi.c",
"//third_party/curl/lib/speedcheck.c",
"//third_party/curl/lib/splay.c",
"//third_party/curl/lib/strcase.c",
"//third_party/curl/lib/strdup.c",
"//third_party/curl/lib/strerror.c",
"//third_party/curl/lib/strtok.c",
"//third_party/curl/lib/strtoofft.c",
"//third_party/curl/lib/system_win32.c",
"//third_party/curl/lib/telnet.c",
"//third_party/curl/lib/tftp.c",
"//third_party/curl/lib/timeval.c",
"//third_party/curl/lib/transfer.c",
"//third_party/curl/lib/url.c",
"//third_party/curl/lib/urlapi.c",
"//third_party/curl/lib/vauth/cleartext.c",
"//third_party/curl/lib/vauth/cram.c",
"//third_party/curl/lib/vauth/digest.c",
"//third_party/curl/lib/vauth/digest_sspi.c",
"//third_party/curl/lib/vauth/krb5_gssapi.c",
"//third_party/curl/lib/vauth/krb5_sspi.c",
"//third_party/curl/lib/vauth/ntlm.c",
"//third_party/curl/lib/vauth/ntlm_sspi.c",
"//third_party/curl/lib/vauth/oauth2.c",
"//third_party/curl/lib/vauth/spnego_gssapi.c",
"//third_party/curl/lib/vauth/spnego_sspi.c",
"//third_party/curl/lib/vauth/vauth.c",
"//third_party/curl/lib/version.c",
"//third_party/curl/lib/vquic/ngtcp2.c",
"//third_party/curl/lib/vquic/quiche.c",
"//third_party/curl/lib/vssh/libssh.c",
"//third_party/curl/lib/vssh/libssh2.c",
"//third_party/curl/lib/vssh/wolfssh.c",
"//third_party/curl/lib/vtls/bearssl.c",
"//third_party/curl/lib/vtls/gskit.c",
"//third_party/curl/lib/vtls/gtls.c",
"//third_party/curl/lib/vtls/mbedtls.c",
"//third_party/curl/lib/vtls/mbedtls_threadlock.c",
"//third_party/curl/lib/vtls/mesalink.c",
"//third_party/curl/lib/vtls/nss.c",
"//third_party/curl/lib/vtls/openssl.c",
"//third_party/curl/lib/vtls/schannel.c",
"//third_party/curl/lib/vtls/schannel_verify.c",
"//third_party/curl/lib/vtls/sectransp.c",
"//third_party/curl/lib/vtls/vtls.c",
"//third_party/curl/lib/vtls/wolfssl.c",
"//third_party/curl/lib/warnless.c",
"//third_party/curl/lib/wildcard.c",
"//third_party/curl/lib/x509asn1.c",
]
if ("${current_os}_${current_cpu}" == "mingw_x86_64") {
cflags = [
"-g",
"-O2",
"-Wall",
"-w",
"-fno-strict-aliasing",
"-m64",
"-D_AMD64_",
"-DBUILDING_LIBCURL",
"-c",
"-DUSE_OPENSSL",
"-DHAVE_OPENSSL_ENGINE_H",
"-DHAVE_OPENSSL_PKCS12_H",
"-DHAVE_ENGINE_LOAD_BUILTIN_ENGINES",
"-DOPENSSL_NO_KRB5",
]
libs = [
"//prebuilts/mingw-w64/ohos/linux-x86_64/clang-mingw/x86_64-w64-mingw32/lib/libwsock32.a",
"//prebuilts/mingw-w64/ohos/linux-x86_64/clang-mingw/x86_64-w64-mingw32/lib/libmincore.a",
]
} else if (host_os == "mac") {
cflags = [
"-DHAVE_CONFIG_H",
"-Qunused-arguments",
"-Os",
"-mmacosx-version-min=10.8",
"-Werror=partial-availability",
"-fvisibility=hidden",
"-DBUILDING_LIBCURL",
"-c",
]
libs = [
# AppKit symbols NSFontWeightXXX may be dlsym'ed.
"AppKit.framework",
"ApplicationServices.framework",
"OpenGL.framework",
]
} else if ("${current_cpu}" == "arm64" || "${current_cpu}" == "arm") {
cflags = [
"-fPIC",
"-g",
"-O2",
"-Wall",
"-w",
"-fno-strict-aliasing",
"-DBUILDING_LIBCURL",
"-c",
"-DHAVE_CONFIG_H",
]
}
deps = [
"//third_party/openssl:crypto_source",
"//third_party/openssl:ssl_source",
"//third_party/zlib:libz",
]
}
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。