Skip to content
This repository has been archived by the owner on Oct 12, 2022. It is now read-only.

Commit

Permalink
pass through --DRT args to benchmarks
Browse files Browse the repository at this point in the history
- disable runtime cmdline parsing for runbench

- parse Runtime.args instead of main args
  • Loading branch information
MartinNowak committed Jan 3, 2015
1 parent 87c9c12 commit 6c343f8
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions benchmark/runbench.d
Expand Up @@ -7,6 +7,8 @@
*/
import std.stdio;

extern(C) __gshared bool rt_cmdline_enabled = false;

struct Config
{
string pattern = r".*\.d", dmd = "dmd", dflags = "-O -release -inline", args;
Expand Down Expand Up @@ -181,9 +183,11 @@ unittest
assert(parseArgs(pair[0]) == pair[1]);
}

void main(string[] args)
void main()
{
auto cfg = parseArgs(args);
import core.runtime;
// use Runtime.args for --DRT-gcopt
auto cfg = parseArgs(Runtime.args);
if (cfg.help) return printHelp();

import std.process : env=environment;
Expand Down

0 comments on commit 6c343f8

Please sign in to comment.