Improve the trimcc tool's batching algorithm.
This commit is contained in:
parent
c7570dcd3e
commit
753733e9e2
2 changed files with 145 additions and 80 deletions
18
tools/fakedeps.nim
Normal file
18
tools/fakedeps.nim
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
import strutils, os, pegs, strtabs, math, threadpool, times
|
||||
|
||||
proc fakeCppDep(x: ptr float) {.importcpp: "fakeCppDep", header: "<vector>".}
|
||||
proc fakeTimeDep() = echo(times.getDateStr())
|
||||
proc fakedeps() =
|
||||
var x = 0.4
|
||||
{.emit: "#if 0\n".}
|
||||
fakeCppDep(addr x)
|
||||
{.emit: "#endif\n".}
|
||||
|
||||
# this is not true:
|
||||
if math.sin(x) > 0.6:
|
||||
spawn(fakeTimeDep())
|
||||
|
||||
proc main =
|
||||
fakedeps()
|
||||
when isMainModule:
|
||||
main()
|
||||
Loading…
Add table
Add a link
Reference in a new issue