@@ -13,7 +13,7 @@ extern(C) __gshared bool rt_cmdline_enabled = false;
13
13
struct Config
14
14
{
15
15
string pattern = r " .*\.d" , dmd = " dmd" , dflags = " -O -release -inline" , args;
16
- bool help, verbose;
16
+ bool help, verbose, compile = true ;
17
17
uint repeat = 10 ;
18
18
}
19
19
@@ -76,14 +76,17 @@ void runTests(Config cfg)
76
76
77
77
foreach (ref src; sources.parallel(1 ))
78
78
{
79
- writeln(" COMPILING " , src);
80
79
version (Windows ) enum exe = " exe" ; else enum exe = " " ;
81
80
auto bin = buildPath(bindir, src.relativePath(cwd).setExtension(exe));
82
81
auto obj = buildPath(objdir, src.relativePath(cwd).setExtension(exe));
83
82
auto cmd = std.string.format (" %s %s -op -od%s -of%s %s" , cfg.dmd, cfg.dflags, obj, bin, src);
84
83
if (auto ex = src in extra_sources)
85
84
cmd ~= " -I" ~ src[0 .. $- 2 ] ~ " .extra" ~ * ex;
86
- runCmd(cmd, cfg.verbose);
85
+ if (cfg.compile)
86
+ {
87
+ writeln(" COMPILING " , src);
88
+ runCmd(cmd, cfg.verbose);
89
+ }
87
90
src = bin;
88
91
}
89
92
@@ -180,6 +183,7 @@ Config parseArgs(string[] args)
180
183
config.passThrough,
181
184
" h|help" , &cfg.help,
182
185
" v|verbose" , &cfg.verbose,
186
+ " N|no-compile" , (string option) { cfg.compile = false ; },
183
187
" dflags" , &cfg.dflags,
184
188
" r|repeat" , &cfg.repeat);
185
189
@@ -237,7 +241,8 @@ void main()
237
241
238
242
import std.process : env=environment;
239
243
cfg.dmd = env.get (" DMD" , " dmd" );
240
- writeln(" compiler: " ~ cfg.dmd~ ' ' ~ cfg.dflags);
244
+ if (cfg.compile)
245
+ writeln(" compiler: " ~ cfg.dmd~ ' ' ~ cfg.dflags);
241
246
242
247
runTests(cfg);
243
248
}
0 commit comments