summaryrefslogtreecommitdiff
path: root/project
diff options
context:
space:
mode:
authorJosh Suereth <joshua.suereth@gmail.com>2011-12-09 13:54:12 -0500
committerJosh Suereth <joshua.suereth@gmail.com>2011-12-09 13:54:12 -0500
commitb0e74c560ade7bfadb5bd86bc9bb127bc47e7e43 (patch)
tree951f598e742307a75ebc4af7be05c1c0687c4754 /project
parent5842fbf130a4b9a3f44ff8189f84ee5403cf13b2 (diff)
downloadscala-b0e74c560ade7bfadb5bd86bc9bb127bc47e7e43.tar.gz
scala-b0e74c560ade7bfadb5bd86bc9bb127bc47e7e43.tar.bz2
scala-b0e74c560ade7bfadb5bd86bc9bb127bc47e7e43.zip
MSIL now part of layered compiles
* The MSIL source code is now built at every layer as part of the compiler project. * The MSIL project is completely removed from other references.
Diffstat (limited to 'project')
-rw-r--r--project/Build.scala20
-rw-r--r--project/Layers.scala7
2 files changed, 8 insertions, 19 deletions
diff --git a/project/Build.scala b/project/Build.scala
index 0f48b3b742..297f82e515 100644
--- a/project/Build.scala
+++ b/project/Build.scala
@@ -74,7 +74,7 @@ object ScalaBuild extends Build with Layers {
)
// Collections of projects to run 'compile' on.
- lazy val compiledProjects = Seq(quickLib, quickComp, continuationsLibrary, actors, swing, dbc, forkjoin, fjbg, msil)
+ lazy val compiledProjects = Seq(quickLib, quickComp, continuationsLibrary, actors, swing, dbc, forkjoin, fjbg)
// Collection of projects to 'package' and 'publish' together.
lazy val packagedBinaryProjects = Seq(scalaLibrary, scalaCompiler, swing, dbc, continuationsPlugin, jline, scalap)
lazy val partestRunProjects = Seq(testsuite, continuationsTestsuite)
@@ -179,17 +179,6 @@ object ScalaBuild extends Build with Layers {
// Forkjoin backport
lazy val forkjoin = Project("forkjoin", file(".")) settings(settingOverrides : _*)
- // MSIL code generator
- // TODO - This probably needs to compile in the layers, but Sabbus
- // had it building against locker, so we'll do worse and build
- // build against STARR for now.
- lazy val msilSettings = settingOverrides ++ Seq(
- defaultExcludes := ("tests"),
- javacOptions ++= Seq("-source", "1.4"),
- STARR
- )
- lazy val msil = Project("msil", file(".")) settings(msilSettings: _*)
-
// --------------------------------------------------------------
// The magic kingdom.
// Layered compilation of Scala.
@@ -203,7 +192,6 @@ object ScalaBuild extends Build with Layers {
val library = file("lib/scala-library.jar")
val compiler = file("lib/scala-compiler.jar")
val libJars = (file("lib") * "*.jar").get filterNot Set(library, compiler)
-
ScalaInstance("starr", library, compiler, launcher, libJars: _*)
}
@@ -312,12 +300,12 @@ object ScalaBuild extends Build with Layers {
quickScalaInstance,
target <<= (baseDirectory, name) apply (_ / "target" / _)
)
- lazy val scalaLibrary = Project("scala-library", file(".")) settings(scalaLibArtifactSettings:_*)
+ lazy val scalaLibrary = Project("scala-library", file(".")) settings(publishSettings:_*) settings(scalaLibArtifactSettings:_*)
// --------------------------------------------------------------
// Real Compiler Artifact
// --------------------------------------------------------------
- lazy val packageScalaBinTask = Seq(quickComp, fjbg, msil).map(p => products in p in Compile).join.map(_.flatten).map(productTaskToMapping)
+ lazy val packageScalaBinTask = Seq(quickComp, fjbg).map(p => products in p in Compile).join.map(_.flatten).map(productTaskToMapping)
lazy val scalaBinArtifactSettings : Seq[Setting[_]] = inConfig(Compile)(Defaults.packageTasks(packageBin, packageScalaBinTask)) ++ Seq(
name := "scala-compiler",
crossPaths := false,
@@ -328,7 +316,7 @@ object ScalaBuild extends Build with Layers {
quickScalaInstance,
target <<= (baseDirectory, name) apply (_ / "target" / _)
)
- lazy val scalaCompiler = Project("scala-compiler", file(".")) settings(scalaBinArtifactSettings:_*) dependsOn(scalaLibrary)
+ lazy val scalaCompiler = Project("scala-compiler", file(".")) settings(publishSettings:_*) settings(scalaBinArtifactSettings:_*) dependsOn(scalaLibrary)
lazy val fullQuickScalaReference = makeScalaReference("pack", scalaLibrary, scalaCompiler, fjbg)
// --------------------------------------------------------------
diff --git a/project/Layers.scala b/project/Layers.scala
index 50037f8f9f..905d312fff 100644
--- a/project/Layers.scala
+++ b/project/Layers.scala
@@ -14,8 +14,6 @@ trait Layers extends Build {
def forkjoin: Project
/** Reference to Fast-Java-Bytecode-Generator library */
def fjbg: Project
- /** Reference to MSIL generator library */
- def msil: Project
/** A setting that adds some external dependencies. */
def externalDeps: Setting[_]
@@ -68,6 +66,9 @@ trait Layers extends Build {
version := layer,
scalaSource in Compile <<= (baseDirectory) apply (_ / "src" / "compiler"),
resourceDirectory in Compile <<= baseDirectory apply (_ / "src" / "compiler"),
+ unmanagedSourceDirectories in Compile <+= (baseDirectory) apply (_ / "src" / "msil"),
+ defaultExcludes := ("tests"),
+ javacOptions ++= Seq("-source", "1.4"),
defaultExcludes in unmanagedResources := "*.scala",
resourceGenerators in Compile <+= (baseDirectory, version, resourceManaged, gitRunner) map Release.generatePropertiesFile("compiler.properties"),
// Note, we might be able to use the default task, but for some reason ant was filtering files out. Not sure what's up, but we'll
@@ -78,7 +79,7 @@ trait Layers extends Build {
dirs.descendentsExcept( ("*.xml" | "*.html" | "*.gif" | "*.png" | "*.js" | "*.css" | "*.tmpl" | "*.swf" | "*.properties" | "*.txt"),"*.scala").get
},
// TODO - Use depends on *and* SBT's magic dependency mechanisms...
- unmanagedClasspath in Compile <<= Seq(forkjoin, library, fjbg, jline, msil).map(exportedProducts in Compile in _).join.map(_.flatten),
+ unmanagedClasspath in Compile <<= Seq(forkjoin, library, fjbg, jline).map(exportedProducts in Compile in _).join.map(_.flatten),
classpathOptions := ClasspathOptions.manual,
externalDeps,
referenceScala