source: tags/1.8.0/ci/create-abcl-properties.bash

Last change on this file was 15407, checked in by Mark Evenson, 4 years ago

build: make building and running a local ABCL easier

(From a suggestion by Slyrus)

Replace use of abcl.javac.{source,target} with the "magic"
ant.build.javac,{source,target} properties.

Explicitly configure 'abcl.release' target to use openjdk8 compilation.

The Java compilation options are perhaps underspecified in terms of
the target JVM in order to support a developer who simply wants to
compile and run locally with least hassles.

When preparing ABCL binaries for wider distribution, the values of the
abcl.build.target.javac and abcl.build.source.java become more
important.

The 'abcl.properties.autoconfigure.*' targets use the
ci/create-build-properties.bash script to set these options for
various openjdk platforms.

  • * *

build: build the wrapper with the release

N.b. the wrapper is a local artifact, not supposed to be shipped with
the release.

File size: 1.8 KB
Line 
1#!/usr/bin/env bash
2DIR="$(cd -P "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
3
4jdk=$1
5if [[ -z $jdk ]]; then
6    jdk=openjdk8
7fi
8
9root="${DIR}/.."
10prop_in="${root}/abcl.properties.in"
11prop_out="${root}/abcl.properties"
12echo "Configuring for $jdk from <${prop_in}>."
13
14# Unused
15# zgc="-XX:+UnlockExperimentalVMOptions -XX:+UseZGC -Xmx<size> -Xlog:gc"
16
17abcl_javac_source=1.8
18case $jdk in
19    6|openjdk6)
20        options="-d64 -XX:+CMSClassUnloadingEnabled -XX:MaxPermSize=1g -XX:+UseConcMarkSweepGC"
21        ant_build_javac_target=1.6
22  ant_build_javac_source=1.6
23        ;;
24    7|openjdk7)
25  options="-d64 -XX:+UseG1GC"
26        ant_build_javac_target=1.7
27  ant_build_javac_source=1.7
28  ;;
29    8|openjdk8)
30        options="-XX:+UseG1GC -XX:+AggressiveOpts -XX:CompileThreshold=10"
31  ant_build_javac_target=1.8
32  ant_build_javac_source=1.8
33        ;;
34    11|openjdk11)
35        options="-XX:CompileThreshold=10"
36  ant_build_javac_target=11
37  ant_build_javac_source=1.8
38        ;;
39    # untested: weakly unsupported
40    12|openjdk12)
41        options="-XX:CompileThreshold=10"
42  ant_build_javac_target=12
43  ant_build_javac_source=1.8
44        ;;
45    13|openjdk13)
46        options="-XX:CompileThreshold=10"
47  ant_build_javac_target=13
48  ant_build_javac_source=1.8
49        ;;
50    14|openjdk14)
51        options="-XX:CompileThreshold=10 ${zgc}"
52  ant_build_javac_target=14
53  ant_build_javac_source=1.8
54        ;;
55    15|openjdk15)
56        options="-XX:CompileThreshold=10 ${zgc}"
57  ant_build_javac_target=15
58  ant_build_javac_source=1.8
59        ;;
60esac
61
62cat ${root}/abcl.properties.in \
63    | awk -F = \
64    -v options="$options" \
65    -v target="$ant_build_javac_target" \
66    -v source="$ant_build_javac_source" \
67       -f ${DIR}/create-abcl-properties.awk \
68  > ${root}/abcl.properties
69
70echo "Finished configuring for $jdk into <${prop_out}>."
Note: See TracBrowser for help on using the repository browser.