@@ -20,6 +20,7 @@ struct Config {
20
20
string[] cFlags;
21
21
string[] linkerFlags;
22
22
uint numBuildJobs;
23
+ bool systemZlib;
23
24
string[string] cmakeVars;
24
25
}
25
26
@@ -160,6 +161,7 @@ void runCMake() {
160
161
if (config.dFlags.length) args ~= "-DD_EXTRA_FLAGS=" ~ config.dFlags.join(";");
161
162
if (config.cFlags.length) args ~= "-DRT_CFLAGS=" ~ config.cFlags.join(" ");
162
163
if (config.linkerFlags.length) args ~= "-DLD_FLAGS=" ~ config.linkerFlags.join(" ");
164
+ if (config.systemZlib) args ~= "-DPHOBOS_SYSTEM_ZLIB=ON";
163
165
164
166
foreach (pair; config.cmakeVars.byPair)
165
167
args ~= "-D" ~ pair[0] ~ '=' ~ pair[1];
@@ -324,7 +326,8 @@ void parseCommandLine(string[] args) {
324
326
"dFlags", "Extra LDC flags for the D modules (separated by ';')", &config.dFlags,
325
327
"cFlags", "Extra C/ASM compiler flags for the handful of C/ASM files (separated by ';')", &config.cFlags,
326
328
"linkerFlags", "Extra C linker flags for shared libraries and testrunner executables (separated by ';')", &config.linkerFlags,
327
- "j", "Number of parallel build jobs", &config.numBuildJobs
329
+ "j", "Number of parallel build jobs", &config.numBuildJobs,
330
+ "systemZlib", "Use system zlib instead of Phobos' vendored version", &config.systemZlib,
328
331
);
329
332
330
333
// getopt() has removed all consumed args from `args`
0 commit comments