Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions build.detach.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ SuperSabbus for Scala detach plugin.
<!-- ===========================================================================
END-USER TARGETS
============================================================================ -->

<target name="build" depends="pack.done"
description="Builds the Scala detach plugin."/>

Expand Down Expand Up @@ -72,7 +72,6 @@ QUICK BUILD (QUICK)
<path id="quick.classpath">
<pathelement location="${build-quick.dir}/classes/library"/>
<pathelement location="${build-quick.dir}/classes/compiler"/>
<pathelement location="${lib.dir}/msil.jar"/>
<pathelement location="${lib.dir}/forkjoin.jar"/>
<pathelement location="${ant.home}/lib/ant.jar"/>
</path>
Expand Down Expand Up @@ -119,9 +118,9 @@ QUICK BUILD (QUICK)
<!-- ===========================================================================
PACKED QUICK BUILD (PACK)
============================================================================ -->

<target name="pack.start" depends="quick.done"/>

<target name="pack.pre-lib" depends="pack.start">
<uptodate
property="pack.lib.available"
Expand Down
17 changes: 1 addition & 16 deletions build.examples.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@ PROPERTIES
<!-- Location of pre-compiled libraries properties -->
<property name="scala.lib.jar" value="${lib.dir}/scala-library.jar"/>
<property name="scala.comp.jar" value="${lib.dir}/scala-compiler.jar"/>
<property name="msil.name" value="msil.jar"/>
<property name="msil.jar" value="${lib.dir}/${msil.name}"/>
<property name="ant.jar" value="${ant.home}/lib/ant.jar"/>
<property name="ant-contrib.jar" value="${lib.dir}/ant/ant-contrib.jar"/>
<!-- -->
Expand Down Expand Up @@ -57,7 +55,7 @@ INITIALISATION
<fail message="Scala library in '${lib.dir}/' is not available">
<condition><not><and>
<available
classname="scala.Predef"
classname="scala.Predef"
classpath="${scala.lib.jar}"
/>
<available
Expand All @@ -79,15 +77,6 @@ INITIALISATION
/>
</not></condition>
</fail>
<echo level="verbose" message="msil.jar=${msil.jar}"/>
<fail message="MSIL library in '${lib.dir}/' is not available">
<condition><not>
<available
classname="ch.epfl.lamp.compiler.msil.MemberInfo"
classpath="${msil.jar}"
/>
</not></condition>
</fail>
<echo level="verbose" message="ant.jar=${ant.jar}"/>
<echo level="verbose" message="ant-contrib.jar=${ant-contrib.jar}"/>
<fail message="Additional Ant tasks in '${lib.dir}/' is not available">
Expand All @@ -99,13 +88,9 @@ INITIALISATION
</not></condition>
</fail>
<!-- Creating class-pathes -->
<path id="common.classpath">
<pathelement location="${msil.jar}"/>
</path>
<path id="scala.classpath">
<pathelement location="${scala.lib.jar}"/>
<pathelement location="${scala.comp.jar}"/>
<path refid="common.classpath"/>
</path>
<!-- Creating boot-level tasks -->
<taskdef resource="net/sf/antcontrib/antlib.xml">
Expand Down
95 changes: 0 additions & 95 deletions build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,6 @@ PROPERTIES

