Repository navigation
add a dependency on libssh2 and use a systemIntegrationOption - #27
Conversation
63f07f3 to
417b10d
Compare
417b10d to
39e5de6
Compare
|
I was just thinking of this! Do you know if we can deduplicate the crypto implementations between libgit2 and libssh2? (And zlib for that matter too) |
|
According to my build summary and zig-pkg directory, mbedtls is already reused (probably only since its the same dependency hash): Build Summary: 18/18 steps succeeded When trying to enable zlib on libssh the vendored zlib from the libgit2 sources will still be compiled and i guess we rely on the linker surviving both versions somehow, right?
|
|
Sweet. For zlib I'm leaning towards the second option. It has a higher chance of reusing the binary and it won't break the build script if they get out of sync. The only hiccup is providing some specific C flags ( zlib_dep.artifact("z").root_module.addCMacro("NO_GZIP");EDIT: on second thought, messing with C flags will probably prevent reuse if the configurations are different. Ignore that last part! |
on a build system level we need to have the exact same compile command to reuse. NO_VIZ does only appear in the changelog of upstream libz, i think its a legacy option the libgit2 maintainers left in there and it can be dropped. |
For option 1 I would assume so, since we'd be reaching into its dependency. For option 2, I would assume it's just a cache miss and our version gets built separately. Worth investigating! In the meantime lets add the matching zlib dependency to our zon file. |
|
I just tried option1, and your right, Added the zlib dep now. When it gets really complicated i guess is if we were to enable linking system zlib. |
Parzival-3141
left a comment
There was a problem hiding this comment.
Whoops I somehow missed a commit :P
Fallback to mbedtls if we cannot provide a good alternative.
The runner builds fine on my machine without zlib headers. We'll see if it passes CI...
The zlib headers are required for testing windows builds.
|
Thanks! |
can we enable ssh support without system libssh?
needs this mr to build libssh2 without linking system mbedtls:
allyourcodebase/libssh2#11