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

Commit

Permalink
Browse files Browse the repository at this point in the history
…untime into gc_config_cleanup
  • Loading branch information
rainers committed Oct 19, 2014
2 parents f818017 + 890997d commit 46c8da1
Show file tree
Hide file tree
Showing 163 changed files with 2,367 additions and 637 deletions.
37 changes: 14 additions & 23 deletions benchmark/runbench.d
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,8 @@ string genTempFilename(string result_path)

int system(string command)
{
import std.c.process;

if (command.empty) return std.c.process.system(null);
const commandz = toStringz(command);
auto status = std.c.process.system(commandz);
Expand Down Expand Up @@ -293,31 +295,20 @@ int main(string[] args)
pattern = args[1];
}

EnvData envData;
envData.results_dir = getenv("RESULTS_DIR");
envData.sep = getenv("SEP");
envData.dsep = getenv("DSEP");
envData.obj = getenv("OBJ");
envData.exe = getenv("EXE");
envData.os = getenv("OS");
envData.dmd = replace(getenv("DMD"), "/", envData.sep);
envData.compiler = "dmd"; //should be replaced for other compilers
envData.ccompiler = getenv("CC");
envData.model = getenv("MODEL");
envData.required_args = getenv("ARGS");

// provide some sensible defaults
version(Windows) enum isWindows = true; else enum isWindows = false;
if (envData.results_dir .empty) envData.results_dir = "results";
if (envData.sep .empty) envData.sep = isWindows ? r"\" : "/";
if (envData.dsep .empty) envData.dsep = isWindows ? r"\\" : "/";
if (envData.obj .empty) envData.obj = isWindows ? ".obj" : ".o";
if (envData.exe .empty) envData.exe = isWindows ? ".exe" : "";
if (envData.os .empty) envData.os = isWindows ? "win32" : "";
if (envData.dmd .empty) envData.dmd = "dmd";
if (envData.compiler .empty) envData.compiler = "dmd"; //should be replaced for other compilers
if (envData.model .empty) envData.model = envData.os == "win32" ? "32" : "64";
if (envData.required_args.empty) envData.required_args = "-O -release -inline";
EnvData envData;
envData.results_dir = environment.get("RESULTS_DIR", "results");
envData.sep = environment.get("SEP", isWindows ? r"\" : "/");
envData.dsep = environment.get("DSEP", isWindows ? r"\\" : "/");
envData.obj = environment.get("OBJ", isWindows ? ".obj" : ".o");
envData.exe = environment.get("EXE", isWindows ? ".exe" : "");
envData.os = environment.get("OS", isWindows ? "win32" : "");
envData.dmd = replace(environment.get("DMD", "dmd"), "/", envData.sep);
envData.compiler = "dmd"; //should be replaced for other compilers
envData.ccompiler = environment.get("CC");
envData.model = environment.get("MODEL", envData.os == "win32" ? "32" : "64");
envData.required_args = environment.get("ARGS", "-O -release -inline");

if (std.file.exists("../src/gc/config.d"))
envData.required_args ~= " -version=initGCFromEnvironment ../src/gc/config.d";
Expand Down
5 changes: 5 additions & 0 deletions mak/COPY
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ COPY=\
$(IMPDIR)\core\sys\freebsd\sys\elf64.d \
$(IMPDIR)\core\sys\freebsd\sys\event.d \
$(IMPDIR)\core\sys\freebsd\sys\link_elf.d \
$(IMPDIR)\core\sys\freebsd\time.d \
\
$(IMPDIR)\core\sys\linux\config.d \
$(IMPDIR)\core\sys\linux\dlfcn.d \
Expand All @@ -57,6 +58,8 @@ COPY=\
$(IMPDIR)\core\sys\linux\execinfo.d \
$(IMPDIR)\core\sys\linux\link.d \
$(IMPDIR)\core\sys\linux\termios.d \
$(IMPDIR)\core\sys\linux\time.d \
$(IMPDIR)\core\sys\linux\tipc.d \
\
$(IMPDIR)\core\sys\linux\sys\inotify.d \
$(IMPDIR)\core\sys\linux\sys\mman.d \
Expand Down Expand Up @@ -123,9 +126,11 @@ COPY=\
$(IMPDIR)\core\sys\solaris\sys\priocntl.d \
$(IMPDIR)\core\sys\solaris\execinfo.d \
\
$(IMPDIR)\core\sys\windows\com.d \
$(IMPDIR)\core\sys\windows\dbghelp.d \
$(IMPDIR)\core\sys\windows\dll.d \
$(IMPDIR)\core\sys\windows\stacktrace.d \
$(IMPDIR)\core\sys\windows\stat.d \
$(IMPDIR)\core\sys\windows\threadaux.d \
$(IMPDIR)\core\sys\windows\windows.d \
\
Expand Down
5 changes: 5 additions & 0 deletions mak/MANIFEST
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ MANIFEST=\
\
src\core\sys\freebsd\dlfcn.d \
src\core\sys\freebsd\execinfo.d \
src\core\sys\freebsd\time.d \
\
src\core\sys\freebsd\sys\elf.d \
src\core\sys\freebsd\sys\elf_common.d \
Expand All @@ -86,6 +87,8 @@ MANIFEST=\
src\core\sys\linux\execinfo.d \
src\core\sys\linux\link.d \
src\core\sys\linux\termios.d \
src\core\sys\linux\time.d \
src\core\sys\linux\tipc.d \
\
src\core\sys\linux\sys\inotify.d \
src\core\sys\linux\sys\mman.d \
Expand Down Expand Up @@ -154,9 +157,11 @@ MANIFEST=\
src\core\sys\solaris\sys\types.d \
src\core\sys\solaris\execinfo.d \
\
src\core\sys\windows\com.d \
src\core\sys\windows\dbghelp.d \
src\core\sys\windows\dll.d \
src\core\sys\windows\stacktrace.d \
src\core\sys\windows\stat.d \
src\core\sys\windows\threadaux.d \
src\core\sys\windows\windows.d \
\
Expand Down
4 changes: 4 additions & 0 deletions mak/SRCS
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ SRCS=\
src\core\sys\freebsd\execinfo.d \
src\core\sys\freebsd\sys\event.d \
\
src\core\sys\linux\tipc.d \
\
src\core\sys\posix\signal.d \
src\core\sys\posix\dirent.d \
src\core\sys\posix\sys\resource.d \
Expand All @@ -62,9 +64,11 @@ SRCS=\
src\core\sys\solaris\sys\types.d \
src\core\sys\solaris\sys\procset.d \
\
src\core\sys\windows\com.d \
src\core\sys\windows\dbghelp.d \
src\core\sys\windows\dll.d \
src\core\sys\windows\stacktrace.d \
src\core\sys\windows\stat.d \
src\core\sys\windows\threadaux.d \
src\core\sys\windows\windows.d \
\
Expand Down
Loading

0 comments on commit 46c8da1

Please sign in to comment.