Commit 9db6d95
Add -lz when PHOBOS_SYSTEM_ZLIB=on and -link-defaultlib-shared
Some projects use the zlib C function directly and, given that those
symbols are available when phobos embeds zlib (the default) and when
linking the stdlib statically, the projects often don't include a
`-lz` in their build settings. This omission then prevents a
successful build with PHOBOS_SYSTEM_ZLIB=on and
-link-defaultlib-shared.
Until a permanent decision is made if those projects should change
their build scripts or if the compiler should always add `-lz`, add
the library anyway, to minimize breakages.
This also makes the behavior consistent with gdc which also adds an
unconditional `-lz` when zlib is not embedded.
See-Also: #4742
Signed-off-by: Andrei Horodniceanu <[email protected]>1 parent 0fddfc5 commit 9db6d95
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
594 | 594 | | |
595 | 595 | | |
596 | 596 | | |
597 | | - | |
| 597 | + | |
598 | 598 | | |
599 | 599 | | |
600 | 600 | | |
| |||
0 commit comments