Path: blob/master/test/functional/cmdLineTests/lockWordAlignment/build.xml
6004 views
<?xml version="1.0"?>12<!--3Copyright (c) 2016, 2021 IBM Corp. and others45This program and the accompanying materials are made available under6the terms of the Eclipse Public License 2.0 which accompanies this7distribution and is available at https://www.eclipse.org/legal/epl-2.0/8or the Apache License, Version 2.0 which accompanies this distribution and9is available at https://www.apache.org/licenses/LICENSE-2.0.1011This Source Code may also be made available under the following12Secondary Licenses when the conditions for such availability set13forth in the Eclipse Public License, v. 2.0 are satisfied: GNU14General Public License, version 2 with the GNU Classpath15Exception [1] and GNU General Public License, version 2 with the16OpenJDK Assembly Exception [2].1718[1] https://www.gnu.org/software/classpath/license.html19[2] http://openjdk.java.net/legal/assembly-exception.html2021SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 OR LicenseRef-GPL-2.0 WITH Assembly-exception22-->2324<project name="lockWordAlignment" default="build" basedir=".">25<taskdef resource="net/sf/antcontrib/antlib.xml" />26<description>27Build cmdLineTests_lockWordAlignment28</description>2930<import file="${TEST_ROOT}/functional/cmdLineTests/buildTools.xml"/>3132<!-- set properties for this build -->33<property name="DEST" value="${BUILD_ROOT}/functional/cmdLineTests/lockWordAlignment" />34<property name="PROJECT_ROOT" location="." />35<property name="src" location="./src"/>36<property name="build" location="./bin"/>37<import file="${TEST_ROOT}/TKG/scripts/getDependencies.xml"/>3839<target name="init">40<mkdir dir="${DEST}" />41<mkdir dir="${build}" />42</target>4344<target name="compile" depends="init" description="Using java ${JDK_VERSION} to compile the source ">45<echo>Ant version is ${ant.version}</echo>46<echo>============COMPILER SETTINGS============</echo>47<echo>===fork: yes</echo>48<echo>===executable: ${compiler.javac}</echo>49<echo>===debug: on</echo>50<echo>===destdir: ${DEST}</echo>51<if>52<equals arg1="${JDK_VERSION}" arg2="8"/>53<then>54<javac srcdir="${src}" destdir="${build}" debug="true" fork="true" executable="${compiler.javac}" includeAntRuntime="false" encoding="ISO-8859-1">55<src path="${src}" />56</javac>57</then>58<else>59<property name="addExports" value="--add-exports java.base/com.ibm.oti.vm=ALL-UNNAMED --add-exports java.base/jdk.internal.org.objectweb.asm=ALL-UNNAMED" />60<javac srcdir="${src}" destdir="${build}" debug="true" fork="true" executable="${compiler.javac}" includeAntRuntime="false" encoding="ISO-8859-1">61<src path="${src}" />62<compilerarg line='${addExports}' />63</javac>64</else>65</if>66</target>6768<target name="generateTestClass" depends="compile" description="Generate test class files ">69<if>70<equals arg1="${JDK_VERSION}" arg2="8"/>71<then>72<property name="addExports" value="" />73</then>74<else>75<property name="addExports" value="--add-exports java.base/com.ibm.oti.vm=ALL-UNNAMED --add-exports java.base/jdk.internal.org.objectweb.asm=ALL-UNNAMED" />76</else>77</if>78<property name="build.javaexecutable" value="${TEST_JDK_HOME}/bin/java"/>79<java classname="IntLongObjectAlignmentTestGenerator" failonerror="true" fork="true" logError="true" jvm="${build.javaexecutable}">80<jvmarg line='${addExports}' />81<classpath>82<pathelement path="${build}"/>83</classpath>84</java>85</target>8687<target name="dist" depends="generateTestClass" description="generate the distribution">88<jar jarfile="${DEST}/alignment.jar" filesonly="true">89<manifest>90<attribute name="Main-Class" value="ijo_extends_level_2_I.class"/>91</manifest>92<fileset dir="${build}" />93<fileset dir="./" />94</jar>95<copy todir="${DEST}">96<fileset dir="${src}/../" includes="*.xml" />97<fileset dir="${src}/../" includes="*.mk" />98</copy>99</target>100101<target name="clean" depends="dist" description="clean up">102<!-- Delete the ${build} directory trees -->103<delete dir="${build}" />104<delete>105<fileset dir=".">106<include name="*.class"/>107</fileset>108</delete>109</target>110111<target name="build" depends="buildCmdLineTestTools">112<if>113<or>114<equals arg1="${JDK_IMPL}" arg2="ibm" />115<equals arg1="${JDK_IMPL}" arg2="openj9" />116</or>117<then>118<antcall target="clean" inheritall="true" />119</then>120</if>121</target>122</project>123124125