File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,12 @@ val nixBuild = sys.props.isDefinedAt("nix")
12
12
// Enable dev mode: disable certain flags, etc.
13
13
val mantisDev = sys.props.get(" mantisDev" ).contains(" true" ) || sys.env.get(" MANTIS_DEV" ).contains(" true" )
14
14
15
+ lazy val compilerOptimizationsForProd = Seq (
16
+ " -opt:l:method" , // method-local optimizations
17
+ " -opt:l:inline" , // inlining optimizations
18
+ " -opt-inline-from:**" // inlining allowed to all classes
19
+ )
20
+
15
21
// Releasing. https://github.com/olafurpg/sbt-ci-release
16
22
inThisBuild(List (
17
23
organization := " io.iohk" ,
@@ -47,6 +53,7 @@ def commonSettings(projectName: String): Seq[sbt.Def.Setting[_]] = Seq(
47
53
" -encoding" ,
48
54
" utf-8"
49
55
),
56
+ scalacOptions ++= (if (mantisDev) Seq .empty else compilerOptimizationsForProd),
50
57
scalacOptions in (Compile , console) ~= (_.filterNot(
51
58
Set (
52
59
" -Ywarn-unused-import" ,
You can’t perform that action at this time.
0 commit comments