-
-
Notifications
You must be signed in to change notification settings - Fork 17
/
build.sc
68 lines (61 loc) · 2.2 KB
/
build.sc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
import mill._, mill.scalalib._, mill.scalalib.publish._
import scalafmt._
import $ivy.`com.goyeau::mill-scalafix::0.3.1`
import com.goyeau.mill.scalafix.ScalafixModule
import $ivy.`com.carlosedp::mill-aliases::0.4.1`
import com.carlosedp.aliases._
object versions {
val scala = "2.13.14"
val chisel = "6.4.0"
val chiseltest = "6.0.0"
val scalatest = "3.2.18"
val riscvassembler = "1.9.1"
val mainargs = "0.7.0"
}
trait BaseProject extends ScalaModule with ScalafixModule with ScalafmtModule {
def scalaVersion = versions.scala
def ivyDeps = Agg(
ivy"org.chipsalliance::chisel:${versions.chisel}",
ivy"com.lihaoyi::mainargs:${versions.mainargs}",
)
def scalacPluginIvyDeps = Agg(ivy"org.chipsalliance:::chisel-plugin:${versions.chisel}")
object test extends ScalaTests with TestModule.ScalaTest {
def ivyDeps = Agg(
ivy"org.scalatest::scalatest:${versions.scalatest}",
ivy"edu.berkeley.cs::chiseltest:${versions.chiseltest}",
ivy"com.carlosedp::riscvassembler:${versions.riscvassembler}",
)
}
override def scalacOptions = T {
super.scalacOptions() ++ Seq(
"-unchecked",
"-deprecation",
"-language:reflectiveCalls",
"-encoding",
"UTF-8",
"-feature",
"-Xcheckinit",
"-Xfatal-warnings",
"-Ywarn-dead-code",
"-Ywarn-unused",
"-Ymacro-annotations",
)
}
}
object chiselv extends BaseProject {
def mainClass = Some("chiselv.Toplevel")
}
object chiselv_rvfi extends BaseProject {
def mainClass = Some("chiselv.RVFI")
def sources = T.sources(millSourcePath / os.up / "chiselv" / "src")
}
// -----------------------------------------------------------------------------
// Command Aliases
// -----------------------------------------------------------------------------
object MyAliases extends Aliases {
def lint = alias("mill.scalalib.scalafmt.ScalafmtModule/reformatAll __.sources", "__.fix")
def fmt = alias("mill.scalalib.scalafmt.ScalafmtModule/reformatAll __.sources")
def checkfmt = alias("mill.scalalib.scalafmt.ScalafmtModule/checkFormatAll __.sources")
def deps = alias("mill.scalalib.Dependency/showUpdates")
def test = alias("__.test")
}