diff options
author | Josh Suereth <joshua.suereth@gmail.com> | 2012-05-23 14:27:42 -0400 |
---|---|---|
committer | Josh Suereth <joshua.suereth@gmail.com> | 2012-05-23 14:27:42 -0400 |
commit | fad0bf216e196c78fdabc19227435d5e5e593a67 (patch) | |
tree | 67d312f4a7f4eede8fe719cae12b83c60ae64fb0 /project/Layers.scala | |
parent | d3bb612195dbaa8996ff98187cd51452a5f72f6c (diff) | |
download | scala-fad0bf216e196c78fdabc19227435d5e5e593a67.tar.gz scala-fad0bf216e196c78fdabc19227435d5e5e593a67.tar.bz2 scala-fad0bf216e196c78fdabc19227435d5e5e593a67.zip |
ASM now compiled once in the build.
* Moved ASM sources to src/asm
* New ant task builds asm *ONCE*. Build times improve by a few seconds
* Fixed SBT build for new asm location. SBT build still broken from actors-migration and partest
Review by @magarciaEPFL
Diffstat (limited to 'project/Layers.scala')
-rw-r--r-- | project/Layers.scala | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/project/Layers.scala b/project/Layers.scala index 3d6d780f8f..58fcb1b254 100644 --- a/project/Layers.scala +++ b/project/Layers.scala @@ -14,6 +14,8 @@ trait Layers extends Build { def forkjoin: Project /** Reference to Fast-Java-Bytecode-Generator library */ def fjbg: Project + /** Reference to the ASM wrapped project. */ + def asm: Project /** A setting that adds some external dependencies. */ def externalDeps: Setting[_] /** The root project. */ @@ -22,14 +24,15 @@ trait Layers extends Build { /** Creates a reference Scala version that can be used to build other projects. This takes in the raw * library, compiler and fjbg libraries as well as a string representing the layer name (used for compiling the compile-interface). */ - def makeScalaReference(layer : String, library: Project, compiler: Project, fjbg: Project) = + def makeScalaReference(layer : String, library: Project, compiler: Project) = scalaInstance <<= (appConfiguration in library, version in library, (exportedProducts in library in Compile), (exportedProducts in compiler in Compile), (exportedProducts in fjbg in Compile), - (fullClasspath in jline in Runtime)) map { - (app, version: String, lib: Classpath, comp: Classpath, fjbg: Classpath, jline: Classpath) => + (fullClasspath in jline in Runtime), + (exportedProducts in asm in Runtime)) map { + (app, version: String, lib: Classpath, comp: Classpath, fjbg: Classpath, jline: Classpath, asm: Classpath) => val launcher = app.provider.scalaProvider.launcher (lib,comp) match { case (Seq(libraryJar), Seq(compilerJar)) => @@ -38,7 +41,7 @@ trait Layers extends Build { libraryJar.data, compilerJar.data, launcher, - ((fjbg.files++jline.files):_*)) + ((fjbg.files++jline.files ++ asm.files):_*)) case _ => error("Cannot build a ScalaReference with more than one classpath element") } } @@ -58,7 +61,6 @@ trait Layers extends Build { defaultExcludes in unmanagedResources := ("*.scala" | "*.java" | "*.disabled"), // TODO - Allow other scalac option settings. scalacOptions in Compile <++= (scalaSource in Compile) map (src => Seq("-sourcepath", src.getAbsolutePath)), - classpathOptions := ClasspathOptions.manual, resourceGenerators in Compile <+= (resourceManaged, Versions.scalaVersions, skip in Compile, streams) map Versions.generateVersionPropertiesFile("library.properties"), referenceScala ) @@ -80,8 +82,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).map(exportedProducts in Compile in _).join.map(_.flatten), - classpathOptions := ClasspathOptions.manual, + unmanagedClasspath in Compile <<= Seq(forkjoin, library, fjbg, jline, asm).map(exportedProducts in Compile in _).join.map(_.flatten), externalDeps, referenceScala ) |