summaryrefslogtreecommitdiff
path: root/build.xml
diff options
context:
space:
mode:
authorJosh Suereth <joshua.suereth@gmail.com>2012-05-23 14:27:42 -0400
committerJosh Suereth <joshua.suereth@gmail.com>2012-05-23 14:27:42 -0400
commitfad0bf216e196c78fdabc19227435d5e5e593a67 (patch)
tree67d312f4a7f4eede8fe719cae12b83c60ae64fb0 /build.xml
parentd3bb612195dbaa8996ff98187cd51452a5f72f6c (diff)
downloadscala-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 'build.xml')
-rw-r--r--build.xml85
1 files changed, 43 insertions, 42 deletions
diff --git a/build.xml b/build.xml
index 4727dffbdc..d5b4395914 100644
--- a/build.xml
+++ b/build.xml
@@ -182,6 +182,7 @@ PROPERTIES
<!-- Sets location of build folders -->
<property name="build.dir" value="${basedir}/build"/>
+ <property name="build-asm.dir" value="${build.dir}/asm"/>
<property name="build-locker.dir" value="${build.dir}/locker"/>
<property name="build-palo.dir" value="${build.dir}/palo"/>
<property name="build-quick.dir" value="${build.dir}/quick"/>
@@ -413,10 +414,43 @@ INITIALISATION
</target>
<!-- ===========================================================================
+LOCAL Adapted ASM
+============================================================================ -->
+
+ <target name="asm.start" depends="init">
+ <condition property="asm.available">
+ <available file="${build-asm.dir}/asm.complete"/>
+ </condition>
+ </target>
+
+ <target name="asm.lib" depends="asm.start" unless="asm.available">
+ <stopwatch name="asm.lib.timer"/>
+ <mkdir dir="${build-asm.dir}/classes/"/>
+ <javac
+ srcdir="${src.dir}/asm"
+ destdir="${build-asm.dir}/classes"
+ classpath="${build-asm.dir}/classes"
+ includes="**/*.java"
+ target="1.5" source="1.5">
+ <compilerarg line="${javac.args} -XDignore.symbol.file"/>
+ </javac>
+ <touch file="${build-asm.dir}/asm.complete" verbose="no"/>
+ <stopwatch name="asm.lib.timer" action="total"/>
+ </target>
+
+
+ <target name="asm.done" depends="asm.lib">
+ <path id="asm.classpath">
+ <pathelement location="${build-asm.dir}/classes/"/>
+ </path>
+ </target>
+
+
+<!-- ===========================================================================
LOCAL REFERENCE BUILD (LOCKER)
============================================================================ -->
- <target name="locker.start" depends="init">
+ <target name="locker.start" depends="asm.done">
<condition property="locker.available">
<available file="${build-locker.dir}/all.complete"/>
</condition>
@@ -482,20 +516,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"/>
- <!-- TODO If we have cross dependencies, move this below scalacfork... -->
- <javac
- srcdir="${src.dir}/compiler"
- destdir="${build-locker.dir}/classes/compiler"
- includes="**/*.java"
- target="1.5" source="1.5">
- <compilerarg line="${javac.args}"/>
- <classpath>
- <pathelement location="${build-locker.dir}/classes/library"/>
- <pathelement location="${build-locker.dir}/classes/compiler"/>
- <path refid="aux.libs"/>
- <pathelement location="${jline.jar}"/>
- </classpath>
- </javac>
<scalacfork
destdir="${build-locker.dir}/classes/compiler"
compilerpathref="starr.classpath"
@@ -507,6 +527,7 @@ LOCAL REFERENCE BUILD (LOCKER)
<pathelement location="${build-locker.dir}/classes/library"/>
<pathelement location="${build-locker.dir}/classes/compiler"/>
<path refid="aux.libs"/>
+ <path refid="asm.classpath"/>
<pathelement location="${jline.jar}"/>
</compilationpath>
</scalacfork>
@@ -538,11 +559,13 @@ LOCAL REFERENCE BUILD (LOCKER)
<path id="locker.classpath">
<pathelement location="${build-locker.dir}/classes/library"/>
<pathelement location="${build-locker.dir}/classes/compiler"/>
+ <path refid="asm.classpath"/>
<path refid="aux.libs"/>
</path>
<path id="quick.classpath">
<pathelement location="${build-quick.dir}/classes/library"/>
<pathelement location="${build-quick.dir}/classes/compiler"/>
+ <path refid="asm.classpath"/>
<path refid="aux.libs"/>
</path>
</target>
@@ -610,6 +633,7 @@ PACKED LOCKER BUILD (PALO)
<mkdir dir="${build-palo.dir}/lib"/>
<jar destfile="${build-palo.dir}/lib/scala-compiler.jar" manifest="${basedir}/META-INF/MANIFEST.MF">
<fileset dir="${build-locker.dir}/classes/compiler"/>
+ <fileset dir="${build-asm.dir}/classes/"/>
<!-- filemode / dirmode: see trac ticket #1294 -->
<zipfileset dirmode="755" filemode="644" src="${lib.dir}/fjbg.jar"/>
<zipfileset dirmode="755" filemode="644" src="${lib.dir}/msil.jar"/>
@@ -781,20 +805,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"/>
- <!-- TODO If we have cross dependencies, move this below scalacfork... -->
- <javac
- srcdir="${src.dir}/compiler"
- destdir="${build-quick.dir}/classes/compiler"
- includes="**/*.java"
- target="1.5" source="1.5">
- <compilerarg line="${javac.args}"/>
- <classpath>
- <pathelement location="${build-quick.dir}/classes/library"/>
- <pathelement location="${build-quick.dir}/classes/compiler"/>
- <path refid="aux.libs"/>
- <pathelement location="${jline.jar}"/>
- </classpath>
- </javac>
<scalacfork
destdir="${build-quick.dir}/classes/compiler"
compilerpathref="locker.classpath"
@@ -806,6 +816,7 @@ QUICK BUILD (QUICK)
<pathelement location="${build-quick.dir}/classes/library"/>
<pathelement location="${build-quick.dir}/classes/compiler"/>
<path refid="aux.libs"/>
+ <path refid="asm.classpath"/>
<pathelement location="${jline.jar}"/>
</compilationpath>
</scalacfork>
@@ -1064,6 +1075,7 @@ QUICK BUILD (QUICK)
<path id="quick.classpath">
<pathelement location="${build-quick.dir}/classes/library"/>
<pathelement location="${build-quick.dir}/classes/compiler"/>
+ <path refid="asm.classpath"/>
<path refid="aux.libs"/>
</path>
</target>
@@ -1130,6 +1142,7 @@ PACKED QUICK BUILD (PACK)
<mkdir dir="${build-pack.dir}/lib"/>
<jar destfile="${build-pack.dir}/lib/scala-compiler.jar" manifest="${build-pack.dir}/META-INF/MANIFEST.MF">
<fileset dir="${build-quick.dir}/classes/compiler"/>
+ <fileset dir="${build-asm.dir}/classes"/>
<!-- filemode / dirmode: see trac ticket #1294 -->
<zipfileset dirmode="755" filemode="644" src="${fjbg.jar}"/>
<zipfileset dirmode="755" filemode="644" src="${msil.jar}"/>
@@ -1346,19 +1359,6 @@ BOOTSTRAPPING BUILD (STRAP)
<stopwatch name="strap.comp.timer"/>
<mkdir dir="${build-strap.dir}/classes/compiler"/>
<!-- TODO If we have cross dependencies, move this below scalacfork... -->
- <javac
- srcdir="${src.dir}/compiler"
- destdir="${build-strap.dir}/classes/compiler"
- includes="**/*.java"
- target="1.5" source="1.5">
- <compilerarg line="${javac.args}"/>
- <classpath>
- <pathelement location="${build-strap.dir}/classes/library"/>
- <pathelement location="${build-strap.dir}/classes/compiler"/>
- <path refid="aux.libs"/>
- <pathelement location="${jline.jar}"/>
- </classpath>
- </javac>
<scalacfork
destdir="${build-strap.dir}/classes/compiler"
compilerpathref="pack.classpath"
@@ -1370,6 +1370,7 @@ BOOTSTRAPPING BUILD (STRAP)
<pathelement location="${build-strap.dir}/classes/library"/>
<pathelement location="${build-strap.dir}/classes/compiler"/>
<path refid="aux.libs"/>
+ <path refid="asm.classpath"/>
<pathelement location="${jline.jar}"/>
</compilationpath>
</scalacfork>