mirror of
https://github.com/curl/curl.git
synced 2024-12-27 06:59:43 +08:00
3f8fc25720
Aka "jumbo" or "amalgamation" builds. It means to compile all sources per target as a single C source. This is experimental. You can enable it by passing `-DCMAKE_UNITY_BUILD=ON` to cmake. It requires CMake 3.16 or newer. It makes builds (much) faster, allows for better optimizations and tends to promote less ambiguous code. Also add a new AppVeyor CI job and convert an existing one to use "unity" mode (one MSVC, one MinGW), and enable it for one macOS CI job. Fix related issues: - add missing include guard to `easy_lock.h`. - rename static variables and functions (and a macro) with names reused across sources, or shadowed by local variables. - add an `#undef` after use. - add a missing `#undef` before use. - move internal definitions from `ftp.h` to `ftp.c`. - `curl_memory.h` fixes to make it work when included repeatedly. - stop building/linking curlx bits twice for a static-mode curl tool. These caused doubly defined symbols in unity builds. - silence missing extern declarations compiler warning for ` _CRT_glob`. - fix extern declarations for `tool_freq` and `tool_isVistaOrGreater`. - fix colliding static symbols in debug mode: `debugtime()` and `statename`. - rename `ssl_backend_data` structure to unique names for each TLS-backend, along with the `ssl_connect_data` struct member referencing them. This required adding casts for each access. - add workaround for missing `[P]UNICODE_STRING` types in certain Windows builds when compiling `lib/ldap.c`. To support "unity" builds, we had to enable `SCHANNEL_USE_BLACKLISTS` for Schannel (a Windows `schannel.h` option) _globally_. This caused an indirect inclusion of Windows `schannel.h` from `ldap.c` via `winldap.h` to have it enabled as well. This requires `[P]UNICODE_STRING` types, which is apperantly not defined automatically (as seen with both MSVS and mingw-w64). This patch includes `<subauth.h>` to fix it. Ref: https://github.com/curl/curl/runs/13987772013 Ref: https://dev.azure.com/daniel0244/curl/_build/results?buildId=15827&view=logs&jobId=2c9f582d-e278-56b6-4354-f38a4d851906&j=2c9f582d-e278-56b6-4354-f38a4d851906&t=90509b00-34fa-5a81-35d7-5ed9569d331c - tweak unity builds to compile `lib/memdebug.c` separately in memory trace builds to avoid PP confusion. - force-disable unity for test programs. - do not compile and link libcurl sources to libtests _twice_ when libcurl is built in static mode. KNOWN ISSUES: - running tests with unity builds may fail in cases. - some build configurations/env may not compile in unity mode. E.g.: https://ci.appveyor.com/project/curlorg/curl/builds/47230972/job/51wfesgnfuauwl8q#L250 Ref: https://github.com/libssh2/libssh2/issues/1034 Ref: https://cmake.org/cmake/help/latest/prop_tgt/UNITY_BUILD.html Ref: https://en.wikipedia.org/wiki/Unity_build Closes #11095 |
||
---|---|---|
.. | ||
vauth | ||
vquic | ||
vssh | ||
vtls | ||
.checksrc | ||
.gitattributes | ||
.gitignore | ||
altsvc.c | ||
altsvc.h | ||
amigaos.c | ||
amigaos.h | ||
arpa_telnet.h | ||
asyn-ares.c | ||
asyn-thread.c | ||
asyn.h | ||
base64.c | ||
bufq.c | ||
bufq.h | ||
bufref.c | ||
bufref.h | ||
c-hyper.c | ||
c-hyper.h | ||
cf-h1-proxy.c | ||
cf-h1-proxy.h | ||
cf-h2-proxy.c | ||
cf-h2-proxy.h | ||
cf-haproxy.c | ||
cf-haproxy.h | ||
cf-https-connect.c | ||
cf-https-connect.h | ||
cf-socket.c | ||
cf-socket.h | ||
cfilters.c | ||
cfilters.h | ||
CMakeLists.txt | ||
config-amigaos.h | ||
config-dos.h | ||
config-mac.h | ||
config-os400.h | ||
config-plan9.h | ||
config-riscos.h | ||
config-win32.h | ||
config-win32ce.h | ||
conncache.c | ||
conncache.h | ||
connect.c | ||
connect.h | ||
content_encoding.c | ||
content_encoding.h | ||
cookie.c | ||
cookie.h | ||
curl_addrinfo.c | ||
curl_addrinfo.h | ||
curl_base64.h | ||
curl_config.h.cmake | ||
curl_ctype.h | ||
curl_des.c | ||
curl_des.h | ||
curl_endian.c | ||
curl_endian.h | ||
curl_fnmatch.c | ||
curl_fnmatch.h | ||
curl_get_line.c | ||
curl_get_line.h | ||
curl_gethostname.c | ||
curl_gethostname.h | ||
curl_gssapi.c | ||
curl_gssapi.h | ||
curl_hmac.h | ||
curl_krb5.h | ||
curl_ldap.h | ||
curl_log.c | ||
curl_log.h | ||
curl_md4.h | ||
curl_md5.h | ||
curl_memory.h | ||
curl_memrchr.c | ||
curl_memrchr.h | ||
curl_multibyte.c | ||
curl_multibyte.h | ||
curl_ntlm_core.c | ||
curl_ntlm_core.h | ||
curl_ntlm_wb.c | ||
curl_ntlm_wb.h | ||
curl_path.c | ||
curl_path.h | ||
curl_printf.h | ||
curl_range.c | ||
curl_range.h | ||
curl_rtmp.c | ||
curl_rtmp.h | ||
curl_sasl.c | ||
curl_sasl.h | ||
curl_setup_once.h | ||
curl_setup.h | ||
curl_sha256.h | ||
curl_sspi.c | ||
curl_sspi.h | ||
curl_threads.c | ||
curl_threads.h | ||
curlx.h | ||
dict.c | ||
dict.h | ||
doh.c | ||
doh.h | ||
dynbuf.c | ||
dynbuf.h | ||
dynhds.c | ||
dynhds.h | ||
easy_lock.h | ||
easy.c | ||
easygetopt.c | ||
easyif.h | ||
easyoptions.c | ||
easyoptions.h | ||
escape.c | ||
escape.h | ||
file.c | ||
file.h | ||
fileinfo.c | ||
fileinfo.h | ||
fopen.c | ||
fopen.h | ||
formdata.c | ||
formdata.h | ||
ftp.c | ||
ftp.h | ||
ftplistparser.c | ||
ftplistparser.h | ||
functypes.h | ||
getenv.c | ||
getinfo.c | ||
getinfo.h | ||
gopher.c | ||
gopher.h | ||
hash.c | ||
hash.h | ||
headers.c | ||
headers.h | ||
hmac.c | ||
hostasyn.c | ||
hostip4.c | ||
hostip6.c | ||
hostip.c | ||
hostip.h | ||
hostsyn.c | ||
hsts.c | ||
hsts.h | ||
http1.c | ||
http1.h | ||
http2.c | ||
http2.h | ||
http_aws_sigv4.c | ||
http_aws_sigv4.h | ||
http_chunks.c | ||
http_chunks.h | ||
http_digest.c | ||
http_digest.h | ||
http_negotiate.c | ||
http_negotiate.h | ||
http_ntlm.c | ||
http_ntlm.h | ||
http_proxy.c | ||
http_proxy.h | ||
http.c | ||
http.h | ||
idn.c | ||
idn.h | ||
if2ip.c | ||
if2ip.h | ||
imap.c | ||
imap.h | ||
inet_ntop.c | ||
inet_ntop.h | ||
inet_pton.c | ||
inet_pton.h | ||
krb5.c | ||
ldap.c | ||
libcurl.plist.in | ||
libcurl.rc | ||
libcurl.vers.in | ||
llist.c | ||
llist.h | ||
Makefile.am | ||
Makefile.inc | ||
Makefile.mk | ||
Makefile.soname | ||
md4.c | ||
md5.c | ||
memdebug.c | ||
memdebug.h | ||
mime.c | ||
mime.h | ||
mprintf.c | ||
mqtt.c | ||
mqtt.h | ||
multi.c | ||
multihandle.h | ||
multiif.h | ||
netrc.c | ||
netrc.h | ||
nonblock.c | ||
nonblock.h | ||
noproxy.c | ||
noproxy.h | ||
openldap.c | ||
optiontable.pl | ||
parsedate.c | ||
parsedate.h | ||
pingpong.c | ||
pingpong.h | ||
pop3.c | ||
pop3.h | ||
progress.c | ||
progress.h | ||
psl.c | ||
psl.h | ||
rand.c | ||
rand.h | ||
rename.c | ||
rename.h | ||
rtsp.c | ||
rtsp.h | ||
select.c | ||
select.h | ||
sendf.c | ||
sendf.h | ||
setopt.c | ||
setopt.h | ||
setup-os400.h | ||
setup-vms.h | ||
setup-win32.h | ||
sha256.c | ||
share.c | ||
share.h | ||
sigpipe.h | ||
slist.c | ||
slist.h | ||
smb.c | ||
smb.h | ||
smtp.c | ||
smtp.h | ||
sockaddr.h | ||
socketpair.c | ||
socketpair.h | ||
socks_gssapi.c | ||
socks_sspi.c | ||
socks.c | ||
socks.h | ||
speedcheck.c | ||
speedcheck.h | ||
splay.c | ||
splay.h | ||
strcase.c | ||
strcase.h | ||
strdup.c | ||
strdup.h | ||
strerror.c | ||
strerror.h | ||
strtok.c | ||
strtok.h | ||
strtoofft.c | ||
strtoofft.h | ||
system_win32.c | ||
system_win32.h | ||
telnet.c | ||
telnet.h | ||
tftp.c | ||
tftp.h | ||
timediff.c | ||
timediff.h | ||
timeval.c | ||
timeval.h | ||
transfer.c | ||
transfer.h | ||
url.c | ||
url.h | ||
urlapi-int.h | ||
urlapi.c | ||
urldata.h | ||
version_win32.c | ||
version_win32.h | ||
version.c | ||
warnless.c | ||
warnless.h | ||
ws.c | ||
ws.h |