source: trunk/abcl/ci/create-abcl-properties.bash

Last change on this file was 15650, checked in by Mark Evenson, 13 months ago

build: autoconfigure with common --add-opens for openjdk17+

Need at least these for the CL+SSL CFFI linkages to work.

File size: 2.7 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"
16opens="--add-opens java.base/sun.nio.ch=ALL-UNNAMED  --add-opens java.base/java.io=ALL-UNNAMED"
17
18abcl_javac_source=1.8
19case $jdk in
20    6|openjdk6)
21        options="-d64 -XX:+CMSClassUnloadingEnabled -XX:MaxPermSize=1g -XX:+UseConcMarkSweepGC"
22        ant_build_javac_target=1.6
23  ant_build_javac_source=1.6
24        ;;
25    7|openjdk7)
26  options="-d64 -XX:+UseG1GC"
27        ant_build_javac_target=1.7
28  ant_build_javac_source=1.7
29  ;;
30    8|openjdk8)
31        options="-XX:+UseG1GC -XX:+AggressiveOpts -XX:CompileThreshold=10"
32  ant_build_javac_target=1.8
33  ant_build_javac_source=1.8
34        ;;
35    11|openjdk11)
36        options="-XX:CompileThreshold=10"
37  ant_build_javac_target=11
38  ant_build_javac_source=1.8
39        ;;
40    # untested: weakly unsupported
41    12|openjdk12)
42        options="-XX:CompileThreshold=10"
43  ant_build_javac_target=12
44  ant_build_javac_source=1.8
45        ;;
46    13|openjdk13)
47        options="-XX:CompileThreshold=10"
48  ant_build_javac_target=13
49  ant_build_javac_source=1.8
50        ;;
51    14|openjdk14)
52        options="-XX:CompileThreshold=10 ${zgc}"
53  ant_build_javac_target=14
54  ant_build_javac_source=1.8
55        ;;
56    15|openjdk15)
57        options="-XX:CompileThreshold=10 ${zgc}"
58  ant_build_javac_target=15
59  ant_build_javac_source=1.8
60        ;;
61    16|openjdk16)
62        options="-XX:CompileThreshold=10 ${zgc}"
63  ant_build_javac_target=16
64  ant_build_javac_source=1.8
65        ;;
66    17|openjdk17)
67        options="-XX:CompileThreshold=10 ${opens}"
68  ant_build_javac_target=17
69  ant_build_javac_source=1.8
70        ;;
71    18|openjdk18)
72        options="-XX:CompileThreshold=10 ${opens}"
73  ant_build_javac_target=18
74  ant_build_javac_source=1.8
75        ;;
76    19:openjdk19)
77        options="-XX:CompileThreshold=10 ${opens}"
78  ant_build_javac_target=19
79  ant_build_javac_source=1.8
80        ;;
81    *)
82        options="-XX:CompileThreshold=10 ${opens}"
83        ant_build_javac_target=19
84  ant_build_javac_source=1.8
85        ;;
86esac
87
88cat ${root}/abcl.properties.in \
89    | awk -F = \
90    -v options="$options" \
91    -v source="$ant_build_javac_source" \
92       -f ${DIR}/create-abcl-properties.awk \
93  > ${root}/abcl.properties
94
95
96# cat ${root}/abcl.properties.in \
97#     | awk -F = \
98#     -v options="$options" \
99#     -v target="$ant_build_javac_target" \
100#     -v source="$ant_build_javac_source" \
101#        -f ${DIR}/create-abcl-properties.awk \
102#   > ${root}/abcl.properties
103
104echo "Finished configuring for $jdk into <${prop_out}>."
Note: See TracBrowser for help on using the repository browser.