diff options
author | Andreas Rumpf <rumpf_a@web.de> | 2017-03-14 10:18:20 +0100 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2017-03-14 10:18:20 +0100 |
commit | 4912300ca762f05681d3654631300173e3729920 (patch) | |
tree | 83cf1121f5a676689883a8fdf5c63165f0f5fd12 /koch.nim | |
parent | 3d534375c79d521c9fa747efceb09b5115b94010 (diff) | |
parent | e32f08d05b7e9a7f8cc121f02a3622bf26e29733 (diff) | |
download | Nim-4912300ca762f05681d3654631300173e3729920.tar.gz |
Merge branch 'devel' into faster-nimsuggest
Diffstat (limited to 'koch.nim')
-rw-r--r-- | koch.nim | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/koch.nim b/koch.nim index 20d01ae98..7c8401c57 100644 --- a/koch.nim +++ b/koch.nim @@ -512,6 +512,14 @@ proc pushCsources() = finally: setCurrentDir(cwd) +proc valgrind(cmd: string) = + exec("nim c " & cmd) + var i = cmd.len-1 + while i >= 0 and cmd[i] != ' ': dec i + let file = if i >= 0: substr(cmd, i+1) else: cmd + let supp = getAppDir() / "tools" / "nimgrind.supp" + exec("valgrind --suppressions=" & supp & " " & changeFileExt(file, "")) + proc showHelp() = quit(HelpText % [VersionAsString & spaces(44-len(VersionAsString)), CompileDate, CompileTime], QuitSuccess) @@ -548,5 +556,6 @@ of cmdArgument: of "nimsuggest": bundleNimsuggest(buildExe=true) of "tools": buildTools(existsDir(".git")) of "pushcsource", "pushcsources": pushCsources() + of "valgrind": valgrind(op.cmdLineRest) else: showHelp() of cmdEnd: showHelp() |