Skip to content

Commit

Permalink
feat: Add rake task with optimization
Browse files Browse the repository at this point in the history
  • Loading branch information
yhara committed Nov 2, 2019
1 parent a25d1eb commit bd97314
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,15 @@ task :default => [:parser, :test]
task :run do
sh "cargo run"
sh "llc a.ll"
sh "cc -I/usr/local/Cellar/bdw-gc/7.6.0/include/ -L/usr/local/Cellar/bdw-gc/7.6.0/lib/ -lgc -o bgc a.s"
sh "./bgc"
sh "cc -I/usr/local/Cellar/bdw-gc/7.6.0/include/ -L/usr/local/Cellar/bdw-gc/7.6.0/lib/ -lgc -o a.out a.s"
sh "./a.out"
end

task :opt do
sh "cargo run"
sh "opt -O3 a.ll > a.bc"
sh "llvm-dis a.bc -o a2.ll"
sh "llc a.bc"
sh "cc -I/usr/local/Cellar/bdw-gc/7.6.0/include/ -L/usr/local/Cellar/bdw-gc/7.6.0/lib/ -lgc -o a.out a.s"
sh "./a.out"
end

0 comments on commit bd97314

Please sign in to comment.