harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From var...@apache.org
Subject svn commit: r587805 - in /harmony/enhanced/drlvm/trunk/build/make: build.xml build_component.xml targets/build.native.xml targets/common.xml targets/common_extra.xml targets/common_vm.xml targets/cunit.test.xml
Date Wed, 24 Oct 2007 07:34:01 GMT
Author: varlax
Date: Wed Oct 24 00:34:00 2007
New Revision: 587805

URL: http://svn.apache.org/viewvc?rev=587805&view=rev
Log:
Get rid of targets preprocessing.

Modified:
    harmony/enhanced/drlvm/trunk/build/make/build.xml
    harmony/enhanced/drlvm/trunk/build/make/build_component.xml
    harmony/enhanced/drlvm/trunk/build/make/targets/build.native.xml
    harmony/enhanced/drlvm/trunk/build/make/targets/common.xml
    harmony/enhanced/drlvm/trunk/build/make/targets/common_extra.xml
    harmony/enhanced/drlvm/trunk/build/make/targets/common_vm.xml
    harmony/enhanced/drlvm/trunk/build/make/targets/cunit.test.xml

Modified: harmony/enhanced/drlvm/trunk/build/make/build.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/build/make/build.xml?rev=587805&r1=587804&r2=587805&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/build/make/build.xml (original)
+++ harmony/enhanced/drlvm/trunk/build/make/build.xml Wed Oct 24 00:34:00 2007
@@ -174,11 +174,47 @@
         <property name="build.cfg" value="${env.BUILD_CFG}" />
         <property name="build.cxx" value="${env.CXX}" />
 
+        <condition property="is.gcc">
+            <equals arg1="${build.cxx}" arg2="gcc"/>
+        </condition>
+
+        <condition property="is.icc">
+            <equals arg1="${build.cxx}" arg2="icc"/>
+        </condition>
+
+        <condition property="is.icl">
+            <equals arg1="${build.cxx}" arg2="icl"/>
+        </condition>
+
+        <condition property="is.msvc">
+            <equals arg1="${build.cxx}" arg2="msvc"/>
+        </condition>
+
+        <condition property="is.cfg.debug">
+            <equals arg1="${build.cfg}" arg2="debug"/>
+        </condition>
+        <condition property="is.cfg.release">
+            <not><equals arg1="${build.cfg}" arg2="debug"/></not>
+        </condition>
+        
         <!-- build debug: true/false -->
         <condition property="build.is.debug" value="true">
             <equals arg1="${build.cfg}" arg2="debug" />
         </condition>
         <property name="build.is.debug" value="false" />
+        
+        <condition property="is.unix.x86_64">
+            <and>
+                <isset property="is.unix"/>
+                <isset property="is.x86_64"/>
+            </and>
+        </condition>
+        <condition property="is.unix.x86">
+            <and>
+                <isset property="is.unix"/>
+                <isset property="is.x86"/>
+            </and>
+        </condition>
     </target>
 
     <!-- initialization target specific for unix -->
@@ -449,7 +485,7 @@
         <parallel threadsPerProcessor="1" failonany="no">
             <ant target="hut.test"      output="${base.test.dir}/hut.log"/>
             <ant target="kernel.test"   output="${base.test.dir}/kernel.log"/>
-            <ant target="ehwa"          output="${base.test.dir}/ehwa.log"/>
+            <ant target="ehwa.test"     output="${base.test.dir}/ehwa.log"/>
             <ant target="jvmti.test"    output="${base.test.dir}/jvmti.log"/>
             <ant target="smoke.test"    output="${base.test.dir}/smoke.log"/>
             <ant target="reg.test"      output="${base.test.dir}/reg.log"/>
@@ -465,11 +501,8 @@
     </target>
 
     <!-- Run cunit tests only -->
-    <target name="cunit.test" depends="setup, init">
-        <subant buildpath="." antfile="build_component.xml" target="build" inheritall="true"
failonerror="true">
-            <property name="_component" value="vm" />
-            <property name="_target" value="cunit.test" />
-        </subant>
+    <target name="cunit.test" depends="init">
+        <ant antfile="targets/cunit.test.xml" target="cunit.test"/>
         <available property="test.failed" file="${base.test.dir}/cunit.test.failed" />
     </target>
 
@@ -480,7 +513,7 @@
     </target>
 
     <!-- Main target to run kernel tests -->
-    <target name="kernel.test" depends="extern_dep,init" >
+    <target name="kernel.test" depends="init" >
         <ant antfile="targets/kernel.test.xml" target="kernel.test"/>
         <available property="test.failed" file="${base.test.dir}/kernel.test.failed" />
     </target>