<!-- Sets location of pre-compiled libraries -->
<property name="lib.starr.jar" value="${lib.dir}/scala-library.jar"/>
<property name="msil.starr.jar" value="${lib.dir}/msil.jar"/>
<property name="reflect.starr.jar" value="${lib.dir}/scala-reflect.jar"/>
<property name="comp.starr.jar" value="${lib.dir}/scala-compiler.jar"/>
<property name="jline.jar" value="${lib.dir}/jline.jar"/>
Expand Down Expand Up @@ -462,7 +461,6 @@ INITIALISATION
<path id="starr.dep.libs">
<fileset dir="${lib.dir}">
<include name="forkjoin.jar"/>
<include name="msil.jar"/>
</fileset>
</path>
<!-- Auxiliary libs placed on every classpath. -->
Expand Down Expand Up @@ -621,9 +619,6 @@ LOCAL REFERENCE BUILD (LOCKER)
<pathelement location="${build-locker.dir}/classes/library"/>
</classpath>
</javac>
<!-- NOTE: Potential problem with maximal command line length on Windows
(32768 characters for XP, since executed with Java's "exec"). See
src/build/msil.xml in msil branch for more details. -->
<scalacfork
destdir="${build-locker.dir}/classes/library"
compilerpathref="starr.classpath"
Expand Down Expand Up @@ -713,42 +708,6 @@ LOCAL REFERENCE BUILD (LOCKER)
<target name="locker.comp" depends="locker.pre-comp" if="locker.comp.needed">
<stopwatch name="locker.comp.timer"/>
<mkdir dir="${build-locker.dir}/classes/compiler"/>
<if>
<equals arg1="${fastlocker}" arg2="true" />
<then>
<!-- Fastlocker build: don't compile MSIL, use its starr version.... -->
<property name="locker.comp.msil" value="${msil.starr.jar}"/>
</then>
<else>
<!-- Regular build: Compile MSIL inside of locker.... -->
<javac
srcdir="${src.dir}/msil"
destdir="${build-locker.dir}/classes/compiler"
classpath="${build-locker.dir}/classes/compiler"
includes="**/*.java"
excludes="**/tests/**"
debug="true"
target="1.6" source="1.4">
<compilerarg line="${javac.args}"/>
</javac>
<scalacfork
destdir="${build-locker.dir}/classes/compiler"
compilerpathref="starr.classpath"
params="${scalac.args.all}"
srcdir="${src.dir}/msil"
jvmargs="${scalacfork.jvmargs}">
<include name="**/*.scala"/>
<compilationpath>
<pathelement location="${build-locker.dir}/classes/library"/>
<pathelement location="${build-locker.dir}/classes/reflect"/>
<pathelement location="${build-locker.dir}/classes/compiler"/>
<path refid="aux.libs"/>
<pathelement location="${jline.jar}"/>
</compilationpath>
</scalacfork>
<property name="locker.comp.msil" value="${build-locker.dir}/classes/compiler"/>
</else>
</if>
<scalacfork
destdir="${build-locker.dir}/classes/compiler"
compilerpathref="starr.classpath"
Expand All @@ -762,7 +721,6 @@ LOCAL REFERENCE BUILD (LOCKER)
<pathelement location="${build-locker.dir}/classes/compiler"/>
<path refid="aux.libs"/>
<path refid="asm.classpath"/>
<pathelement location="${locker.comp.msil}" />
<pathelement location="${jline.jar}"/>
</compilationpath>
</scalacfork>
Expand Down Expand Up @@ -1110,32 +1068,6 @@ QUICK BUILD (QUICK)
<target name="quick.comp" depends="quick.pre-comp" unless="quick.comp.available">
<stopwatch name="quick.comp.timer"/>
<mkdir dir="${build-quick.dir}/classes/compiler"/>
<!-- Compile MSIL inside of quick.... -->
<javac
srcdir="${src.dir}/msil"
destdir="${build-quick.dir}/classes/compiler"
classpath="${build-quick.dir}/classes/compiler"
includes="**/*.java"
excludes="**/tests/**"
debug="true"
target="1.6" source="1.4">
<compilerarg line="${javac.args}"/>
</javac>
<scalacfork
destdir="${build-quick.dir}/classes/compiler"
compilerpathref="locker.classpath"
params="${scalac.args.all}"
srcdir="${src.dir}/msil"
jvmargs="${scalacfork.jvmargs}">
<include name="**/*.scala"/>
<compilationpath>
<pathelement location="${build-quick.dir}/classes/library"/>
<pathelement location="${build-quick.dir}/classes/reflect"/>
<pathelement location="${build-quick.dir}/classes/compiler"/>
<path refid="aux.libs"/>
<pathelement location="${jline.jar}"/>
</compilationpath>
</scalacfork>
<scalacfork
destdir="${build-quick.dir}/classes/compiler"
compilerpathref="locker.classpath"
Expand Down Expand Up @@ -1886,32 +1818,6 @@ BOOTSTRAPPING BUILD (STRAP)
<target name="strap.comp" depends="strap.pre-comp" unless="strap.comp.available">
<stopwatch name="strap.comp.timer"/>
<mkdir dir="${build-strap.dir}/classes/compiler"/>
<!-- Compile MSIL inside of strap.... -->
<javac
srcdir="${src.dir}/msil"
destdir="${build-strap.dir}/classes/compiler"
classpath="${build-strap.dir}/classes/compiler"
includes="**/*.java"
excludes="**/tests/**"
debug="true"
target="1.6" source="1.4">
<compilerarg line="${javac.args}"/>
</javac>
<scalacfork
destdir="${build-strap.dir}/classes/compiler"
compilerpathref="pack.classpath"
params="${scalac.args.all}"
srcdir="${src.dir}/msil"
jvmargs="${scalacfork.jvmargs}">
<include name="**/*.scala"/>
<compilationpath>
<pathelement location="${build-strap.dir}/classes/library"/>
<pathelement location="${build-strap.dir}/classes/reflect"/>
<pathelement location="${build-strap.dir}/classes/compiler"/>
<path refid="aux.libs"/>
<pathelement location="${jline.jar}"/>
</compilationpath>
</scalacfork>
<scalacfork
destdir="${build-strap.dir}/classes/compiler"
compilerpathref="pack.classpath"
Expand Down Expand Up @@ -2772,7 +2678,6 @@ STABLE REFERENCE (STARR)
<jar destfile="${basedir}/lib/scala-compiler-src.jar">
<fileset dir="${basedir}/src/compiler"/>
<fileset dir="${basedir}/src/asm"/>
<fileset dir="${basedir}/src/msil"/>
</jar>
</target>

Expand Down
1 change: 0 additions & 1 deletion lib/msil.jar.desired.sha1

This file was deleted.

30 changes: 15 additions & 15 deletions project/Build.scala
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ object ScalaBuild extends Build with Layers with Packaging with Testing {
override lazy val settings = super.settings ++ Versions.settings ++ Seq(
autoScalaLibrary := false,
resolvers += Resolver.url(
"Typesafe nightlies",
"Typesafe nightlies",
url("https://typesafe.artifactoryonline.com/typesafe/ivy-snapshots/")
)(Resolver.ivyStylePatterns),
resolvers ++= Seq(
Expand All @@ -21,14 +21,14 @@ object ScalaBuild extends Build with Layers with Packaging with Testing {
organization := "org.scala-lang",
version <<= Versions.mavenVersion,
pomExtra := epflPomExtra
)
)

// Collections of projects to run 'compile' on.
lazy val compiledProjects = Seq(quickLib, quickComp, continuationsLibrary, actors, swing, forkjoin)
// Collection of projects to 'package' and 'publish' together.
lazy val packagedBinaryProjects = Seq(scalaLibrary, scalaCompiler, swing, actors, continuationsPlugin, jline, scalap)
lazy val partestRunProjects = Seq(testsuite, continuationsTestsuite)

private def epflPomExtra = (
<xml:group>
<inceptionYear>2002</inceptionYear>
Expand All @@ -47,7 +47,7 @@ object ScalaBuild extends Build with Layers with Packaging with Testing {
</issueManagement>
</xml:group>
)

// Settings used to make sure publishing goes smoothly.
def publishSettings: Seq[Setting[_]] = Seq(
ivyScala ~= ((is: Option[IvyScala]) => is.map(_.copy(checkExplicit = false))),
Expand Down Expand Up @@ -91,7 +91,7 @@ object ScalaBuild extends Build with Layers with Packaging with Testing {
lazy val aaa_root = Project("scala", file(".")) settings(projectSettings: _*) settings(ShaResolve.settings: _*)

// External dependencies used for various projects
lazy val externalDeps: Setting[_] = libraryDependencies <<= (sbtVersion)(v =>
lazy val externalDeps: Setting[_] = libraryDependencies <<= (sbtVersion)(v =>
Seq(
"org.apache.ant" % "ant" % "1.8.2",
"org.scala-sbt" % "compiler-interface" % v % "provided"
Expand Down Expand Up @@ -132,7 +132,7 @@ object ScalaBuild extends Build with Layers with Packaging with Testing {

// Jline nested project. Compile this sucker once and be done.
lazy val jline = Project("jline", file("src/jline"))
// Our wrapped version of msil.
// Our wrapped version of asm.
lazy val asm = Project("asm", file(".")) settings(settingOverrides : _*)
// Forkjoin backport
lazy val forkjoin = Project("forkjoin", file(".")) settings(settingOverrides : _*)
Expand Down Expand Up @@ -173,9 +173,9 @@ object ScalaBuild extends Build with Layers with Packaging with Testing {
// --------------------------------------------------------------
// Projects dependent on layered compilation (quick)
// --------------------------------------------------------------
def addCheaterDependency(projectName: String): Setting[_] =
pomPostProcess <<= (version, organization, pomPostProcess) apply { (v,o,k) =>
val dependency: scala.xml.Node =
def addCheaterDependency(projectName: String): Setting[_] =
pomPostProcess <<= (version, organization, pomPostProcess) apply { (v,o,k) =>
val dependency: scala.xml.Node =
<dependency>
<groupId>{o}</groupId>
<artifactid>{projectName}</artifactid>
Expand All @@ -191,10 +191,10 @@ object ScalaBuild extends Build with Layers with Packaging with Testing {
case n: scala.xml.Elem if n.label == "dependencies" => n
} isEmpty)
// TODO - Keep namespace on project...
k andThen {
k andThen {
case n @ <project>{ nested@_*}</project> if hasDependencies(n) =>
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0">{nested}<dependencies>{dependency}</dependencies></project>
case <project>{ nested@_*}</project> =>
case <project>{ nested@_*}</project> =>
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0">{ nested map fixDependencies }</project>
}
}
Expand All @@ -203,7 +203,7 @@ object ScalaBuild extends Build with Layers with Packaging with Testing {
lazy val dependentProjectSettings = settingOverrides ++ Seq(quickScalaInstance, quickScalaLibraryDependency, addCheaterDependency("scala-library"))
lazy val actors = Project("scala-actors", file(".")) settings(dependentProjectSettings:_*) dependsOn(forkjoin % "provided")
lazy val swing = Project("scala-swing", file(".")) settings(dependentProjectSettings:_*) dependsOn(actors % "provided")
// This project will generate man pages (in man1 and html) for scala.
// This project will generate man pages (in man1 and html) for scala.
lazy val manmakerSettings: Seq[Setting[_]] = dependentProjectSettings :+ externalDeps
lazy val manmaker = Project("manual", file(".")) settings(manmakerSettings:_*)

Expand Down Expand Up @@ -232,7 +232,7 @@ object ScalaBuild extends Build with Layers with Packaging with Testing {
lazy val continuationsPlugin = Project("continuations-plugin", file(".")) settings(continuationsPluginSettings:_*)
lazy val continuationsLibrarySettings = dependentProjectSettings ++ Seq(
scalaSource in Compile <<= baseDirectory(_ / "src/continuations/library/"),
scalacOptions in Compile <++= (exportedProducts in Compile in continuationsPlugin) map {
scalacOptions in Compile <++= (exportedProducts in Compile in continuationsPlugin) map {
case Seq(cpDir) => Seq("-Xplugin-require:continuations", "-P:continuations:enable", "-Xplugin:"+cpDir.data.getAbsolutePath)
}
)
Expand Down Expand Up @@ -295,11 +295,11 @@ object ScalaBuild extends Build with Layers with Packaging with Testing {
lazy val scalaCompiler = Project("scala-compiler", file(".")) settings(publishSettings:_*) settings(scalaBinArtifactSettings:_*) dependsOn(scalaReflect)
lazy val fullQuickScalaReference = makeScalaReference("pack", scalaLibrary, scalaReflect, scalaCompiler)


// --------------------------------------------------------------
// Generating Documentation.
// --------------------------------------------------------------

// TODO - Migrate this into the dist project.
// Scaladocs
lazy val documentationSettings: Seq[Setting[_]] = dependentProjectSettings ++ Seq(
Expand Down
1 change: 0 additions & 1 deletion project/Layers.scala
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,6 @@ 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"),
defaultExcludes in unmanagedResources := "*.scala",
resourceGenerators in Compile <+= (resourceManaged, Versions.scalaVersions, skip in Compile, streams) map Versions.generateVersionPropertiesFile("compiler.properties"),
Expand Down
15 changes: 1 addition & 14 deletions src/compiler/scala/tools/ant/Scalac.scala
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,6 @@ import scala.tools.nsc.reporters.{Reporter, ConsoleReporter}
* - `usejavacp`,
* - `failonerror`,
* - `scalacdebugging`,
* - `assemname`,
* - `assemrefs`.
*
* It also takes the following parameters as nested elements:
* - `src` (for `srcdir`),
Expand Down Expand Up @@ -100,7 +98,7 @@ class Scalac extends ScalaMatchingTask with ScalacShared {

/** Defines valid values for the `target` property. */
object Target extends PermissibleValue {
val values = List("jvm-1.5", "jvm-1.6", "jvm-1.7", "msil")
val values = List("jvm-1.5", "jvm-1.6", "jvm-1.7")
}

/** Defines valid values for the `deprecation` and `unchecked` properties. */
Expand Down Expand Up @@ -170,11 +168,6 @@ class Scalac extends ScalaMatchingTask with ScalacShared {
/** Indicates whether compilation errors will fail the build; defaults to true. */
protected var failonerror: Boolean = true

// Name of the output assembly (only relevant with -target:msil)
protected var assemname: Option[String] = None
// List of assemblies referenced by the program (only relevant with -target:msil)
protected var assemrefs: Option[String] = None

/** Prints out the files being compiled by the scalac ant task
* (not only the number of files). */
protected var scalacDebugging: Boolean = false
Expand Down Expand Up @@ -421,9 +414,6 @@ class Scalac extends ScalaMatchingTask with ScalacShared {
* @param input The specified flag */
def setScalacdebugging(input: Boolean) { scalacDebugging = input }

def setAssemname(input: String) { assemname = Some(input) }
def setAssemrefs(input: String) { assemrefs = Some(input) }

/** Sets the `compilerarg` as a nested compilerarg Ant parameter.
* @return A compiler argument to be configured. */
def createCompilerArg(): ImplementationSpecificArgument = {
Expand Down Expand Up @@ -616,9 +606,6 @@ class Scalac extends ScalaMatchingTask with ScalacShared {
if (!unchecked.isEmpty) settings.unchecked.value = unchecked.get
if (!usejavacp.isEmpty) settings.usejavacp.value = usejavacp.get

if (!assemname.isEmpty) settings.assemname.value = assemname.get
if (!assemrefs.isEmpty) settings.assemrefs.value = assemrefs.get

val jvmargs = scalacCompilerArgs.getArgs filter (_ startsWith "-J")
if (!jvmargs.isEmpty) settings.jvmargs.value = jvmargs.toList
val defines = scalacCompilerArgs.getArgs filter (_ startsWith "-D")
Expand Down
Loading