winbuild: reduce command-line length by dropping whitespace#16528
winbuild: reduce command-line length by dropping whitespace#16528vszakats wants to merge 7 commits into
Conversation
|
That looked pretty good! |
|
One new input file increases the linker command-line by 80 bytes, I'm trying another iteration with response files. If that fails, shortening |
|
Did your CSOURCES trick not work because I think it should work all by itself edit: example: diff --git a/winbuild/Makefile.vc b/winbuild/Makefile.vc
index d404279..eccf684 100644
--- a/winbuild/Makefile.vc
+++ b/winbuild/Makefile.vc
@@ -294,6 +294,8 @@ LIBCURL_DIROBJ = ..\builds\$(CONFIG_NAME_LIB)-obj-lib
CURL_DIROBJ = ..\builds\$(CONFIG_NAME_LIB)-obj-curl
DIRDIST = ..\builds\$(CONFIG_NAME_LIB)\
+LIBCURL_OBJS=$(LIBCURL_OBJS: = )
+
$(MODE):
@echo LIBCURL_OBJS = \> LIBCURL_OBJS.inc
@for %%i in ($(LIBCURL_OBJS)) do @echo $(LIBCURL_DIROBJ)/%%i \>> LIBCURL_OBJS.inc |
a7104ab to
494171a
Compare
It doesn't work because that list then gets converted to two interim |
The one line change I posted in the previous message works for me to build Stefan's PR |
You're right, that's also passed to |
|
Correction: No, that variable isn't passed down the I'm not sure why it fixed it for you. Can it be different (shorter) config string than the CI uses? |
|
It's libcurl-vc10-x86-debug-dll-ssl-dll-ipv6-sspi-schannel-obj-lib so I think it's longer (multissl build). the inc output files are attached. i can take a closer look later but i'd try running that single line in the ci just to see what happens |
494171a to
2aa579a
Compare
2aa579a to
d953bcd
Compare
|
Aha, there are many command-lines that can overflow! I assumed it's If the compiler/linker lines bump into this, we can move on the other Here's a green run with Stefan's patch applied: |
This reverts commit e7c5d67.
This reverts commit 9d1aa6c.
Further testing with timeouts in event based processing revealed that our current shutdown handling in the connection pool was not clear enough. Graceful shutdowns can only happen inside a multi handle and it was confusing to track in the code which situation actually applies. It seems better to split the shutdown handling off and have that code always be part of a multi handle. Add `cshutdn.[ch]` with its own struct to maintain connections being shut down. A `cshutdn` always belongs to a multi handle and uses that for socket/timeout monitoring. The `cpool`, which can be part of a multi or share, either passes connections to a `cshutdn` or terminates them with a one-time, best effort. Add an `admin` easy handle to each multi and share. This is used to perform all maintenance operations where no "real" easy handle is available. `cpool` and `cshutdn` do no longer maintain their own internal handle. This solves the problem that the multi admin handle requires some additional initialisation (e.g. timeout list). The share needs its admin handle as it is often cleaned up when no other transfer or multi handle exists any more. But we need a `data` in almost every call. Changes in `curl` itself: - for parallel transfers, do not set a connection pool in the share, rely on the multi's connection pool instead. While not a requirement for the new `cshutdn` to work, this is a) helpful in testing to trigger graceful shutdowns b) a broader code coverage of libcurl via the curl tool - on test_event with uv, cleanup the multi handle before returning from parallel_event(). The uv struct is on the stack, cleanup of the multi later will crash when it tries to register sockets. This is a "eat your own dogfood" related fix.
This reverts commit 7ea4911.
cb5c46a to
ad956e8
Compare
Keep the `@for %%i in [...]` lines within limits by stripping whitespace
from the input `.c` source lists read from `Makefile.inc`. To avoid this
error after adding a new `.c` source:
```
configuration name: libcurl-vc14-x64-release-dll-ssl-dll-ipv6-sspi
NMAKE : fatal error U1095: expanded command line 'for %i in (altsvc.obj amigaos.obj
asyn-ares.obj asyn-thread.obj base64.obj bufq.obj
bufref.obj cf-h1-proxy.obj cf-h2-proxy.obj cf-haproxy.obj [...]
vssh/wolfssh.obj) do @echo ..\builds\libcurl-vc14-x64-release-dll-ssl-dll-ipv6-sspi-obj-lib/%i \
' too long
Stop.
Command exited with code 2
```
Ref: https://ci.appveyor.com/project/curlorg/curl/builds/51605338/job/dqg6qtebtscb279g#L44
Reported-by: Stefan Eissing
Bug: curl#16508 (comment)
Fixes curl#16521
Closes curl#16528
Keep the
@for %%i in [...]lines within limits by stripping whitespacefrom the input
.csource lists read fromMakefile.inc. To avoid thiserror after adding a new
.csource:Ref: https://ci.appveyor.com/project/curlorg/curl/builds/51605338/job/dqg6qtebtscb279g#L44
Reported-by: Stefan Eissing
Bug: #16508 (comment)
Fixes #16521
If that's not enough for the next 6 months, we can:
-obj-lib,-obj-curlsuffixes for the object directoriesto reduce the command-line length further.