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

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

build: support abcl.properties creation openjdk{6,7,8,11,13,14}

Additionally add test for openjdk14 to the Travis-CI build.

Improve script for creating build properties, which may be invoked
like:

bash ci/create-abcl-properties.bash openjdk8

Currently this script has baked-in "knowledge" of options for various
platforms for now, but will eventually directly transcribe from the
"facts" in <file:abcl.rdf>.

  • * *

Update RDF

File size: 1.3 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_source=1.6
22        ;;
23    7|openjdk7)
24  options="-d64 -XX:+UseG1GC"
25        abcl_javac_source=1.7
26  ;;
27    8|openjdk8)
28        options="-XX:+UseG1GC -XX:+AggressiveOpts -XX:CompileThreshold=10"
29        ;;
30    11|openjdk11)
31        options="-XX:CompileThreshold=10"
32        ;;
33    # untested: weakly unsupported
34    12|openjdk12)
35        options="-XX:CompileThreshold=10"
36        ;;
37    13|openjdk13)
38        options="-XX:CompileThreshold=10"
39        ;;
40    14|openjdk14)
41        options="-XX:CompileThreshold=10 ${zgc}"
42        ;;
43esac
44
45cat ${root}/abcl.properties.in | awk -F = -v options="$options" -v source="$abcl_javac_source" '/^java.options/ {print $0 " " options; next}; /^abcl.javac.source/ {print "abcl.javac.source=" source; next}; {print $0}' > ${root}/abcl.properties
46
47echo "Finished configuring for $jdk into <${prop_out}>."
Note: See TracBrowser for help on using the repository browser.