-
Notifications
You must be signed in to change notification settings - Fork 7
/
common.sc
37 lines (25 loc) · 1.05 KB
/
common.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
import mill._
import mill.scalalib._
import mill.scalalib.publish._
import coursier.maven.MavenRepository
trait HasChisel
extends ScalaModule {
// Define these for building chisel from source
def chiselModule: Option[ScalaModule]
override def moduleDeps = super.moduleDeps ++ chiselModule
def chiselPluginJar: T[Option[PathRef]]
override def scalacOptions = T(super.scalacOptions() ++ chiselPluginJar().map(path => s"-Xplugin:${path.path}"))
override def scalacPluginClasspath: T[Agg[PathRef]] = T(super.scalacPluginClasspath() ++ chiselPluginJar())
// Define these for building chisel from ivy
def chiselIvy: Option[Dep]
override def ivyDeps = T(super.ivyDeps() ++ chiselIvy)
def chiselPluginIvy: Option[Dep]
override def scalacPluginIvyDeps: T[Agg[Dep]] = T(super.scalacPluginIvyDeps() ++ chiselPluginIvy.map(Agg(_)).getOrElse(Agg.empty[Dep]))
}
trait ArithmeticModule
extends ScalaModule
with HasChisel {
def spireIvy: T[Dep]
def evilplotIvy: T[Dep]
override def ivyDeps = T(super.ivyDeps() ++ Seq(spireIvy(), evilplotIvy()))
}