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

Last change on this file was 15281, checked in by Mark Evenson, 5 years ago

build: fix autoconfiguration script

Running the autoconfiguration script now sets both the target and
source options for the java compilation, selecting the maximum target
for compilation platform.

File size: 1.6 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        abcl_javac_target=1.6
22  abcl_javac_source=1.6
23        ;;
24    7|openjdk7)
25  options="-d64 -XX:+UseG1GC"
26        abcl_javac_target=1.7
27  abcl_javac_source=1.7
28  ;;
29    8|openjdk8)
30        options="-XX:+UseG1GC -XX:+AggressiveOpts -XX:CompileThreshold=10"
31  abcl_javac_target=1.8
32  abcl_javac_source=1.8
33        ;;
34    11|openjdk11)
35        options="-XX:CompileThreshold=10"
36  abcl_javac_target=11
37  abcl_javac_source=1.8
38        ;;
39    # untested: weakly unsupported
40    12|openjdk12)
41        options="-XX:CompileThreshold=10"
42  abcl_javac_target=12
43  abcl_javac_source=1.8
44        ;;
45    13|openjdk13)
46        options="-XX:CompileThreshold=10"
47  abcl_javac_target=13
48  abcl_javac_source=1.8
49        ;;
50    14|openjdk14)
51        options="-XX:CompileThreshold=10 ${zgc}"
52  abcl_javac_target=14
53  abcl_javac_source=1.8
54        ;;
55esac
56
57cat ${root}/abcl.properties.in \
58    | awk -F = \
59    -v options="$options" \
60    -v target="$abcl_javac_target" \
61    -v source="$abcl_javac_source" \
62       -f ${DIR}/create-abcl-properties.awk \
63  > ${root}/abcl.properties
64
65echo "Finished configuring for $jdk into <${prop_out}>."
Note: See TracBrowser for help on using the repository browser.