summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJosh Suereth <joshua.suereth@gmail.com>2012-06-11 12:08:10 -0400
committerJosh Suereth <joshua.suereth@gmail.com>2012-06-11 12:08:10 -0400
commit949c5caba25f6273bd87b09a8aa568227bd44240 (patch)
tree117f3ad47a3e4085969d25c45920ce8180173021
parentecc323233e2ff4f005e0d2b7ac62487954678977 (diff)
downloadscala-949c5caba25f6273bd87b09a8aa568227bd44240.tar.gz
scala-949c5caba25f6273bd87b09a8aa568227bd44240.tar.bz2
scala-949c5caba25f6273bd87b09a8aa568227bd44240.zip
MSIL now build as part of compiler.
* MSIL is now compiled/embedded with compiler * Tested building new STARR, everything groovy * Can probably remove msil/forkjoin/fjbg from STARR now that they're properly embedded/built.
-rw-r--r--build.xml184
1 files changed, 90 insertions, 94 deletions
diff --git a/build.xml b/build.xml
index ef518a7233..b5f5d07e54 100644
--- a/build.xml
+++ b/build.xml
@@ -135,16 +135,6 @@ END-USER TARGETS
<antcall target="palo.bin"/>
</target>
- <target name="newlibs"
- description="Requires libraries (MSIL, FJBG) to be rebuilt. Add this target before any other if class file format is incompatible.">
- <property name="libs.outdated" value="yes"/>
- </target>
-
- <target name="newforkjoin"
- description="Requires forkjoin library to be rebuilt. Add this target before any other if class file format is incompatible.">
- <property name="forkjoin.outdated" value="yes"/>
- </target>
-
<!-- ===========================================================================
PROPERTIES
============================================================================ -->
@@ -175,6 +165,7 @@ 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"/>
@@ -392,13 +383,11 @@ INITIALISATION
<fileset dir="${lib.dir}">
<include name="fjbg.jar"/>
<include name="forkjoin.jar"/>
+ <include name="msil.jar"/>
</fileset>
</path>
<!-- Auxiliary libs placed on every classpath. -->
<path id="aux.libs">
- <fileset dir="${lib.dir}">
- <include name="msil.jar"/>
- </fileset>
<pathelement location="${ant.jar}"/>
<path refid="lib.extra"/>
<path refid="dependency.classpath"/>
@@ -688,6 +677,33 @@ 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"/>
+ <!-- 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.5" 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="fjbg.classpath"/>
+ <path refid="aux.libs"/>
+ <pathelement location="${jline.jar}"/>
+ </compilationpath>
+ </scalacfork>
<scalacfork
destdir="${build-locker.dir}/classes/compiler"
compilerpathref="starr.classpath"
@@ -843,8 +859,6 @@ PACKED LOCKER BUILD (PALO)
<fileset dir="${build-locker.dir}/classes/compiler"/>
<fileset dir="${build-asm.dir}/classes/"/>
<fileset dir="${build-libs.dir}/classes/fjbg"/>
- <!-- filemode / dirmode: see trac ticket #1294 -->
- <zipfileset dirmode="755" filemode="644" src="${lib.dir}/msil.jar"/>
</jar>
<copy file="${jline.jar}" toDir="${build-palo.dir}/lib"/>
</target>
@@ -1041,27 +1055,7 @@ QUICK BUILD (QUICK)
<stopwatch name="quick.reflect.timer" action="total"/>
</target>
- <target name="quick.newlibs" depends="quick.reflect" if="libs.outdated">
- <antcall target="libs.done" inheritRefs="true"/>
- <property name="fjbg.jar" value="${build-libs.dir}/fjbg.jar"/>
- <property name="msil.jar" value="${build-libs.dir}/msil.jar"/>
- </target>
-
- <target name="quick.libs" depends="quick.newlibs" unless="libs.outdated">
- <property name="fjbg.jar" value="${lib.dir}/fjbg.jar"/>
- <property name="msil.jar" value="${lib.dir}/msil.jar"/>
- </target>
-
- <target name="quick.newforkjoin" depends="quick.libs" if="forkjoin.outdated">
- <antcall target="forkjoin.done" inheritRefs="true"/>
- <property name="forkjoin.jar" value="${build-libs.dir}/forkjoin.jar"/>
- </target>
-
- <target name="quick.forkjoin" depends="quick.newforkjoin" unless="forkjoin.outdated">
- <property name="forkjoin.jar" value="${lib.dir}/forkjoin.jar"/>
- </target>
-
- <target name="quick.pre-comp" depends="quick.forkjoin">
+ <target name="quick.pre-comp" depends="quick.reflect">
<uptodate property="quick.comp.available" targetfile="${build-quick.dir}/compiler.complete">
<srcfiles dir="${src.dir}/compiler"/>
</uptodate>
@@ -1070,6 +1064,33 @@ 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.5" source="1.4">
+ <compilerarg line="${javac.args}"/>
+ </javac>
+ <scalacfork
+ destdir="${build-quick.dir}/classes/compiler"
+ compilerpathref="starr.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="fjbg.classpath"/>
+ <path refid="aux.libs"/>
+ <pathelement location="${jline.jar}"/>
+ </compilationpath>
+ </scalacfork>
<scalacfork
destdir="${build-quick.dir}/classes/compiler"
compilerpathref="locker.classpath"
@@ -1390,7 +1411,6 @@ PACKED QUICK BUILD (PACK)
<exclude name="scala/actors/**"/>
</fileset>
<fileset dir="${build-libs.dir}/classes/forkjoin"/>
- <zipfileset dirmode="755" filemode="644" src="${forkjoin.jar}"/>
</jar>
<jar destfile="${build-pack.dir}/lib/scala-swing.jar">
<fileset dir="${build-quick.dir}/classes/library">
@@ -1439,8 +1459,6 @@ PACKED QUICK BUILD (PACK)
<fileset dir="${build-quick.dir}/classes/compiler"/>
<fileset dir="${build-asm.dir}/classes"/>
<fileset dir="${build-libs.dir}/classes/fjbg"/>
- <!-- filemode / dirmode: see trac ticket #1294 -->
- <zipfileset dirmode="755" filemode="644" src="${msil.jar}"/>
</jar>
<copy file="${jline.jar}" toDir="${build-pack.dir}/lib"/>
<copy todir="${build-pack.dir}/lib">
@@ -1709,7 +1727,33 @@ 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"/>
- <!-- TODO If we have cross dependencies, move this below scalacfork... -->
+ <!-- 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.5" source="1.4">
+ <compilerarg line="${javac.args}"/>
+ </javac>
+ <scalacfork
+ destdir="${build-strap.dir}/classes/compiler"
+ compilerpathref="starr.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="fjbg.classpath"/>
+ <path refid="aux.libs"/>
+ <pathelement location="${jline.jar}"/>
+ </compilationpath>
+ </scalacfork>
<scalacfork
destdir="${build-strap.dir}/classes/compiler"
compilerpathref="pack.classpath"
@@ -1904,59 +1948,11 @@ BOOTSTRAPPING BUILD (STRAP)
</target>
<!-- ===========================================================================
-LIBRARIES (MSIL, FJBG maybe later)
+LIBRARIES (Forkjoin, FJBG, ASM)
============================================================================ -->
- <target name="libs.start"/>
-
- <target name="libs.pre-msil" depends="libs.start">
- <uptodate property="libs.msil.available" targetfile="${build-libs.dir}/msil.complete">
- <srcfiles dir="${src.dir}/msil">
- <include name="**/*.java"/>
- <include name="**/*.scala"/>
- </srcfiles>
- </uptodate>
- </target>
-
- <target name="libs.msil" depends="libs.pre-msil" unless="libs.msil.available">
- <mkdir dir="${build-libs.dir}/classes/msil"/>
- <javac
- srcdir="${src.dir}/msil"
- destdir="${build-libs.dir}/classes/msil"
- classpath="${build-libs.dir}/classes/msil"
- includes="**/*.java"
- excludes="**/tests/**"
- debug="true"
- target="1.5" source="1.4">
- <compilerarg line="${javac.args}"/>
- </javac>
- <scalacfork
- destdir="${build-libs.dir}/classes/msil"
- 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-libs.dir}/classes/msil"/>
- </compilationpath>
- </scalacfork>
- <touch file="${build-libs.dir}/msil.complete" verbose="no"/>
- </target>
-
- <target name="libs.pre-msilpack" depends="libs.msil">
- </target>
-
- <target name="libs.msilpack" depends="libs.pre-msilpack" unless="libs.msilpack.available">
- <jar destfile="${build-libs.dir}/msil.jar">
- <fileset dir="${build-libs.dir}/classes/msil"/>
- </jar>
- </target>
-
- <target name="libs.done" depends="libs.msilpack"/>
-
- <target name="libs.clean" depends="pack.clean">
+
+ <target name="libs.clean" depends="pack.clean, asm.clean">
<delete dir="${build-libs.dir}" includeemptydirs="yes" quiet="yes" failonerror="no"/>
</target>
@@ -2235,7 +2231,7 @@ DOCUMENTATION
BOOTRAPING TEST AND TEST SUITE
============================================================================ -->
- <target name="test.stability" depends="strap.done">
+ <target name="test.stability" depends="strap.done, init">
<same dir="${build-quick.dir}" todir="${build-strap.dir}" failondifferent="yes">
<exclude name="**/*.properties"/>
<exclude name="bin/**"/>
@@ -2515,11 +2511,11 @@ STABLE REFERENCE (STARR)
</jar>
</target>
- <target name="starr.libs" depends="starr.src" if="libs.outdated">
+ <target name="starr.libs" depends="starr.src, forkjoin.done, fjbg.done">
+ <!-- TODO - Do we even *need* this in starr? -->
<copy toDir="${lib.dir}" overwrite="yes">
<fileset dir="${build-libs.dir}">
<include name="fjbg.jar"/>
- <include name="msil.jar"/>
<include name="forkjoin.jar"/>
</fileset>
</copy>