-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.sc
42 lines (35 loc) · 1.19 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
import mill._
import scalalib._
// support BSP
import mill.bsp._
val defaultScalaVersion = "2.13.12"
val chiselVersion = "6.5.0"
val scalatestVersion = "3.2.19"
val chiselIvy = ivy"org.chipsalliance::chisel:$chiselVersion"
val chiselPluginIvy = ivy"org.chipsalliance:::chisel-plugin:$chiselVersion"
val scalatestIvy = ivy"org.scalatest::scalatest::$scalatestVersion"
object %NAME% extends HasChisel with scalafmt.ScalafmtModule {
override def millSourcePath = os.pwd / "hw" / "chisel"
override def moduleDeps = super.moduleDeps ++ Seq(
// deps
)
object test extends ScalaTests with TestModule.ScalaTest {
override def ivyDeps = super.ivyDeps() ++ Agg(scalatestIvy)
}
}
trait HasChisel extends ScalaModule {
override def scalaVersion = defaultScalaVersion
override def scalacOptions = super.scalacOptions() ++ Seq(
"-unchecked",
"-deprecation",
"-language:reflectiveCalls",
"-feature",
"-Xcheckinit",
"-Xfatal-warnings",
"-Ywarn-dead-code",
"-Ywarn-unused",
"-Ymacro-annotations"
)
override def ivyDeps = super.ivyDeps() ++ Agg(chiselIvy)
override def scalacPluginIvyDeps = super.scalacPluginIvyDeps() ++ Agg(chiselPluginIvy)
}