Modified: harmony/enhanced/drlvm/trunk/build/make/build_component.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/build/make/build_component.xml?rev=587805&r1=587804&r2=587805&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/build/make/build_component.xml (original)
+++ harmony/enhanced/drlvm/trunk/build/make/build_component.xml Wed Oct 24 00:34:00 2007
@@ -83,7 +83,6 @@
     <target name="is.build.constructed">
         <dependset>
             <srcfileset dir="components" includes="**/*.xml" />
-            <srcfileset dir="targets" includes="**/*.xml" />
             <srcfilelist dir="." files="deploy.xml,selector.xsl,build_component.xsl,build_component.xml"
/>
             <targetfileset dir="${build.semi.dir}" includes="done.txt" />
         </dependset>
@@ -93,8 +92,6 @@
     <!-- sets some properties used by the build construction -->
     <target name="generate.init" unless="build.constructed">
         <mkdir dir="${build.semi.dir}/build" />
-        <!-- creating directory under build.semi.dir to store semi results for targets
-->
-        <mkdir dir="${build.semi.dir}/build/targets" />
         <property name="build.file" value="${build.semi.dir}/build.tmp.xml" />
         <echo file="${build.file}">
             <![CDATA[            
@@ -111,9 +108,7 @@
         </echo>
     </target>
 
-    <!-- generates semis/build_targets.xml
-        (processes targets with xslt to get the version for current build configuration
-         and imports them to the semis/build_targets.xml) -->
+    <!-- generates semis/build_targets.xml -->
     <target name="generate.targets" unless="build.constructed">
         <echo file="${build.targets.file}" append="true">
             <![CDATA[
@@ -123,34 +118,24 @@
         <var name="targets.list.var" value="" />
         <property name="target.target.file" value="" />
         <for param="target">
-            <!-- all files in targets directory are targets for the build -->
             <fileset dir="targets">
                 <include name="**" />
+                <exclude name="*test*"/>
             </fileset>
 
             <sequential>
                 <basename property="@{target}.name" file="@{target}" />
                 <!-- target name (with suffix and .xml)-->
                 <propertycopy name="targetname" override="true" from="@{target}.name"
/>
-                <!-- processing targets with xslt to filter select tags -->
-                <xslt in="@{target}" out="${build.semi.dir}/build/targets/${targetname}"
style="./selector.xsl">
-                    <param name="cfg" expression="${build.cfg}" />
-                    <param name="os" expression="${build.os.short}" />
-                    <param name="osfamily" expression="${build.os.family}" />
-                    <param name="arch" expression="${build.arch}" />
-                    <param name="cxx" expression="${build.cxx}" />
-                    <param name="hynosig" expression="${hy.no.sig}" />
-                    <param name="hylocalzlib" expression="${hy.local.zlib}" />
-                </xslt>
                 <echo file="${build.targets.file}" append="true">
                     <![CDATA[
-    <import file="${build.semi.dir}/build/targets/${targetname}" />
+    <import file="${basedir}/targets/${targetname}" />
                     ]]>
                 </echo>
 
                 <!-- load the content of the semis/build/targets/${targetname} -->
                 <var name="target.target.file" unset="true" />
-                <loadfile property="target.target.file" srcfile="${build.semi.dir}/build/targets/${targetname}"
/>
+                <loadfile property="target.target.file" srcfile="targets/${targetname}"
/>
 
                 <!-- ${t.file} = ${targetname}.file (file content) -->
                 <propertycopy override="true" name="t.file" from="target.target.file"
/>
@@ -177,11 +162,6 @@
 </project> 
             ]]>
         </echo>
-
-        <!-- FIXME: do we need it? -->
-        <fileset id="targets" dir="${build.semi.dir}/build/targets">
-            <include name="**" />
-        </fileset>
     </target>
 
     <!-- processes descriptors with xslt - to get init_${component}.xml

Modified: harmony/enhanced/drlvm/trunk/build/make/targets/build.native.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/build/make/targets/build.native.xml?rev=587805&r1=587804&r2=587805&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/build/make/targets/build.native.xml (original)
+++ harmony/enhanced/drlvm/trunk/build/make/targets/build.native.xml Wed Oct 24 00:34:00 2007
@@ -75,11 +75,6 @@
         <property name="lib.out.dir" location="${libdir}" />
         <mkdir dir="${lib.out.dir}" />
 
-        <condition property="is.cfg.debug" value="true">
-            <equals arg1="${cfg.build}" arg2="debug" />
-        </condition>
-        <property name="is.cfg.debug" value="false" />
-
         <condition property="object.suffix" value="obj">
             <isset property="if.win" />
         </condition>
@@ -93,14 +88,14 @@
     <!-- compiles c sources ${c.compiler} must be set in the component descriptor 
                 to point what sources have to be compiled -->
     <target name="build.native.c" depends="build.native.init" if="have.to.rebuild">
-        <cc objdir="${build.dir}/_obj" debug="${is.cfg.debug}" runtime="static" multithreaded="true"
subsystem="console">
+        <cc objdir="${build.dir}/_obj" debug="${build.is.debug}" runtime="static" multithreaded="true"
subsystem="console">
             <compiler refid="c.compiler" />
-            <select os="win">
-                <compilerarg value="/Zi" />
-            </select>
-            <select osfamily="unix">
-                <linkerarg value="-g" />
-            </select>
+            <compilerarg value="/Zi" if="is.windows"/>
+            <compilerarg value="/Fp${build.dir}/_obj\" if="is.windows"/>
+            <compilerarg value="/FR${build.dir}/_obj\" if="is.windows"/>
+            <compilerarg value="/Fd${build.dir}/_obj\" if="is.windows"/>
+
+            <linkerarg value="-g" if="is.unix"/>
             <fileset refid="c.fileset" />
         </cc>
     </target>
@@ -108,46 +103,59 @@
     <!-- compiles cpp sources ${cpp.compiler} must be set in the component descriptor

                 to point what sources have to be compiled -->
     <target name="build.native.cpp" depends="build.native.init" if="have.to.rebuild">
-        <cc objdir="${build.dir}/_obj" debug="${is.cfg.debug}" runtime="static" multithreaded="true"
 subsystem="console">
+        <cc objdir="${build.dir}/_obj" debug="${build.is.debug}" runtime="static" multithreaded="true"
 subsystem="console">
             <compiler refid="cpp.compiler" />
-            <select os="win">
-                <compilerarg value="/Zi" />
-            </select>
-            <select osfamily="unix">
-                <compilerarg value="-fpic" />
-                <linkerarg value="-g" />
-            </select>
+            <compilerarg value="/Zi" if="is.windows"/>
+            <compilerarg value="/Fp${build.dir}/_obj\" if="is.windows"/>
+            <compilerarg value="/FR${build.dir}/_obj\" if="is.windows"/>
+            <compilerarg value="/Fd${build.dir}/_obj\" if="is.windows"/>
+
+            <compilerarg value="-fpic" if="is.unix"/>
+            <linkerarg value="-g" if="is.unix"/>
             <fileset refid="cpp.fileset" />
         </cc>
     </target>
 
     <target name="build.native.asm.init" depends="build.native.init" if="have.to.rebuild">
-        <property name="asm.args" value="" />
-
-        <select cxx="gcc">
-            <property name="asm.executable" value="gcc" />
-        </select>
-        <select cxx="icc">
-            <property name="asm.executable" value="icc" />
-        </select>
-        <select os="win">
-            <select arch="em64t">
-                <property name="asm.executable" value="ml64" />
-                <property name="asm.add.arg" value="/c /Cp /W3 /nologo /Zd /Zi -DWIN32"
/>
-            </select>
-            <select arch="ia32">
-                <property name="asm.executable" value="ml" />
-                <property name="asm.add.arg" value="/c /Cp /W3 /nologo /coff /Zm /Zd /Zi
/Gd -DWIN32" />
-            </select>
-        </select>
-
+        <condition property="asm.executable" value="${build.cxx}">
+            <or>
+                <equals arg1="${build.cxx}" arg2="gcc"/>
+                <equals arg1="${build.cxx}" arg2="icc"/>
+            </or>
+        </condition>
         <condition property="asm.add.arg" value="-Wa,--fatal-warnings -c -x assembler-with-cpp
-g">
             <or>
                 <equals arg1="icc" arg2="${asm.executable}" />
                 <equals arg1="gcc" arg2="${asm.executable}" />
             </or>
         </condition>
-        <property name="asm.add.arg" value="" />
+        <condition property="asm.obj.switch" value="-o">
+            <or>
+                <equals arg1="${build.cxx}" arg2="gcc"/>
+                <equals arg1="${build.cxx}" arg2="icc"/>
+            </or>
+        </condition>
+        <condition property="asm.executable" value="ml64">
+            <and>
+                <isset property="is.windows"/>
+                <isset property="is.64bit"/>
+            </and>
+        </condition>
+        <condition property="asm.add.arg" value="/c /Cp /W3 /nologo /Zd /Zi -DWIN32">
+            <and>
+                <isset property="is.windows"/>
+                <isset property="is.64bit"/>
+            </and>
+        </condition>
+        <condition property="asm.executable" value="ml">
+            <isset property="is.windows"/>
+        </condition>
+        <condition property="asm.add.arg" value="/c /Cp /W3 /nologo /coff /Zm /Zd /Zi
/Gd -DWIN32">
+            <isset property="is.windows"/>
+        </condition>
+        <condition property="asm.obj.switch" value="/Fo">
+            <isset property="is.windows"/>
+        </condition>
     </target>
 
     <target name="build.native.asm" depends="build.native.asm.init" if="have.to.rebuild">
@@ -165,14 +173,8 @@
                     </not>
                     <then>
                         <exec executable="${asm.executable}" failonerror="true">
-                            <arg line="${asm.args}" />
                             <arg line="${asm.add.arg}" />
-                            <select osfamily="unix">
-                                <arg line=" -o${build.dir}/_obj/${object}.${object.suffix}
@{file} " />
-                            </select>
-                            <select os="win">
-                                <arg line="/Fo${build.dir}/_obj/${object}.${object.suffix}
@{file} " />
-                            </select>
+                            <arg line=" ${asm.obj.switch}${build.dir}/_obj/${object}.${object.suffix}
@{file} " />
                         </exec>
                     </then>
                 </if>
@@ -207,14 +209,18 @@
     <target name="build.native.link"
             depends="build.native.link.init"
             if="link.present">
+        <condition property="need.pdb">
+            <and>
+                <isset property="is.windows"/>
+                <isset property="${component}.not.static"/>
+            </and>
+        </condition>
         <cc name="${build.cxx}"
-            debug="${is.cfg.debug}"
+            debug="${build.is.debug}"
             outfile="${lib.out.dir}/${libname}"
             outtype="${outtype}"  subsystem="console">
-            <select os="win">
-                <linkerarg value="/pdb:${build.dir}/_bin/${libname}.pdb" if="${component}.not.static"
/>
-                <linkerarg value="/debug" if="${component}.not.static" />
-            </select>
+            <linkerarg value="/pdb:${build.dir}/_bin/${libname}.pdb" if="need.pdb" />
+            <linkerarg value="/debug" if="need.pdb" />
             <linker refid="linker" />
             <fileset refid="link.fileset" />
         </cc>

Modified: harmony/enhanced/drlvm/trunk/build/make/targets/common.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/build/make/targets/common.xml?rev=587805&r1=587804&r2=587805&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/build/make/targets/common.xml (original)
+++ harmony/enhanced/drlvm/trunk/build/make/targets/common.xml Wed Oct 24 00:34:00 2007
@@ -20,14 +20,10 @@
         <property name="common.src" value="" />
                 
         <compiler id="common.cpp.compiler" name="${build.cxx}">
-            <select os="win">
-                <defineset define="WIN32,_WINDOWS" />
-            </select>
+            <defineset define="WIN32,_WINDOWS" if="is.windows"/>
         </compiler>
         <compiler id="common.c.compiler" name="${build.cxx}">
-            <select os="win">
-                <defineset define="WIN32,_WINDOWS" />
-            </select>
+            <defineset define="WIN32,_WINDOWS" if="is.windows"/>
         </compiler>
         <linker name="${build.cxx}" id="common.linker">
         </linker>

Modified: harmony/enhanced/drlvm/trunk/build/make/targets/common_extra.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/build/make/targets/common_extra.xml?rev=587805&r1=587804&r2=587805&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/build/make/targets/common_extra.xml (original)
+++ harmony/enhanced/drlvm/trunk/build/make/targets/common_extra.xml Wed Oct 24 00:34:00 2007
@@ -29,26 +29,16 @@
                   location="${build.semi.dir}/${component.as.path}/_classes" />
 
         <compiler id="common.cpp.compiler" name="${build.cxx}">
-            <select os="win">
-                <defineset define="WIN32,_WINDOWS" />
-            </select>
+            <defineset define="WIN32,_WINDOWS" if="is.windows"/>
         </compiler>
         <compiler id="common.c.compiler" name="${build.cxx}">
-            <select os="win">
-                <defineset define="WIN32,_WINDOWS" />
-            </select>
+            <defineset define="WIN32,_WINDOWS" if="is.windows"/>
         </compiler>
         <linker name="${build.cxx}" id="common.linker">
-            <select os="win">
-                <syslibset libs="advapi32,odbc32,userenv,ws2_32,mswsock" />
-            </select>
-            <select osfamily="unix">
-                <syslibset type="static" libs="z,pthread,xml2" />
-                <syslibset type="shared" libs="m,dl,stdc++" />
-            </select>
-            <select os="lnx" cxx="gcc">
-                <syslibset type="shared" libs="gcc_s" />
-            </select>
+            <syslibset libs="advapi32,odbc32,userenv,ws2_32,mswsock" if="is.windows"/>
+            <syslibset type="static" libs="z,pthread,xml2" if="is.unix"/>
+            <syslibset type="shared" libs="m,dl,stdc++" if="is.unix"/>
+            <syslibset type="shared" libs="gcc_s" if="is.gcc"/>
         </linker>
     </target>
 </project>

Modified: harmony/enhanced/drlvm/trunk/build/make/targets/common_vm.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/build/make/targets/common_vm.xml?rev=587805&r1=587804&r2=587805&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/build/make/targets/common_vm.xml (original)
+++ harmony/enhanced/drlvm/trunk/build/make/targets/common_vm.xml Wed Oct 24 00:34:00 2007
@@ -37,213 +37,101 @@
 
             <defineset define="${refs.comp.mode}" />
 
-            <select cfg="release">
-                <defineset define="NDEBUG" />
-            </select>
-
-            <select cfg="debug">
-                <defineset define="_DEBUG" />
-                <defineset define="VM_STATS" />
-            </select>
-
-            <select arch="ia32">
-                <defineset define="_IA32_" />
-            </select>
-
-            <select arch="ipf">
-                <defineset define="_IPF_" />
-                <defineset define="POINTER64" />
-                <defineset define="HYIA64" />
-            </select>
-
-            <select arch="em64t">
-                <defineset define="_EM64T_" />
-                <defineset define="POINTER64" />
-                <defineset define="LAZY_LOCK" />
-                <defineset define="HYX86_64" />
-            </select>
-
-            <select arch="ppc32">
-                <defineset define="_PPC32_" />
-                <defineset define="_PPC_" />
-                <defineset define="HYPPC32" />
-            </select>
-
-            <select os="win">
-                <defineset>
-                    <define name="PLATFORM_NT" />
-                    <define name="WIN32" />
-                    <define name="_WINDOWS" />
-                    <define name="_WIN32_WINNT" value="0x0501" />
-                </defineset>
-
-                <compilerarg value="/Fp${build.dir}/_obj\" />
-                <compilerarg value="/FR${build.dir}/_obj\" />
-                <compilerarg value="/Fd${build.dir}/_obj\" />
-                <compilerarg value="/nologo" />
-                <compilerarg value="/W3" />
-
-                <select arch="ia32,ipf">
-                    <compilerarg value="/WX" />
-                </select>
-                <compilerarg value="/Zi" />
-
-                <select arch="em64t">
-                    <compilerarg value="/wd4996" />
-                </select>
-            </select>
-
-            <select osfamily="unix">
-                <defineset define="PLATFORM_POSIX" />
-                <select os="macosx">
-                    <defineset define="MACOSX" />
-                </select>
-                <select os="lnx">
-                    <defineset define="LINUX" />
-                </select>
-                <defineset define="__SMP__" />
-                <defineset define="_REENTRANT" />
-                <defineset define="LINUX_TLS_OPT" />
-
-                <select arch="em64t">
-                    <compilerarg value="-ftls-model=initial-exec" /> 
-                </select>
-                
-                <select arch="ia32">
-                    <defineset define="_LARGEFILE64_SOURCE" />
-                </select>
-
-                <compilerarg value="-fno-exceptions" />
-
-                <select cxx="icc">
-                    <compilerarg value="-w1" />
-                </select>
-
-                <!--compilerarg value="-Werror" /-->
-
-                <select cfg="release">
-                    <compilerarg value="-O2" />
-                </select>
-
-                <select cfg="debug">
-                    <compilerarg value="-O0" />
-                    <compilerarg value="-g" />
-                    <compilerarg value="-ggdb3" />
-                </select>
-            </select>
-
-            <select cxx="icc,icl">                  
-                <compilerarg value="-mp" />
-            </select>
-
-            <select cfg="release">
-                <select os="win" cxx="icl">
-                    <compilerarg value="/QxN" />
-                    <compilerarg value="/O3" />
-                    <compilerarg value="/Qip" />
-                </select>
-
-                <select os="win" cxx="msvc">
-                    <compilerarg value="/Ox" />
-                </select>
-            </select>
-
-            <select cfg="debug">
-                <select os="win" cxx="icl">
-                    <compilerarg value="/QxN" />
-                    <compilerarg value="/Qip" />
-                </select>
-            </select>
-
-            <select hynosig="true">
-                <defineset define="HY_NO_SIG" />
-            </select>
-
-            <select hylocalzlib="true">
-                <defineset define="HY_LOCAL_ZLIB" />
-            </select>
+            <defineset define="NDEBUG" unless="is.cfg.debug"/>
+            <defineset define="_DEBUG" if="is.cfg.debug" />
+            <defineset define="VM_STATS" if="is.cfg.debug"/>
+
+            <defineset define="_IA32_" if="is.x86"/>
+
+            <defineset define="_IPF_" if="is.ia64"/>
+            <defineset define="HYIA64" if="is.ia64"/>
+
+            <defineset define="_EM64T_" if="is.x86_64"/>
+            <defineset define="HYX86_64" if="is.x86_64"/>
+            
+            <defineset define="POINTER64" if="is.64bit"/>
+
+            <defineset if="is.ppc32"> 
+                <define name="_PPC32_"/>
+                <define name="_PPC_"/>
+                <define name="HYPPC32"/>
+            </defineset>
+
+            <defineset if="is.windows">
+                <define name="PLATFORM_NT" />
+                <define name="WIN32" />
+                <define name="_WINDOWS" />
+                <define name="_WIN32_WINNT" value="0x0501" />
+            </defineset>
+            
+            <compilerarg value="/Zi" if="is.windows"/>
+            <compilerarg value="/W3" if="is.windows"/>
+            <compilerarg value="/WX" if="is.windows" unless="is.x86_64"/>
+            <!-- C4996: 'function': was declared deprecated -->
+            <compilerarg value="/wd4996" if="is.windows" unless="is.x86"/>
+
+
+            <defineset define="MACOSX" if="is.macosx"/>
+            <defineset define="LINUX" if="is.linux"/>
+
+            <defineset if="is.unix">
+                <define name="PLATFORM_POSIX"/>
+                <define name="__SMP__" />
+                <define name="_REENTRANT" />
+                <define name="LINUX_TLS_OPT" />
+                <define name="_LARGEFILE64_SOURCE" if="is.x86"/>
+            </defineset>
+
+            <compilerarg value="-ftls-model=initial-exec" if="is.unix.x86_64"/> 
+            <compilerarg value="-fno-exceptions" if="is.unix"/>
+            <compilerarg value="-fPIC" if="is.unix" unless="is.x86"/>
+
+            <compilerarg value="-w1" if="is.icc"/>
+            <!--compilerarg value="-Werror" /-->
+
+            <compilerarg value="-O2" if="is.unix" unless="is.cfg.debug"/>
+
+            <compilerarg value="-O0" if="is.unix" unless="is.cfg.release"/>
+            <compilerarg value="-g" if="is.unix" unless="is.cfg.release"/>
+            <compilerarg value="-ggdb3" if="is.unix" unless="is.cfg.release"/>
+
+            <compilerarg value="/Ox" if="is.msvc" unless="is.cfg.debug"/>
+            <compilerarg value="/Od" if="is.windows" unless="is.cfg.release"/>
+            
+            <compilerarg value="/O3" if="is.icl" unless="is.cfg.debug"/>
+            <compilerarg value="-mp" if="is.icl"/>
+            <compilerarg value="-mp" if="is.icc"/>
+            <compilerarg value="/QxN" if="is.icl"/>
+            <compilerarg value="/Qip" if="is.icl"/>
+
+            <defineset define="HY_NO_SIG" if="hy.skip.sig"/>
+            <defineset define="HY_LOCAL_ZLIB" unless="hy.skip.zip.api"/>
 
         </compiler>
 
         <compiler id="common.cpp.compiler" name="${build.cxx}" extends="common.compiler">
-            <select arch="em64t,ipf" os="lnx">
-                <compilerarg value="-fPIC" />
-            </select>
-
-            <select os="win">
-                <select cfg="debug">
-                    <compilerarg value="/EHsc" />
-                    <compilerarg value="/Od" />
-                </select>
-
-                <select arch="ia32,em64t" cxx="icl">
-                    <compilerarg value="/ZI" />
-                </select>
-
-                <select os="win" cfg="release" cxx="icl">
-                    <compilerarg value="/QxN" />
-                    <compilerarg value="/O3" />
-                </select>
-
-                <select cxx="msvc">
-                    <compilerarg value="/EHsc" />
-                </select>
-
-                <select cxx="icl">
-                    <compilerarg value="/Qvc7.1" />
-                </select>
-            </select>
-
-            <select osfamily="unix">
-                <compilerarg value="-Wno-deprecated" />
-                <compilerarg value="-x" />
-                <compilerarg value="c++" />
-
-                <select cxx="icc">
-                    <compilerarg value="-cxxlib-gcc" />
-                </select>
-            </select>
+            <compilerarg value="/EHsc" if="is.windows"/>
+            
+            <compilerarg value="/ZI" if="is.icl" unless="is.ia64"/>
+            <compilerarg value="/Qvc7.1" if="is.icl"/>
+            
+            <compilerarg value="-Wno-deprecated" if="is.unix"/>
+            <compilerarg value="-x" if="is.unix"/>
+            <compilerarg value="c++" if="is.unix"/>
+
+            <compilerarg value="-cxxlib-gcc" if="is.icc"/>
         </compiler>
 
         <compiler id="common.c.compiler" name="${build.cxx}" extends="common.compiler">
-            <select os="lnx" arch="em64t,ipf">
-                <compilerarg value="-fPIC" />
-            </select>
-            <select cfg="debug">
-                <select os="win" cxx="icl">
-                    <compilerarg value="/O3" />
-                </select>
-            </select>
         </compiler>
 
         <linker name="${build.cxx}" id="common.linker">
-            <select os="win">
-                <linkerarg value="/pdb:${build.dir}/_bin" />
-                <linkerarg value="/debug" />
-            </select>
-
-            <select os="win" cfg="release">
-                <linkerarg value="/MD" />
-            </select>
-
-            <select os="win" cfg="debug">
-                <linkerarg value="/MDd" />
-                <linkerarg value="/Zi" />
-                <linkerarg value="/Od" />
-                <linkerarg value="/NODEFAULTLIB"/>
-            </select>
-
-            <select os="win">
-                <syslibset libs="advapi32,odbc32,userenv,ws2_32,mswsock,psapi" />
-            </select>
-
-            <select os="lnx" arch="ia32">
-                <syslibset type="static" libs="z,pthread,xml2" />
-                <syslibset type="shared" libs="m,dl,stdc++,rt" />
-            </select>
-            <select os="lnx" cxx="gcc" arch="ia32">
-                <linkerarg value="-lgcc_s" />
-            </select>
+            <linkerarg value="/NODEFAULTLIB" if="is.windows"/>
+            <syslibset libs="advapi32,odbc32,userenv,ws2_32,mswsock,psapi" if="is.windows"/>
+
+            <syslibset type="static" libs="z,pthread,xml2" if="is.unix.x86"/>
+            <syslibset type="shared" libs="m,dl,stdc++,rt" if="is.unix.x86"/>
+            <linkerarg value="-lgcc_s" if="is.unix.x86" unless="is.icc"/>
         </linker>
     </target>
 </project>

Modified: harmony/enhanced/drlvm/trunk/build/make/targets/cunit.test.xml
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/build/make/targets/cunit.test.xml?rev=587805&r1=587804&r2=587805&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/build/make/targets/cunit.test.xml (original)
+++ harmony/enhanced/drlvm/trunk/build/make/targets/cunit.test.xml Wed Oct 24 00:34:00 2007
@@ -17,6 +17,7 @@
 <project name="C UNIT TESTS">
     
     <import file="test.common.xml"/>
+    <import file="common_vm.xml"/>
     
     <property name="cunit.test.dir" location="${base.test.dir}/cunit.tests"/>
     <property name="cunit.test.summary" location="${base.test.dir}/cunit.test.failed"/>
@@ -38,9 +39,9 @@
         <globmapper from="*.c" to="*"/>
     </pathconvert>
     
-    <target name="cunit.test" depends="init_component,cunit-compile,cunit-run,cunit-report"/>
+    <target name="cunit.test" depends="cunit-compile,cunit-run,cunit-report"/>
 
-    <target name="cunit-compile" >
+    <target name="cunit-compile" depends="common_vm">
         <!-- Set cunit tests include dirs -->
         <path id="unit.test.c.include">
             <pathelement location="${build.VM.home}/tests/unit/thread/utils" />
@@ -54,90 +55,8 @@
         <mkdir dir="${cunit.obj.dir}" />
         <mkdir dir="${cunit.bin.dir}" />
 
-        <compiler name="${build.cxx}" id="cunit.test.compiler">
+        <compiler name="${build.cxx}" id="cunit.test.compiler" extends="common.c.compiler">
             <defineset define="APR_DECLARE_STATIC, BUILDING_VM"/>
-            <select cfg="release">
-                <defineset define="NDEBUG" />
-                <select os="win">
-                    <select cxx="icl">
-                        <compilerarg value="/QxN" />
-                        <compilerarg value="/O3" />
-                        <compilerarg value="/Qip" />
-                    </select>
-                    <select cxx="msvc">
-                        <compilerarg value="/Ox" />
-
-                    </select>
-                </select>
-                <select osfamily="unix">
-                    <compilerarg value="-O2" />
-                </select>
-            </select>
- 
-            <select cfg="debug">
-                <defineset define="_DEBUG,VM_STATS" />
-                <select osfamily="unix">
-                    <compilerarg value="-O0" />
-                    <compilerarg value="-g" />
-                    <compilerarg value="-ggdb3" />
-                </select>
-                <select os="win" cxx="icl">
-                    <compilerarg value="/QxN" />
-                    <compilerarg value="/Qip" />
-                    <compilerarg value="/O3" />
-                </select>
-            </select>
-
-            <select arch="ia32">
-                <defineset define="_IA32_" />
-            </select>
-            <select arch="ipf">
-                <defineset define="_IPF_,POINTER64,HYIA64" />
-            </select>
-            <select arch="em64t">
-                <defineset define="_EM64T_,POINTER64,LAZY_LOCK,HYX86_64" />
-            </select>
-            <select arch="ppc32">
-                <defineset define="_PPC32_,_PPC_,HYPPC32" />
-            </select>
-            <select os="win">
-                <defineset define="PLATFORM_NT,WIN32,_WINDOWS" />
-                <defineset>
-                    <define name="_WIN32_WINNT" value="0x0501" />
-                </defineset>
-                <compilerarg value="/nologo" />
-                <compilerarg value="/W3" />
-                <select arch="ia32,ipf">
-                    <compilerarg value="/WX" />
-                </select>
-                <compilerarg value="/Zi" />
-            </select>
-            <select osfamily="unix">
-                <defineset define="PLATFORM_POSIX" />
-                <compilerarg value="-fno-exceptions" />
-                <select os="macosx">
-                    <defineset define="MACOSX" />
-                </select>
-                <select os="lnx">
-                    <defineset define="LINUX" />
-                </select>
-                <defineset define="__SMP__,_REENTRANT,LINUX_TLS_OPT" />
-                <select arch="em64t">
-                    <compilerarg value="-ftls-model=initial-exec" /> 
-                </select>
-                <select arch="ia32">
-                    <defineset define="_LARGEFILE64_SOURCE" />
-                </select>
-                <select os="lnx" arch="em64t,ipf">
-                    <compilerarg value="-fPIC" />
-                </select>
-                <select cxx="icc">
-                    <compilerarg value="-w1" />
-                </select>
-            </select>
-            <select cxx="icc,icl">                  
-                <compilerarg value="-mp" />
-            </select>
         </compiler>
        
         <!-- Compiling cunit tests and framework -->
@@ -177,26 +96,18 @@
                             <include name="${filename}.o*" />
                         </fileset>
 
-                        <select os="win">
-                            <select cfg="debug">
-                                <linkerarg value="/DEBUG" />
-                            </select>
-                            <libset type="shared" libs="harmonyvm"
-                                dir="${hdk.lib.dir}" />
-                            <libset type="shared" libs="hythr"
-                                dir="${hdk.lib.dir}" />
-                            <linkerarg value="/libpath:${test.vmdir}" />
-                            <linkerarg value="/NODEFAULTLIB:libcmtd" />
-                        </select>
+                        <linkerarg value="/DEBUG" if="is.windows" unless="is.cfg.release"/>
+                        <libset type="shared" libs="harmonyvm,hythr"
+                            dir="${hdk.lib.dir}" if="is.windows"/>
+                        <linkerarg value="/libpath:${test.vmdir}" if="is.windows" />
+                        <linkerarg value="/NODEFAULTLIB:libcmtd" if="is.windows" />
                         
-                        <select os="lnx">
-                            <libset type="shared" libs="harmonyvm"
-                                dir="${test.vmdir}" />
-                            <linkerarg value="-rpath" />
-                            <linkerarg value="${test.jre.home}/bin" />
-                            <linkerarg value="-rpath" />
-                            <linkerarg value="${test.vmdir}" />
-                        </select>
+                        <libset type="shared" libs="harmonyvm"
+                            dir="${test.vmdir}" if="is.unix"/>
+                        <linkerarg value="-rpath" if="is.unix"/>
+                        <linkerarg value="${test.jre.home}/bin" if="is.unix"/>
+                        <linkerarg value="-rpath" if="is.unix"/>
+                        <linkerarg value="${test.vmdir}" if="is.unix"/>
                     </linker>
                 </cc>
             </sequential>
@@ -215,6 +126,9 @@
                 <var name="filename" unset="true" />
                 <basename property="filename" file="@{file}" />
                 
+                <condition property="cunit.extra.args" value="-Xint" else="">
+                    <isset property="is.ia64"/>
+                </condition>
                 <!-- Executing unit test... -->
                 <echo message="Running: ${filename}" />
                 <var name="outputproperty" unset="true" />
@@ -228,19 +142,11 @@
                     <arg value="-Dorg.apache.harmony.vm.vmdir=${test.vmdir}"/>
                     <arg value="-Djava.home=${test.jre.home}"/>
                     <arg value="-XX:vm.jvmti.enabled=true"/>
-                    <arg value="${test.vmargs}"/>
-                    <select arch="ipf">
-                        <arg value="-Xint"/>
-                    </select>
+                    <arg line="${test.vmargs} ${cunit.extra.args}"/>
                     
                     <env key="JAVA_HOME" value="${test.jre.home}" />
-                    
-                    <select os="win">
-                        <env key="Path" path="${test.jre.home}/bin/;${test.vmdir};${env.Path}"
/>
-                    </select>
-                    <select os="lnx">
-                        <env key="LD_LIBRARY_PATH" path="${test.jre.home}/bin/:${test.vmdir}"
/>
-                    </select>
+                    <env key="Path" path="${test.jre.home}/bin/;${test.vmdir};${env.Path}"
/>
+                    <env key="LD_LIBRARY_PATH" path="${test.jre.home}/bin/:${test.vmdir}"
/>
                 </exec>
 
                 <echo file="${cunit.test.dir}/reports/${filename}.out" message="${outputproperty}"
/>



Mime
View raw message