mirror of
https://github.com/JetBrains/JetBrainsRuntime.git
synced 2025-12-13 12:59:41 +01:00
Compare commits
1050 Commits
wayland-de
...
jdk-17.0.6
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bf7e3bf070 | ||
|
|
00445e86fd | ||
|
|
d3197e7628 | ||
|
|
d13038aa90 | ||
|
|
6d2cddf54b | ||
|
|
b30d962f27 | ||
|
|
2796eca91c | ||
|
|
e3c178d6d8 | ||
|
|
70a51d482a | ||
|
|
3d2d300bcd | ||
|
|
129484da3b | ||
|
|
38fdbd4356 | ||
|
|
e650bdcde0 | ||
|
|
cb294d9ecf | ||
|
|
92571e3465 | ||
|
|
2c988d1842 | ||
|
|
cf0abb8958 | ||
|
|
02fa4be6c4 | ||
|
|
27057f84af | ||
|
|
f74269cdaa | ||
|
|
9168aa252d | ||
|
|
bb31cd9af1 | ||
|
|
b284851543 | ||
|
|
1fe8777f3b | ||
|
|
6bfe87dc43 | ||
|
|
91b5c0a39d | ||
|
|
951fff5462 | ||
|
|
c430a94576 | ||
|
|
5885a8e672 | ||
|
|
53cb0028b5 | ||
|
|
7ac74ca213 | ||
|
|
fb82b73b8f | ||
|
|
64db633e91 | ||
|
|
17982d846d | ||
|
|
016e500457 | ||
|
|
cbfb654958 | ||
|
|
b9749f4178 | ||
|
|
3822bbdb00 | ||
|
|
488e6a355f | ||
|
|
11e8a91619 | ||
|
|
d52a899212 | ||
|
|
a6462223df | ||
|
|
7488823fba | ||
|
|
11dddf15fb | ||
|
|
0b31a9f567 | ||
|
|
27ffd83f6a | ||
|
|
2e12c18f0d | ||
|
|
a747955b7d | ||
|
|
186745e83f | ||
|
|
2a5a30b761 | ||
|
|
cd6f6596ae | ||
|
|
37c9cd1555 | ||
|
|
6fa5281c6b | ||
|
|
25ad9d6ba3 | ||
|
|
98f6737e83 | ||
|
|
3b4649d941 | ||
|
|
d48914256f | ||
|
|
612cca3897 | ||
|
|
689a837f64 | ||
|
|
b6454bccd8 | ||
|
|
c402838c3a | ||
|
|
de4792a374 | ||
|
|
3258b672d4 | ||
|
|
77c1e0a2e7 | ||
|
|
5d9546e1c2 | ||
|
|
f185a190bc | ||
|
|
9d27716f61 | ||
|
|
c406983e47 | ||
|
|
dae14b3540 | ||
|
|
309f794a53 | ||
|
|
cfe1e95501 | ||
|
|
6c53fadb6d | ||
|
|
930be902d0 | ||
|
|
fbaf069d27 | ||
|
|
8457dd23a6 | ||
|
|
9f8e0d7238 | ||
|
|
6a4b6220f8 | ||
|
|
c3aa29f009 | ||
|
|
00f2b3fa8c | ||
|
|
3a57cc6724 | ||
|
|
c2f6e5283e | ||
|
|
dec16ad44f | ||
|
|
89d2c89c83 | ||
|
|
75b7aedf0c | ||
|
|
1ee3e051ad | ||
|
|
c929865666 | ||
|
|
31853fe147 | ||
|
|
bd7766321b | ||
|
|
02215ff8f6 | ||
|
|
aafb815658 | ||
|
|
9120f28d97 | ||
|
|
4f79e18537 | ||
|
|
bebb61224b | ||
|
|
fc6fa1c3fd | ||
|
|
d3b1956c1e | ||
|
|
100c802c6e | ||
|
|
4bab0ebf8c | ||
|
|
d755049a96 | ||
|
|
881ff368ce | ||
|
|
b7ea51fd02 | ||
|
|
a087c51dfa | ||
|
|
528693c991 | ||
|
|
48d1d419b4 | ||
|
|
ccc4732eeb | ||
|
|
c53d022729 | ||
|
|
567bc2ec07 | ||
|
|
a8e7d8f9a6 | ||
|
|
292e6bb71f | ||
|
|
011b96c37e | ||
|
|
882b5f573a | ||
|
|
2e21c87fac | ||
|
|
a391032cc2 | ||
|
|
00074c0f1f | ||
|
|
204e67a7ad | ||
|
|
e64282173d | ||
|
|
0263abac50 | ||
|
|
ad7fab5b19 | ||
|
|
a4642ae202 | ||
|
|
05b94006af | ||
|
|
25b75964eb | ||
|
|
db2010b18d | ||
|
|
3ad144510d | ||
|
|
ab90ac3822 | ||
|
|
363a8ffdaf | ||
|
|
01217e1c6c | ||
|
|
a5e273d8c1 | ||
|
|
1305516689 | ||
|
|
7aeba377f1 | ||
|
|
a6c02bd401 | ||
|
|
d3354af99f | ||
|
|
f73037d9ae | ||
|
|
7f40f16597 | ||
|
|
860464e461 | ||
|
|
9dcec4db4a | ||
|
|
d95c921fc3 | ||
|
|
8be0fc09f0 | ||
|
|
a19a716ba9 | ||
|
|
b0059e1eef | ||
|
|
774213fd32 | ||
|
|
437c634b61 | ||
|
|
180f3d9970 | ||
|
|
23fc8605d3 | ||
|
|
b0af5e5236 | ||
|
|
4c96224b5f | ||
|
|
201dad41d7 | ||
|
|
f044785fa9 | ||
|
|
1675370076 | ||
|
|
0ea78e56d8 | ||
|
|
bbe8c3421c | ||
|
|
42e3184f88 | ||
|
|
831b3b8adf | ||
|
|
25059b286d | ||
|
|
1ae5ba5539 | ||
|
|
2e2e891db8 | ||
|
|
caceaba559 | ||
|
|
dd7ab3d7fc | ||
|
|
3269cec1d4 | ||
|
|
47e478d6de | ||
|
|
d90fd6f811 | ||
|
|
270a4740c8 | ||
|
|
6f0f8429e0 | ||
|
|
68456bb248 | ||
|
|
72603ffc69 | ||
|
|
a2be28daca | ||
|
|
a411085799 | ||
|
|
4403118001 | ||
|
|
b7d808e96b | ||
|
|
c1e544fe0f | ||
|
|
b91c4922e6 | ||
|
|
e0750eb79c | ||
|
|
9f5701896f | ||
|
|
d798aa2a4f | ||
|
|
3b8f43e532 | ||
|
|
f5e1c3f870 | ||
|
|
1584ddc897 | ||
|
|
4d92532956 | ||
|
|
f1d3fa9570 | ||
|
|
50c0080689 | ||
|
|
7975c0ac8a | ||
|
|
6f4c27006d | ||
|
|
4b25717255 | ||
|
|
e4d1d62091 | ||
|
|
4dd34b713f | ||
|
|
29579f4763 | ||
|
|
ed715363c4 | ||
|
|
1f8477537e | ||
|
|
66ccd22e8d | ||
|
|
f0dd322310 | ||
|
|
67ca42c5dd | ||
|
|
83d442665e | ||
|
|
ad1852518f | ||
|
|
cb415a13f8 | ||
|
|
f8d3d4287c | ||
|
|
dd7280fdf9 | ||
|
|
1963985531 | ||
|
|
8563eeccf7 | ||
|
|
cb88133467 | ||
|
|
292d90dc39 | ||
|
|
a081e4ade9 | ||
|
|
aa3d2f76a5 | ||
|
|
84ac0f0de4 | ||
|
|
66cdd6eb36 | ||
|
|
92d617fc7a | ||
|
|
667582d02f | ||
|
|
2da3752e98 | ||
|
|
7023eef9e3 | ||
|
|
0d0e4fbc70 | ||
|
|
3ef9ce6c02 | ||
|
|
e7a37b6192 | ||
|
|
4e45ac97ea | ||
|
|
551b0270ad | ||
|
|
9a4f12d5ce | ||
|
|
d16d4f1f05 | ||
|
|
3013100d5a | ||
|
|
9c9c061a50 | ||
|
|
c2d2dc726a | ||
|
|
2903d59a90 | ||
|
|
d9c81d9562 | ||
|
|
4b1bba808e | ||
|
|
3472ab2be8 | ||
|
|
041924ab32 | ||
|
|
fb86d40220 | ||
|
|
6ed972510c | ||
|
|
18e0dfcbc0 | ||
|
|
4a19cdca9c | ||
|
|
629754e743 | ||
|
|
9a4a6ab14d | ||
|
|
e266ffdc5a | ||
|
|
6850786f90 | ||
|
|
6b5186eec8 | ||
|
|
9439a87f72 | ||
|
|
3e42e25823 | ||
|
|
4330e5fe32 | ||
|
|
b9841d40be | ||
|
|
18d3e4da13 | ||
|
|
6ed20f81b1 | ||
|
|
75e1b08347 | ||
|
|
72f368dcaf | ||
|
|
e158967986 | ||
|
|
fb234acb2b | ||
|
|
f78c4bcfc6 | ||
|
|
461fb320bc | ||
|
|
1fece41790 | ||
|
|
817457e79e | ||
|
|
c94a235861 | ||
|
|
d70f90bd41 | ||
|
|
0355888e01 | ||
|
|
ab81cd02b1 | ||
|
|
676b0973cb | ||
|
|
fc81c86ce9 | ||
|
|
2680e83f5f | ||
|
|
cc91c6e85d | ||
|
|
7c8749311c | ||
|
|
5c1835de0b | ||
|
|
7cef5a5f0a | ||
|
|
f9a6e0c627 | ||
|
|
bbd500f316 | ||
|
|
230cd5ecc8 | ||
|
|
296dc7858c | ||
|
|
b6404c83f4 | ||
|
|
31eefe5e96 | ||
|
|
c735f555c2 | ||
|
|
1b1500a051 | ||
|
|
0e6959de80 | ||
|
|
14f38e198b | ||
|
|
523a4c41a4 | ||
|
|
a95482acf8 | ||
|
|
c464f20f41 | ||
|
|
e5a71d77b7 | ||
|
|
a839a364c8 | ||
|
|
75cfc998eb | ||
|
|
cf2b20fda1 | ||
|
|
70d3583340 | ||
|
|
0955acab54 | ||
|
|
db26df68d8 | ||
|
|
a1da138b45 | ||
|
|
c1e1719722 | ||
|
|
bb7b764410 | ||
|
|
40c7bf253d | ||
|
|
d67ca11f47 | ||
|
|
ae9b334490 | ||
|
|
b751b3c108 | ||
|
|
1cbe38a3f8 | ||
|
|
6793a6a43d | ||
|
|
740e6b1186 | ||
|
|
6f109a4df1 | ||
|
|
11d3c006b4 | ||
|
|
73c292ad0e | ||
|
|
b18783d44f | ||
|
|
90d4233f02 | ||
|
|
2a799c8e18 | ||
|
|
457b7e819a | ||
|
|
8aa099020c | ||
|
|
e8db428302 | ||
|
|
a2c1578386 | ||
|
|
c1a87498ea | ||
|
|
03eb709ea9 | ||
|
|
99eb134cf7 | ||
|
|
1c9ffea06c | ||
|
|
33999a457a | ||
|
|
a0822b0f81 | ||
|
|
c11b74bcf9 | ||
|
|
c390fbcee8 | ||
|
|
e58378a58e | ||
|
|
da9aa234ab | ||
|
|
f11bb8984e | ||
|
|
38b7732c20 | ||
|
|
d19834fe34 | ||
|
|
a61b441176 | ||
|
|
463ce03e29 | ||
|
|
5829a66ce7 | ||
|
|
09e30314eb | ||
|
|
a1533c7209 | ||
|
|
713f9fb132 | ||
|
|
1420a1eb43 | ||
|
|
fcc1cc626b | ||
|
|
d218ce4998 | ||
|
|
7d3a528b47 | ||
|
|
e78f47e595 | ||
|
|
b5e8388258 | ||
|
|
c923449d10 | ||
|
|
efabf452e6 | ||
|
|
83dba0314d | ||
|
|
ba4e609bc3 | ||
|
|
bf6b1d9360 | ||
|
|
e8db346515 | ||
|
|
ac4171142f | ||
|
|
ab2f61e9ca | ||
|
|
06c955a32b | ||
|
|
25f2a52e79 | ||
|
|
1007dedf50 | ||
|
|
0bb751bf29 | ||
|
|
2875e18190 | ||
|
|
6976bb431e | ||
|
|
2c79c3302e | ||
|
|
2aa1fe09a0 | ||
|
|
b9089e7cc7 | ||
|
|
8fb8fe6d03 | ||
|
|
52bbd698c7 | ||
|
|
cdf144edba | ||
|
|
7252649d71 | ||
|
|
f883f5166d | ||
|
|
c9f70519ff | ||
|
|
32a5e5d3e8 | ||
|
|
2d4103a3d9 | ||
|
|
0aff75f678 | ||
|
|
47a269a11a | ||
|
|
37a86ea52d | ||
|
|
91e98b65e5 | ||
|
|
59761fe5fd | ||
|
|
57f64cce1c | ||
|
|
329711d9a4 | ||
|
|
a1a29925ac | ||
|
|
d66b6e175f | ||
|
|
3c34eb1412 | ||
|
|
468ab69747 | ||
|
|
893d586f56 | ||
|
|
789b4a9b30 | ||
|
|
2d6247b52e | ||
|
|
079119abaf | ||
|
|
9c3124a607 | ||
|
|
3127e4caa0 | ||
|
|
e2f6bb8c2e | ||
|
|
bf88ff18ad | ||
|
|
02292c5b61 | ||
|
|
76402bc251 | ||
|
|
2f39462ce7 | ||
|
|
a9c2a50a0a | ||
|
|
0200d64ee3 | ||
|
|
373526a465 | ||
|
|
6eaf579a06 | ||
|
|
9068185db6 | ||
|
|
b46fabf26e | ||
|
|
d89ad1f104 | ||
|
|
ef42dbb7d2 | ||
|
|
7e41d84393 | ||
|
|
66c3529861 | ||
|
|
92bbddeb55 | ||
|
|
b16d03782b | ||
|
|
86ac4ab1d6 | ||
|
|
8d7f26b7ad | ||
|
|
99237145b1 | ||
|
|
7d132f5e5e | ||
|
|
ba6f73330b | ||
|
|
3c123f307b | ||
|
|
13140f91b0 | ||
|
|
1705541ba9 | ||
|
|
d62a116e28 | ||
|
|
18ece9b5c4 | ||
|
|
d4424463c8 | ||
|
|
d6eb2818b8 | ||
|
|
d19ec6f8c6 | ||
|
|
937b55c0db | ||
|
|
a7efccab6d | ||
|
|
9bfb322975 | ||
|
|
a637773e23 | ||
|
|
aafda8cd47 | ||
|
|
bd360ab557 | ||
|
|
ea167d7ce9 | ||
|
|
5c8ce904d1 | ||
|
|
f2329d515f | ||
|
|
049b1baaf5 | ||
|
|
7650afa460 | ||
|
|
a605a3065f | ||
|
|
cbe4973947 | ||
|
|
32148d2643 | ||
|
|
fbe05ec561 | ||
|
|
c3ea7ca00a | ||
|
|
90126f80c3 | ||
|
|
00f201d514 | ||
|
|
2acca94970 | ||
|
|
40dce20d2b | ||
|
|
defd25c98f | ||
|
|
e9557600c5 | ||
|
|
ee7a603dfd | ||
|
|
f67a3a5bda | ||
|
|
60d085e6f7 | ||
|
|
cf2a7abcc5 | ||
|
|
5d1969bde4 | ||
|
|
4f0d711487 | ||
|
|
943c2b31ad | ||
|
|
7b65a39f22 | ||
|
|
35215049b4 | ||
|
|
cd5684ac93 | ||
|
|
24ce3f49c8 | ||
|
|
88216d84a7 | ||
|
|
16f75080e6 | ||
|
|
d4d334886c | ||
|
|
c82e18fe8f | ||
|
|
5edb982271 | ||
|
|
bb8b3c2226 | ||
|
|
3c6aecd395 | ||
|
|
79cce169d4 | ||
|
|
972dcde474 | ||
|
|
535511a85a | ||
|
|
3b5363540a | ||
|
|
fb3ccbcda8 | ||
|
|
e2fa3d36f0 | ||
|
|
08084ea140 | ||
|
|
8197fd4781 | ||
|
|
6dcf10b242 | ||
|
|
863631fa6b | ||
|
|
d5e4f03179 | ||
|
|
feeb4180c8 | ||
|
|
d3dc0cdaf8 | ||
|
|
d41346927d | ||
|
|
f79a4edd69 | ||
|
|
6fb49c330d | ||
|
|
eb076ae137 | ||
|
|
722964b2ab | ||
|
|
1e25ca92ce | ||
|
|
f25a8fc5e1 | ||
|
|
3e7cbd2256 | ||
|
|
97096d8701 | ||
|
|
ba26525e29 | ||
|
|
365e4ced9c | ||
|
|
0d933c9b4f | ||
|
|
673c5850b5 | ||
|
|
11a5bbd65e | ||
|
|
a946f04d2e | ||
|
|
a15455fae6 | ||
|
|
eee17fb7b5 | ||
|
|
f820a3c3da | ||
|
|
a8775f16d7 | ||
|
|
ff1ef50a42 | ||
|
|
e2103de489 | ||
|
|
91e9344624 | ||
|
|
ec2c521ca7 | ||
|
|
b3aa42d1ca | ||
|
|
47723c2027 | ||
|
|
1fc280c2b1 | ||
|
|
3aa5b5100a | ||
|
|
a51a5f03a3 | ||
|
|
2c480b2c2b | ||
|
|
ac19e3e144 | ||
|
|
9ff24faf1f | ||
|
|
dd83c4e72d | ||
|
|
4631f4ac5f | ||
|
|
40173515c1 | ||
|
|
977e773663 | ||
|
|
23b7f7e7b4 | ||
|
|
02a876f0e7 | ||
|
|
47f29a346c | ||
|
|
51e7af2e22 | ||
|
|
8e13d2f3e7 | ||
|
|
6ce19ed585 | ||
|
|
c2a62d74a1 | ||
|
|
9e9c15037a | ||
|
|
90d83a2250 | ||
|
|
fc57ee6d14 | ||
|
|
df5a29caf1 | ||
|
|
66506527eb | ||
|
|
56f0c53c59 | ||
|
|
0c6e662f0a | ||
|
|
9bb8b7fba2 | ||
|
|
5de8b78504 | ||
|
|
f7f0b31648 | ||
|
|
cf55b1b81d | ||
|
|
f6afde2143 | ||
|
|
63fe16098a | ||
|
|
d54675becb | ||
|
|
a59e8cbc0f | ||
|
|
0e5810d121 | ||
|
|
2011c35344 | ||
|
|
ab3dd202d7 | ||
|
|
a7010a2fac | ||
|
|
7833c7d5bf | ||
|
|
8207e69aa0 | ||
|
|
ec1733dac6 | ||
|
|
6cee0184f3 | ||
|
|
87010e737c | ||
|
|
2965051f0d | ||
|
|
a5d00fb089 | ||
|
|
f3916545a4 | ||
|
|
5159ffd487 | ||
|
|
0965996c5c | ||
|
|
bda9cb4469 | ||
|
|
c36c1c2213 | ||
|
|
dba064ae10 | ||
|
|
cd730957d0 | ||
|
|
f7235889bb | ||
|
|
27cbe247e6 | ||
|
|
ff3eec181b | ||
|
|
5d54bf504e | ||
|
|
e459c8cbaa | ||
|
|
0b51fe2bce | ||
|
|
6cacf9afd9 | ||
|
|
c03b95dc59 | ||
|
|
45002c0e67 | ||
|
|
592adc85d1 | ||
|
|
952f9c7159 | ||
|
|
869bb36c58 | ||
|
|
c5815984ae | ||
|
|
cb769c03c1 | ||
|
|
ac8a550f9b | ||
|
|
22a62791ce | ||
|
|
7a5a8abe9e | ||
|
|
d34650ad39 | ||
|
|
3bd78751db | ||
|
|
b23271bd6d | ||
|
|
49cf332a25 | ||
|
|
9378f2633b | ||
|
|
a93e5efee2 | ||
|
|
096c31c796 | ||
|
|
0cc9d30292 | ||
|
|
3d6f3319b6 | ||
|
|
0a1419c592 | ||
|
|
59d39ef601 | ||
|
|
28dcaf3c2e | ||
|
|
6315ce3c59 | ||
|
|
25a418d526 | ||
|
|
55fb592e45 | ||
|
|
17cdd90f33 | ||
|
|
a39960a40e | ||
|
|
7273556e89 | ||
|
|
43ddf82214 | ||
|
|
fe1d8e99fa | ||
|
|
5e93008d16 | ||
|
|
36fc98b071 | ||
|
|
3ca676cd30 | ||
|
|
c7329f3315 | ||
|
|
761e2989e4 | ||
|
|
d3eb0a2daf | ||
|
|
f749fc73c4 | ||
|
|
2137e83dd2 | ||
|
|
69d296d4f8 | ||
|
|
6f644e0d50 | ||
|
|
d1d0b08b9d | ||
|
|
335424492b | ||
|
|
e9658818ec | ||
|
|
e92b2bc0b4 | ||
|
|
84457e5f42 | ||
|
|
78e21539fe | ||
|
|
fc92adc975 | ||
|
|
0130fdcd85 | ||
|
|
4b5b58df93 | ||
|
|
3c279bd42c | ||
|
|
061bf8fc26 | ||
|
|
f652b448b8 | ||
|
|
2e5c4007b2 | ||
|
|
30c263c16b | ||
|
|
2886a4dc0b | ||
|
|
8d7a6e5d4b | ||
|
|
75f87528cc | ||
|
|
9f97c821bd | ||
|
|
68846354bb | ||
|
|
7f684c31a2 | ||
|
|
d716c2b70c | ||
|
|
6c0f9742c3 | ||
|
|
832a570de5 | ||
|
|
a9b245bb06 | ||
|
|
e8b4d824ce | ||
|
|
ab0ade6f37 | ||
|
|
db0b611a18 | ||
|
|
7554d8c1ef | ||
|
|
744d785d59 | ||
|
|
3de6b2cb81 | ||
|
|
3d3533a6ea | ||
|
|
5ea822c6f7 | ||
|
|
e54e3c4209 | ||
|
|
3b5fc8ca6a | ||
|
|
de2e289dce | ||
|
|
4a188e9112 | ||
|
|
ca59b640e3 | ||
|
|
9acabebea7 | ||
|
|
0ccdda46df | ||
|
|
775e81de78 | ||
|
|
bd280503fb | ||
|
|
a471f7a2fa | ||
|
|
ccb5f86643 | ||
|
|
8e6ed88e53 | ||
|
|
7daca99e01 | ||
|
|
256356d4e3 | ||
|
|
8ce6877fcf | ||
|
|
0a538a08e4 | ||
|
|
38f01a7097 | ||
|
|
611a0ea8ed | ||
|
|
dcd98215f2 | ||
|
|
493a78af8c | ||
|
|
f016e603af | ||
|
|
3adb3dd26e | ||
|
|
38fdf4f1d2 | ||
|
|
d30b6e44c3 | ||
|
|
6aa60ac1df | ||
|
|
15f24065e1 | ||
|
|
4a38659524 | ||
|
|
5287dae745 | ||
|
|
d8a22d6287 | ||
|
|
81cd594074 | ||
|
|
9d0bfe1108 | ||
|
|
93234a48ab | ||
|
|
c9ebb93cab | ||
|
|
2cac565b24 | ||
|
|
83f1749b57 | ||
|
|
515d412e3a | ||
|
|
311bb85014 | ||
|
|
79d97c4086 | ||
|
|
13d30463f0 | ||
|
|
66348799ad | ||
|
|
4b3a9e3a32 | ||
|
|
cc4a0b1ebf | ||
|
|
5ea8f4835d | ||
|
|
cb06a20947 | ||
|
|
c0ab12db5d | ||
|
|
2e9b2718d0 | ||
|
|
6f0f42630e | ||
|
|
aa11a93537 | ||
|
|
fbb7f2d1cf | ||
|
|
a6c3b5deee | ||
|
|
e80c9fb5ba | ||
|
|
5406f14a71 | ||
|
|
1e4ec1d1aa | ||
|
|
cd6234dca1 | ||
|
|
a1049e87d6 | ||
|
|
565ec1aa22 | ||
|
|
14a1f2af39 | ||
|
|
670d73ef2f | ||
|
|
d1df469f24 | ||
|
|
2f51d80791 | ||
|
|
e533d7bb54 | ||
|
|
6da0c63f60 | ||
|
|
79ede93c8b | ||
|
|
865d24c802 | ||
|
|
846bf123f8 | ||
|
|
f1d9e37a69 | ||
|
|
63981ab764 | ||
|
|
57e6e61206 | ||
|
|
07eac08b22 | ||
|
|
857163336f | ||
|
|
ed45df2ea7 | ||
|
|
c47e23303b | ||
|
|
9be7550b47 | ||
|
|
d2d734c9eb | ||
|
|
dc7216acab | ||
|
|
6f2bdc013f | ||
|
|
d998761ad3 | ||
|
|
7ffac79187 | ||
|
|
03ef5a9c8c | ||
|
|
562cb4a9d5 | ||
|
|
716eeb06a8 | ||
|
|
01a9e635cc | ||
|
|
66c051a9c3 | ||
|
|
2d69b2d587 | ||
|
|
6aa02d75d9 | ||
|
|
38db4521c6 | ||
|
|
acecce5ab8 | ||
|
|
19201da54c | ||
|
|
55f8d8c6bf | ||
|
|
fdcc3f17a4 | ||
|
|
0e896e7fde | ||
|
|
85f315b656 | ||
|
|
397bf9584b | ||
|
|
687dd87727 | ||
|
|
e4cc0c1d0a | ||
|
|
7326f392ef | ||
|
|
ddc81f2788 | ||
|
|
b7c7b84ef2 | ||
|
|
076941f252 | ||
|
|
f1a8a22f54 | ||
|
|
95573d443b | ||
|
|
63517678c8 | ||
|
|
f9eed140be | ||
|
|
816b5cdb3a | ||
|
|
e5c70af047 | ||
|
|
e8eec1f909 | ||
|
|
9ff9e62e8e | ||
|
|
e7e83d5f1e | ||
|
|
1d11bcd979 | ||
|
|
95726bf738 | ||
|
|
93d8337c05 | ||
|
|
6f3cd6b30c | ||
|
|
7758191d5a | ||
|
|
cc09778008 | ||
|
|
e4425d83ff | ||
|
|
6221d6165f | ||
|
|
24c7fe35d2 | ||
|
|
b2f4dff716 | ||
|
|
c3de885179 | ||
|
|
ff4f5337d8 | ||
|
|
23b4496e6b | ||
|
|
a1036efea5 | ||
|
|
193c7f12a8 | ||
|
|
3e349b4366 | ||
|
|
58a6dae99b | ||
|
|
7aaad161e6 | ||
|
|
16a191c56e | ||
|
|
89a03fef74 | ||
|
|
6bb5494726 | ||
|
|
4eeefb49b1 | ||
|
|
ed48774b07 | ||
|
|
acd939e8ee | ||
|
|
0b52b9d6b2 | ||
|
|
7349d64f8e | ||
|
|
05ad02f8e2 | ||
|
|
143cc644ca | ||
|
|
aadd484d62 | ||
|
|
43ae1796b4 | ||
|
|
7176520d44 | ||
|
|
e829c856b7 | ||
|
|
dc93934a4e | ||
|
|
6c86a4176b | ||
|
|
e160532418 | ||
|
|
6d63a86cd9 | ||
|
|
a3843775fe | ||
|
|
9a2c123ddf | ||
|
|
0ab99ed0dd | ||
|
|
a834b58377 | ||
|
|
23326d5f22 | ||
|
|
00fed20ff4 | ||
|
|
9f3c840ea0 | ||
|
|
4003db8f86 | ||
|
|
229cb350b0 | ||
|
|
de474887ea | ||
|
|
802844ae73 | ||
|
|
f63d56502e | ||
|
|
dc66c34326 | ||
|
|
a0899bfbe1 | ||
|
|
583844a4b2 | ||
|
|
0364737d31 | ||
|
|
25bfea613b | ||
|
|
22f15137e8 | ||
|
|
38bfd62bd4 | ||
|
|
f0fb814cd3 | ||
|
|
08cee6f5cd | ||
|
|
8cf3c0c484 | ||
|
|
127d5cb107 | ||
|
|
ccfe697f23 | ||
|
|
a1dc595517 | ||
|
|
80077e5719 | ||
|
|
c7b9f9eed7 | ||
|
|
15964f0f46 | ||
|
|
e85351d15b | ||
|
|
031c033f31 | ||
|
|
90273f3dca | ||
|
|
844d8bf88c | ||
|
|
facbabb203 | ||
|
|
c89e8ba4a9 | ||
|
|
20f3576cd1 | ||
|
|
0edff7e0f2 | ||
|
|
6bbdfe028e | ||
|
|
ee02c64267 | ||
|
|
6081dcaaa0 | ||
|
|
8cb963440d | ||
|
|
451611ff16 | ||
|
|
61a56e325c | ||
|
|
b0e49bb956 | ||
|
|
8b62d546f8 | ||
|
|
6dbb3d0cba | ||
|
|
efdf41167e | ||
|
|
ddb89c3573 | ||
|
|
01f4883cd5 | ||
|
|
9751b8f05b | ||
|
|
aabc4ba0ee | ||
|
|
e79cb9ce4b | ||
|
|
bbcb0729fa | ||
|
|
47c129db49 | ||
|
|
cbd82dbb6b | ||
|
|
ed7bdf7114 | ||
|
|
e46f05b06f | ||
|
|
54a86bb7cf | ||
|
|
59ecf3c456 | ||
|
|
e6f9d19c87 | ||
|
|
1a159cade8 | ||
|
|
1cc972f34e | ||
|
|
e09f6c9337 | ||
|
|
df332ff6e8 | ||
|
|
b76b89eca5 | ||
|
|
c5a871cde4 | ||
|
|
500ed35c8d | ||
|
|
f3cc4aacd8 | ||
|
|
548d49586b | ||
|
|
9792699a12 | ||
|
|
8571ae43a1 | ||
|
|
4ce49e6e4e | ||
|
|
bf3117fd23 | ||
|
|
f89c59f9d1 | ||
|
|
b70e4998a3 | ||
|
|
aae2ae3cfb | ||
|
|
14e6913ab2 | ||
|
|
d13334d5ee | ||
|
|
ccb20347de | ||
|
|
9ef6d5b26c | ||
|
|
2243fd63a0 | ||
|
|
9b3b88e208 | ||
|
|
e1847fca11 | ||
|
|
9352fa23a3 | ||
|
|
a73ddce8e6 | ||
|
|
b1f8775f6b | ||
|
|
c169cd69d2 | ||
|
|
393547b2a2 | ||
|
|
f886e8589e | ||
|
|
894767d0fe | ||
|
|
09370c3f50 | ||
|
|
328358a4e5 | ||
|
|
5e90da94f4 | ||
|
|
973911e9a5 | ||
|
|
2a4b0425da | ||
|
|
b002cc94cc | ||
|
|
1e9126a627 | ||
|
|
609c919ffc | ||
|
|
e6675c789c | ||
|
|
88d2053798 | ||
|
|
94ec379c3b | ||
|
|
3cc4dc2261 | ||
|
|
9c6178906b | ||
|
|
82788f2fe9 | ||
|
|
d59e97da00 | ||
|
|
b5d40609b7 | ||
|
|
c5446c191d | ||
|
|
32678f7d42 | ||
|
|
58487fb0de | ||
|
|
24903860dd | ||
|
|
268c015925 | ||
|
|
c136c188b5 | ||
|
|
845494aa6e | ||
|
|
de6899b66e | ||
|
|
91dd244f34 | ||
|
|
c26cd97cb7 | ||
|
|
a9981fb0ff | ||
|
|
20afdfdcfe | ||
|
|
cdd4075663 | ||
|
|
2586eb08b1 | ||
|
|
d6d5a9a538 | ||
|
|
a7028380c8 | ||
|
|
592542fb28 | ||
|
|
84f6cb4ae4 | ||
|
|
c4b3d62c7f | ||
|
|
f4a0b13d86 | ||
|
|
fd81865b96 | ||
|
|
962f3937b6 | ||
|
|
7298db5b38 | ||
|
|
6141fccd19 | ||
|
|
5761056e3a | ||
|
|
e4bf9f9014 | ||
|
|
23fa88b18b | ||
|
|
2b393f9263 | ||
|
|
da77acb8f2 | ||
|
|
056eca0c2d | ||
|
|
ff3e90f5cd | ||
|
|
108e1bd1e8 | ||
|
|
dd705127be | ||
|
|
c2d1db9c50 | ||
|
|
f48db899d3 | ||
|
|
b55ec5b402 | ||
|
|
ded4b31601 | ||
|
|
ed4e3dbacd | ||
|
|
4e707bc1fa | ||
|
|
d93500168c | ||
|
|
7add1580b2 | ||
|
|
c4dfa5759c | ||
|
|
926a815f67 | ||
|
|
d46a5ae71e | ||
|
|
6f3ace5653 | ||
|
|
2174f4b4ea | ||
|
|
7b67581a2f | ||
|
|
00f7c45a4c | ||
|
|
227e159de1 | ||
|
|
9d590fc13b | ||
|
|
f2cb3d0f6c | ||
|
|
8cd93192a4 | ||
|
|
0c9807d8b3 | ||
|
|
536d1b6de5 | ||
|
|
4583bb037c | ||
|
|
cb6a08c044 | ||
|
|
73d605bdc6 | ||
|
|
912ae51344 | ||
|
|
74de3ef2a9 | ||
|
|
793d08a74b | ||
|
|
cd1d3e0189 | ||
|
|
3a650aa641 | ||
|
|
bf788eee88 | ||
|
|
92ff652416 | ||
|
|
c2dc88fe56 | ||
|
|
fc8078a09a | ||
|
|
759cbcba6d | ||
|
|
6b74b1ba27 | ||
|
|
da1c0fea12 | ||
|
|
171e90cbf5 | ||
|
|
75240a5872 | ||
|
|
44f32cbabc | ||
|
|
94f41162f4 | ||
|
|
20be766ed9 | ||
|
|
f8ecff4877 | ||
|
|
808356abec | ||
|
|
ec0b85ab5f | ||
|
|
4dff991d7b | ||
|
|
0e847cfb15 | ||
|
|
d9a7fc63f8 | ||
|
|
f7f9a73a1e | ||
|
|
cef269f896 | ||
|
|
9f7de59006 | ||
|
|
6a7542fed0 | ||
|
|
f1c8fa62d3 | ||
|
|
d561554fdf | ||
|
|
c96cfed51d | ||
|
|
f32703f81d | ||
|
|
0ced2aa756 | ||
|
|
ea6e678c95 | ||
|
|
271403bccc | ||
|
|
e1cd6c7813 | ||
|
|
ad0426940b | ||
|
|
f78d4194f1 | ||
|
|
ef65147a06 | ||
|
|
2b3bdce27e | ||
|
|
b300e880c4 | ||
|
|
bc7c0bae73 | ||
|
|
3a0e2b45a7 | ||
|
|
3623ea697d | ||
|
|
07f34a2cf6 | ||
|
|
b935900e1c | ||
|
|
5e04e45271 | ||
|
|
f79ea82331 | ||
|
|
ff6a9382f5 | ||
|
|
9248bd08cf | ||
|
|
671dab6154 | ||
|
|
71a6aae38d | ||
|
|
20d00ebaf7 | ||
|
|
37de147bea | ||
|
|
6efa50333f | ||
|
|
3c57e012b9 | ||
|
|
648f3f6a8f | ||
|
|
9a7046d649 | ||
|
|
bb7c412e25 | ||
|
|
567fdbf4b5 | ||
|
|
7d6c3adef3 | ||
|
|
3c1023c1b9 | ||
|
|
9554fba495 | ||
|
|
f8eb9abe03 | ||
|
|
49ef89b02d | ||
|
|
0a08534703 | ||
|
|
bf920d9492 | ||
|
|
24e5c1a040 | ||
|
|
bb350989c7 | ||
|
|
5211317613 | ||
|
|
704e6b93aa | ||
|
|
e9fd4b9fc4 | ||
|
|
efeb10b5ca | ||
|
|
0c182e7585 | ||
|
|
551354e0d3 | ||
|
|
f0028333d8 | ||
|
|
790d9a9fda | ||
|
|
8a20dfe546 | ||
|
|
66bd0d57ee | ||
|
|
32f026ab74 | ||
|
|
9489ab7b8b | ||
|
|
90341dbccd | ||
|
|
52c3e7dcf1 | ||
|
|
cb7e311dc6 | ||
|
|
4dc0e9e2df | ||
|
|
48aa0ef109 | ||
|
|
757afdc5d4 | ||
|
|
e506cb23cf | ||
|
|
9c213825ae | ||
|
|
f9c7b4f5b0 | ||
|
|
7d799fe4e7 | ||
|
|
5e8b87038b | ||
|
|
eac2c999f2 | ||
|
|
c3bbf5bd28 | ||
|
|
55c8adf6c6 | ||
|
|
2cb686567b | ||
|
|
adcfbd3d19 | ||
|
|
9d2c5ec20d | ||
|
|
db92c1bb5f | ||
|
|
40db0bde4c | ||
|
|
456735f772 | ||
|
|
02ea80a6f0 | ||
|
|
97fa97d64a | ||
|
|
91ad122390 | ||
|
|
b7573f6d5e | ||
|
|
53866eb2af | ||
|
|
9175a8d217 | ||
|
|
84aad735a1 | ||
|
|
a93833d88f | ||
|
|
c38902db6b | ||
|
|
24c7e25910 | ||
|
|
13937b2a4a | ||
|
|
d26ecc330c | ||
|
|
a575f5c090 | ||
|
|
de808a5e92 | ||
|
|
6be8aeb216 | ||
|
|
afede39e0c | ||
|
|
48d6fef3ea | ||
|
|
9b97129e8c | ||
|
|
eb10d4f437 | ||
|
|
fc8f959e6b | ||
|
|
b6003a87e4 | ||
|
|
9b6aa5304c | ||
|
|
de786bbcc1 | ||
|
|
85d98fa322 | ||
|
|
c6812bebdd | ||
|
|
00ffb8f1b9 | ||
|
|
d684356d9d | ||
|
|
da18f64548 | ||
|
|
4fa8b8fd54 | ||
|
|
4fcc43dce7 | ||
|
|
78cb6a1e6c | ||
|
|
da5e349088 | ||
|
|
82d44a79de | ||
|
|
33cd383a96 | ||
|
|
5adbf765a2 | ||
|
|
cf73d51d77 | ||
|
|
b3054c8168 | ||
|
|
040f1053aa | ||
|
|
b24dff5fef | ||
|
|
87b5f1bd82 | ||
|
|
0102000658 | ||
|
|
8f31f0d343 | ||
|
|
4b289d6ab5 | ||
|
|
80dd63d0d7 | ||
|
|
3888c76ac3 |
70
.github/workflows/build-cross-compile.yml
vendored
70
.github/workflows/build-cross-compile.yml
vendored
@@ -29,22 +29,22 @@ on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
gcc-major-version:
|
||||
required: true
|
||||
type: string
|
||||
apt-gcc-version:
|
||||
required: true
|
||||
type: string
|
||||
apt-gcc-cross-version:
|
||||
required: true
|
||||
type: string
|
||||
extra-conf-options:
|
||||
required: false
|
||||
type: string
|
||||
default: '10'
|
||||
apt-gcc-version:
|
||||
required: false
|
||||
type: string
|
||||
default: '10.3.0-1ubuntu1~20.04'
|
||||
apt-gcc-cross-suffix:
|
||||
required: false
|
||||
type: string
|
||||
default: 'cross1'
|
||||
|
||||
jobs:
|
||||
build-cross-compile:
|
||||
name: build
|
||||
runs-on: ubuntu-22.04
|
||||
runs-on: ubuntu-20.04
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
@@ -54,35 +54,20 @@ jobs:
|
||||
- arm
|
||||
- s390x
|
||||
- ppc64le
|
||||
- riscv64
|
||||
include:
|
||||
- target-cpu: aarch64
|
||||
gnu-arch: aarch64
|
||||
debian-arch: arm64
|
||||
debian-repository: https://httpredir.debian.org/debian/
|
||||
debian-version: bullseye
|
||||
gnu-arch: aarch64
|
||||
- target-cpu: arm
|
||||
gnu-arch: arm
|
||||
debian-arch: armhf
|
||||
debian-repository: https://httpredir.debian.org/debian/
|
||||
debian-version: bullseye
|
||||
gnu-arch: arm
|
||||
gnu-abi: eabihf
|
||||
- target-cpu: s390x
|
||||
gnu-arch: s390x
|
||||
debian-arch: s390x
|
||||
debian-repository: https://httpredir.debian.org/debian/
|
||||
debian-version: bullseye
|
||||
gnu-arch: s390x
|
||||
- target-cpu: ppc64le
|
||||
gnu-arch: powerpc64le
|
||||
debian-arch: ppc64el
|
||||
debian-repository: https://httpredir.debian.org/debian/
|
||||
debian-version: bullseye
|
||||
- target-cpu: riscv64
|
||||
gnu-arch: riscv64
|
||||
debian-arch: riscv64
|
||||
debian-repository: https://deb.debian.org/debian-ports
|
||||
debian-keyring: /usr/share/keyrings/debian-ports-archive-keyring.gpg
|
||||
debian-version: sid
|
||||
gnu-arch: powerpc64le
|
||||
|
||||
steps:
|
||||
- name: 'Checkout the JDK source'
|
||||
@@ -110,10 +95,9 @@ jobs:
|
||||
sudo apt-get install \
|
||||
gcc-${{ inputs.gcc-major-version }}=${{ inputs.apt-gcc-version }} \
|
||||
g++-${{ inputs.gcc-major-version }}=${{ inputs.apt-gcc-version }} \
|
||||
gcc-${{ inputs.gcc-major-version }}-${{ matrix.gnu-arch }}-linux-gnu${{ matrix.gnu-abi}}=${{ inputs.apt-gcc-cross-version }} \
|
||||
g++-${{ inputs.gcc-major-version }}-${{ matrix.gnu-arch }}-linux-gnu${{ matrix.gnu-abi}}=${{ inputs.apt-gcc-cross-version }} \
|
||||
libxrandr-dev libxtst-dev libcups2-dev libasound2-dev \
|
||||
debian-ports-archive-keyring
|
||||
gcc-${{ inputs.gcc-major-version }}-${{ matrix.gnu-arch }}-linux-gnu${{ matrix.gnu-abi}}=${{ inputs.apt-gcc-version }}${{ inputs.apt-gcc-cross-suffix }} \
|
||||
g++-${{ inputs.gcc-major-version }}-${{ matrix.gnu-arch }}-linux-gnu${{ matrix.gnu-abi}}=${{ inputs.apt-gcc-version }}${{ inputs.apt-gcc-cross-suffix }} \
|
||||
libxrandr-dev libxtst-dev libcups2-dev libasound2-dev
|
||||
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-${{ inputs.gcc-major-version }} 100 --slave /usr/bin/g++ g++ /usr/bin/g++-${{ inputs.gcc-major-version }}
|
||||
|
||||
- name: 'Check cache for sysroot'
|
||||
@@ -129,15 +113,14 @@ jobs:
|
||||
|
||||
- name: 'Create sysroot'
|
||||
run: >
|
||||
sudo debootstrap
|
||||
sudo qemu-debootstrap
|
||||
--arch=${{ matrix.debian-arch }}
|
||||
--verbose
|
||||
--include=fakeroot,symlinks,build-essential,libx11-dev,libxext-dev,libxrender-dev,libxrandr-dev,libxtst-dev,libxt-dev,libcups2-dev,libfontconfig1-dev,libasound2-dev,libfreetype6-dev,libpng-dev
|
||||
--resolve-deps
|
||||
$(test -n "${{ matrix.debian-keyring }}" && echo "--keyring=${{ matrix.debian-keyring }}")
|
||||
${{ matrix.debian-version }}
|
||||
buster
|
||||
sysroot
|
||||
${{ matrix.debian-repository }}
|
||||
https://httpredir.debian.org/debian/
|
||||
if: steps.get-cached-sysroot.outputs.cache-hit != 'true'
|
||||
|
||||
- name: 'Prepare sysroot'
|
||||
@@ -145,9 +128,7 @@ jobs:
|
||||
# Prepare sysroot and remove unused files to minimize cache
|
||||
sudo chroot sysroot symlinks -cr .
|
||||
sudo chown ${USER} -R sysroot
|
||||
rm -rf sysroot/{dev,proc,run,sys,var}
|
||||
rm -rf sysroot/usr/{sbin,bin,share}
|
||||
rm -rf sysroot/usr/lib/{apt,udev,systemd}
|
||||
rm -rf sysroot/{dev,proc,run,sys}
|
||||
if: steps.get-cached-sysroot.outputs.cache-hit != 'true'
|
||||
|
||||
- name: 'Configure'
|
||||
@@ -162,13 +143,8 @@ jobs:
|
||||
--openjdk-target=${{ matrix.gnu-arch }}-linux-gnu${{ matrix.gnu-abi}}
|
||||
--with-sysroot=sysroot
|
||||
--with-build-jdk=${{ steps.buildjdk.outputs.jdk-path }}
|
||||
--with-jmod-compress=zip-1
|
||||
CC=${{ matrix.gnu-arch }}-linux-gnu${{ matrix.gnu-abi}}-gcc-${{ inputs.gcc-major-version }}
|
||||
CXX=${{ matrix.gnu-arch }}-linux-gnu${{ matrix.gnu-abi}}-g++-${{ inputs.gcc-major-version }}
|
||||
${{ inputs.extra-conf-options }} || (
|
||||
echo "Dumping config.log:" &&
|
||||
cat config.log &&
|
||||
exit 1)
|
||||
CC=${{ matrix.gnu-arch }}-linux-gnu${{ matrix.gnu-abi}}-gcc-10
|
||||
CXX=${{ matrix.gnu-arch }}-linux-gnu${{ matrix.gnu-abi}}-g++-10
|
||||
|
||||
- name: 'Build'
|
||||
id: build
|
||||
|
||||
19
.github/workflows/build-linux.yml
vendored
19
.github/workflows/build-linux.yml
vendored
@@ -42,13 +42,6 @@ on:
|
||||
required: false
|
||||
type: string
|
||||
default: '[ "debug", "release" ]'
|
||||
gcc-major-version:
|
||||
required: true
|
||||
type: string
|
||||
gcc-package-suffix:
|
||||
required: false
|
||||
type: string
|
||||
default: ''
|
||||
apt-gcc-version:
|
||||
required: true
|
||||
type: string
|
||||
@@ -62,7 +55,7 @@ on:
|
||||
jobs:
|
||||
build-linux:
|
||||
name: build
|
||||
runs-on: ubuntu-22.04
|
||||
runs-on: ubuntu-20.04
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
@@ -108,8 +101,8 @@ jobs:
|
||||
fi
|
||||
sudo apt-get update
|
||||
sudo apt-get install --only-upgrade apt
|
||||
sudo apt-get install gcc-${{ inputs.gcc-major-version }}${{ inputs.gcc-package-suffix }}=${{ inputs.apt-gcc-version }} g++-${{ inputs.gcc-major-version }}${{ inputs.gcc-package-suffix }}=${{ inputs.apt-gcc-version }} libxrandr-dev${{ steps.arch.outputs.suffix }} libxtst-dev${{ steps.arch.outputs.suffix }} libcups2-dev${{ steps.arch.outputs.suffix }} libasound2-dev${{ steps.arch.outputs.suffix }} ${{ inputs.apt-extra-packages }}
|
||||
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-${{ inputs.gcc-major-version }} 100 --slave /usr/bin/g++ g++ /usr/bin/g++-${{ inputs.gcc-major-version }}
|
||||
sudo apt-get install gcc-${{ inputs.apt-gcc-version }} g++-${{ inputs.apt-gcc-version }} libxrandr-dev${{ steps.arch.outputs.suffix }} libxtst-dev${{ steps.arch.outputs.suffix }} libcups2-dev${{ steps.arch.outputs.suffix }} libasound2-dev${{ steps.arch.outputs.suffix }} ${{ inputs.apt-extra-packages }}
|
||||
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-10 100 --slave /usr/bin/g++ g++ /usr/bin/g++-10
|
||||
|
||||
- name: 'Configure'
|
||||
run: >
|
||||
@@ -122,11 +115,7 @@ jobs:
|
||||
--with-gtest=${{ steps.gtest.outputs.path }}
|
||||
--enable-jtreg-failure-handler
|
||||
--with-zlib=system
|
||||
--with-jmod-compress=zip-1
|
||||
${{ inputs.extra-conf-options }} || (
|
||||
echo "Dumping config.log:" &&
|
||||
cat config.log &&
|
||||
exit 1)
|
||||
${{ inputs.extra-conf-options }}
|
||||
|
||||
- name: 'Build'
|
||||
id: build
|
||||
|
||||
6
.github/workflows/build-macos.yml
vendored
6
.github/workflows/build-macos.yml
vendored
@@ -97,11 +97,7 @@ jobs:
|
||||
--with-gtest=${{ steps.gtest.outputs.path }}
|
||||
--enable-jtreg-failure-handler
|
||||
--with-zlib=system
|
||||
--with-jmod-compress=zip-1
|
||||
${{ inputs.extra-conf-options }} || (
|
||||
echo "Dumping config.log:" &&
|
||||
cat config.log &&
|
||||
exit 1)
|
||||
${{ inputs.extra-conf-options }}
|
||||
|
||||
- name: 'Build'
|
||||
id: build
|
||||
|
||||
6
.github/workflows/build-windows.yml
vendored
6
.github/workflows/build-windows.yml
vendored
@@ -110,11 +110,7 @@ jobs:
|
||||
--with-gtest=${{ steps.gtest.outputs.path }}
|
||||
--enable-jtreg-failure-handler
|
||||
--with-msvc-toolset-version=${{ inputs.msvc-toolset-version }}
|
||||
--with-jmod-compress=zip-1
|
||||
${{ inputs.extra-conf-options }} || (
|
||||
echo "Dumping config.log:" &&
|
||||
cat config.log &&
|
||||
exit 1)
|
||||
${{ inputs.extra-conf-options }}
|
||||
env:
|
||||
# We need a minimal PATH on Windows
|
||||
# Set PATH to "", so just GITHUB_PATH is included
|
||||
|
||||
35
.github/workflows/main.yml
vendored
35
.github/workflows/main.yml
vendored
@@ -49,7 +49,7 @@ jobs:
|
||||
|
||||
select:
|
||||
name: 'Select platforms'
|
||||
runs-on: ubuntu-22.04
|
||||
runs-on: ubuntu-20.04
|
||||
outputs:
|
||||
linux-x64: ${{ steps.include.outputs.linux-x64 }}
|
||||
linux-x86: ${{ steps.include.outputs.linux-x86 }}
|
||||
@@ -123,8 +123,7 @@ jobs:
|
||||
uses: ./.github/workflows/build-linux.yml
|
||||
with:
|
||||
platform: linux-x64
|
||||
gcc-major-version: '10'
|
||||
apt-gcc-version: '10.3.0-15ubuntu1'
|
||||
apt-gcc-version: '10=10.3.0-1ubuntu1~20.04'
|
||||
# The linux-x64 jdk bundle is used as buildjdk for the cross-compile job
|
||||
if: needs.select.outputs.linux-x64 == 'true' || needs.select.outputs.linux-cross-compile == 'true'
|
||||
|
||||
@@ -134,13 +133,11 @@ jobs:
|
||||
uses: ./.github/workflows/build-linux.yml
|
||||
with:
|
||||
platform: linux-x86
|
||||
gcc-major-version: '10'
|
||||
gcc-package-suffix: '-multilib'
|
||||
apt-gcc-version: '10.3.0-15ubuntu1'
|
||||
apt-gcc-version: '10-multilib'
|
||||
apt-architecture: 'i386'
|
||||
# Some multilib libraries do not have proper inter-dependencies, so we have to
|
||||
# install their dependencies manually.
|
||||
apt-extra-packages: 'libfreetype6-dev:i386 libtiff-dev:i386 libcupsimage2-dev:i386 libc6-i386'
|
||||
apt-extra-packages: 'libfreetype6-dev:i386 libtiff-dev:i386 libcupsimage2-dev:i386'
|
||||
extra-conf-options: '--with-target-bits=32'
|
||||
if: needs.select.outputs.linux-x86 == 'true'
|
||||
|
||||
@@ -152,8 +149,7 @@ jobs:
|
||||
platform: linux-x64
|
||||
make-target: 'hotspot'
|
||||
debug-levels: '[ "debug" ]'
|
||||
gcc-major-version: '10'
|
||||
apt-gcc-version: '10.3.0-15ubuntu1'
|
||||
apt-gcc-version: '10=10.3.0-1ubuntu1~20.04'
|
||||
extra-conf-options: '--disable-precompiled-headers'
|
||||
if: needs.select.outputs.linux-x64-variants == 'true'
|
||||
|
||||
@@ -165,8 +161,7 @@ jobs:
|
||||
platform: linux-x64
|
||||
make-target: 'hotspot'
|
||||
debug-levels: '[ "debug" ]'
|
||||
gcc-major-version: '10'
|
||||
apt-gcc-version: '10.3.0-15ubuntu1'
|
||||
apt-gcc-version: '10=10.3.0-1ubuntu1~20.04'
|
||||
extra-conf-options: '--with-jvm-variants=zero --disable-precompiled-headers'
|
||||
if: needs.select.outputs.linux-x64-variants == 'true'
|
||||
|
||||
@@ -178,8 +173,7 @@ jobs:
|
||||
platform: linux-x64
|
||||
make-target: 'hotspot'
|
||||
debug-levels: '[ "debug" ]'
|
||||
gcc-major-version: '10'
|
||||
apt-gcc-version: '10.3.0-15ubuntu1'
|
||||
apt-gcc-version: '10=10.3.0-1ubuntu1~20.04'
|
||||
extra-conf-options: '--with-jvm-variants=minimal --disable-precompiled-headers'
|
||||
if: needs.select.outputs.linux-x64-variants == 'true'
|
||||
|
||||
@@ -192,8 +186,7 @@ jobs:
|
||||
make-target: 'hotspot'
|
||||
# Technically this is not the "debug" level, but we can't inject a new matrix state for just this job
|
||||
debug-levels: '[ "debug" ]'
|
||||
gcc-major-version: '10'
|
||||
apt-gcc-version: '10.3.0-15ubuntu1'
|
||||
apt-gcc-version: '10=10.3.0-1ubuntu1~20.04'
|
||||
extra-conf-options: '--with-debug-level=optimized --disable-precompiled-headers'
|
||||
if: needs.select.outputs.linux-x64-variants == 'true'
|
||||
|
||||
@@ -203,10 +196,6 @@ jobs:
|
||||
- select
|
||||
- build-linux-x64
|
||||
uses: ./.github/workflows/build-cross-compile.yml
|
||||
with:
|
||||
gcc-major-version: '10'
|
||||
apt-gcc-version: '10.3.0-15ubuntu1'
|
||||
apt-gcc-cross-version: '10.3.0-8ubuntu1cross1'
|
||||
if: needs.select.outputs.linux-cross-compile == 'true'
|
||||
|
||||
build-macos-x64:
|
||||
@@ -234,7 +223,7 @@ jobs:
|
||||
uses: ./.github/workflows/build-windows.yml
|
||||
with:
|
||||
platform: windows-x64
|
||||
msvc-toolset-version: '14.29'
|
||||
msvc-toolset-version: '14.25'
|
||||
msvc-toolset-architecture: 'x86.x64'
|
||||
if: needs.select.outputs.windows-x64 == 'true'
|
||||
|
||||
@@ -262,7 +251,7 @@ jobs:
|
||||
with:
|
||||
platform: linux-x64
|
||||
bootjdk-platform: linux-x64
|
||||
runs-on: ubuntu-22.04
|
||||
runs-on: ubuntu-20.04
|
||||
|
||||
test-linux-x86:
|
||||
name: linux-x86
|
||||
@@ -272,7 +261,7 @@ jobs:
|
||||
with:
|
||||
platform: linux-x86
|
||||
bootjdk-platform: linux-x64
|
||||
runs-on: ubuntu-22.04
|
||||
runs-on: ubuntu-20.04
|
||||
|
||||
test-macos-x64:
|
||||
name: macos-x64
|
||||
@@ -297,7 +286,7 @@ jobs:
|
||||
# Remove bundles so they are not misconstrued as binary distributions from the JDK project
|
||||
remove-bundles:
|
||||
name: 'Remove bundle artifacts'
|
||||
runs-on: ubuntu-22.04
|
||||
runs-on: ubuntu-20.04
|
||||
if: always()
|
||||
needs:
|
||||
- build-linux-x64
|
||||
|
||||
2
.gitignore
vendored
2
.gitignore
vendored
@@ -16,5 +16,3 @@ NashornProfile.txt
|
||||
**/JTreport/**
|
||||
**/JTwork/**
|
||||
/src/utils/LogCompilation/target/
|
||||
/.project/
|
||||
/.settings/
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
[general]
|
||||
project=jdk
|
||||
project=jdk-updates
|
||||
jbs=JDK
|
||||
version=20
|
||||
version=17.0.5
|
||||
|
||||
[checks]
|
||||
error=author,committer,reviewers,merge,issues,executable,symlink,message,hg-tag,whitespace,problemlists
|
||||
|
||||
57
README.md
57
README.md
@@ -1,64 +1,11 @@
|
||||
# Welcome to the JDK!
|
||||
|
||||
## Wakefield
|
||||
This is a temporary section created to host information on the
|
||||
[Wakefield](https://wiki.openjdk.java.net/display/wakefield) project.
|
||||
|
||||
### Building
|
||||
There are two addition `configure` arguments:
|
||||
```
|
||||
--with-wayland specify prefix directory for the wayland package
|
||||
(expecting the headers under PATH/include)
|
||||
--with-wayland-include specify directory for the wayland include files
|
||||
```
|
||||
As usual, there should be no need to specify those explicitly unless you're doing
|
||||
something tricky.
|
||||
However, a variant of `libwayland-dev` needs to be installed on the build system.
|
||||
|
||||
### Running
|
||||
Make sure your system is configured such that `libwayland` can find the socket to connect to;
|
||||
usually this means that the environment variable `WAYLAND_DISPLAY` is set to something
|
||||
sensible. Then add this argument to `java`
|
||||
```
|
||||
-Dawt.toolkit.name=WLToolkit
|
||||
```
|
||||
|
||||
### Testing
|
||||
Testing that involves `Robot` is done inside a [Weston](https://gitlab.freedesktop.org/wayland/weston/)
|
||||
instance with a special module loaded called `libwakefield`
|
||||
that provides the necessary functionality. The Wayland-specific tests are therefore executed with a dedicated test driver
|
||||
`test/jdk/java/awt/wakefield/WakefieldTestDriver.java`. The driver also provides an easy
|
||||
way to run the test in several configurations with a different size and even number
|
||||
of "outputs" (monitors).
|
||||
|
||||
To run the Wayland-specific tests, perform these steps:
|
||||
* Install Weston version 9 (earlier versions are known NOT to work).
|
||||
* Obtain `libwakefield.so` either by building from source (available under
|
||||
`src/java.desktop/share/native/libwakefield` and not integrated into the rest of the
|
||||
build infrastructure; see `README.md` there)
|
||||
or by fetching the latest pre-built `x64` binary
|
||||
```
|
||||
wget https://github.com/mkartashev/wakefield/raw/main/libwakefield.so
|
||||
```
|
||||
* Set `LIBWAKEFIELD` environment variable to the full path to `libwakefield.so`
|
||||
```
|
||||
export LIBWAKEFIELD=/tmp/wakefield-testing/libwakefield.so
|
||||
```
|
||||
* Run `jtreg` like so
|
||||
```
|
||||
jtreg -e:XDG_RUNTIME_DIR -e:LIBWAKEFIELD -testjdk:... test/jdk/java/awt/wakefield/
|
||||
```
|
||||
|
||||
This was verified to work in `Ubuntu 21.10`.
|
||||
This does NOT work in `Ubuntu 21.04` or `Fedora 34`.
|
||||
|
||||
## Generic Info (not Wakefield-specific)
|
||||
For build instructions please see the
|
||||
[online documentation](https://openjdk.org/groups/build/doc/building.html),
|
||||
[online documentation](https://openjdk.java.net/groups/build/doc/building.html),
|
||||
or either of these files:
|
||||
|
||||
- [doc/building.html](doc/building.html) (html version)
|
||||
- [doc/building.md](doc/building.md) (markdown version)
|
||||
|
||||
See <https://openjdk.org/> for more information about
|
||||
See <https://openjdk.java.net/> for more information about
|
||||
the OpenJDK Community and the JDK.
|
||||
|
||||
77
bin/idea.sh
77
bin/idea.sh
@@ -25,7 +25,7 @@
|
||||
# Shell script for generating an IDEA project from a given list of modules
|
||||
|
||||
usage() {
|
||||
echo "usage: $0 [-h|--help] [-v|--verbose] [-o|--output <path>] [-c|--conf <conf_name>] [modules]+"
|
||||
echo "usage: $0 [-h|--help] [-v|--verbose] [-o|--output <path>] [modules]+"
|
||||
exit 1
|
||||
}
|
||||
|
||||
@@ -37,7 +37,6 @@ cd $TOP;
|
||||
|
||||
IDEA_OUTPUT=$TOP/.idea
|
||||
VERBOSE="false"
|
||||
CONF_ARG=
|
||||
while [ $# -gt 0 ]
|
||||
do
|
||||
case $1 in
|
||||
@@ -53,10 +52,6 @@ do
|
||||
IDEA_OUTPUT=$2/.idea
|
||||
shift
|
||||
;;
|
||||
-c | --conf )
|
||||
CONF_ARG="CONF_NAME=$2"
|
||||
shift
|
||||
;;
|
||||
|
||||
-*) # bad option
|
||||
usage
|
||||
@@ -69,9 +64,6 @@ do
|
||||
shift
|
||||
done
|
||||
|
||||
if [ -e $IDEA_OUTPUT ] ; then
|
||||
rm -r $IDEA_OUTPUT
|
||||
fi
|
||||
mkdir -p $IDEA_OUTPUT || exit 1
|
||||
cd $IDEA_OUTPUT; IDEA_OUTPUT=`pwd`
|
||||
|
||||
@@ -99,7 +91,7 @@ if [ "$VERBOSE" = "true" ] ; then
|
||||
echo "idea template dir: $IDEA_TEMPLATE"
|
||||
fi
|
||||
|
||||
cd $TOP ; make -f "$IDEA_MAKE/idea.gmk" -I $MAKE_DIR/.. idea MAKEOVERRIDES= OUT=$IDEA_OUTPUT/env.cfg MODULES="$*" $CONF_ARG || exit 1
|
||||
cd $TOP ; make -f "$IDEA_MAKE/idea.gmk" -I $MAKE_DIR/.. idea MAKEOVERRIDES= OUT=$IDEA_OUTPUT/env.cfg MODULES="$*" || exit 1
|
||||
cd $SCRIPT_DIR
|
||||
|
||||
. $IDEA_OUTPUT/env.cfg
|
||||
@@ -156,14 +148,14 @@ add_replacement "###MODULE_NAMES###" "$MODULE_NAMES"
|
||||
add_replacement "###VCS_TYPE###" "$VCS_TYPE"
|
||||
SPEC_DIR=`dirname $SPEC`
|
||||
if [ "x$CYGPATH" != "x" ]; then
|
||||
add_replacement "###BUILD_DIR###" "`$CYGPATH -am $SPEC_DIR`"
|
||||
add_replacement "###IMAGES_DIR###" "`$CYGPATH -am $SPEC_DIR`/images/jdk"
|
||||
add_replacement "###ROOT_DIR###" "`$CYGPATH -am $TOPLEVEL_DIR`"
|
||||
add_replacement "###IDEA_DIR###" "`$CYGPATH -am $IDEA_OUTPUT`"
|
||||
add_replacement "###BUILD_DIR###" "`cygpath -am $SPEC_DIR`"
|
||||
add_replacement "###IMAGES_DIR###" "`cygpath -am $SPEC_DIR`/images/jdk"
|
||||
add_replacement "###ROOT_DIR###" "`cygpath -am $TOPLEVEL_DIR`"
|
||||
add_replacement "###IDEA_DIR###" "`cygpath -am $IDEA_OUTPUT`"
|
||||
if [ "x$JT_HOME" = "x" ]; then
|
||||
add_replacement "###JTREG_HOME###" ""
|
||||
else
|
||||
add_replacement "###JTREG_HOME###" "`$CYGPATH -am $JT_HOME`"
|
||||
add_replacement "###JTREG_HOME###" "`cygpath -am $JT_HOME`"
|
||||
fi
|
||||
elif [ "x$WSL_DISTRO_NAME" != "x" ]; then
|
||||
add_replacement "###BUILD_DIR###" "`wslpath -am $SPEC_DIR`"
|
||||
@@ -188,7 +180,7 @@ SOURCE_POSTFIX="\" isTestSource=\"false\" />"
|
||||
|
||||
for root in $MODULE_ROOTS; do
|
||||
if [ "x$CYGPATH" != "x" ]; then
|
||||
root=`$CYGPATH -am $root`
|
||||
root=`cygpath -am $root`
|
||||
elif [ "x$WSL_DISTRO_NAME" != "x" ]; then
|
||||
root=`wslpath -am $root`
|
||||
fi
|
||||
@@ -215,59 +207,38 @@ replace_template_dir "$IDEA_OUTPUT"
|
||||
CLASSES=$IDEA_OUTPUT/classes
|
||||
|
||||
if [ "x$ANT_HOME" = "x" ] ; then
|
||||
# try some common locations
|
||||
if [ -f "/usr/share/ant/lib/ant.jar" ] ; then
|
||||
ANT_HOME="/usr/share/ant"
|
||||
else
|
||||
try_ant=$(ls /opt/homebrew/Cellar/ant/*/libexec/lib/ant.jar 2> /dev/null | sort -r | head -n 1)
|
||||
if [ "x$try_ant" != "x" ] ; then
|
||||
ANT_HOME=$(cd $(dirname $try_ant)/.. && pwd)
|
||||
else
|
||||
try_ant=$(ls /usr/local/Cellar/ant/*/libexec/lib/ant.jar 2> /dev/null | sort -r | head -n 1)
|
||||
if [ "x$try_ant" != "x" ] ; then
|
||||
ANT_HOME=$(cd $(dirname $try_ant)/.. && pwd)
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
else
|
||||
if [ ! -f "$ANT_HOME/lib/ant.jar" ] ; then
|
||||
echo "FATAL: ANT_HOME is incorrect. Try removing it and use autodetection, or fix the value" >&2; exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "x$ANT_HOME" = "x" ] ; then
|
||||
echo "FATAL: cannot find ant. Try setting ANT_HOME." >&2; exit 1
|
||||
# try some common locations, before giving up
|
||||
if [ -f "/usr/share/ant/lib/ant.jar" ] ; then
|
||||
ANT_HOME="/usr/share/ant"
|
||||
elif [ -f "/usr/local/Cellar/ant/1.9.4/libexec/lib/ant.jar" ] ; then
|
||||
ANT_HOME="/usr/local/Cellar/ant/1.9.4/libexec"
|
||||
else
|
||||
echo "FATAL: cannot find ant. Try setting ANT_HOME." >&2; exit 1
|
||||
fi
|
||||
fi
|
||||
CP=$ANT_HOME/lib/ant.jar
|
||||
rm -rf $CLASSES; mkdir $CLASSES
|
||||
|
||||
# If we have a Windows boot JDK, we need a .exe suffix
|
||||
if [ -e "$BOOT_JDK/bin/java.exe" ] ; then
|
||||
JAVAC=javac.exe
|
||||
else
|
||||
if [ "x$CYGPATH" != "x" ] ; then ## CYGPATH may be set in env.cfg
|
||||
JAVAC_SOURCE_FILE=`cygpath -am $IDEA_OUTPUT/src/idea/IdeaLoggerWrapper.java`
|
||||
JAVAC_SOURCE_PATH=`cygpath -am $IDEA_OUTPUT/src`
|
||||
JAVAC_CLASSES=`cygpath -am $CLASSES`
|
||||
JAVAC_CP=`cygpath -am $CP`
|
||||
JAVAC=javac
|
||||
fi
|
||||
|
||||
# If we are on WSL, the boot JDK might be either Windows or Linux,
|
||||
# and we need to use realpath instead of CYGPATH to make javac work on both.
|
||||
# We need to handle this case first since CYGPATH might be set on WSL.
|
||||
if [ "x$WSL_DISTRO_NAME" != "x" ]; then
|
||||
elif [ "x$WSL_DISTRO_NAME" != "x" ]; then
|
||||
JAVAC_SOURCE_FILE=`realpath --relative-to=./ $IDEA_OUTPUT/src/idea/IdeaLoggerWrapper.java`
|
||||
JAVAC_SOURCE_PATH=`realpath --relative-to=./ $IDEA_OUTPUT/src`
|
||||
JAVAC_CLASSES=`realpath --relative-to=./ $CLASSES`
|
||||
ANT_TEMP=`mktemp -d -p ./`
|
||||
cp $ANT_HOME/lib/ant.jar $ANT_TEMP/ant.jar
|
||||
JAVAC_CP=$ANT_TEMP/ant.jar
|
||||
elif [ "x$CYGPATH" != "x" ] ; then ## CYGPATH may be set in env.cfg
|
||||
JAVAC_SOURCE_FILE=`$CYGPATH -am $IDEA_OUTPUT/src/idea/IdeaLoggerWrapper.java`
|
||||
JAVAC_SOURCE_PATH=`$CYGPATH -am $IDEA_OUTPUT/src`
|
||||
JAVAC_CLASSES=`$CYGPATH -am $CLASSES`
|
||||
JAVAC_CP=`$CYGPATH -am $CP`
|
||||
JAVAC=javac.exe
|
||||
else
|
||||
JAVAC_SOURCE_FILE=$IDEA_OUTPUT/src/idea/IdeaLoggerWrapper.java
|
||||
JAVAC_SOURCE_PATH=$IDEA_OUTPUT/src
|
||||
JAVAC_CLASSES=$CLASSES
|
||||
JAVAC_CP=$CP
|
||||
JAVAC=javac
|
||||
fi
|
||||
|
||||
$BOOT_JDK/bin/$JAVAC -d $JAVAC_CLASSES -sourcepath $JAVAC_SOURCE_PATH -cp $JAVAC_CP $JAVAC_SOURCE_FILE
|
||||
|
||||
45
bin/print-config.js
Normal file
45
bin/print-config.js
Normal file
@@ -0,0 +1,45 @@
|
||||
/*
|
||||
* Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License version 2 only, as
|
||||
* published by the Free Software Foundation. Oracle designates this
|
||||
* particular file as subject to the "Classpath" exception as provided
|
||||
* by Oracle in the LICENSE file that accompanied this code.
|
||||
*
|
||||
* This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
* version 2 for more details (a copy is included in the LICENSE file that
|
||||
* accompanied this code).
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License version
|
||||
* 2 along with this work; if not, write to the Free Software Foundation,
|
||||
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
* or visit www.oracle.com if you need additional information or have any
|
||||
* questions.
|
||||
*/
|
||||
|
||||
/*
|
||||
* This little utility can be used to expand the jib-profiles configuration
|
||||
* files into plain json.
|
||||
*
|
||||
* Usage:
|
||||
*
|
||||
* jjs -scripting print-config.js -- [<jib-profiles.js>]
|
||||
*
|
||||
*/
|
||||
|
||||
var file = $ARG[0];
|
||||
if (file == null) {
|
||||
file = new java.io.File(__DIR__, "../conf/jib-profiles.js").getCanonicalPath();
|
||||
}
|
||||
load(file);
|
||||
var input = {};
|
||||
input.get = function(dependencyName, attribute) {
|
||||
return "\${" + dependencyName + "." + attribute + "}";
|
||||
};
|
||||
print(JSON.stringify(getJibProfiles(input), null, 2));
|
||||
@@ -70,9 +70,6 @@
|
||||
<li><a href="#make-control-variables">Make Control Variables</a></li>
|
||||
</ul></li>
|
||||
<li><a href="#running-tests">Running Tests</a></li>
|
||||
<li><a href="#signing">Signing</a><ul>
|
||||
<li><a href="#macos-1">macOS</a></li>
|
||||
</ul></li>
|
||||
<li><a href="#cross-compiling">Cross-compiling</a><ul>
|
||||
<li><a href="#cross-compiling-the-easy-way-with-openjdk-devkits">Cross compiling the easy way with OpenJDK devkits</a></li>
|
||||
<li><a href="#boot-jdk-and-build-jdk">Boot JDK and Build JDK</a></li>
|
||||
@@ -99,7 +96,6 @@
|
||||
<li><a href="#specific-build-issues">Specific Build Issues</a></li>
|
||||
<li><a href="#getting-help">Getting Help</a></li>
|
||||
</ul></li>
|
||||
<li><a href="#reproducible-builds">Reproducible Builds</a></li>
|
||||
<li><a href="#hints-and-suggestions-for-advanced-users">Hints and Suggestions for Advanced Users</a><ul>
|
||||
<li><a href="#bash-completion">Bash Completion</a></li>
|
||||
<li><a href="#using-multiple-configurations">Using Multiple Configurations</a></li>
|
||||
@@ -115,14 +111,13 @@
|
||||
<li><a href="#developing-the-build-system-itself">Developing the Build System Itself</a></li>
|
||||
</ul></li>
|
||||
<li><a href="#contributing-to-the-jdk">Contributing to the JDK</a></li>
|
||||
<li><a href="#editing-this-document">Editing this document</a></li>
|
||||
</ul>
|
||||
</nav>
|
||||
<h2 id="tldr-instructions-for-the-impatient">TL;DR (Instructions for the Impatient)</h2>
|
||||
<p>If you are eager to try out building the JDK, these simple steps works most of the time. They assume that you have installed Git (and Cygwin if running on Windows) and cloned the top-level JDK repository that you want to build.</p>
|
||||
<ol type="1">
|
||||
<li><p><a href="#getting-the-source-code">Get the complete source code</a>:<br />
|
||||
<code>git clone https://git.openjdk.org/jdk/</code></p></li>
|
||||
<code>git clone https://git.openjdk.java.net/jdk/</code></p></li>
|
||||
<li><p><a href="#running-configure">Run configure</a>:<br />
|
||||
<code>bash configure</code></p>
|
||||
<p>If <code>configure</code> fails due to missing dependencies (to either the <a href="#native-compiler-toolchain-requirements">toolchain</a>, <a href="#build-tools-requirements">build tools</a>, <a href="#external-library-requirements">external libraries</a> or the <a href="#boot-jdk-requirements">boot JDK</a>), most of the time it prints a suggestion on how to resolve the situation on your platform. Follow the instructions, and try running <code>bash configure</code> again.</p></li>
|
||||
@@ -136,9 +131,9 @@
|
||||
<p>If any of these steps failed, or if you want to know more about build requirements or build functionality, please continue reading this document.</p>
|
||||
<h2 id="introduction">Introduction</h2>
|
||||
<p>The JDK is a complex software project. Building it requires a certain amount of technical expertise, a fair number of dependencies on external software, and reasonably powerful hardware.</p>
|
||||
<p>If you just want to use the JDK and not build it yourself, this document is not for you. See for instance <a href="http://openjdk.org/install">OpenJDK installation</a> for some methods of installing a prebuilt JDK.</p>
|
||||
<p>If you just want to use the JDK and not build it yourself, this document is not for you. See for instance <a href="http://openjdk.java.net/install">OpenJDK installation</a> for some methods of installing a prebuilt JDK.</p>
|
||||
<h2 id="getting-the-source-code">Getting the Source Code</h2>
|
||||
<p>Make sure you are getting the correct version. As of JDK 10, the source is no longer split into separate repositories so you only need to clone one single repository. At the <a href="https://git.openjdk.org/">OpenJDK Git site</a> you can see a list of all available repositories. If you want to build an older version, e.g. JDK 11, it is recommended that you get the <code>jdk11u</code> repo, which contains incremental updates, instead of the <code>jdk11</code> repo, which was frozen at JDK 11 GA.</p>
|
||||
<p>Make sure you are getting the correct version. As of JDK 10, the source is no longer split into separate repositories so you only need to clone one single repository. At the <a href="https://git.openjdk.java.net/">OpenJDK Git site</a> you can see a list of all available repositories. If you want to build an older version, e.g. JDK 11, it is recommended that you get the <code>jdk11u</code> repo, which contains incremental updates, instead of the <code>jdk11</code> repo, which was frozen at JDK 11 GA.</p>
|
||||
<p>If you are new to Git, a good place to start is the book <a href="https://git-scm.com/book/en/v2">Pro Git</a>. The rest of this document assumes a working knowledge of Git.</p>
|
||||
<h3 id="special-considerations">Special Considerations</h3>
|
||||
<p>For a smooth building experience, it is recommended that you follow these rules on where and how to check out the source code.</p>
|
||||
@@ -152,7 +147,7 @@
|
||||
<li><p>Do not put the JDK clone in a path under your Cygwin home directory. This is especially important if your user name contains spaces and/or mixed upper and lower case letters.</p></li>
|
||||
<li><p>You need to install a git client. You have two choices, Cygwin git or Git for Windows. Unfortunately there are pros and cons with each choice.</p>
|
||||
<ul>
|
||||
<li><p>The Cygwin <code>git</code> client has no line ending issues and understands Cygwin paths (which are used throughout the JDK build system). However, it does not currently work well with the Skara CLI tooling. Please see the <a href="https://wiki.openjdk.org/display/SKARA/Skara#Skara-Git">Skara wiki on Git clients</a> for up-to-date information about the Skara git client support.</p></li>
|
||||
<li><p>The Cygwin <code>git</code> client has no line ending issues and understands Cygwin paths (which are used throughout the JDK build system). However, it does not currently work well with the Skara CLI tooling. Please see the <a href="https://wiki.openjdk.java.net/display/SKARA/Skara#Skara-Git">Skara wiki on Git clients</a> for up-to-date information about the Skara git client support.</p></li>
|
||||
<li><p>The <a href="https://gitforwindows.org">Git for Windows</a> client has issues with line endings, and do not understand Cygwin paths. It does work well with the Skara CLI tooling, however. To alleviate the line ending problems, make sure you set <code>core.autocrlf</code> to <code>false</code> (this is asked during installation).</p></li>
|
||||
</ul></li>
|
||||
</ul>
|
||||
@@ -167,8 +162,6 @@
|
||||
<h3 id="building-on-aarch64">Building on aarch64</h3>
|
||||
<p>At a minimum, a machine with 8 cores is advisable, as well as 8 GB of RAM. (The more cores to use, the more memory you need.) At least 6 GB of free disk space is required.</p>
|
||||
<p>If you do not have access to sufficiently powerful hardware, it is also possible to use <a href="#cross-compiling">cross-compiling</a>.</p>
|
||||
<h4 id="branch-protection">Branch Protection</h4>
|
||||
<p>In order to use Branch Protection features in the VM, <code>--enable-branch-protection</code> must be used. This option requires C++ compiler support (GCC 9.1.0+ or Clang 10+). The resulting build can be run on both machines with and without support for branch protection in hardware. Branch Protection is only supported for Linux targets.</p>
|
||||
<h3 id="building-on-32-bit-arm">Building on 32-bit arm</h3>
|
||||
<p>This is not recommended. Instead, see the section on <a href="#cross-compiling">Cross-compiling</a>.</p>
|
||||
<h2 id="operating-system-requirements">Operating System Requirements</h2>
|
||||
@@ -198,7 +191,7 @@
|
||||
</tbody>
|
||||
</table>
|
||||
<p>The double version numbers for Linux are due to the hybrid model used at Oracle, where header files and external libraries from an older version are used when building on a more modern version of the OS.</p>
|
||||
<p>The Build Group has a wiki page with <a href="https://wiki.openjdk.org/display/Build/Supported+Build+Platforms">Supported Build Platforms</a>. From time to time, this is updated by contributors to list successes or failures of building on different platforms.</p>
|
||||
<p>The Build Group has a wiki page with <a href="https://wiki.openjdk.java.net/display/Build/Supported+Build+Platforms">Supported Build Platforms</a>. From time to time, this is updated by contributors to list successes or failures of building on different platforms.</p>
|
||||
<h3 id="windows">Windows</h3>
|
||||
<p>Windows XP is not a supported platform, but all newer Windows should be able to build the JDK.</p>
|
||||
<p>On Windows, it is important that you pay attention to the instructions in the <a href="#special-considerations">Special Considerations</a>.</p>
|
||||
@@ -220,7 +213,7 @@
|
||||
<p>Unfortunately, Cygwin can be unreliable in certain circumstances. If you experience build tool crashes or strange issues when building on Windows, please check the Cygwin FAQ on the <a href="https://cygwin.com/faq/faq.html#faq.using.bloda">"BLODA" list</a> and the section on <a href="https://cygwin.com/faq/faq.html#faq.using.fixing-fork-failures">fork() failures</a>.</p>
|
||||
<h4 id="windows-subsystem-for-linux-wsl">Windows Subsystem for Linux (WSL)</h4>
|
||||
<p>Windows 10 1809 or newer is supported due to a dependency on the wslpath utility and support for environment variable sharing through WSLENV. Version 1803 can work but intermittent build failures have been observed.</p>
|
||||
<p>It's possible to build both Windows and Linux binaries from WSL. To build Windows binaries, you must use a Windows boot JDK (located in a Windows-accessible directory). To build Linux binaries, you must use a Linux boot JDK. The default behavior is to build for Windows. To build for Linux, pass <code>--build=x86_64-unknown-linux-gnu --openjdk-target=x86_64-unknown-linux-gnu</code> to <code>configure</code>.</p>
|
||||
<p>It's possible to build both Windows and Linux binaries from WSL. To build Windows binaries, you must use a Windows boot JDK (located in a Windows-accessible directory). To build Linux binaries, you must use a Linux boot JDK. The default behavior is to build for Windows. To build for Linux, pass <code>--build=x86_64-unknown-linux-gnu --host=x86_64-unknown-linux-gnu</code> to <code>configure</code>.</p>
|
||||
<p>If building Windows binaries, the source code must be located in a Windows- accessible directory. This is because Windows executables (such as Visual Studio and the boot JDK) must be able to access the source code. Also, the drive where the source is stored must be mounted as case-insensitive by changing either /etc/fstab or /etc/wsl.conf in WSL. Individual directories may be corrected using the fsutil tool in case the source was cloned before changing the mount options.</p>
|
||||
<p>Note that while it's possible to build on WSL, testing is still not fully supported.</p>
|
||||
<h3 id="macos">macOS</h3>
|
||||
@@ -237,7 +230,7 @@
|
||||
<p>For Alpine Linux, aside from basic tooling, install the GNU versions of some programs:</p>
|
||||
<pre><code>sudo apk add build-base bash grep zip</code></pre>
|
||||
<h3 id="aix">AIX</h3>
|
||||
<p>Please consult the AIX section of the <a href="https://wiki.openjdk.org/display/Build/Supported+Build+Platforms">Supported Build Platforms</a> OpenJDK Build Wiki page for details about which versions of AIX are supported.</p>
|
||||
<p>Please consult the AIX section of the <a href="https://wiki.openjdk.java.net/display/Build/Supported+Build+Platforms">Supported Build Platforms</a> OpenJDK Build Wiki page for details about which versions of AIX are supported.</p>
|
||||
<h2 id="native-compiler-toolchain-requirements">Native Compiler (Toolchain) Requirements</h2>
|
||||
<p>Large portions of the JDK consists of native code, that needs to be compiled to be able to run on the target platform. In theory, toolchain and operating system should be independent factors, but in practice there's more or less a one-to-one correlation between target operating system and toolchain.</p>
|
||||
<table>
|
||||
@@ -277,7 +270,7 @@
|
||||
<tbody>
|
||||
<tr class="odd">
|
||||
<td style="text-align: left;">Linux</td>
|
||||
<td style="text-align: left;">gcc 11.2.0</td>
|
||||
<td style="text-align: left;">gcc 10.2.0</td>
|
||||
</tr>
|
||||
<tr class="even">
|
||||
<td style="text-align: left;">macOS</td>
|
||||
@@ -292,7 +285,7 @@
|
||||
<p>All compilers are expected to be able to compile to the C99 language standard, as some C99 features are used in the source code. Microsoft Visual Studio doesn't fully support C99 so in practice shared code is limited to using C99 features that it does support.</p>
|
||||
<h3 id="gcc">gcc</h3>
|
||||
<p>The minimum accepted version of gcc is 5.0. Older versions will generate a warning by <code>configure</code> and are unlikely to work.</p>
|
||||
<p>The JDK is currently known to be able to compile with at least version 11.2 of gcc.</p>
|
||||
<p>The JDK is currently known to be able to compile with at least version 10.2 of gcc.</p>
|
||||
<p>In general, any version between these two should be usable.</p>
|
||||
<h3 id="clang">clang</h3>
|
||||
<p>The minimum accepted version of clang is 3.5. Older versions will not be accepted by <code>configure</code>.</p>
|
||||
@@ -304,11 +297,11 @@
|
||||
<p>It is advisable to keep an older version of Xcode for building the JDK when updating Xcode. This <a href="http://iosdevelopertips.com/xcode/install-multiple-versions-of-xcode.html">blog page</a> has good suggestions on managing multiple Xcode versions. To use a specific version of Xcode, use <code>xcode-select -s</code> before running <code>configure</code>, or use <code>--with-toolchain-path</code> to point to the version of Xcode to use, e.g. <code>configure --with-toolchain-path=/Applications/Xcode8.app/Contents/Developer/usr/bin</code></p>
|
||||
<p>If you have recently (inadvertently) updated your OS and/or Xcode version, and the JDK can no longer be built, please see the section on <a href="#problems-with-the-build-environment">Problems with the Build Environment</a>, and <a href="#getting-help">Getting Help</a> to find out if there are any recent, non-merged patches available for this update.</p>
|
||||
<h3 id="microsoft-visual-studio">Microsoft Visual Studio</h3>
|
||||
<p>The minimum accepted version is Visual Studio 2019 version 16.8. (Note that this version is often presented as "MSVC 14.28", and reported by cl.exe as 19.28.) Older versions will not be accepted by <code>configure</code> and will not work. The maximum accepted version of Visual Studio is 2022.</p>
|
||||
<p>If you have multiple versions of Visual Studio installed, <code>configure</code> will by default pick the latest. You can request a specific version to be used by setting <code>--with-toolchain-version</code>, e.g. <code>--with-toolchain-version=2022</code>.</p>
|
||||
<p>For aarch64 machines running Windows the minimum accepted version is Visual Studio 2019 (16.8 or higher). For all other platforms the minimum accepted version of Visual Studio is 2017. Older versions will not be accepted by <code>configure</code> and will not work. For all platforms the maximum accepted version of Visual Studio is 2019.</p>
|
||||
<p>If you have multiple versions of Visual Studio installed, <code>configure</code> will by default pick the latest. You can request a specific version to be used by setting <code>--with-toolchain-version</code>, e.g. <code>--with-toolchain-version=2017</code>.</p>
|
||||
<p>If you have Visual Studio installed but <code>configure</code> fails to detect it, it may be because of <a href="#spaces-in-path">spaces in path</a>.</p>
|
||||
<h3 id="ibm-xl-cc">IBM XL C/C++</h3>
|
||||
<p>Please consult the AIX section of the <a href="https://wiki.openjdk.org/display/Build/Supported+Build+Platforms">Supported Build Platforms</a> OpenJDK Build Wiki page for details about which versions of XLC are supported.</p>
|
||||
<p>Please consult the AIX section of the <a href="https://wiki.openjdk.java.net/display/Build/Supported+Build+Platforms">Supported Build Platforms</a> OpenJDK Build Wiki page for details about which versions of XLC are supported.</p>
|
||||
<h2 id="boot-jdk-requirements">Boot JDK Requirements</h2>
|
||||
<p>Paradoxically, building the JDK requires a pre-existing JDK. This is called the "boot JDK". The boot JDK does not, however, have to be a JDK built directly from the source code available in the OpenJDK Community. If you are porting the JDK to a new platform, chances are that there already exists another JDK for that platform that is usable as boot JDK.</p>
|
||||
<p>The rule of thumb is that the boot JDK for building JDK major version <em>N</em> should be a JDK of major version <em>N-1</em>, so for building JDK 9 a JDK 8 would be suitable as boot JDK. However, the JDK should be able to "build itself", so an up-to-date build of the current JDK source is an acceptable alternative. If you are following the <em>N-1</em> rule, make sure you've got the latest update version, since JDK 8 GA might not be able to build JDK 9 on all platforms.</p>
|
||||
@@ -495,7 +488,7 @@
|
||||
<li><code>CONF</code> and <code>CONF_NAME</code> - Selecting the configuration(s) to use. See <a href="#using-multiple-configurations">Using Multiple Configurations</a></li>
|
||||
</ul>
|
||||
<h4 id="test-make-control-variables">Test Make Control Variables</h4>
|
||||
<p>These make control variables only make sense when running tests. Please see <strong>Testing the JDK</strong> (<a href="testing.html">html</a>, <a href="testing.md">markdown</a>) for details.</p>
|
||||
<p>These make control variables only make sense when running tests. Please see <a href="testing.html">Testing the JDK</a> for details.</p>
|
||||
<ul>
|
||||
<li><code>TEST</code></li>
|
||||
<li><code>TEST_JOBS</code></li>
|
||||
@@ -512,8 +505,8 @@
|
||||
<li><code>SPEC_FILTER</code></li>
|
||||
</ul>
|
||||
<h2 id="running-tests">Running Tests</h2>
|
||||
<p>Most of the JDK tests are using the <a href="http://openjdk.org/jtreg">JTReg</a> test framework. Make sure that your configuration knows where to find your installation of JTReg. If this is not picked up automatically, use the <code>--with-jtreg=<path to jtreg home></code> option to point to the JTReg framework. Note that this option should point to the JTReg home, i.e. the top directory, containing <code>lib/jtreg.jar</code> etc.</p>
|
||||
<p>The <a href="https://wiki.openjdk.org/display/Adoption">Adoption Group</a> provides recent builds of jtreg <a href="https://ci.adoptopenjdk.net/view/Dependencies/job/dependency_pipeline/lastSuccessfulBuild/artifact/jtreg/">here</a>. Download the latest <code>.tar.gz</code> file, unpack it, and point <code>--with-jtreg</code> to the <code>jtreg</code> directory that you just unpacked.</p>
|
||||
<p>Most of the JDK tests are using the <a href="http://openjdk.java.net/jtreg">JTReg</a> test framework. Make sure that your configuration knows where to find your installation of JTReg. If this is not picked up automatically, use the <code>--with-jtreg=<path to jtreg home></code> option to point to the JTReg framework. Note that this option should point to the JTReg home, i.e. the top directory, containing <code>lib/jtreg.jar</code> etc.</p>
|
||||
<p>The <a href="https://wiki.openjdk.java.net/display/Adoption">Adoption Group</a> provides recent builds of jtreg <a href="https://ci.adoptopenjdk.net/view/Dependencies/job/dependency_pipeline/lastSuccessfulBuild/artifact/jtreg/">here</a>. Download the latest <code>.tar.gz</code> file, unpack it, and point <code>--with-jtreg</code> to the <code>jtreg</code> directory that you just unpacked.</p>
|
||||
<p>Building of Hotspot Gtest suite requires the source code of Google Test framework. The top directory, which contains both <code>googletest</code> and <code>googlemock</code> directories, should be specified via <code>--with-gtest</code>. The supported version of Google Test is 1.8.1, whose source code can be obtained:</p>
|
||||
<ul>
|
||||
<li>by downloading and unpacking the source bundle from <a href="https://github.com/google/googletest/releases/tag/release-1.8.1">here</a></li>
|
||||
@@ -521,13 +514,7 @@
|
||||
</ul>
|
||||
<p>To execute the most basic tests (tier 1), use:</p>
|
||||
<pre><code>make run-test-tier1</code></pre>
|
||||
<p>For more details on how to run tests, please see <strong>Testing the JDK</strong> (<a href="testing.html">html</a>, <a href="testing.md">markdown</a>).</p>
|
||||
<h2 id="signing">Signing</h2>
|
||||
<h3 id="macos-1">macOS</h3>
|
||||
<p>Modern versions of macOS require applications to be signed and notarizied before distribution. See Apple's documentation for more background on what this means and how it works. To help support this, the JDK build can be configured to automatically sign all native binaries, and the JDK bundle, with all the options needed for successful notarization, as well as all the entitlements required by the JDK. To enable <code>hardened</code> signing, use configure parameter <code>--with-macosx-codesign=hardened</code> and configure the signing identity you wish to use with <code>--with-macosx-codesign-identity=<identity></code>. The identity refers to a signing identity from Apple that needs to be preinstalled on the build host.</p>
|
||||
<p>When not signing for distribution with the hardened option, the JDK build will still attempt to perform <code>adhoc</code> signing to add the special entitlement <code>com.apple.security.get-task-allow</code> to each binary. This entitlement is required to be able to dump core files from a process. Note that adding this entitlement makes the build invalid for notarization, so it is only added when signing in <code>debug</code> mode. To explicitly enable this kind of adhoc signing, use configure parameter <code>--with-macosx-codesign=debug</code>. It will be enabled by default in most cases.</p>
|
||||
<p>It's also possible to completely disable any explicit codesign operations done by the JDK build using the configure parameter <code>--without-macosx-codesign</code>. The exact behavior then depends on the architecture. For macOS on x64, it (at least at the time of this writing) results in completely unsigned binaries that should still work fine for development and debugging purposes. On aarch64, the Xcode linker will apply a default "adhoc" signing, without any entitlements. Such a build does not allow dumping core files.</p>
|
||||
<p>The default mode "auto" will try for <code>hardened</code> signing if the debug level is <code>release</code> and either the default identity or the specified identity is valid. If hardened isn't possible, then <code>debug</code> signing is chosen if it works. If nothing works, the codesign build step is disabled.</p>
|
||||
<p>For more details on how to run tests, please see the <a href="testing.html">Testing the JDK</a> document.</p>
|
||||
<h2 id="cross-compiling">Cross-compiling</h2>
|
||||
<p>Cross-compiling means using one platform (the <em>build</em> platform) to generate output that can ran on another platform (the <em>target</em> platform).</p>
|
||||
<p>The typical reason for cross-compiling is that the build is performed on a more powerful desktop computer, but the resulting binaries will be able to run on a different, typically low-performing system. Most of the complications that arise when building for embedded is due to this separation of <em>build</em> and <em>target</em> systems.</p>
|
||||
@@ -580,8 +567,7 @@ x86_64-linux-gnu-to-ppc64le-linux-gnu</code></pre>
|
||||
<p>To be able to build, we need a "Build JDK", which is a JDK built from the current sources (that is, the same as the end result of the entire build process), but able to run on the <em>build</em> system, and not the <em>target</em> system. (In contrast, the Boot JDK should be from an older release, e.g. JDK 8 when building JDK 9.)</p>
|
||||
<p>The build process will create a minimal Build JDK for you, as part of building. To speed up the build, you can use <code>--with-build-jdk</code> to <code>configure</code> to point to a pre-built Build JDK. Please note that the build result is unpredictable, and can possibly break in subtle ways, if the Build JDK does not <strong>exactly</strong> match the current sources.</p>
|
||||
<h3 id="specifying-the-target-platform">Specifying the Target Platform</h3>
|
||||
<p>You <em>must</em> specify the target platform when cross-compiling. Doing so will also automatically turn the build into a cross-compiling mode. The simplest way to do this is to use the <code>--openjdk-target</code> argument, e.g. <code>--openjdk-target=arm-linux-gnueabihf</code>. or <code>--openjdk-target=aarch64-oe-linux</code>. This will automatically set the <code>--host</code> and <code>--target</code> options for autoconf, which can otherwise be confusing. (In autoconf terminology, the "target" is known as "host", and "target" is used for building a Canadian cross-compiler.)</p>
|
||||
<p>If <code>--build</code> has not been explicitly passed to configure, <code>--openjdk-target</code> will autodetect the build platform and internally set the flag automatically, otherwise the platform that was explicitly passed to <code>--build</code> will be used instead.</p>
|
||||
<p>You <em>must</em> specify the target platform when cross-compiling. Doing so will also automatically turn the build into a cross-compiling mode. The simplest way to do this is to use the <code>--openjdk-target</code> argument, e.g. <code>--openjdk-target=arm-linux-gnueabihf</code>. or <code>--openjdk-target=aarch64-oe-linux</code>. This will automatically set the <code>--build</code>, <code>--host</code> and <code>--target</code> options for autoconf, which can otherwise be confusing. (In autoconf terminology, the "target" is known as "host", and "target" is used for building a Canadian cross-compiler.)</p>
|
||||
<h3 id="toolchain-considerations">Toolchain Considerations</h3>
|
||||
<p>You will need two copies of your toolchain, one which generates output that can run on the target system (the normal, or <em>target</em>, toolchain), and one that generates output that can run on the build system (the <em>build</em> toolchain). Note that cross-compiling is only supported for gcc at the time being. The gcc standard is to prefix cross-compiling toolchains with the target denominator. If you follow this standard, <code>configure</code> is likely to pick up the toolchain correctly.</p>
|
||||
<p>The <em>build</em> toolchain will be autodetected just the same way the normal <em>build</em>/<em>target</em> toolchain will be autodetected when not cross-compiling. If this is not what you want, or if the autodetection fails, you can specify a devkit containing the <em>build</em> toolchain using <code>--with-build-devkit</code> to <code>configure</code>, or by giving <code>BUILD_CC</code> and <code>BUILD_CXX</code> arguments.</p>
|
||||
@@ -820,7 +806,7 @@ ls build/linux-aarch64-server-release/</code></pre></li>
|
||||
<p><a href="http://github.com/icecc/icecream">icecc/icecream</a> is a simple way to setup a distributed compiler network. If you have multiple machines available for building the JDK, you can drastically cut individual build times by utilizing it.</p>
|
||||
<p>To use, setup an icecc network, and install icecc on the build machine. Then run <code>configure</code> using <code>--enable-icecc</code>.</p>
|
||||
<h3 id="using-sjavac">Using sjavac</h3>
|
||||
<p>To speed up compilation of Java code, especially during incremental compilations, the sjavac server is automatically enabled in the configuration step by default. To explicitly enable or disable sjavac, use either <code>--enable-javac-server</code> or <code>--disable-javac-server</code>.</p>
|
||||
<p>To speed up Java compilation, especially incremental compilations, you can try the experimental sjavac compiler by using <code>--enable-sjavac</code>.</p>
|
||||
<h3 id="building-the-right-target">Building the Right Target</h3>
|
||||
<p>Selecting the proper target to build can have dramatic impact on build time. For normal usage, <code>jdk</code> or the default target is just fine. You only need to build <code>images</code> for shipping, or if your tests require it.</p>
|
||||
<p>See also <a href="#using-fine-grained-make-targets">Using Fine-Grained Make Targets</a> on how to build an even smaller subset of the product.</p>
|
||||
@@ -896,32 +882,8 @@ spawn failed</code></pre>
|
||||
<h4 id="spaces-in-path">Spaces in Path</h4>
|
||||
<p>On Windows, when configuring, <code>fixpath.sh</code> may report that some directory names have spaces. Usually, it assumes those directories have <a href="https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/fsutil-8dot3name">short paths</a>. You can run <code>fsutil file setshortname</code> in <code>cmd</code> on certain directories, such as <code>Microsoft Visual Studio</code> or <code>Windows Kits</code>, to assign arbitrary short paths so <code>configure</code> can access them.</p>
|
||||
<h3 id="getting-help">Getting Help</h3>
|
||||
<p>If none of the suggestions in this document helps you, or if you find what you believe is a bug in the build system, please contact the Build Group by sending a mail to <a href="mailto:build-dev@openjdk.org">build-dev@openjdk.org</a>. Please include the relevant parts of the configure and/or build log.</p>
|
||||
<p>If none of the suggestions in this document helps you, or if you find what you believe is a bug in the build system, please contact the Build Group by sending a mail to <a href="mailto:build-dev@openjdk.java.net">build-dev@openjdk.java.net</a>. Please include the relevant parts of the configure and/or build log.</p>
|
||||
<p>If you need general help or advice about developing for the JDK, you can also contact the Adoption Group. See the section on <a href="#contributing-to-openjdk">Contributing to OpenJDK</a> for more information.</p>
|
||||
<h2 id="reproducible-builds">Reproducible Builds</h2>
|
||||
<p>Build reproducibility is the property of getting exactly the same bits out when building, every time, independent on who builds the product, or where. This is for many reasons a harder goal than it initially appears, but it is an important goal, for security reasons and others. Please see <a href="https://reproducible-builds.org">Reproducible Builds</a> for more information about the background and reasons for reproducible builds.</p>
|
||||
<p>Currently, it is not possible to build OpenJDK fully reproducibly, but getting there is an ongoing effort.</p>
|
||||
<p>An absolute prerequisite for building reproducible is to speficy a fixed build time, since time stamps are embedded in many file formats. This is done by setting the <code>SOURCE_DATE_EPOCH</code> environment variable, which is an <a href="https://reproducible-builds.org/docs/source-date-epoch/">industry standard</a>, that many tools, such as gcc, recognize, and use in place of the current time when generating output.</p>
|
||||
<p>To generate reproducible builds, you must set <code>SOURCE_DATE_EPOCH</code> before running <code>configure</code>. The value in <code>SOURCE_DATE_EPOCH</code> will be stored in the configuration, and used by <code>make</code>. Setting <code>SOURCE_DATE_EPOCH</code> before running <code>make</code> will have no effect on the build.</p>
|
||||
<p>You must also make sure your build does not rely on <code>configure</code>'s default adhoc version strings. Default adhoc version strings <code>OPT</code> segment include user name and source directory. You can either override just the <code>OPT</code> segment using <code>--with-version-opt=<any fixed string></code>, or you can specify the entire version string using <code>--with-version-string=<your version></code>.</p>
|
||||
<p>This is a typical example of how to build the JDK in a reproducible way:</p>
|
||||
<pre><code>export SOURCE_DATE_EPOCH=946684800
|
||||
bash configure --with-version-opt=adhoc
|
||||
make</code></pre>
|
||||
<p>Note that regardless if you specify a source date for <code>configure</code> or not, the JDK build system will set <code>SOURCE_DATE_EPOCH</code> for all build tools when building. If <code>--with-source-date</code> has the value <code>current</code> (which is the default unless <code>SOURCE_DATE_EPOCH</code> is found by in the environment by <code>configure</code>), the source date value will be determined at configure time.</p>
|
||||
<p>There are several aspects of reproducible builds that can be individually adjusted by <code>configure</code> arguments. If any of these are given, they will override the value derived from <code>SOURCE_DATE_EPOCH</code>. These arguments are:</p>
|
||||
<ul>
|
||||
<li><p><code>--with-source-date</code></p>
|
||||
<p>This option controls how the JDK build sets <code>SOURCE_DATE_EPOCH</code> when building. It can be set to a value describing a date, either an epoch based timestamp as an integer, or a valid ISO-8601 date.</p>
|
||||
<p>It can also be set to one of the special values <code>current</code>, <code>updated</code> or <code>version</code>. <code>current</code> means that the time of running <code>configure</code> will be used. <code>version</code> will use the nominal release date for the current JDK version. <code>updated</code>, which means that <code>SOURCE_DATE_EPOCH</code> will be set to the current time each time you are running <code>make</code>. All choices, except for <code>updated</code>, will set a fixed value for the source date timestamp.</p>
|
||||
<p>When <code>SOURCE_DATE_EPOCH</code> is set, the default value for <code>--with-source-date</code> will be the value given by <code>SOURCE_DATE_EPOCH</code>. Otherwise, the default value is <code>current</code>.</p></li>
|
||||
<li><p><code>--with-hotspot-build-time</code></p>
|
||||
<p>This option controls the build time string that will be included in the hotspot library (<code>libjvm.so</code> or <code>jvm.dll</code>). When the source date is fixed (e.g. by setting <code>SOURCE_DATE_EPOCH</code>), the default value for <code>--with-hotspot-build-time</code> will be an ISO 8601 representation of that time stamp. Otherwise the default value will be the current time when building hotspot.</p></li>
|
||||
<li><p><code>--with-copyright-year</code></p>
|
||||
<p>This option controls the copyright year in some generated text files. When the source date is fixed (e.g. by setting <code>SOURCE_DATE_EPOCH</code>), the default value for <code>--with-copyright-year</code> will be the year of that time stamp. Otherwise the default is the current year at the time of running configure. This can be overridden by <code>--with-copyright-year=<year></code>.</p></li>
|
||||
<li><p><code>--enable-reproducible-build</code></p>
|
||||
<p>This option controls some additional behavior needed to make the build reproducible. When the source date is fixed (e.g. by setting <code>SOURCE_DATE_EPOCH</code>), this flag will be turned on by default. Otherwise, the value is determined by heuristics. If it is explicitly turned off, the build might not be reproducible.</p></li>
|
||||
</ul>
|
||||
<h2 id="hints-and-suggestions-for-advanced-users">Hints and Suggestions for Advanced Users</h2>
|
||||
<h3 id="bash-completion">Bash Completion</h3>
|
||||
<p>The <code>configure</code> and <code>make</code> commands tries to play nice with bash command-line completion (using <code><tab></code> or <code><tab><tab></code>). To use this functionality, make sure you enable completion in your <code>~/.bashrc</code> (see instructions for bash in your operating system).</p>
|
||||
@@ -1037,13 +999,11 @@ test-support/</code></pre>
|
||||
<pre><code>make COMPARE_BUILD=CONF=--enable-new-hotspot-feature:MAKE=hotspot</code></pre>
|
||||
<p>See <code>make/InitSupport.gmk</code> for details on how to use <code>COMPARE_BUILD</code>.</p>
|
||||
<p>To analyze build performance, run with <code>LOG=trace</code> and check <code>$BUILD/build-trace-time.log</code>. Use <code>JOBS=1</code> to avoid parallelism.</p>
|
||||
<p>Please check that you adhere to the <a href="http://openjdk.org/groups/build/doc/code-conventions.html">Code Conventions for the Build System</a> before submitting patches.</p>
|
||||
<p>Please check that you adhere to the <a href="http://openjdk.java.net/groups/build/doc/code-conventions.html">Code Conventions for the Build System</a> before submitting patches.</p>
|
||||
<h2 id="contributing-to-the-jdk">Contributing to the JDK</h2>
|
||||
<p>So, now you've built your JDK, and made your first patch, and want to contribute it back to the OpenJDK Community.</p>
|
||||
<p>First of all: Thank you! We gladly welcome your contribution. However, please bear in mind that the JDK is a massive project, and we must ask you to follow our rules and guidelines to be able to accept your contribution.</p>
|
||||
<p>The official place to start is the <a href="http://openjdk.org/contribute/">'How to contribute' page</a>. There is also an official (but somewhat outdated and skimpy on details) <a href="http://openjdk.org/guide/">Developer's Guide</a>.</p>
|
||||
<p>If this seems overwhelming to you, the Adoption Group is there to help you! A good place to start is their <a href="https://wiki.openjdk.org/display/Adoption/New+Contributor">'New Contributor' page</a>, or start reading the comprehensive <a href="https://adoptopenjdk.gitbooks.io/adoptopenjdk-getting-started-kit/en/">Getting Started Kit</a>. The Adoption Group will also happily answer any questions you have about contributing. Contact them by <a href="http://mail.openjdk.org/mailman/listinfo/adoption-discuss">mail</a> or <a href="http://openjdk.org/irc/">IRC</a>.</p>
|
||||
<h2 id="editing-this-document">Editing this document</h2>
|
||||
<p>If you want to contribute changes to this document, edit <code>doc/building.md</code> and then run <code>make update-build-docs</code> to generate the same changes in <code>doc/building.html</code>.</p>
|
||||
<p>The official place to start is the <a href="http://openjdk.java.net/contribute/">'How to contribute' page</a>. There is also an official (but somewhat outdated and skimpy on details) <a href="http://openjdk.java.net/guide/">Developer's Guide</a>.</p>
|
||||
<p>If this seems overwhelming to you, the Adoption Group is there to help you! A good place to start is their <a href="https://wiki.openjdk.java.net/display/Adoption/New+Contributor">'New Contributor' page</a>, or start reading the comprehensive <a href="https://adoptopenjdk.gitbooks.io/adoptopenjdk-getting-started-kit/en/">Getting Started Kit</a>. The Adoption Group will also happily answer any questions you have about contributing. Contact them by <a href="http://mail.openjdk.java.net/mailman/listinfo/adoption-discuss">mail</a> or <a href="http://openjdk.java.net/irc/">IRC</a>.</p>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
208
doc/building.md
208
doc/building.md
@@ -7,7 +7,7 @@ the time. They assume that you have installed Git (and Cygwin if running
|
||||
on Windows) and cloned the top-level JDK repository that you want to build.
|
||||
|
||||
1. [Get the complete source code](#getting-the-source-code): \
|
||||
`git clone https://git.openjdk.org/jdk/`
|
||||
`git clone https://git.openjdk.java.net/jdk/`
|
||||
|
||||
2. [Run configure](#running-configure): \
|
||||
`bash configure`
|
||||
@@ -40,14 +40,14 @@ reasonably powerful hardware.
|
||||
|
||||
If you just want to use the JDK and not build it yourself, this document is not
|
||||
for you. See for instance [OpenJDK installation](
|
||||
http://openjdk.org/install) for some methods of installing a prebuilt
|
||||
http://openjdk.java.net/install) for some methods of installing a prebuilt
|
||||
JDK.
|
||||
|
||||
## Getting the Source Code
|
||||
|
||||
Make sure you are getting the correct version. As of JDK 10, the source is no
|
||||
longer split into separate repositories so you only need to clone one single
|
||||
repository. At the [OpenJDK Git site](https://git.openjdk.org/) you
|
||||
repository. At the [OpenJDK Git site](https://git.openjdk.java.net/) you
|
||||
can see a list of all available repositories. If you want to build an older version,
|
||||
e.g. JDK 11, it is recommended that you get the `jdk11u` repo, which contains
|
||||
incremental updates, instead of the `jdk11` repo, which was frozen at JDK 11 GA.
|
||||
@@ -96,7 +96,7 @@ on where and how to check out the source code.
|
||||
Cygwin paths (which are used throughout the JDK build system).
|
||||
However, it does not currently work well with the Skara CLI tooling.
|
||||
Please see the [Skara wiki on Git clients](
|
||||
https://wiki.openjdk.org/display/SKARA/Skara#Skara-Git) for
|
||||
https://wiki.openjdk.java.net/display/SKARA/Skara#Skara-Git) for
|
||||
up-to-date information about the Skara git client support.
|
||||
|
||||
* The [Git for Windows](https://gitforwindows.org) client has issues
|
||||
@@ -135,14 +135,6 @@ space is required.
|
||||
If you do not have access to sufficiently powerful hardware, it is also
|
||||
possible to use [cross-compiling](#cross-compiling).
|
||||
|
||||
#### Branch Protection
|
||||
|
||||
In order to use Branch Protection features in the VM, `--enable-branch-protection`
|
||||
must be used. This option requires C++ compiler support (GCC 9.1.0+ or Clang
|
||||
10+). The resulting build can be run on both machines with and without support
|
||||
for branch protection in hardware. Branch Protection is only supported for
|
||||
Linux targets.
|
||||
|
||||
### Building on 32-bit arm
|
||||
|
||||
This is not recommended. Instead, see the section on [Cross-compiling](
|
||||
@@ -173,7 +165,7 @@ used at Oracle, where header files and external libraries from an older version
|
||||
are used when building on a more modern version of the OS.
|
||||
|
||||
The Build Group has a wiki page with [Supported Build Platforms](
|
||||
https://wiki.openjdk.org/display/Build/Supported+Build+Platforms). From
|
||||
https://wiki.openjdk.java.net/display/Build/Supported+Build+Platforms). From
|
||||
time to time, this is updated by contributors to list successes or failures of
|
||||
building on different platforms.
|
||||
|
||||
@@ -244,8 +236,8 @@ It's possible to build both Windows and Linux binaries from WSL. To build
|
||||
Windows binaries, you must use a Windows boot JDK (located in a
|
||||
Windows-accessible directory). To build Linux binaries, you must use a Linux
|
||||
boot JDK. The default behavior is to build for Windows. To build for Linux, pass
|
||||
`--build=x86_64-unknown-linux-gnu --openjdk-target=x86_64-unknown-linux-gnu`
|
||||
to `configure`.
|
||||
`--build=x86_64-unknown-linux-gnu --host=x86_64-unknown-linux-gnu` to
|
||||
`configure`.
|
||||
|
||||
If building Windows binaries, the source code must be located in a Windows-
|
||||
accessible directory. This is because Windows executables (such as Visual Studio
|
||||
@@ -303,7 +295,7 @@ sudo apk add build-base bash grep zip
|
||||
### AIX
|
||||
|
||||
Please consult the AIX section of the [Supported Build Platforms](
|
||||
https://wiki.openjdk.org/display/Build/Supported+Build+Platforms) OpenJDK
|
||||
https://wiki.openjdk.java.net/display/Build/Supported+Build+Platforms) OpenJDK
|
||||
Build Wiki page for details about which versions of AIX are supported.
|
||||
|
||||
## Native Compiler (Toolchain) Requirements
|
||||
@@ -329,7 +321,7 @@ issues.
|
||||
|
||||
Operating system Toolchain version
|
||||
------------------ -------------------------------------------------------
|
||||
Linux gcc 11.2.0
|
||||
Linux gcc 10.2.0
|
||||
macOS Apple Xcode 10.1 (using clang 10.0.0)
|
||||
Windows Microsoft Visual Studio 2022 update 17.1.0
|
||||
|
||||
@@ -343,7 +335,7 @@ features that it does support.
|
||||
The minimum accepted version of gcc is 5.0. Older versions will generate a warning
|
||||
by `configure` and are unlikely to work.
|
||||
|
||||
The JDK is currently known to be able to compile with at least version 11.2 of
|
||||
The JDK is currently known to be able to compile with at least version 10.2 of
|
||||
gcc.
|
||||
|
||||
In general, any version between these two should be usable.
|
||||
@@ -382,14 +374,13 @@ available for this update.
|
||||
|
||||
### Microsoft Visual Studio
|
||||
|
||||
The minimum accepted version is Visual Studio 2019 version 16.8. (Note that this
|
||||
version is often presented as "MSVC 14.28", and reported by cl.exe as 19.28.)
|
||||
Older versions will not be accepted by `configure` and will not work. The
|
||||
maximum accepted version of Visual Studio is 2022.
|
||||
The minimum accepted version of Visual Studio is 2017. Older versions will not
|
||||
be accepted by `configure` and will not work. The maximum accepted
|
||||
version of Visual Studio is 2019.
|
||||
|
||||
If you have multiple versions of Visual Studio installed, `configure` will by
|
||||
default pick the latest. You can request a specific version to be used by
|
||||
setting `--with-toolchain-version`, e.g. `--with-toolchain-version=2022`.
|
||||
setting `--with-toolchain-version`, e.g. `--with-toolchain-version=2017`.
|
||||
|
||||
If you have Visual Studio installed but `configure` fails to detect it, it may
|
||||
be because of [spaces in path](#spaces-in-path).
|
||||
@@ -397,7 +388,7 @@ be because of [spaces in path](#spaces-in-path).
|
||||
### IBM XL C/C++
|
||||
|
||||
Please consult the AIX section of the [Supported Build Platforms](
|
||||
https://wiki.openjdk.org/display/Build/Supported+Build+Platforms) OpenJDK
|
||||
https://wiki.openjdk.java.net/display/Build/Supported+Build+Platforms) OpenJDK
|
||||
Build Wiki page for details about which versions of XLC are supported.
|
||||
|
||||
|
||||
@@ -827,7 +818,7 @@ configuration, as opposed to the "configure time" configuration.
|
||||
#### Test Make Control Variables
|
||||
|
||||
These make control variables only make sense when running tests. Please see
|
||||
**Testing the JDK** ([html](testing.html), [markdown](testing.md)) for details.
|
||||
[Testing the JDK](testing.html) for details.
|
||||
|
||||
* `TEST`
|
||||
* `TEST_JOBS`
|
||||
@@ -848,14 +839,14 @@ Suggestions for Advanced Users](#hints-and-suggestions-for-advanced-users) and
|
||||
|
||||
## Running Tests
|
||||
|
||||
Most of the JDK tests are using the [JTReg](http://openjdk.org/jtreg)
|
||||
Most of the JDK tests are using the [JTReg](http://openjdk.java.net/jtreg)
|
||||
test framework. Make sure that your configuration knows where to find your
|
||||
installation of JTReg. If this is not picked up automatically, use the
|
||||
`--with-jtreg=<path to jtreg home>` option to point to the JTReg framework.
|
||||
Note that this option should point to the JTReg home, i.e. the top directory,
|
||||
containing `lib/jtreg.jar` etc.
|
||||
|
||||
The [Adoption Group](https://wiki.openjdk.org/display/Adoption) provides
|
||||
The [Adoption Group](https://wiki.openjdk.java.net/display/Adoption) provides
|
||||
recent builds of jtreg [here](
|
||||
https://ci.adoptopenjdk.net/view/Dependencies/job/dependency_pipeline/lastSuccessfulBuild/artifact/jtreg/).
|
||||
Download the latest `.tar.gz` file, unpack it, and point `--with-jtreg` to the
|
||||
@@ -874,44 +865,8 @@ To execute the most basic tests (tier 1), use:
|
||||
make run-test-tier1
|
||||
```
|
||||
|
||||
For more details on how to run tests, please see **Testing the JDK**
|
||||
([html](testing.html), [markdown](testing.md)).
|
||||
|
||||
## Signing
|
||||
|
||||
### macOS
|
||||
|
||||
Modern versions of macOS require applications to be signed and notarizied before
|
||||
distribution. See Apple's documentation for more background on what this means
|
||||
and how it works. To help support this, the JDK build can be configured to
|
||||
automatically sign all native binaries, and the JDK bundle, with all the options
|
||||
needed for successful notarization, as well as all the entitlements required by
|
||||
the JDK. To enable `hardened` signing, use configure parameter
|
||||
`--with-macosx-codesign=hardened` and configure the signing identity you wish to
|
||||
use with `--with-macosx-codesign-identity=<identity>`. The identity refers to a
|
||||
signing identity from Apple that needs to be preinstalled on the build host.
|
||||
|
||||
When not signing for distribution with the hardened option, the JDK build will
|
||||
still attempt to perform `adhoc` signing to add the special entitlement
|
||||
`com.apple.security.get-task-allow` to each binary. This entitlement is required
|
||||
to be able to dump core files from a process. Note that adding this entitlement
|
||||
makes the build invalid for notarization, so it is only added when signing in
|
||||
`debug` mode. To explicitly enable this kind of adhoc signing, use configure
|
||||
parameter `--with-macosx-codesign=debug`. It will be enabled by default in most
|
||||
cases.
|
||||
|
||||
It's also possible to completely disable any explicit codesign operations done
|
||||
by the JDK build using the configure parameter `--without-macosx-codesign`.
|
||||
The exact behavior then depends on the architecture. For macOS on x64, it (at
|
||||
least at the time of this writing) results in completely unsigned binaries that
|
||||
should still work fine for development and debugging purposes. On aarch64, the
|
||||
Xcode linker will apply a default "adhoc" signing, without any entitlements.
|
||||
Such a build does not allow dumping core files.
|
||||
|
||||
The default mode "auto" will try for `hardened` signing if the debug level is
|
||||
`release` and either the default identity or the specified identity is valid.
|
||||
If hardened isn't possible, then `debug` signing is chosen if it works. If
|
||||
nothing works, the codesign build step is disabled.
|
||||
For more details on how to run tests, please see the [Testing
|
||||
the JDK](testing.html) document.
|
||||
|
||||
## Cross-compiling
|
||||
|
||||
@@ -1022,16 +977,11 @@ You *must* specify the target platform when cross-compiling. Doing so will also
|
||||
automatically turn the build into a cross-compiling mode. The simplest way to
|
||||
do this is to use the `--openjdk-target` argument, e.g.
|
||||
`--openjdk-target=arm-linux-gnueabihf`. or `--openjdk-target=aarch64-oe-linux`.
|
||||
This will automatically set the `--host` and `--target` options for
|
||||
This will automatically set the `--build`, `--host` and `--target` options for
|
||||
autoconf, which can otherwise be confusing. (In autoconf terminology, the
|
||||
"target" is known as "host", and "target" is used for building a Canadian
|
||||
cross-compiler.)
|
||||
|
||||
If `--build` has not been explicitly passed to configure, `--openjdk-target`
|
||||
will autodetect the build platform and internally set the flag automatically,
|
||||
otherwise the platform that was explicitly passed to `--build` will be used
|
||||
instead.
|
||||
|
||||
### Toolchain Considerations
|
||||
|
||||
You will need two copies of your toolchain, one which generates output that can
|
||||
@@ -1332,10 +1282,8 @@ run `configure` using `--enable-icecc`.
|
||||
|
||||
### Using sjavac
|
||||
|
||||
To speed up compilation of Java code, especially during incremental compilations,
|
||||
the sjavac server is automatically enabled in the configuration step by default.
|
||||
To explicitly enable or disable sjavac, use either `--enable-javac-server`
|
||||
or `--disable-javac-server`.
|
||||
To speed up Java compilation, especially incremental compilations, you can try
|
||||
the experimental sjavac compiler by using `--enable-sjavac`.
|
||||
|
||||
### Building the Right Target
|
||||
|
||||
@@ -1548,103 +1496,13 @@ You can run `fsutil file setshortname` in `cmd` on certain directories, such as
|
||||
|
||||
If none of the suggestions in this document helps you, or if you find what you
|
||||
believe is a bug in the build system, please contact the Build Group by sending
|
||||
a mail to [build-dev@openjdk.org](mailto:build-dev@openjdk.org).
|
||||
a mail to [build-dev@openjdk.java.net](mailto:build-dev@openjdk.java.net).
|
||||
Please include the relevant parts of the configure and/or build log.
|
||||
|
||||
If you need general help or advice about developing for the JDK, you can also
|
||||
contact the Adoption Group. See the section on [Contributing to OpenJDK](
|
||||
#contributing-to-openjdk) for more information.
|
||||
|
||||
## Reproducible Builds
|
||||
|
||||
Build reproducibility is the property of getting exactly the same bits out when
|
||||
building, every time, independent on who builds the product, or where. This is
|
||||
for many reasons a harder goal than it initially appears, but it is an important
|
||||
goal, for security reasons and others. Please see [Reproducible Builds](
|
||||
https://reproducible-builds.org) for more information about the background and
|
||||
reasons for reproducible builds.
|
||||
|
||||
Currently, it is not possible to build OpenJDK fully reproducibly, but getting
|
||||
there is an ongoing effort.
|
||||
|
||||
An absolute prerequisite for building reproducible is to speficy a fixed build
|
||||
time, since time stamps are embedded in many file formats. This is done by
|
||||
setting the `SOURCE_DATE_EPOCH` environment variable, which is an [industry
|
||||
standard]( https://reproducible-builds.org/docs/source-date-epoch/), that many
|
||||
tools, such as gcc, recognize, and use in place of the current time when
|
||||
generating output.
|
||||
|
||||
To generate reproducible builds, you must set `SOURCE_DATE_EPOCH` before running
|
||||
`configure`. The value in `SOURCE_DATE_EPOCH` will be stored in the
|
||||
configuration, and used by `make`. Setting `SOURCE_DATE_EPOCH` before running
|
||||
`make` will have no effect on the build.
|
||||
|
||||
You must also make sure your build does not rely on `configure`'s default adhoc
|
||||
version strings. Default adhoc version strings `OPT` segment include user name
|
||||
and source directory. You can either override just the `OPT` segment using
|
||||
`--with-version-opt=<any fixed string>`, or you can specify the entire version
|
||||
string using `--with-version-string=<your version>`.
|
||||
|
||||
This is a typical example of how to build the JDK in a reproducible way:
|
||||
|
||||
```
|
||||
export SOURCE_DATE_EPOCH=946684800
|
||||
bash configure --with-version-opt=adhoc
|
||||
make
|
||||
```
|
||||
|
||||
Note that regardless if you specify a source date for `configure` or not, the
|
||||
JDK build system will set `SOURCE_DATE_EPOCH` for all build tools when building.
|
||||
If `--with-source-date` has the value `current` (which is the default unless
|
||||
`SOURCE_DATE_EPOCH` is found by in the environment by `configure`), the source
|
||||
date value will be determined at configure time.
|
||||
|
||||
There are several aspects of reproducible builds that can be individually
|
||||
adjusted by `configure` arguments. If any of these are given, they will override
|
||||
the value derived from `SOURCE_DATE_EPOCH`. These arguments are:
|
||||
|
||||
* `--with-source-date`
|
||||
|
||||
This option controls how the JDK build sets `SOURCE_DATE_EPOCH` when
|
||||
building. It can be set to a value describing a date, either an epoch based
|
||||
timestamp as an integer, or a valid ISO-8601 date.
|
||||
|
||||
It can also be set to one of the special values `current`, `updated` or
|
||||
`version`. `current` means that the time of running `configure` will be
|
||||
used. `version` will use the nominal release date for the current JDK
|
||||
version. `updated`, which means that `SOURCE_DATE_EPOCH` will be set to the
|
||||
current time each time you are running `make`. All choices, except for
|
||||
`updated`, will set a fixed value for the source date timestamp.
|
||||
|
||||
When `SOURCE_DATE_EPOCH` is set, the default value for `--with-source-date`
|
||||
will be the value given by `SOURCE_DATE_EPOCH`. Otherwise, the default value
|
||||
is `current`.
|
||||
|
||||
* `--with-hotspot-build-time`
|
||||
|
||||
This option controls the build time string that will be included in the
|
||||
hotspot library (`libjvm.so` or `jvm.dll`). When the source date is fixed
|
||||
(e.g. by setting `SOURCE_DATE_EPOCH`), the default value for
|
||||
`--with-hotspot-build-time` will be an ISO 8601 representation of that time
|
||||
stamp. Otherwise the default value will be the current time when building
|
||||
hotspot.
|
||||
|
||||
* `--with-copyright-year`
|
||||
|
||||
This option controls the copyright year in some generated text files. When
|
||||
the source date is fixed (e.g. by setting `SOURCE_DATE_EPOCH`), the default
|
||||
value for `--with-copyright-year` will be the year of that time stamp.
|
||||
Otherwise the default is the current year at the time of running configure.
|
||||
This can be overridden by `--with-copyright-year=<year>`.
|
||||
|
||||
* `--enable-reproducible-build`
|
||||
|
||||
This option controls some additional behavior needed to make the build
|
||||
reproducible. When the source date is fixed (e.g. by setting
|
||||
`SOURCE_DATE_EPOCH`), this flag will be turned on by default. Otherwise, the
|
||||
value is determined by heuristics. If it is explicitly turned off, the build
|
||||
might not be reproducible.
|
||||
|
||||
## Hints and Suggestions for Advanced Users
|
||||
|
||||
### Bash Completion
|
||||
@@ -1958,7 +1816,7 @@ To analyze build performance, run with `LOG=trace` and check `$BUILD/build-trace
|
||||
Use `JOBS=1` to avoid parallelism.
|
||||
|
||||
Please check that you adhere to the [Code Conventions for the Build System](
|
||||
http://openjdk.org/groups/build/doc/code-conventions.html) before
|
||||
http://openjdk.java.net/groups/build/doc/code-conventions.html) before
|
||||
submitting patches.
|
||||
|
||||
## Contributing to the JDK
|
||||
@@ -1971,25 +1829,19 @@ However, please bear in mind that the JDK is a massive project, and we must ask
|
||||
you to follow our rules and guidelines to be able to accept your contribution.
|
||||
|
||||
The official place to start is the ['How to contribute' page](
|
||||
http://openjdk.org/contribute/). There is also an official (but somewhat
|
||||
http://openjdk.java.net/contribute/). There is also an official (but somewhat
|
||||
outdated and skimpy on details) [Developer's Guide](
|
||||
http://openjdk.org/guide/).
|
||||
http://openjdk.java.net/guide/).
|
||||
|
||||
If this seems overwhelming to you, the Adoption Group is there to help you! A
|
||||
good place to start is their ['New Contributor' page](
|
||||
https://wiki.openjdk.org/display/Adoption/New+Contributor), or start
|
||||
https://wiki.openjdk.java.net/display/Adoption/New+Contributor), or start
|
||||
reading the comprehensive [Getting Started Kit](
|
||||
https://adoptopenjdk.gitbooks.io/adoptopenjdk-getting-started-kit/en/). The
|
||||
Adoption Group will also happily answer any questions you have about
|
||||
contributing. Contact them by [mail](
|
||||
http://mail.openjdk.org/mailman/listinfo/adoption-discuss) or [IRC](
|
||||
http://openjdk.org/irc/).
|
||||
|
||||
## Editing this document
|
||||
|
||||
If you want to contribute changes to this document, edit `doc/building.md` and
|
||||
then run `make update-build-docs` to generate the same changes in
|
||||
`doc/building.html`.
|
||||
http://mail.openjdk.java.net/mailman/listinfo/adoption-discuss) or [IRC](
|
||||
http://openjdk.java.net/irc/).
|
||||
|
||||
---
|
||||
# Override styles from the base CSS file that are not ideal for this document.
|
||||
|
||||
@@ -50,8 +50,6 @@
|
||||
<li><a href="#nullptr">nullptr</a></li>
|
||||
<li><a href="#atomic"><atomic></a></li>
|
||||
<li><a href="#uniform-initialization">Uniform Initialization</a></li>
|
||||
<li><a href="#local-function-objects">Local Function Objects</a></li>
|
||||
<li><a href="#inheriting-constructors">Inheriting constructors</a></li>
|
||||
<li><a href="#additional-permitted-features">Additional Permitted Features</a></li>
|
||||
<li><a href="#excluded-features">Excluded Features</a></li>
|
||||
<li><a href="#undecided-features">Undecided Features</a></li>
|
||||
@@ -68,9 +66,7 @@
|
||||
<h3 id="counterexamples-and-updates">Counterexamples and Updates</h3>
|
||||
<p>Many of the guidelines mentioned here have (sometimes widespread) counterexamples in the HotSpot code base. Finding a counterexample is not sufficient justification for new code to follow the counterexample as a precedent, since readers of your code will rightfully expect your code to follow the greater bulk of precedents documented here.</p>
|
||||
<p>Occasionally a guideline mentioned here may be just out of synch with the actual HotSpot code base. If you find that a guideline is consistently contradicted by a large number of counterexamples, please bring it up for discussion and possible change. The architectural rule, of course, is "When in Rome do as the Romans". Sometimes in the suburbs of Rome the rules are a little different; these differences can be pointed out here.</p>
|
||||
<p>Proposed changes should be discussed on the <a href="mailto:hotspot-dev@openjdk.org">HotSpot Developers</a> mailing list. Changes are likely to be cautious and incremental, since HotSpot coders have been using these guidelines for years.</p>
|
||||
<p>Substantive changes are approved by <a href="https://www.rfc-editor.org/rfc/rfc7282.html">rough consensus</a> of the <a href="https://openjdk.org/census#hotspot">HotSpot Group</a> Members. The Group Lead determines whether consensus has been reached.</p>
|
||||
<p>Editorial changes (changes that only affect the description of HotSpot style, not its substance) do not require the full consensus gathering process. The normal HotSpot pull request process may be used for editorial changes, with the additional requirement that the requisite reviewers are also HotSpot Group Members.</p>
|
||||
<p>Proposed changes should be discussed on the <a href="mailto:hotspot-dev@openjdk.java.net">HotSpot Developers</a> mailing list, and approved by <a href="https://en.wikipedia.org/wiki/Rough_consensus">rough consensus</a> of the <a href="https://openjdk.java.net/census#hotspot">HotSpot Group</a> Members. The Group Lead determines whether consensus has been reached. Changes are likely to be cautious and incremental, since HotSpot coders have been using these guidelines for years.</p>
|
||||
<h2 id="structure-and-formatting">Structure and Formatting</h2>
|
||||
<h3 id="factoring-and-class-design">Factoring and Class Design</h3>
|
||||
<ul>
|
||||
@@ -154,7 +150,7 @@
|
||||
<h3 id="whitespace">Whitespace</h3>
|
||||
<ul>
|
||||
<li><p>In general, don't change whitespace unless it improves readability or consistency. Gratuitous whitespace changes will make integrations and backports more difficult.</p></li>
|
||||
<li><p>Use <a href="https://en.wikipedia.org/wiki/Indentation_style#Variant:_1TBS_(OTBS)">One-True-Brace-Style</a>. The opening brace for a function or class is normally at the end of the line; it is sometimes moved to the beginning of the next line for emphasis. Substatements are enclosed in braces, even if there is only a single statement. Extremely simple one-line statements may drop braces around a substatement.</p></li>
|
||||
<li><p>Use One-True-Brace-Style. The opening brace for a function or class is normally at the end of the line; it is sometimes moved to the beginning of the next line for emphasis. Substatements are enclosed in braces, even if there is only a single statement. Extremely simple one-line statements may drop braces around a substatement.</p></li>
|
||||
<li><p>Indentation levels are two columns.</p></li>
|
||||
<li><p>There is no hard line length limit. That said, bear in mind that excessively long lines can cause difficulties. Some people like to have multiple side-by-side windows in their editors, and long lines may force them to choose among unpleasant options. They can use wide windows, reducing the number that can fit across the screen, and wasting a lot of screen real estate because most lines are not that long. Alternatively, they can have more windows across the screen, with long lines wrapping (or worse, requiring scrolling to see in their entirety), which is harder to read. Similar issues exist for side-by-side code reviews.</p></li>
|
||||
<li><p>Tabs are not allowed in code. Set your editor accordingly.<br> (Emacs: <code>(setq-default indent-tabs-mode nil)</code>.)</p></li>
|
||||
@@ -198,7 +194,7 @@ while ( test_foo(args...) ) { // No, excess spaces around control</code></pre></
|
||||
<p>Similar discussions for some other projects:</p>
|
||||
<ul>
|
||||
<li><p><a href="https://google.github.io/styleguide/cppguide.html">Google C++ Style Guide</a> — Currently (2020) targeting C++17.</p></li>
|
||||
<li><p><a href="https://chromium.googlesource.com/chromium/src/+/main/styleguide/c++/c++-features.md">C++11 and C++14 use in Chromium</a> — Categorizes features as allowed, banned, or to be discussed.</p></li>
|
||||
<li><p><a href="https://chromium-cpp.appspot.com">C++11 and C++14 use in Chromium</a> — Categorizes features as allowed, banned, or to be discussed.</p></li>
|
||||
<li><p><a href="https://llvm.org/docs/CodingStandards.html">llvm Coding Standards</a> — Currently (2020) targeting C++14.</p></li>
|
||||
<li><p><a href="https://firefox-source-docs.mozilla.org/code-quality/coding-style/using_cxx_in_firefox_code.html">Using C++ in Mozilla code</a> — C++17 support is required for recent versions (2020).</p></li>
|
||||
</ul>
|
||||
@@ -211,7 +207,7 @@ while ( test_foo(args...) ) { // No, excess spaces around control</code></pre></
|
||||
<p>Rationale: Other than to implement exceptions (which HotSpot doesn't use), most potential uses of <a href="https://en.wikipedia.org/wiki/Run-time_type_information" title="Runtime Type Information">RTTI</a> are better done via virtual functions. Some of the remainder can be replaced by bespoke mechanisms. The cost of the additional runtime data structures needed to support <a href="https://en.wikipedia.org/wiki/Run-time_type_information" title="Runtime Type Information">RTTI</a> are deemed not worthwhile, given the alternatives.</p>
|
||||
<h3 id="memory-allocation">Memory Allocation</h3>
|
||||
<p>Do not use the standard global allocation and deallocation functions (operator new and related functions). Use of these functions by HotSpot code is disabled for some platforms.</p>
|
||||
<p>Rationale: HotSpot often uses "resource" or "arena" allocation. Even where heap allocation is used, the standard global functions are avoided in favor of wrappers around malloc and free that support the VM's Native Memory Tracking (NMT) feature. Typically, uses of the global operator new are inadvertent and therefore often associated with memory leaks.</p>
|
||||
<p>Rationale: HotSpot often uses "resource" or "arena" allocation. Even where heap allocation is used, the standard global functions are avoided in favor of wrappers around malloc and free that support the VM's Native Memory Tracking (NMT) feature.</p>
|
||||
<p>Native memory allocation failures are often treated as non-recoverable. The place where "out of memory" is (first) detected may be an innocent bystander, unrelated to the actual culprit.</p>
|
||||
<h3 id="class-inheritance">Class Inheritance</h3>
|
||||
<p>Use public single inheritance.</p>
|
||||
@@ -238,7 +234,7 @@ while ( test_foo(args...) ) { // No, excess spaces around control</code></pre></
|
||||
<p>Some reasons for this include</p>
|
||||
<ul>
|
||||
<li><p>Exceptions. Perhaps the largest core issue with adopting the use of Standard Library facilities is exceptions. HotSpot does not use exceptions and, for platforms which allow doing so, builds with them turned off. Many Standard Library facilities implicitly or explicitly use exceptions.</p></li>
|
||||
<li><p><code>assert</code>. An issue that is quickly encountered is the <code>assert</code> macro name collision (<a href="https://bugs.openjdk.org/browse/JDK-8007770">JDK-8007770</a>). Some mechanism for addressing this would be needed before much of the Standard Library could be used. (Not all Standard Library implementations use assert in header files, but some do.)</p></li>
|
||||
<li><p><code>assert</code>. An issue that is quickly encountered is the <code>assert</code> macro name collision (<a href="https://bugs.openjdk.java.net/browse/JDK-8007770">JDK-8007770</a>). Some mechanism for addressing this would be needed before much of the Standard Library could be used. (Not all Standard Library implementations use assert in header files, but some do.)</p></li>
|
||||
<li><p>Memory allocation. HotSpot requires explicit control over where allocations occur. The C++98/03 <code>std::allocator</code> class is too limited to support our usage. (Changes in more recent Standards may remove this limitation.)</p></li>
|
||||
<li><p>Implementation vagaries. Bugs, or simply different implementation choices, can lead to different behaviors among the various Standard Libraries we need to deal with.</p></li>
|
||||
<li><p>Inconsistent naming conventions. HotSpot and the C++ Standard use different naming conventions. The coexistence of those different conventions might appear jarring and reduce readability.</p></li>
|
||||
@@ -258,7 +254,8 @@ while ( test_foo(args...) ) { // No, excess spaces around control</code></pre></
|
||||
<li><p>Function argument deduction. This is always permitted, and indeed encouraged. It is nearly always better to allow the type of a function template argument to be deduced rather than explicitly specified.</p></li>
|
||||
<li><p><code>auto</code> variable declarations (<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n1984.pdf">n1984</a>)<br> For local variables, this can be used to make the code clearer by eliminating type information that is obvious or irrelevant. Excessive use can make code much harder to understand.</p></li>
|
||||
<li><p>Function return type deduction (<a href="https://isocpp.org/files/papers/N3638.html">n3638</a>)<br> Only use if the function body has a very small number of <code>return</code> statements, and generally relatively little other code.</p></li>
|
||||
<li><p>Also see <a href="#lambdaexpressions">lambda expressions</a>.</p></li>
|
||||
<li><p>Generic lambdas. Lambdas are not (yet) permitted.</p></li>
|
||||
<li><p>Lambda init captures. Lambdas are not (yet) permitted.</p></li>
|
||||
</ul>
|
||||
<h3 id="expression-sfinae">Expression SFINAE</h3>
|
||||
<p><a href="https://en.cppreference.com/w/cpp/language/sfinae" title="Substitution Failure Is Not An Error">Substitution Failure Is Not An Error</a> (SFINAE) is a template metaprogramming technique that makes use of template parameter substitution failures to make compile-time decisions.</p>
|
||||
@@ -271,8 +268,8 @@ while ( test_foo(args...) ) { // No, excess spaces around control</code></pre></
|
||||
<p>The underlying type of a <em>scoped-enum</em> should also be specified explicitly if conversions may be applied to values of that type.</p>
|
||||
<p>Due to bugs in certain (very old) compilers, there is widespread use of enums and avoidance of in-class initialization of static integral constant members. Compilers having such bugs are no longer supported. Except where an enum is semantically appropriate, new code should use integral constants.</p>
|
||||
<h3 id="thread_local">thread_local</h3>
|
||||
<p>Avoid use of <code>thread_local</code> (<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2659.htm">n2659</a>); and instead, use the HotSpot macro <code>THREAD_LOCAL</code>, for which the initializer must be a constant expression. When <code>thread_local</code> must be used, use the Hotspot macro <code>APPROVED_CPP_THREAD_LOCAL</code> to indicate that the use has been given appropriate consideration.</p>
|
||||
<p>As was discussed in the review for <a href="https://mail.openjdk.org/pipermail/hotspot-dev/2019-September/039487.html">JDK-8230877</a>, <code>thread_local</code> allows dynamic initialization and destruction semantics. However, that support requires a run-time penalty for references to non-function-local <code>thread_local</code> variables defined in a different translation unit, even if they don't need dynamic initialization. Dynamic initialization and destruction of non-local <code>thread_local</code> variables also has the same ordering problems as for ordinary non-local variables. So we avoid use of <code>thread_local</code> in general, limiting its use to only those cases where dynamic initialization or destruction are essential. See <a href="https://bugs.openjdk.org/browse/JDK-8282469">JDK-8282469</a> for further discussion.</p>
|
||||
<p>Do not use <code>thread_local</code> (<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2659.htm">n2659</a>); instead, use the HotSpot macro <code>THREAD_LOCAL</code>. The initializer must be a constant expression.</p>
|
||||
<p>As was discussed in the review for <a href="https://mail.openjdk.java.net/pipermail/hotspot-dev/2019-September/039487.html">JDK-8230877</a>, <code>thread_local</code> allows dynamic initialization and destruction semantics. However, that support requires a run-time penalty for references to non-function-local <code>thread_local</code> variables defined in a different translation unit, even if they don't need dynamic initialization. Dynamic initialization and destruction of namespace-scoped thread local variables also has the same ordering problems as for ordinary namespace-scoped variables.</p>
|
||||
<h3 id="nullptr">nullptr</h3>
|
||||
<p>Prefer <code>nullptr</code> (<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2431.pdf">n2431</a>) to <code>NULL</code>. Don't use (constexpr or literal) 0 for pointers.</p>
|
||||
<p>For historical reasons there are widespread uses of both <code>NULL</code> and of integer 0 as a pointer value.</p>
|
||||
@@ -291,125 +288,6 @@ while ( test_foo(args...) ) { // No, excess spaces around control</code></pre></
|
||||
<li><a href="https://en.cppreference.com/w/cpp/language/aggregate_initialization">aggregate initialization</a></li>
|
||||
</ul>
|
||||
<p>Although related, the use of <code>std::initializer_list</code> remains forbidden, as part of the avoidance of the C++ Standard Library in HotSpot code.</p>
|
||||
<h3 id="local-function-objects">Local Function Objects</h3>
|
||||
<ul>
|
||||
<li>Local function objects, including lambda expressions, may be used.</li>
|
||||
<li>Lambda expressions must only be used as a downward value.</li>
|
||||
<li>Prefer <code>[&]</code> as the capture list of a lambda expression.</li>
|
||||
<li>Return type deduction for lambda expressions is permitted, and indeed encouraged.</li>
|
||||
<li>An empty parameter list for a lambda expression may be elided.</li>
|
||||
<li>A lambda expression must not be <code>mutable</code>.</li>
|
||||
<li>Generic lambda expressions are permitted.</li>
|
||||
<li>Lambda expressions should be relatively simple.</li>
|
||||
<li>Anonymous lambda expressions should not overly clutter the enclosing expression.</li>
|
||||
<li>An anonymous lambda expression must not be directly invoked.</li>
|
||||
<li>Bind expressions are forbidden.</li>
|
||||
</ul>
|
||||
<p>Single-use function objects can be defined locally within a function, directly at the point of use. This is an alternative to having a function or function object class defined at class or namespace scope.</p>
|
||||
<p>This usage was somewhat limited by C++03, which does not permit such a class to be used as a template parameter. That restriction was removed by C++11 (<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2657.htm">n2657</a>). Use of this feature is permitted.</p>
|
||||
<p>Many HotSpot protocols involve "function-like" objects that involve some named member function rather than a call operator. For example, a function that performs some action on all threads might be written as</p>
|
||||
<pre><code>void do_something() {
|
||||
struct DoSomething : public ThreadClosure {
|
||||
virtual void do_thread(Thread* t) {
|
||||
... do something with t ...
|
||||
}
|
||||
} closure;
|
||||
Threads::threads_do(&closure);
|
||||
}</code></pre>
|
||||
<p>HotSpot code has historically usually placed the DoSomething class at namespace (or sometimes class) scope. This separates the function's code from its use, often to the detriment of readability. It requires giving the class a globally unique name (if at namespace scope). It also loses the information that the class is intended for use in exactly one place, and does not have any subclasses. (However, the latter can now be indicated by declaring it <code>final</code>.) Often, for simplicity, a local class will skip things like access control and accessor functions, giving the enclosing function direct access to the implementation and eliminating some boilerplate that might be provided if the class is in some outer (more accessible) scope. On the other hand, if there is a lot of surrounding code in the function body or the local class is of significant size, defining it locally can increase clutter and reduce readability.</p>
|
||||
<p><a name="lambdaexpressions"></a> C++11 added <em>lambda expressions</em> as a new way to write a function object. Simple lambda expressions can be significantly more concise than a function object, eliminating a lot of boiler-plate. On the other hand, a complex lambda expression may not provide much, if any, readability benefit compared to an ordinary function object. Also, while a lambda can encapsulate a call to a "function-like" object, it cannot be used in place of such.</p>
|
||||
<p>A common use for local functions is as one-use <a href="https://en.cppreference.com/w/cpp/language/raii" title="Resource Acquisition Is Initialization">RAII</a> objects. The amount of boilerplate for a function object class (local or not) makes such usage somewhat clumsy and verbose. But with the help of a small amount of supporting utility code, lambdas work particularly well for this use case.</p>
|
||||
<p>Another use for local functions is <a href="https://en.wikipedia.org/wiki/Partial_application" title="Partial Application">partial application</a>. Again here, lambdas are typically much simpler and less verbose than function object classes.</p>
|
||||
<p>Because of these benefits, lambda expressions are permitted in HotSpot code, with some restrictions and usage guidance. An anonymous lambda is one which is passed directly as an argument. A named lambda is the value of a variable, which is its name.</p>
|
||||
<p>Lambda expressions should only be passed downward. In particular, a lambda should not be returned from a function or stored in a global variable, whether directly or as the value of a member of some other object. Lambda capture is syntactically subtle (by design), and propagating a lambda in such ways can easily pass references to captured values to places where they are no longer valid. In particular, members of the enclosing <code>this</code> object are effectively captured by reference, even if the default capture is by-value. For such uses-cases a function object class should be used to make the desired value capturing and propagation explicit.</p>
|
||||
<p>Limiting the capture list to <code>[&]</code> (implicitly capture by reference) is a simplifying restriction that still provides good support for HotSpot usage, while reducing the cases a reader must recognize and understand.</p>
|
||||
<ul>
|
||||
<li><p>Many common lambda uses require reference capture. Not permitting it would substantially reduce the utility of lambdas.</p></li>
|
||||
<li><p>Referential transparency. Implicit reference capture makes variable references in the lambda body have the same meaning they would have in the enclosing code. There isn't a semantic barrier across which the meaning of a variable changes.</p></li>
|
||||
<li><p>Explicit reference capture introduces significant clutter, especially when lambda expressions are relatively small and simple, as they should be in HotSpot code.</p></li>
|
||||
<li><p>There are a number of reasons why by-value capture might be used, but for the most part they don't apply to HotSpot code, given other usage restrictions.</p>
|
||||
<ul>
|
||||
<li><p>A primary use-case for by-value capture is to support escaping uses, where values captured by-reference might become invalid. That use-case doesn't apply if only downward lambdas are used.</p></li>
|
||||
<li><p>By-value capture can also make a lambda-local copy for mutation, which requires making the lambda <code>mutable</code>; see below.</p></li>
|
||||
<li><p>By-value capture might be viewed as an optimization, avoiding any overhead for reference capture of cheap to copy values. But the compiler can often eliminate any such overhead.</p></li>
|
||||
<li><p>By-value capture by a non-<code>mutable</code> lambda makes the captured values const, preventing any modification by the lambda and making the captured value unaffected by modifications to the outer variable. But this only applies to captured auto variables, not member variables, and is inconsistent with referential transparency.</p></li>
|
||||
</ul></li>
|
||||
<li><p>Non-capturing lambdas (with an empty capture list - <code>[]</code>) have limited utility. There are cases where no captures are required (pure functions, for example), but if the function is small and simple then that's obvious anyway.</p></li>
|
||||
<li><p>Capture initializers (a C++14 feature - <a href="https://isocpp.org/files/papers/N3649.html">N3649</a>) are not permitted. Capture initializers inherently increase the complexity of the capture list, and provide little benefit over an additional in-scope local variable.</p></li>
|
||||
</ul>
|
||||
<p>The use of <code>mutable</code> lambda expressions is forbidden because there don't seem to be many, if any, good use-cases for them in HotSpot. A lambda expression needs to be mutable in order to modify a by-value captured value. But with only downward lambdas, such usage seems likely to be rare and complicated. It is better to use a function object class in any such cases that arise, rather than requiring all HotSpot developers to understand this relatively obscure feature.</p>
|
||||
<p>While it is possible to directly invoke an anonymous lambda expression, that feature should not be used, as such a form can be confusing to readers. Instead, name the lambda and call it by name.</p>
|
||||
<p>Some reasons to prefer a named lambda instead of an anonymous lambda are</p>
|
||||
<ul>
|
||||
<li><p>The body contains non-trivial control flow or declarations or other nested constructs.</p></li>
|
||||
<li><p>Its role in an argument list is hard to guess without examining the function declaration. Give it a name that indicates its purpose.</p></li>
|
||||
<li><p>It has an unusual capture list.</p></li>
|
||||
<li><p>It has a complex explicit return type or parameter types.</p></li>
|
||||
</ul>
|
||||
<p>Lambda expressions, and particularly anonymous lambda expressions, should be simple and compact. One-liners are good. Anonymous lambdas should usually be limited to a couple lines of body code. More complex lambdas should be named. A named lambda should not clutter the enclosing function and make it long and complex; do continue to break up large functions via the use of separate helper functions.</p>
|
||||
<p>An anonymous lambda expression should either be a one-liner in a one-line expression, or isolated in its own set of lines. Don't place part of a lambda expression on the same line as other arguments to a function. The body of a multi-line lambda argument should be indented from the start of the capture list, as if that were the start of an ordinary function definition. The body of a multi-line named lambda should be indented one step from the variable's indentation.</p>
|
||||
<p>Some examples:</p>
|
||||
<ol type="1">
|
||||
<li><code>foo([&] { ++counter; });</code></li>
|
||||
<li><code>foo(x, [&] { ++counter; });</code></li>
|
||||
<li><code>foo([&] { if (predicate) ++counter; });</code></li>
|
||||
<li><code>foo([&] { auto tmp = process(x); tmp.f(); return tmp.g(); })</code></li>
|
||||
<li><p>Separate one-line lambda from other arguments:</p>
|
||||
<pre><code>foo(c.begin(), c.end(),
|
||||
[&] (const X& x) { do_something(x); return x.value(); });</code></pre></li>
|
||||
<li><p>Indentation for multi-line lambda:</p>
|
||||
<pre><code>c.do_entries([&] (const X& x) {
|
||||
do_something(x, a);
|
||||
do_something1(x, b);
|
||||
do_something2(x, c);
|
||||
});</code></pre></li>
|
||||
<li><p>Separate multi-line lambda from other arguments:</p>
|
||||
<pre><code>foo(c.begin(), c.end(),
|
||||
[&] (const X& x) {
|
||||
do_something(x, a);
|
||||
do_something1(x, b);
|
||||
do_something2(x, c);
|
||||
});</code></pre></li>
|
||||
<li><p>Multi-line named lambda:</p>
|
||||
<pre><code>auto do_entry = [&] (const X& x) {
|
||||
do_something(x, a);
|
||||
do_something1(x, b);
|
||||
do_something2(x, c);
|
||||
};</code></pre></li>
|
||||
</ol>
|
||||
<p>Item 4, and especially items 6 and 7, are pushing the simplicity limits for anonymous lambdas. Item 6 might be better written using a named lambda:</p>
|
||||
<pre><code>c.do_entries(do_entry);</code></pre>
|
||||
<p>Note that C++11 also added <em>bind expressions</em> as a way to write a function object for partial application, using <code>std::bind</code> and related facilities from the Standard Library. <code>std::bind</code> generalizes and replaces some of the binders from C++03. Bind expressions are not permitted in HotSpot code. They don't provide enough benefit over lambdas or local function classes in the cases where bind expressions are applicable to warrant the introduction of yet another mechanism in this space into HotSpot code.</p>
|
||||
<p>References:</p>
|
||||
<ul>
|
||||
<li>Local and unnamed types as template parameters (<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2657.htm">n2657</a>)</li>
|
||||
<li>New wording for C++0x lambdas (<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2009/n2927.pdf">n2927</a>)</li>
|
||||
<li>Generalized lambda capture (init-capture) (<a href="https://isocpp.org/files/papers/N3648.html">N3648</a>)</li>
|
||||
<li>Generic (polymorphic) lambda expressions (<a href="https://isocpp.org/files/papers/N3649.html">N3649</a>)</li>
|
||||
</ul>
|
||||
<p>References from C++17</p>
|
||||
<ul>
|
||||
<li>Wording for constexpr lambda (<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/p0170r1.pdf">p0170r1</a>)</li>
|
||||
<li>Lambda capture of *this by Value (<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/p0018r3.html">p0018r3</a>)</li>
|
||||
</ul>
|
||||
<p>References from C++20</p>
|
||||
<ul>
|
||||
<li>Allow lambda capture [=, this] (<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2017/p0409r2.html">p0409r2</a>)</li>
|
||||
<li>Familiar template syntax for generic lambdas (<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2017/p0428r2.pdf">p0428r2</a>)</li>
|
||||
<li>Simplifying implicit lambda capture (<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2017/p0588r1.html">p0588r1</a>)</li>
|
||||
<li>Default constructible and assignable stateless lambdas (<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2017/p0624r2.pdf">p0624r2</a>)</li>
|
||||
<li>Lambdas in unevaluated contexts (<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2017/p0315r4.pdf">p0315r4</a>)</li>
|
||||
<li>Allow pack expansion in lambda init-capture (<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2018/p0780r2.html">p0780r2</a>) (<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2020/p2095r0.html">p2095r0</a>)</li>
|
||||
<li>Deprecate implicit capture of this via [=] (<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2018/p0806r2.html">p0806r2</a>)</li>
|
||||
</ul>
|
||||
<p>References from C++23</p>
|
||||
<ul>
|
||||
<li>Make () more optional for lambdas (<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2020/p1102r2.html">p1102r2</a>)</li>
|
||||
</ul>
|
||||
<h3 id="inheriting-constructors">Inheriting constructors</h3>
|
||||
<p>Do not use <em>inheriting constructors</em> (<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2540.htm">n2540</a>).</p>
|
||||
<p>C++11 provides simple syntax allowing a class to inherit the constructors of a base class. Unfortunately there are a number of problems with the original specification, and C++17 contains significant revisions (<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/p0136r1.html" title="p0136r1">p0136r1</a> opens with a list of 8 Core Issues). Since HotSpot doesn't support use of C++17, use of inherited constructors could run into those problems. Such uses might also change behavior in a future HotSpot update to use C++17 or later, potentially in subtle ways that could lead to hard to diagnose problems. Because of this, HotSpot code must not use inherited constructors.</p>
|
||||
<p>Note that gcc7 provides the <code>-fnew-inheriting-ctors</code> option to use the <a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/p0136r1.html" title="p0136r1">p0136r1</a> semantics. This is enabled by default when using C++17 or later. It is also enabled by default for <code>fabi-version=11</code> (introduced by gcc7) or higher when using C++11/14, as the change is considered a Defect Report that applies to those versions. Earlier versions of gcc don't have that option, and other supported compilers may not have anything similar.</p>
|
||||
<h3 id="additional-permitted-features">Additional Permitted Features</h3>
|
||||
<ul>
|
||||
<li><p><code>constexpr</code> (<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2235.pdf">n2235</a>) (<a href="https://isocpp.org/files/papers/N3652.html">n3652</a>)</p></li>
|
||||
@@ -427,8 +305,8 @@ while ( test_foo(args...) ) { // No, excess spaces around control</code></pre></
|
||||
<li><p>Dynamic initialization and destruction with concurrency (<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2660.htm">n2660</a>)</p></li>
|
||||
<li><p><code>final</code> virtual specifiers for classes and virtual functions (<a href="http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2009/n2928.htm">n2928</a>), (<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2010/n3206.htm">n3206</a>), (<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2011/n3272.htm">n3272</a>)</p></li>
|
||||
<li><p><code>override</code> virtual specifiers for virtual functions (<a href="http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2009/n2928.htm">n2928</a>), (<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2010/n3206.htm">n3206</a>), (<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2011/n3272.htm">n3272</a>)</p></li>
|
||||
<li><p>Local and unnamed types as template parameters (<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2657.htm">n2657</a>)</p></li>
|
||||
<li><p>Range-based <code>for</code> loops (<a href="http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2009/n2930.html">n2930</a>) (<a href="https://en.cppreference.com/w/cpp/language/range-for">range-for</a>)</p></li>
|
||||
<li><p>Unrestricted Unions (<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2544.pdf">n2544</a>)</p></li>
|
||||
</ul>
|
||||
<h3 id="excluded-features">Excluded Features</h3>
|
||||
<ul>
|
||||
@@ -444,10 +322,11 @@ while ( test_foo(args...) ) { // No, excess spaces around control</code></pre></
|
||||
<li><p>Inline namespaces (<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2535.htm">n2535</a>) — HotSpot makes very limited use of namespaces.</p></li>
|
||||
<li><p><code>using namespace</code> directives. In particular, don't use <code>using namespace std;</code> to avoid needing to qualify Standard Library names.</p></li>
|
||||
<li><p>Propagating exceptions (<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2179.html">n2179</a>) — HotSpot does not permit the use of exceptions, so this feature isn't useful.</p></li>
|
||||
<li><p>Avoid non-local variables with non-constexpr initialization. In particular, avoid variables with types requiring non-trivial initialization or destruction. Initialization order problems can be difficult to deal with and lead to surprises, as can destruction ordering. HotSpot doesn't generally try to cleanup on exit, and running destructors at exit can also lead to problems.</p></li>
|
||||
<li><p>Avoid namespace-scoped variables with non-constexpr initialization. In particular, avoid variables with types requiring non-trivial initialization or destruction. Initialization order problems can be difficult to deal with and lead to surprises, as can destruction ordering. HotSpot doesn't generally try to cleanup on exit, and running destructors at exit can also lead to problems.</p></li>
|
||||
<li><p><code>[[deprecated]]</code> attribute (<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3760.html">n3760</a>) — Not relevant in HotSpot code.</p></li>
|
||||
<li><p>Avoid most operator overloading, preferring named functions. When operator overloading is used, ensure the semantics conform to the normal expected behavior of the operation.</p></li>
|
||||
<li><p>Avoid most implicit conversion constructors and (implicit or explicit) conversion operators. (Note that conversion to <code>bool</code> isn't needed in HotSpot code because of the "no implicit boolean" guideline.)</p></li>
|
||||
<li><p>Avoid covariant return types.</p></li>
|
||||
<li><p>Avoid <code>goto</code> statements.</p></li>
|
||||
</ul>
|
||||
<h3 id="undecided-features">Undecided Features</h3>
|
||||
@@ -458,6 +337,7 @@ while ( test_foo(args...) ) { // No, excess spaces around control</code></pre></
|
||||
<li><p>Member initializers and aggregates (<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3653.html">n3653</a>)</p></li>
|
||||
<li><p><code>[[noreturn]]</code> attribute (<a href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2761.pdf">n2761</a>)</p></li>
|
||||
<li><p>Rvalue references and move semantics</p></li>
|
||||
<li><p>Lambdas</p></li>
|
||||
</ul>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -55,20 +55,13 @@ suburbs of Rome the rules are a little different; these differences
|
||||
can be pointed out here.
|
||||
|
||||
Proposed changes should be discussed on the
|
||||
[HotSpot Developers](mailto:hotspot-dev@openjdk.org) mailing
|
||||
list. Changes are likely to be cautious and incremental, since HotSpot
|
||||
coders have been using these guidelines for years.
|
||||
|
||||
Substantive changes are approved by
|
||||
[rough consensus](https://www.rfc-editor.org/rfc/rfc7282.html) of
|
||||
the [HotSpot Group](https://openjdk.org/census#hotspot) Members.
|
||||
[HotSpot Developers](mailto:hotspot-dev@openjdk.java.net) mailing
|
||||
list, and approved by
|
||||
[rough consensus](https://en.wikipedia.org/wiki/Rough_consensus) of
|
||||
the [HotSpot Group](https://openjdk.java.net/census#hotspot) Members.
|
||||
The Group Lead determines whether consensus has been reached.
|
||||
|
||||
Editorial changes (changes that only affect the description of HotSpot
|
||||
style, not its substance) do not require the full consensus gathering
|
||||
process. The normal HotSpot pull request process may be used for
|
||||
editorial changes, with the additional requirement that the requisite
|
||||
reviewers are also HotSpot Group Members.
|
||||
Changes are likely to be cautious and incremental, since HotSpot
|
||||
coders have been using these guidelines for years.
|
||||
|
||||
## Structure and Formatting
|
||||
|
||||
@@ -294,9 +287,7 @@ well.
|
||||
or consistency. Gratuitous whitespace changes will make integrations
|
||||
and backports more difficult.
|
||||
|
||||
* Use [One-True-Brace-Style](
|
||||
https://en.wikipedia.org/wiki/Indentation_style#Variant:_1TBS_(OTBS)).
|
||||
The opening brace for a function or class
|
||||
* Use One-True-Brace-Style. The opening brace for a function or class
|
||||
is normally at the end of the line; it is sometimes moved to the
|
||||
beginning of the next line for emphasis. Substatements are enclosed
|
||||
in braces, even if there is only a single statement. Extremely simple
|
||||
@@ -418,7 +409,7 @@ Similar discussions for some other projects:
|
||||
* [Google C++ Style Guide](https://google.github.io/styleguide/cppguide.html) —
|
||||
Currently (2020) targeting C++17.
|
||||
|
||||
* [C++11 and C++14 use in Chromium](https://chromium.googlesource.com/chromium/src/+/main/styleguide/c++/c++-features.md) —
|
||||
* [C++11 and C++14 use in Chromium](https://chromium-cpp.appspot.com) —
|
||||
Categorizes features as allowed, banned, or to be discussed.
|
||||
|
||||
* [llvm Coding Standards](https://llvm.org/docs/CodingStandards.html) —
|
||||
@@ -471,9 +462,7 @@ code is disabled for some platforms.
|
||||
Rationale: HotSpot often uses "resource" or "arena" allocation. Even
|
||||
where heap allocation is used, the standard global functions are
|
||||
avoided in favor of wrappers around malloc and free that support the
|
||||
VM's Native Memory Tracking (NMT) feature. Typically, uses of the global
|
||||
operator new are inadvertent and therefore often associated with memory
|
||||
leaks.
|
||||
VM's Native Memory Tracking (NMT) feature.
|
||||
|
||||
Native memory allocation failures are often treated as non-recoverable.
|
||||
The place where "out of memory" is (first) detected may be an innocent
|
||||
@@ -550,7 +539,7 @@ turned off. Many Standard Library facilities implicitly or explicitly
|
||||
use exceptions.
|
||||
|
||||
* `assert`. An issue that is quickly encountered is the `assert` macro name
|
||||
collision ([JDK-8007770](https://bugs.openjdk.org/browse/JDK-8007770)).
|
||||
collision ([JDK-8007770](https://bugs.openjdk.java.net/browse/JDK-8007770)).
|
||||
Some mechanism for addressing this would be needed before much of the
|
||||
Standard Library could be used. (Not all Standard Library implementations
|
||||
use assert in header files, but some do.)
|
||||
@@ -607,7 +596,9 @@ use can make code much harder to understand.
|
||||
Only use if the function body has a very small number of `return`
|
||||
statements, and generally relatively little other code.
|
||||
|
||||
* Also see [lambda expressions](#lambdaexpressions).
|
||||
* Generic lambdas. Lambdas are not (yet) permitted.
|
||||
|
||||
* Lambda init captures. Lambdas are not (yet) permitted.
|
||||
|
||||
### Expression SFINAE
|
||||
|
||||
@@ -633,7 +624,7 @@ Here are a few closely related example bugs:<br>
|
||||
### enum
|
||||
|
||||
Where appropriate, _scoped-enums_ should be used.
|
||||
([n2347](http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2347.pdf))
|
||||
([n2347](http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2347.pdf))
|
||||
|
||||
Use of _unscoped-enums_ is permitted, though ordinary constants may be
|
||||
preferable when the automatic initializer feature isn't used.
|
||||
@@ -653,32 +644,26 @@ integral constants.
|
||||
|
||||
### thread_local
|
||||
|
||||
Avoid use of `thread_local`
|
||||
Do not use `thread_local`
|
||||
([n2659](http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2659.htm));
|
||||
and instead, use the HotSpot macro `THREAD_LOCAL`, for which the initializer must
|
||||
be a constant expression. When `thread_local` must be used, use the Hotspot macro
|
||||
`APPROVED_CPP_THREAD_LOCAL` to indicate that the use has been given appropriate
|
||||
consideration.
|
||||
instead, use the HotSpot macro `THREAD_LOCAL`. The initializer must
|
||||
be a constant expression.
|
||||
|
||||
As was discussed in the review for
|
||||
[JDK-8230877](https://mail.openjdk.org/pipermail/hotspot-dev/2019-September/039487.html),
|
||||
[JDK-8230877](https://mail.openjdk.java.net/pipermail/hotspot-dev/2019-September/039487.html),
|
||||
`thread_local` allows dynamic initialization and destruction
|
||||
semantics. However, that support requires a run-time penalty for
|
||||
references to non-function-local `thread_local` variables defined in a
|
||||
different translation unit, even if they don't need dynamic
|
||||
initialization. Dynamic initialization and destruction of
|
||||
non-local `thread_local` variables also has the same ordering
|
||||
problems as for ordinary non-local variables. So we avoid use of
|
||||
`thread_local` in general, limiting its use to only those cases where dynamic
|
||||
initialization or destruction are essential. See
|
||||
[JDK-8282469](https://bugs.openjdk.org/browse/JDK-8282469)
|
||||
for further discussion.
|
||||
namespace-scoped thread local variables also has the same ordering
|
||||
problems as for ordinary namespace-scoped variables.
|
||||
|
||||
### nullptr
|
||||
|
||||
Prefer `nullptr`
|
||||
([n2431](http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2431.pdf))
|
||||
to `NULL`. Don't use (constexpr or literal) 0 for pointers.
|
||||
to `NULL`. Don't use (constexpr or literal) 0 for pointers.
|
||||
|
||||
For historical reasons there are widespread uses of both `NULL` and of
|
||||
integer 0 as a pointer value.
|
||||
@@ -718,301 +703,10 @@ Some relevant sections from cppreference.com:
|
||||
Although related, the use of `std::initializer_list` remains forbidden, as
|
||||
part of the avoidance of the C++ Standard Library in HotSpot code.
|
||||
|
||||
### Local Function Objects
|
||||
|
||||
* Local function objects, including lambda expressions, may be used.
|
||||
* Lambda expressions must only be used as a downward value.
|
||||
* Prefer `[&]` as the capture list of a lambda expression.
|
||||
* Return type deduction for lambda expressions is permitted, and indeed encouraged.
|
||||
* An empty parameter list for a lambda expression may be elided.
|
||||
* A lambda expression must not be `mutable`.
|
||||
* Generic lambda expressions are permitted.
|
||||
* Lambda expressions should be relatively simple.
|
||||
* Anonymous lambda expressions should not overly clutter the enclosing expression.
|
||||
* An anonymous lambda expression must not be directly invoked.
|
||||
* Bind expressions are forbidden.
|
||||
|
||||
Single-use function objects can be defined locally within a function,
|
||||
directly at the point of use. This is an alternative to having a function
|
||||
or function object class defined at class or namespace scope.
|
||||
|
||||
This usage was somewhat limited by C++03, which does not permit such a class
|
||||
to be used as a template parameter. That restriction was removed by C++11
|
||||
([n2657]). Use of this feature is permitted.
|
||||
|
||||
Many HotSpot protocols involve "function-like" objects that involve some
|
||||
named member function rather than a call operator. For example, a function
|
||||
that performs some action on all threads might be written as
|
||||
|
||||
```
|
||||
void do_something() {
|
||||
struct DoSomething : public ThreadClosure {
|
||||
virtual void do_thread(Thread* t) {
|
||||
... do something with t ...
|
||||
}
|
||||
} closure;
|
||||
Threads::threads_do(&closure);
|
||||
}
|
||||
```
|
||||
|
||||
HotSpot code has historically usually placed the DoSomething class at
|
||||
namespace (or sometimes class) scope. This separates the function's code
|
||||
from its use, often to the detriment of readability. It requires giving the
|
||||
class a globally unique name (if at namespace scope). It also loses the
|
||||
information that the class is intended for use in exactly one place, and
|
||||
does not have any subclasses. (However, the latter can now be indicated by
|
||||
declaring it `final`.) Often, for simplicity, a local class will skip
|
||||
things like access control and accessor functions, giving the enclosing
|
||||
function direct access to the implementation and eliminating some
|
||||
boilerplate that might be provided if the class is in some outer (more
|
||||
accessible) scope. On the other hand, if there is a lot of surrounding code
|
||||
in the function body or the local class is of significant size, defining it
|
||||
locally can increase clutter and reduce readability.
|
||||
|
||||
<a name="lambdaexpressions"></a>
|
||||
C++11 added _lambda expressions_ as a new way to write a function object.
|
||||
Simple lambda expressions can be significantly more concise than a function
|
||||
object, eliminating a lot of boiler-plate. On the other hand, a complex
|
||||
lambda expression may not provide much, if any, readability benefit compared
|
||||
to an ordinary function object. Also, while a lambda can encapsulate a call
|
||||
to a "function-like" object, it cannot be used in place of such.
|
||||
|
||||
A common use for local functions is as one-use [RAII] objects. The amount
|
||||
of boilerplate for a function object class (local or not) makes such usage
|
||||
somewhat clumsy and verbose. But with the help of a small amount of
|
||||
supporting utility code, lambdas work particularly well for this use case.
|
||||
|
||||
Another use for local functions is [partial application][PARTIALAPP]. Again
|
||||
here, lambdas are typically much simpler and less verbose than function
|
||||
object classes.
|
||||
|
||||
Because of these benefits, lambda expressions are permitted in HotSpot code,
|
||||
with some restrictions and usage guidance. An anonymous lambda is one which
|
||||
is passed directly as an argument. A named lambda is the value of a
|
||||
variable, which is its name.
|
||||
|
||||
Lambda expressions should only be passed downward. In particular, a lambda
|
||||
should not be returned from a function or stored in a global variable,
|
||||
whether directly or as the value of a member of some other object. Lambda
|
||||
capture is syntactically subtle (by design), and propagating a lambda in
|
||||
such ways can easily pass references to captured values to places where they
|
||||
are no longer valid. In particular, members of the enclosing `this` object
|
||||
are effectively captured by reference, even if the default capture is
|
||||
by-value. For such uses-cases a function object class should be used to
|
||||
make the desired value capturing and propagation explicit.
|
||||
|
||||
Limiting the capture list to `[&]` (implicitly capture by reference) is a
|
||||
simplifying restriction that still provides good support for HotSpot usage,
|
||||
while reducing the cases a reader must recognize and understand.
|
||||
|
||||
* Many common lambda uses require reference capture. Not permitting it
|
||||
would substantially reduce the utility of lambdas.
|
||||
|
||||
* Referential transparency. Implicit reference capture makes variable
|
||||
references in the lambda body have the same meaning they would have in the
|
||||
enclosing code. There isn't a semantic barrier across which the meaning of
|
||||
a variable changes.
|
||||
|
||||
* Explicit reference capture introduces significant clutter, especially when
|
||||
lambda expressions are relatively small and simple, as they should be in
|
||||
HotSpot code.
|
||||
|
||||
* There are a number of reasons why by-value capture might be used, but for
|
||||
the most part they don't apply to HotSpot code, given other usage restrictions.
|
||||
|
||||
* A primary use-case for by-value capture is to support escaping uses,
|
||||
where values captured by-reference might become invalid. That use-case
|
||||
doesn't apply if only downward lambdas are used.
|
||||
|
||||
* By-value capture can also make a lambda-local copy for mutation, which
|
||||
requires making the lambda `mutable`; see below.
|
||||
|
||||
* By-value capture might be viewed as an optimization, avoiding any
|
||||
overhead for reference capture of cheap to copy values. But the
|
||||
compiler can often eliminate any such overhead.
|
||||
|
||||
* By-value capture by a non-`mutable` lambda makes the captured values
|
||||
const, preventing any modification by the lambda and making the captured
|
||||
value unaffected by modifications to the outer variable. But this only
|
||||
applies to captured auto variables, not member variables, and is
|
||||
inconsistent with referential transparency.
|
||||
|
||||
* Non-capturing lambdas (with an empty capture list - `[]`) have limited
|
||||
utility. There are cases where no captures are required (pure functions,
|
||||
for example), but if the function is small and simple then that's obvious
|
||||
anyway.
|
||||
|
||||
* Capture initializers (a C++14 feature - [N3649]) are not permitted.
|
||||
Capture initializers inherently increase the complexity of the capture list,
|
||||
and provide little benefit over an additional in-scope local variable.
|
||||
|
||||
The use of `mutable` lambda expressions is forbidden because there don't
|
||||
seem to be many, if any, good use-cases for them in HotSpot. A lambda
|
||||
expression needs to be mutable in order to modify a by-value captured value.
|
||||
But with only downward lambdas, such usage seems likely to be rare and
|
||||
complicated. It is better to use a function object class in any such cases
|
||||
that arise, rather than requiring all HotSpot developers to understand this
|
||||
relatively obscure feature.
|
||||
|
||||
While it is possible to directly invoke an anonymous lambda expression, that
|
||||
feature should not be used, as such a form can be confusing to readers.
|
||||
Instead, name the lambda and call it by name.
|
||||
|
||||
Some reasons to prefer a named lambda instead of an anonymous lambda are
|
||||
|
||||
* The body contains non-trivial control flow or declarations or other nested
|
||||
constructs.
|
||||
|
||||
* Its role in an argument list is hard to guess without examining the
|
||||
function declaration. Give it a name that indicates its purpose.
|
||||
|
||||
* It has an unusual capture list.
|
||||
|
||||
* It has a complex explicit return type or parameter types.
|
||||
|
||||
Lambda expressions, and particularly anonymous lambda expressions, should be
|
||||
simple and compact. One-liners are good. Anonymous lambdas should usually
|
||||
be limited to a couple lines of body code. More complex lambdas should be
|
||||
named. A named lambda should not clutter the enclosing function and make it
|
||||
long and complex; do continue to break up large functions via the use of
|
||||
separate helper functions.
|
||||
|
||||
An anonymous lambda expression should either be a one-liner in a one-line
|
||||
expression, or isolated in its own set of lines. Don't place part of a
|
||||
lambda expression on the same line as other arguments to a function. The
|
||||
body of a multi-line lambda argument should be indented from the start of
|
||||
the capture list, as if that were the start of an ordinary function
|
||||
definition. The body of a multi-line named lambda should be indented one
|
||||
step from the variable's indentation.
|
||||
|
||||
Some examples:
|
||||
|
||||
1. `foo([&] { ++counter; });`
|
||||
2. `foo(x, [&] { ++counter; });`
|
||||
3. `foo([&] { if (predicate) ++counter; });`
|
||||
4. `foo([&] { auto tmp = process(x); tmp.f(); return tmp.g(); })`
|
||||
5. Separate one-line lambda from other arguments:
|
||||
|
||||
```
|
||||
foo(c.begin(), c.end(),
|
||||
[&] (const X& x) { do_something(x); return x.value(); });
|
||||
```
|
||||
6. Indentation for multi-line lambda:
|
||||
|
||||
```
|
||||
c.do_entries([&] (const X& x) {
|
||||
do_something(x, a);
|
||||
do_something1(x, b);
|
||||
do_something2(x, c);
|
||||
});
|
||||
```
|
||||
7. Separate multi-line lambda from other arguments:
|
||||
|
||||
```
|
||||
foo(c.begin(), c.end(),
|
||||
[&] (const X& x) {
|
||||
do_something(x, a);
|
||||
do_something1(x, b);
|
||||
do_something2(x, c);
|
||||
});
|
||||
```
|
||||
8. Multi-line named lambda:
|
||||
|
||||
```
|
||||
auto do_entry = [&] (const X& x) {
|
||||
do_something(x, a);
|
||||
do_something1(x, b);
|
||||
do_something2(x, c);
|
||||
};
|
||||
```
|
||||
|
||||
Item 4, and especially items 6 and 7, are pushing the simplicity limits for
|
||||
anonymous lambdas. Item 6 might be better written using a named lambda:
|
||||
```
|
||||
c.do_entries(do_entry);
|
||||
```
|
||||
|
||||
Note that C++11 also added _bind expressions_ as a way to write a function
|
||||
object for partial application, using `std::bind` and related facilities
|
||||
from the Standard Library. `std::bind` generalizes and replaces some of the
|
||||
binders from C++03. Bind expressions are not permitted in HotSpot code.
|
||||
They don't provide enough benefit over lambdas or local function classes in
|
||||
the cases where bind expressions are applicable to warrant the introduction
|
||||
of yet another mechanism in this space into HotSpot code.
|
||||
|
||||
References:
|
||||
|
||||
* Local and unnamed types as template parameters ([n2657])
|
||||
* New wording for C++0x lambdas ([n2927])
|
||||
* Generalized lambda capture (init-capture) ([N3648])
|
||||
* Generic (polymorphic) lambda expressions ([N3649])
|
||||
|
||||
[n2657]: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2657.htm
|
||||
[n2927]: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2009/n2927.pdf
|
||||
[N3648]: https://isocpp.org/files/papers/N3648.html
|
||||
[N3649]: https://isocpp.org/files/papers/N3649.html
|
||||
|
||||
References from C++17
|
||||
|
||||
* Wording for constexpr lambda ([p0170r1])
|
||||
* Lambda capture of *this by Value ([p0018r3])
|
||||
|
||||
[p0170r1]: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/p0170r1.pdf
|
||||
[p0018r3]: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/p0018r3.html
|
||||
|
||||
References from C++20
|
||||
|
||||
* Allow lambda capture [=, this] ([p0409r2])
|
||||
* Familiar template syntax for generic lambdas ([p0428r2])
|
||||
* Simplifying implicit lambda capture ([p0588r1])
|
||||
* Default constructible and assignable stateless lambdas ([p0624r2])
|
||||
* Lambdas in unevaluated contexts ([p0315r4])
|
||||
* Allow pack expansion in lambda init-capture ([p0780r2]) ([p2095r0])
|
||||
* Deprecate implicit capture of this via [=] ([p0806r2])
|
||||
|
||||
[p0409r2]: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2017/p0409r2.html
|
||||
[p0428r2]: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2017/p0428r2.pdf
|
||||
[p0588r1]: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2017/p0588r1.html
|
||||
[p0624r2]: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2017/p0624r2.pdf
|
||||
[p0315r4]: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2017/p0315r4.pdf
|
||||
[p0780r2]: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2018/p0780r2.html
|
||||
[p2095r0]: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2020/p2095r0.html
|
||||
[p0806r2]: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2018/p0806r2.html
|
||||
|
||||
References from C++23
|
||||
|
||||
* Make () more optional for lambdas ([p1102r2])
|
||||
|
||||
[p1102r2]: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2020/p1102r2.html
|
||||
|
||||
### Inheriting constructors
|
||||
|
||||
Do not use _inheriting constructors_
|
||||
([n2540](http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2540.htm)).
|
||||
|
||||
C++11 provides simple syntax allowing a class to inherit the constructors of a
|
||||
base class. Unfortunately there are a number of problems with the original
|
||||
specification, and C++17 contains significant revisions ([p0136r1] opens with
|
||||
a list of 8 Core Issues). Since HotSpot doesn't support use of C++17, use of
|
||||
inherited constructors could run into those problems. Such uses might also
|
||||
change behavior in a future HotSpot update to use C++17 or later, potentially
|
||||
in subtle ways that could lead to hard to diagnose problems. Because of this,
|
||||
HotSpot code must not use inherited constructors.
|
||||
|
||||
Note that gcc7 provides the `-fnew-inheriting-ctors` option to use the
|
||||
[p0136r1] semantics. This is enabled by default when using C++17 or later.
|
||||
It is also enabled by default for `fabi-version=11` (introduced by gcc7) or
|
||||
higher when using C++11/14, as the change is considered a Defect Report that
|
||||
applies to those versions. Earlier versions of gcc don't have that option,
|
||||
and other supported compilers may not have anything similar.
|
||||
|
||||
[p0136r1]: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/p0136r1.html
|
||||
"p0136r1"
|
||||
|
||||
### Additional Permitted Features
|
||||
|
||||
* `constexpr`
|
||||
([n2235](http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2235.pdf))
|
||||
([n2235](http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2235.pdf))
|
||||
([n3652](https://isocpp.org/files/papers/N3652.html))
|
||||
|
||||
* Sized deallocation
|
||||
@@ -1063,13 +757,13 @@ and other supported compilers may not have anything similar.
|
||||
([n3206](http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2010/n3206.htm)),
|
||||
([n3272](http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2011/n3272.htm))
|
||||
|
||||
* Local and unnamed types as template parameters
|
||||
([n2657](http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2657.htm))
|
||||
|
||||
* Range-based `for` loops
|
||||
([n2930](http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2009/n2930.html))
|
||||
([range-for](https://en.cppreference.com/w/cpp/language/range-for))
|
||||
|
||||
* Unrestricted Unions
|
||||
([n2544](http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2544.pdf))
|
||||
|
||||
### Excluded Features
|
||||
|
||||
* New string and character literals
|
||||
@@ -1101,7 +795,7 @@ namespace std;` to avoid needing to qualify Standard Library names.
|
||||
([n2179](http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2179.html)) —
|
||||
HotSpot does not permit the use of exceptions, so this feature isn't useful.
|
||||
|
||||
* Avoid non-local variables with non-constexpr initialization.
|
||||
* Avoid namespace-scoped variables with non-constexpr initialization.
|
||||
In particular, avoid variables with types requiring non-trivial
|
||||
initialization or destruction. Initialization order problems can be
|
||||
difficult to deal with and lead to surprises, as can destruction
|
||||
@@ -1120,14 +814,16 @@ normal expected behavior of the operation.
|
||||
conversion operators. (Note that conversion to `bool` isn't needed
|
||||
in HotSpot code because of the "no implicit boolean" guideline.)
|
||||
|
||||
* Avoid `goto` statements.
|
||||
* Avoid covariant return types.
|
||||
|
||||
* Avoid `goto` statements.
|
||||
|
||||
### Undecided Features
|
||||
|
||||
This list is incomplete; it serves to explicitly call out some
|
||||
features that have not yet been discussed.
|
||||
|
||||
* Trailing return type syntax for functions
|
||||
* Trailing return type syntax for functions
|
||||
([n2541](http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2541.htm))
|
||||
|
||||
* Variable templates
|
||||
@@ -1141,7 +837,10 @@ features that have not yet been discussed.
|
||||
|
||||
* Rvalue references and move semantics
|
||||
|
||||
[ADL]: https://en.cppreference.com/w/cpp/language/adl
|
||||
* Lambdas
|
||||
|
||||
|
||||
[ADL]: https://en.cppreference.com/w/cpp/language/adl
|
||||
"Argument Dependent Lookup"
|
||||
|
||||
[ODR]: https://en.cppreference.com/w/cpp/language/definition
|
||||
@@ -1155,6 +854,3 @@ features that have not yet been discussed.
|
||||
|
||||
[SFINAE]: https://en.cppreference.com/w/cpp/language/sfinae
|
||||
"Substitution Failure Is Not An Error"
|
||||
|
||||
[PARTIALAPP]: https://en.wikipedia.org/wiki/Partial_application
|
||||
"Partial Application"
|
||||
|
||||
12
doc/ide.html
12
doc/ide.html
@@ -41,20 +41,14 @@
|
||||
<pre class="shell"><code>make vscode-project-clangd</code></pre>
|
||||
<p>Additional instructions for configuring the given indexer will be displayed after the workspace has been generated.</p>
|
||||
<h4 id="visual-studio">Visual Studio</h4>
|
||||
<p>The make system can generate a Visual Studio project for the Hotspot native source. After configuring, the project is generated using:</p>
|
||||
<pre class="shell"><code>make hotspot-ide-project</code></pre>
|
||||
<p>This creates a file named <code>jvm.vcxproj</code> in <code>ide\hotspot-visualstudio</code> subfolder of the build output folder. The file can be opened in Visual Studio via <code>File -> Open -> Project/Solution</code>.</p>
|
||||
<p>This section is a work in progress.</p>
|
||||
<pre class="shell"><code>make ide-project</code></pre>
|
||||
<h4 id="compilation-database">Compilation Database</h4>
|
||||
<p>The make system can generate generic native code indexing support in the form of a <a href="https://clang.llvm.org/docs/JSONCompilationDatabase.html">Compilation Database</a> that can be used by many different IDEs and source code indexers.</p>
|
||||
<pre class="shell"><code>make compile-commands</code></pre>
|
||||
<p>It's also possible to generate the Compilation Database for the HotSpot source code only, which is a bit faster as it includes less information.</p>
|
||||
<pre class="shell"><code>make compile-commands-hotspot</code></pre>
|
||||
<h3 id="ide-support-for-java-code">IDE support for Java code</h3>
|
||||
<h4 id="intellij-idea">IntelliJ IDEA</h4>
|
||||
<p>The JDK project has a script that can be used for indexing the project with IntelliJ. After configuring and building the JDK, an IntelliJ workspace can be generated by running the following command in the top-level folder of the cloned repository:</p>
|
||||
<pre class="shell"><code>bash bin/idea.sh</code></pre>
|
||||
<p>To use it, choose <code>File -> Open...</code> in IntelliJ and select the folder where you ran the above script.</p>
|
||||
<p>Next, configure the project SDK in IntelliJ. Open <code>File -> Project Structure -> Project</code> and select <code>build/<config>/images/jdk</code> as the SDK to use.</p>
|
||||
<p>In order to run the tests from the IDE, you can use the JTReg plugin. Instructions for building and using the plugin can be found <a href="https://github.com/openjdk/jtreg/tree/master/plugins/idea">here</a>.</p>
|
||||
<p>This section is a work in progress.</p>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
31
doc/ide.md
31
doc/ide.md
@@ -45,17 +45,12 @@ after the workspace has been generated.
|
||||
|
||||
#### Visual Studio
|
||||
|
||||
The make system can generate a Visual Studio project for the Hotspot
|
||||
native source. After configuring, the project is generated using:
|
||||
This section is a work in progress.
|
||||
|
||||
```shell
|
||||
make hotspot-ide-project
|
||||
make ide-project
|
||||
```
|
||||
|
||||
This creates a file named `jvm.vcxproj` in `ide\hotspot-visualstudio`
|
||||
subfolder of the build output folder. The file can be opened in Visual Studio
|
||||
via `File -> Open -> Project/Solution`.
|
||||
|
||||
#### Compilation Database
|
||||
|
||||
The make system can generate generic native code indexing support in the form of
|
||||
@@ -75,24 +70,4 @@ make compile-commands-hotspot
|
||||
|
||||
### IDE support for Java code
|
||||
|
||||
#### IntelliJ IDEA
|
||||
|
||||
The JDK project has a script that can be used for indexing the project
|
||||
with IntelliJ. After configuring and building the JDK, an IntelliJ workspace
|
||||
can be generated by running the following command in the top-level folder
|
||||
of the cloned repository:
|
||||
|
||||
```shell
|
||||
bash bin/idea.sh
|
||||
```
|
||||
|
||||
To use it, choose `File -> Open...` in IntelliJ and select the folder where
|
||||
you ran the above script.
|
||||
|
||||
Next, configure the project SDK in IntelliJ. Open
|
||||
`File -> Project Structure -> Project` and select `build/<config>/images/jdk`
|
||||
as the SDK to use.
|
||||
|
||||
In order to run the tests from the IDE, you can use the JTReg plugin.
|
||||
Instructions for building and using the plugin can be found
|
||||
[here](https://github.com/openjdk/jtreg/tree/master/plugins/idea).
|
||||
This section is a work in progress.
|
||||
@@ -46,7 +46,6 @@
|
||||
<li><a href="#pkcs11-tests">PKCS11 Tests</a></li>
|
||||
<li><a href="#client-ui-tests">Client UI Tests</a></li>
|
||||
</ul></li>
|
||||
<li><a href="#editing-this-document">Editing this document</a></li>
|
||||
</ul>
|
||||
</nav>
|
||||
<h2 id="using-make-test-the-run-test-framework">Using "make test" (the run-test framework)</h2>
|
||||
@@ -65,9 +64,6 @@ $ make exploded-test TEST=tier2</code></pre>
|
||||
<h3 id="configuration">Configuration</h3>
|
||||
<p>To be able to run JTReg tests, <code>configure</code> needs to know where to find the JTReg test framework. If it is not picked up automatically by configure, use the <code>--with-jtreg=<path to jtreg home></code> option to point to the JTReg framework. Note that this option should point to the JTReg home, i.e. the top directory, containing <code>lib/jtreg.jar</code> etc. (An alternative is to set the <code>JT_HOME</code> environment variable to point to the JTReg home before running <code>configure</code>.)</p>
|
||||
<p>To be able to run microbenchmarks, <code>configure</code> needs to know where to find the JMH dependency. Use <code>--with-jmh=<path to JMH jars></code> to point to a directory containing the core JMH and transitive dependencies. The recommended dependencies can be retrieved by running <code>sh make/devkit/createJMHBundle.sh</code>, after which <code>--with-jmh=build/jmh/jars</code> should work.</p>
|
||||
<p>When tests fail or timeout, jtreg runs its failure handler to capture necessary data from the system where the test was run. This data can then be used to analyze the test failures. Collecting this data involves running various commands (which are listed in files residing in <code>test/failure_handler/src/share/conf</code>) and some of these commands use <code>sudo</code>. If the system's <code>sudoers</code> file isn't configured to allow running these commands, then it can result in password being prompted during the failure handler execution. Typically, when running locally, collecting this additional data isn't always necessary. To disable running the failure handler, use <code>--enable-jtreg-failure-handler=no</code> when running <code>configure</code>. If, however, you want to let the failure handler to run and don't want to be prompted for sudo password, then you can configure your <code>sudoers</code> file appropriately. Please read the necessary documentation of your operating system to see how to do that; here we only show one possible way of doing that - edit the <code>/etc/sudoers.d/sudoers</code> file to include the following line:</p>
|
||||
<pre><code>johndoe ALL=(ALL) NOPASSWD: /sbin/dmesg</code></pre>
|
||||
<p>This line configures <code>sudo</code> to <em>not</em> prompt for password for the <code>/sbin/dmesg</code> command (this is one of the commands that is listed in the files at <code>test/failure_handler/src/share/conf</code>), for the user <code>johndoe</code>. Here <code>johndoe</code> is the user account under which the jtreg tests are run. Replace the username with a relevant user account of your system.</p>
|
||||
<h2 id="test-selection">Test selection</h2>
|
||||
<p>All functionality is available using the <code>test</code> make target. In this use case, the test or tests to be executed is controlled using the <code>TEST</code> variable. To speed up subsequent test runs with no source code changes, <code>test-only</code> can be used instead, which do not depend on the source and test image build.</p>
|
||||
<p>For some common top-level tests, direct make targets have been generated. This includes all JTReg test groups, the hotspot gtest, and custom tests (if present). This means that <code>make test-tier1</code> is equivalent to <code>make test TEST="tier1"</code>, but the latter is more tab-completion friendly. For more complex test runs, the <code>test TEST="x"</code> solution needs to be used.</p>
|
||||
@@ -86,7 +82,7 @@ $ make exploded-test TEST=tier2</code></pre>
|
||||
<li><p><code>tier4</code>: This test group includes every other test not covered by previous tiers. It includes, for example, <code>vmTestbase</code> suites for Hotspot, which run for many hours even on large machines. It also runs GUI tests, so the same <code>TEST_JOBS</code> and <code>JTREG_KEYWORDS</code> caveats apply.</p></li>
|
||||
</ul>
|
||||
<h3 id="jtreg">JTReg</h3>
|
||||
<p>JTReg tests can be selected either by picking a JTReg test group, or a selection of files or directories containing JTReg tests. Documentation can be found at <a href="https://openjdk.org/jtreg/">https://openjdk.org/jtreg/</a>, note especially the extensive <a href="https://openjdk.org/jtreg/faq.html">FAQ</a>.</p>
|
||||
<p>JTReg tests can be selected either by picking a JTReg test group, or a selection of files or directories containing JTReg tests.</p>
|
||||
<p>JTReg test groups can be specified either without a test root, e.g. <code>:tier1</code> (or <code>tier1</code>, the initial colon is optional), or with, e.g. <code>hotspot:tier1</code>, <code>test/jdk:jdk_util</code> or <code>$(TOPDIR)/test/hotspot/jtreg:hotspot_all</code>. The test root can be specified either as an absolute path, or a path relative to the JDK top directory, or the <code>test</code> directory. For simplicity, the hotspot JTReg test root, which really is <code>hotspot/jtreg</code> can be abbreviated as just <code>hotspot</code>.</p>
|
||||
<p>When specified without a test root, all matching groups from all test roots will be added. Otherwise, only the group from the specified test root will be added.</p>
|
||||
<p>Individual JTReg tests or directories containing JTReg tests can also be specified, like <code>test/hotspot/jtreg/native_sanity/JniVersion.java</code> or <code>hotspot/jtreg/native_sanity</code>. Just like for test root selection, you can either specify an absolute path (which can even point to JTReg tests outside the source tree), or a path relative to either the JDK top directory or the <code>test</code> directory. <code>hotspot</code> can be used as an alias for <code>hotspot/jtreg</code> here as well.</p>
|
||||
@@ -235,7 +231,7 @@ TEST FAILURE</code></pre>
|
||||
JTREG="JAVA_OPTIONS=-Djdk.test.docker.image.name=ubuntu
|
||||
-Djdk.test.docker.image.version=latest"</code></pre>
|
||||
<h3 id="non-us-locale">Non-US locale</h3>
|
||||
<p>If your locale is non-US, some tests are likely to fail. To work around this you can set the locale to US. On Unix platforms simply setting <code>LANG="en_US"</code> in the environment before running tests should work. On Windows or MacOS, setting <code>JTREG="VM_OPTIONS=-Duser.language=en -Duser.country=US"</code> helps for most, but not all test cases.</p>
|
||||
<p>If your locale is non-US, some tests are likely to fail. To work around this you can set the locale to US. On Unix platforms simply setting <code>LANG="en_US"</code> in the environment before running tests should work. On Windows, setting <code>JTREG="VM_OPTIONS=-Duser.language=en -Duser.country=US"</code> helps for most, but not all test cases.</p>
|
||||
<p>For example:</p>
|
||||
<pre><code>$ export LANG="en_US" && make test TEST=...
|
||||
$ make test JTREG="VM_OPTIONS=-Duser.language=en -Duser.country=US" TEST=...</code></pre>
|
||||
@@ -255,7 +251,5 @@ $ make test JTREG="VM_OPTIONS=-Duser.language=en -Duser.country=US" TE
|
||||
<h4 id="windows">Windows</h4>
|
||||
<p>Type <code>gpedit</code> in the Search and then click Edit group policy; navigate to User Configuration -> Administrative Templates -> Windows Components -> File Explorer; in the right-side pane look for "Turn off Windows key hotkeys" and double click on it; enable or disable hotkeys.</p>
|
||||
<p>Note: restart is required to make the settings take effect.</p>
|
||||
<h2 id="editing-this-document">Editing this document</h2>
|
||||
<p>If you want to contribute changes to this document, edit <code>doc/testing.md</code> and then run <code>make update-build-docs</code> to generate the same changes in <code>doc/testing.html</code>.</p>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -43,31 +43,6 @@ containing the core JMH and transitive dependencies. The recommended
|
||||
dependencies can be retrieved by running `sh make/devkit/createJMHBundle.sh`,
|
||||
after which `--with-jmh=build/jmh/jars` should work.
|
||||
|
||||
When tests fail or timeout, jtreg runs its failure handler to capture necessary
|
||||
data from the system where the test was run. This data can then be used to
|
||||
analyze the test failures. Collecting this data involves running various commands
|
||||
(which are listed in files residing in `test/failure_handler/src/share/conf`)
|
||||
and some of these commands use `sudo`. If the system's `sudoers` file isn't
|
||||
configured to allow running these commands, then it can result in password being
|
||||
prompted during the failure handler execution. Typically, when running locally,
|
||||
collecting this additional data isn't always necessary. To disable running the
|
||||
failure handler, use `--enable-jtreg-failure-handler=no` when running `configure`.
|
||||
If, however, you want to let the failure handler to run and don't want to be
|
||||
prompted for sudo password, then you can configure your `sudoers` file
|
||||
appropriately. Please read the necessary documentation of your operating system
|
||||
to see how to do that; here we only show one possible way of doing that - edit
|
||||
the `/etc/sudoers.d/sudoers` file to include the following line:
|
||||
|
||||
```
|
||||
johndoe ALL=(ALL) NOPASSWD: /sbin/dmesg
|
||||
```
|
||||
|
||||
This line configures `sudo` to _not_ prompt for password for the `/sbin/dmesg`
|
||||
command (this is one of the commands that is listed in the files
|
||||
at `test/failure_handler/src/share/conf`), for the user `johndoe`. Here `johndoe`
|
||||
is the user account under which the jtreg tests are run. Replace the username
|
||||
with a relevant user account of your system.
|
||||
|
||||
## Test selection
|
||||
|
||||
All functionality is available using the `test` make target. In this use case,
|
||||
@@ -138,9 +113,7 @@ apply.
|
||||
### JTReg
|
||||
|
||||
JTReg tests can be selected either by picking a JTReg test group, or a selection
|
||||
of files or directories containing JTReg tests. Documentation can be found at
|
||||
[https://openjdk.org/jtreg/](https://openjdk.org/jtreg/), note especially the
|
||||
extensive [FAQ](https://openjdk.org/jtreg/faq.html).
|
||||
of files or directories containing JTReg tests.
|
||||
|
||||
JTReg test groups can be specified either without a test root, e.g. `:tier1`
|
||||
(or `tier1`, the initial colon is optional), or with, e.g. `hotspot:tier1`,
|
||||
@@ -541,7 +514,7 @@ $ make test TEST="jtreg:test/hotspot/jtreg/containers/docker" \
|
||||
|
||||
If your locale is non-US, some tests are likely to fail. To work around this
|
||||
you can set the locale to US. On Unix platforms simply setting `LANG="en_US"`
|
||||
in the environment before running tests should work. On Windows or MacOS, setting
|
||||
in the environment before running tests should work. On Windows, setting
|
||||
`JTREG="VM_OPTIONS=-Duser.language=en -Duser.country=US"` helps for most, but
|
||||
not all test cases.
|
||||
|
||||
@@ -605,12 +578,6 @@ double click on it; enable or disable hotkeys.
|
||||
|
||||
Note: restart is required to make the settings take effect.
|
||||
|
||||
## Editing this document
|
||||
|
||||
If you want to contribute changes to this document, edit `doc/testing.md` and
|
||||
then run `make update-build-docs` to generate the same changes in
|
||||
`doc/testing.html`.
|
||||
|
||||
---
|
||||
# Override some definitions in the global css file that are not optimal for
|
||||
# this document.
|
||||
|
||||
@@ -278,7 +278,16 @@ ifneq ($(filter product-bundles% legacy-bundles, $(MAKECMDGOALS)), )
|
||||
$(SYMBOLS_EXCLUDE_PATTERN), \
|
||||
$(ALL_JRE_FILES))
|
||||
|
||||
ifeq ($(MACOSX_CODESIGN_MODE), hardened)
|
||||
# On Macosx release builds, when there is a code signing certificate available,
|
||||
# the final bundle layout can be signed.
|
||||
SIGN_BUNDLE := false
|
||||
ifeq ($(call isTargetOs, macosx)+$(DEBUG_LEVEL), true+release)
|
||||
ifneq ($(CODESIGN), )
|
||||
SIGN_BUNDLE := true
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(SIGN_BUNDLE), true)
|
||||
# Macosx release build and code signing available.
|
||||
|
||||
################################################################################
|
||||
|
||||
@@ -29,7 +29,7 @@ include $(SPEC)
|
||||
include MakeBase.gmk
|
||||
|
||||
# When FIXPATH is set, let it process the file to make sure all paths are usable
|
||||
# by system native tools. The FIXPATH tool assumes arguments preceded by an @
|
||||
# by system native tools. The FIXPATH tool assumes arguments preceeded by an @
|
||||
# character points to a text file containing further arguments (similar to a
|
||||
# linker). It replaces any such arguments with a different temporary filename,
|
||||
# whose contents has been processed to make any paths native. To obtain a
|
||||
|
||||
@@ -104,7 +104,7 @@ define SetupBuildDemoBody
|
||||
ifneq ($$($1_SRC_SUB_DIR), )
|
||||
$1_MAIN_SRC := $$($1_SRC_BASE)/$$($1_SRC_SUB_DIR)
|
||||
else
|
||||
# for almost all
|
||||
# for allmost all
|
||||
$1_MAIN_SRC := $$($1_SRC_BASE)
|
||||
endif
|
||||
|
||||
@@ -189,7 +189,7 @@ $(eval $(call SetupBuildDemo, Font2DTest, \
|
||||
$(eval $(call SetupBuildDemo, J2Ddemo, \
|
||||
DEMO_SUBDIR := jfc, \
|
||||
MAIN_CLASS := java2d.J2Ddemo, \
|
||||
DISABLED_WARNINGS := rawtypes deprecation unchecked cast lossy-conversions, \
|
||||
DISABLED_WARNINGS := rawtypes deprecation unchecked cast, \
|
||||
JAR_NAME := J2Ddemo, \
|
||||
))
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2014, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2014, 2021, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@@ -48,30 +48,6 @@ $(BUILDTOOLS_OUTPUTDIR)/gensrc/%.interim/module-info.java: \
|
||||
TARGETS += $(patsubst %, $(BUILDTOOLS_OUTPUTDIR)/gensrc/%/module-info.java, \
|
||||
$(INTERIM_LANGTOOLS_MODULES))
|
||||
|
||||
################################################################################
|
||||
# Generate interim versions of the ToolProvider.java files for the interim
|
||||
# langtools modules, which will allow to load javac from the interim
|
||||
# jdk.compiler.
|
||||
|
||||
INTERIM_TOOL_PROVIDER_PATTERN := \
|
||||
$(foreach m, $(INTERIM_LANGTOOLS_BASE_MODULES), -e 's/"$m"/"$m.interim"/g')
|
||||
|
||||
$(BUILDTOOLS_OUTPUTDIR)/gensrc/java.compiler.interim/javax/tools/ToolProvider.java: \
|
||||
$(TOPDIR)/src/java.compiler/share/classes/javax/tools/ToolProvider.java
|
||||
$(call LogInfo, Generating ToolProvider.java for java.compiler.interim)
|
||||
$(call MakeDir, $(@D))
|
||||
$(SED) $(INTERIM_TOOL_PROVIDER_PATTERN) $< > $@
|
||||
|
||||
java.compiler.interim_EXTRA_FILES := \
|
||||
$(BUILDTOOLS_OUTPUTDIR)/gensrc/java.compiler.interim/javax/tools/ToolProvider.java
|
||||
|
||||
TARGETS += $(BUILDTOOLS_OUTPUTDIR)/gensrc/java.compiler.interim/javax/tools/ToolProvider.java
|
||||
|
||||
################################################################################
|
||||
# Use the up-to-date PreviewFeature.java and NoPreview.java from the current
|
||||
# sources, instead of the versions from the boot JDK, as javac may be referring
|
||||
# to constants from the up-to-date versions.
|
||||
|
||||
$(eval $(call SetupCopyFiles, COPY_PREVIEW_FEATURES, \
|
||||
FILES := $(TOPDIR)/src/java.base/share/classes/jdk/internal/javac/PreviewFeature.java \
|
||||
$(TOPDIR)/src/java.base/share/classes/jdk/internal/javac/NoPreview.java, \
|
||||
@@ -95,13 +71,11 @@ define SetupInterimModule
|
||||
SRC := $(BUILDTOOLS_OUTPUTDIR)/gensrc/$1.interim \
|
||||
$$(wildcard $(SUPPORT_OUTPUTDIR)/gensrc/$1) \
|
||||
$(TOPDIR)/src/$1/share/classes, \
|
||||
EXCLUDES := sun javax/tools/snippet-files, \
|
||||
EXCLUDES := sun, \
|
||||
EXCLUDE_FILES := $(TOPDIR)/src/$1/share/classes/module-info.java \
|
||||
$(TOPDIR)/src/$1/share/classes/javax/tools/ToolProvider.java \
|
||||
Standard.java, \
|
||||
EXTRA_FILES := $(BUILDTOOLS_OUTPUTDIR)/gensrc/$1.interim/module-info.java \
|
||||
$($1.interim_EXTRA_FILES), \
|
||||
COPY := .gif .png .xml .css .svg .js .js.template .txt javax.tools.JavaCompilerTool, \
|
||||
EXTRA_FILES := $(BUILDTOOLS_OUTPUTDIR)/gensrc/$1.interim/module-info.java, \
|
||||
COPY := .gif .png .xml .css .js .js.template .txt javax.tools.JavaCompilerTool, \
|
||||
BIN := $(BUILDTOOLS_OUTPUTDIR)/interim_langtools_modules/$1.interim, \
|
||||
DISABLED_WARNINGS := module options, \
|
||||
JAVAC_FLAGS := \
|
||||
|
||||
@@ -121,8 +121,8 @@ TARGETS += $($(MODULE))
|
||||
# Since the other modules are declared in different invocations of this file,
|
||||
# use the macro to find the correct target file to depend on.
|
||||
# Only the javac compilation actually depends on other modules so limit
|
||||
# dependency declaration to that by using the *_MODFILELIST variable.
|
||||
$($(MODULE)_MODFILELIST): $(foreach d, $(call FindDepsForModule, $(MODULE)), \
|
||||
# dependency declaration to that by using the *_COMPILE_TARGET variable.
|
||||
$($(MODULE)_COMPILE_TARGET): $(foreach d, $(call FindDepsForModule, $(MODULE)), \
|
||||
$(call SetupJavaCompilationApiTarget, $d, \
|
||||
$(if $($d_BIN), $($d_BIN), $(JDK_OUTPUTDIR)/modules/$d)))
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2011, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@@ -77,13 +77,6 @@ $(eval $(call SetupJavaCompilation, COMPILE_DEPEND, \
|
||||
INCLUDES := build/tools/depend, \
|
||||
BIN := $(BUILDTOOLS_OUTPUTDIR)/depend, \
|
||||
DISABLED_WARNINGS := options, \
|
||||
JAVAC_FLAGS := \
|
||||
--add-exports jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED \
|
||||
--add-exports jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED \
|
||||
--add-exports jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED \
|
||||
--add-exports jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED \
|
||||
--add-exports jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED \
|
||||
--add-exports jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED, \
|
||||
))
|
||||
|
||||
DEPEND_SERVICE_PROVIDER := $(BUILDTOOLS_OUTPUTDIR)/depend/META-INF/services/com.sun.source.util.Plugin
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2014, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2014, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@@ -196,11 +196,6 @@ else # not java.base
|
||||
endif
|
||||
endif
|
||||
|
||||
# Set main class of jdk.httpserver module
|
||||
ifeq ($(MODULE), jdk.httpserver)
|
||||
JMOD_FLAGS += --main-class sun.net.httpserver.simpleserver.Main
|
||||
endif
|
||||
|
||||
# Changes to the jmod tool itself should also trigger a rebuild of all jmods.
|
||||
# The variable JMOD_CMD could contain an environment variable assignment before
|
||||
# the actual command. Filter that out using wildcard before adding to DEPS.
|
||||
@@ -226,18 +221,11 @@ else
|
||||
JMOD_FLAGS += --exclude '**{_the.*,_*.marker*,*.diz,*.debuginfo,*.dSYM/**,*.dSYM}'
|
||||
endif
|
||||
|
||||
# Unless we are creating a very large module, use the small tool JVM options
|
||||
JMOD_SMALL_FLAGS :=
|
||||
ifeq ($(findstring $(MODULE), java.base java.desktop jdk.localedata), )
|
||||
JMOD_SMALL_FLAGS += $(JAVA_TOOL_FLAGS_SMALL)
|
||||
endif
|
||||
|
||||
ifeq ($(INTERIM_JMOD), true)
|
||||
# Interim JMODs are not shipped anywhere, so there is no reason
|
||||
# to compress them at all.
|
||||
JMOD_FLAGS += --compress zip-0
|
||||
# For reproducible builds specify the jmod --date using SOURCE_DATE in ISO-8601
|
||||
ifeq ($(ENABLE_REPRODUCIBLE_BUILD), true)
|
||||
JMOD_SOURCE_DATE := --date $(SOURCE_DATE_ISO_8601)
|
||||
else
|
||||
JMOD_FLAGS += --compress $(JMOD_COMPRESS)
|
||||
JMOD_SOURCE_DATE :=
|
||||
endif
|
||||
|
||||
# Create jmods in the support dir and then move them into place to keep the
|
||||
@@ -248,10 +236,10 @@ $(eval $(call SetupExecute, create_$(JMOD_FILE), \
|
||||
OUTPUT_FILE := $(JMODS_DIR)/$(JMOD_FILE), \
|
||||
SUPPORT_DIR := $(JMODS_SUPPORT_DIR), \
|
||||
PRE_COMMAND := $(RM) $(JMODS_DIR)/$(JMOD_FILE) $(JMODS_SUPPORT_DIR)/$(JMOD_FILE), \
|
||||
COMMAND := $(JMOD) $(JMOD_SMALL_FLAGS) create --module-version $(VERSION_SHORT) \
|
||||
COMMAND := $(JMOD) create --module-version $(VERSION_SHORT) \
|
||||
--target-platform '$(OPENJDK_MODULE_TARGET_PLATFORM)' \
|
||||
--module-path $(JMODS_DIR) $(JMOD_FLAGS) \
|
||||
--date $(SOURCE_DATE_ISO_8601) \
|
||||
$(JMOD_SOURCE_DATE) \
|
||||
$(JMODS_SUPPORT_DIR)/$(JMOD_FILE), \
|
||||
POST_COMMAND := $(MV) $(JMODS_SUPPORT_DIR)/$(JMOD_FILE) $(JMODS_DIR)/$(JMOD_FILE), \
|
||||
))
|
||||
|
||||
@@ -69,6 +69,8 @@ JAVADOC_TAGS := \
|
||||
-tag beaninfo:X \
|
||||
-tag revised:X \
|
||||
-tag since.unbundled:X \
|
||||
-tag spec:X \
|
||||
-tag specdefault:X \
|
||||
-tag Note:X \
|
||||
-tag ToDo:X \
|
||||
-tag 'apiNote:a:API Note:' \
|
||||
@@ -84,7 +86,6 @@ JAVADOC_TAGS := \
|
||||
-tag since \
|
||||
-tag serialData \
|
||||
-tag factory \
|
||||
-tag spec \
|
||||
-tag see \
|
||||
-taglet build.tools.taglet.ExtLink \
|
||||
-taglet build.tools.taglet.Incubating \
|
||||
@@ -103,14 +104,14 @@ JAVADOC_DISABLED_DOCLINT_PACKAGES := org.w3c.* javax.smartcardio
|
||||
|
||||
# The initial set of options for javadoc
|
||||
JAVADOC_OPTIONS := -use -keywords -notimestamp \
|
||||
-encoding ISO-8859-1 -docencoding UTF-8 -breakiterator \
|
||||
-serialwarn -encoding ISO-8859-1 -docencoding UTF-8 -breakiterator \
|
||||
-splitIndex --system none -javafx --expand-requires transitive \
|
||||
--override-methods=summary
|
||||
|
||||
# The reference options must stay stable to allow for comparisons across the
|
||||
# development cycle.
|
||||
REFERENCE_OPTIONS := -XDignore.symbol.file=true -use -keywords -notimestamp \
|
||||
-encoding ISO-8859-1 -breakiterator -splitIndex --system none \
|
||||
-serialwarn -encoding ISO-8859-1 -breakiterator -splitIndex --system none \
|
||||
-html5 -javafx --expand-requires transitive
|
||||
|
||||
# Should we add DRAFT stamps to the generated javadoc?
|
||||
@@ -130,7 +131,7 @@ JAVA_PLATFORM := Java Platform
|
||||
|
||||
ifeq ($(IS_DRAFT), true)
|
||||
DRAFT_MARKER_STR := <br><strong>DRAFT $(VERSION_STRING)</strong>
|
||||
ifeq ($(VERSION_BUILD), )
|
||||
ifeq ($(VERSION_BUILD), 0)
|
||||
DRAFT_MARKER_TITLE := $(SPACE)[ad-hoc build]
|
||||
else
|
||||
DRAFT_MARKER_TITLE := $(SPACE)[build $(VERSION_BUILD)]
|
||||
|
||||
148
make/Doctor.gmk
148
make/Doctor.gmk
@@ -1,148 +0,0 @@
|
||||
#
|
||||
# Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License version 2 only, as
|
||||
# published by the Free Software Foundation. Oracle designates this
|
||||
# particular file as subject to the "Classpath" exception as provided
|
||||
# by Oracle in the LICENSE file that accompanied this code.
|
||||
#
|
||||
# This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# version 2 for more details (a copy is included in the LICENSE file that
|
||||
# accompanied this code).
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License version
|
||||
# 2 along with this work; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
# or visit www.oracle.com if you need additional information or have any
|
||||
# questions.
|
||||
#
|
||||
|
||||
default: all
|
||||
|
||||
include $(SPEC)
|
||||
include MakeBase.gmk
|
||||
|
||||
# Hook to include the corresponding custom file, if present.
|
||||
$(eval $(call IncludeCustomExtension, Doctor.gmk))
|
||||
|
||||
################################################################################
|
||||
#
|
||||
# Help user diagnose possible errors and problems with the build environment.
|
||||
#
|
||||
|
||||
prologue:
|
||||
$(ECHO)
|
||||
$(ECHO) '"make doctor" will help you analyze your build environment. It can highlight'
|
||||
$(ECHO) 'certain well-known problems, but it can never find all possible errors.'
|
||||
|
||||
TARGETS += prologue
|
||||
|
||||
check-git: prologue
|
||||
$(ECHO)
|
||||
$(ECHO) '* Verifying that configure has picked up git...'
|
||||
ifeq ($(GIT), )
|
||||
$(ECHO) 'WARNING: "git" is not present. This will disable several checks.'
|
||||
$(ECHO) '! Correct by installing git and verifying that it is in the PATH'
|
||||
endif
|
||||
|
||||
TARGETS += check-git
|
||||
|
||||
ifneq ($(GIT), )
|
||||
AUTOCRLF := $(shell $(GIT) config core.autocrlf)
|
||||
endif
|
||||
|
||||
check-autocrlf: check-git
|
||||
ifneq ($(GIT), )
|
||||
ifeq ($(call isBuildOs, windows), true)
|
||||
$(ECHO)
|
||||
$(ECHO) '* Verifying git core.autocrlf value...'
|
||||
ifneq ($(AUTOCRLF), false)
|
||||
$(ECHO) 'WARNING: core.autocrlf is not "false". HIGH RISK of build failure!'
|
||||
$(ECHO) '! Correct by running 'git config --global core.autocrlf false' and re-cloning the repo'
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
||||
TARGETS += check-autocrlf
|
||||
|
||||
check-configure-warnings: check-autocrlf
|
||||
$(ECHO)
|
||||
$(ECHO) '* Checking for warnings from configure...'
|
||||
warning_output=`$(GREP) -e "^\* Memory limit:" -A 300 $(OUTPUTDIR)/configure.log | $(TAIL) -n +3 | $(SED) -e '$(DOLLAR){/^$(DOLLAR)/d;}'` && \
|
||||
if test -n "$$warning_output" ; then \
|
||||
$(ECHO) ' ---' ; \
|
||||
$(GREP) -e "^\* Memory limit:" -A 300 $(OUTPUTDIR)/configure.log | $(TAIL) -n +3 | $(SED) -e '$(DOLLAR){/^$(DOLLAR)/d;}' ; \
|
||||
$(ECHO) ' ---' ; \
|
||||
$(ECHO) '! Inspect the warnings, fix any problems, and re-run configure' ; \
|
||||
fi
|
||||
|
||||
TARGETS += check-configure-warnings
|
||||
|
||||
ifneq ($(GIT), )
|
||||
# This might have been set by custom component
|
||||
UNTRACKED_FILES ?= $(shell $(GIT) status --porcelain --ignored | $(CUT) -c 4-)
|
||||
endif
|
||||
|
||||
check-core-files: check-configure-warnings
|
||||
ifneq ($(GIT), )
|
||||
$(ECHO)
|
||||
$(ECHO) '* Checking for left-over core files...'
|
||||
core_files_found=`echo "$(UNTRACKED_FILES)" | $(TR) ' ' '\n' | $(GREP) core` && \
|
||||
if test -n "$$core_files_found" ; then \
|
||||
$(ECHO) 'Found these potential core files. They might interfere with the build process:' ; \
|
||||
$(ECHO) ' ---' ; \
|
||||
$(ECHO) $$core_files_found | $(TR) ' ' '\n'; \
|
||||
$(ECHO) ' ---' ; \
|
||||
$(ECHO) '! Remove left-over core files' ; \
|
||||
fi || : # do nothing if grep returns non-0 value
|
||||
endif
|
||||
|
||||
TARGETS += check-core-files
|
||||
|
||||
check-bad-file-names: check-core-files
|
||||
ifneq ($(GIT), )
|
||||
$(ECHO)
|
||||
$(ECHO) '* Checking for untracked files with illegal names...'
|
||||
core_files_found=`echo "$(UNTRACKED_FILES)" | $(TR) ' ' '\n' | $(GREP) '#'` && \
|
||||
if test -n "$$core_files_found" ; then \
|
||||
$(ECHO) 'Found these files with illegal names. They *will* cause build failures:' ; \
|
||||
$(ECHO) ' ---' ; \
|
||||
$(ECHO) $$core_files_found | $(TR) ' ' '\n'; \
|
||||
$(ECHO) ' ---' ; \
|
||||
$(ECHO) '! Remove all files with '#' in their name from the JDK source tree' ; \
|
||||
fi || : # do nothing if grep returns non-0 value
|
||||
endif
|
||||
|
||||
TARGETS += check-bad-file-names
|
||||
|
||||
epilogue: check-bad-file-names
|
||||
$(ECHO)
|
||||
$(ECHO) '* If all else fails, try removing the entire build directory and re-creating'
|
||||
$(ECHO) 'the same configuration using:'
|
||||
$(ECHO) ' ---' ; \
|
||||
$(ECHO) configure_command_line=\$$\(make print-configuration\)
|
||||
$(ECHO) make dist-clean
|
||||
$(ECHO) bash configure \$$configure_command_line
|
||||
$(ECHO) ' ---' ; \
|
||||
$(ECHO)
|
||||
$(ECHO) '* The build README (doc/building.md) is a great source of information,'
|
||||
$(ECHO) 'especially the chapter "Fixing Unexpected Build Failures". Check it out!'
|
||||
$(ECHO)
|
||||
$(ECHO) '* If you still need assistance please contact build-dev@openjdk.org.'
|
||||
$(ECHO)
|
||||
|
||||
TARGETS += epilogue
|
||||
|
||||
################################################################################
|
||||
|
||||
doctor: $(TARGETS)
|
||||
|
||||
all: doctor
|
||||
|
||||
.PHONY: default all doctor $(TARGETS)
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@@ -88,10 +88,7 @@ $(CLASSLIST_FILE): $(INTERIM_IMAGE_DIR)/bin/java$(EXECUTABLE_SUFFIX) $(CLASSLIST
|
||||
$(CAT) $(LINK_OPT_DIR)/stderr $(JLI_TRACE_FILE) ; \
|
||||
exit $$exitcode \
|
||||
)
|
||||
$(GREP) -v HelloClasslist $@.raw.2 > $@.raw.3
|
||||
$(FIXPATH) $(INTERIM_IMAGE_DIR)/bin/java \
|
||||
-cp $(SUPPORT_OUTPUTDIR)/classlist.jar \
|
||||
build.tools.classlist.SortClasslist $@.raw.3 > $@
|
||||
$(GREP) -v HelloClasslist $@.raw.2 > $@
|
||||
|
||||
# The jli trace is created by the same recipe as classlist. By declaring these
|
||||
# dependencies, make will correctly rebuild both jli trace and classlist
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2012, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2012, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@@ -53,17 +53,14 @@ help:
|
||||
$(info $(_) make docs-jdk-api # Create just JDK javadocs)
|
||||
$(info $(_) make bootcycle-images # Build images twice, second time with newly built JDK)
|
||||
$(info $(_) make install # Install the generated images locally)
|
||||
$(info $(_) make reconfigure # Rerun configure with the same arguments as last time)
|
||||
$(info $(_) make help # Give some help on using make)
|
||||
$(info $(_) make check # Run basic testing (currently tier1))
|
||||
$(info $(_) make test-<test> # Run test, e.g. test-tier1)
|
||||
$(info $(_) make test TEST=<t> # Run test(s) given by TEST specification)
|
||||
$(info $(_) make exploded-test TEST=<t> # Run test(s) on the exploded image instead of)
|
||||
$(info $(_) # the full jdk image)
|
||||
$(info )
|
||||
$(info Targets for troubleshooting)
|
||||
$(info $(_) make help # Give some help on using make)
|
||||
$(info $(_) make doctor # Diagnose build environment problems)
|
||||
$(info $(_) make reconfigure # Rerun configure with the same arguments as last time)
|
||||
$(info )
|
||||
$(info Targets for cleaning)
|
||||
$(info $(_) make clean # Remove all files generated by make, but not those)
|
||||
$(info $(_) # generated by configure)
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
# questions.
|
||||
#
|
||||
|
||||
# This makefile creates a jdk image overlaid with statically linked core
|
||||
# This makefile creates a jdk image overlayed with statically linked core
|
||||
# libraries.
|
||||
|
||||
default: all
|
||||
|
||||
204
make/Hsdis.gmk
204
make/Hsdis.gmk
@@ -1,204 +0,0 @@
|
||||
#
|
||||
# Copyright (c) 2020, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License version 2 only, as
|
||||
# published by the Free Software Foundation. Oracle designates this
|
||||
# particular file as subject to the "Classpath" exception as provided
|
||||
# by Oracle in the LICENSE file that accompanied this code.
|
||||
#
|
||||
# This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# version 2 for more details (a copy is included in the LICENSE file that
|
||||
# accompanied this code).
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License version
|
||||
# 2 along with this work; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
# or visit www.oracle.com if you need additional information or have any
|
||||
# questions.
|
||||
#
|
||||
|
||||
default: all
|
||||
|
||||
include $(SPEC)
|
||||
include MakeBase.gmk
|
||||
include JdkNativeCompilation.gmk
|
||||
|
||||
################################################################################
|
||||
# This makefile compiles and installs the hsdis library
|
||||
#
|
||||
################################################################################
|
||||
|
||||
HSDIS_OUTPUT_DIR := $(SUPPORT_OUTPUTDIR)/hsdis
|
||||
REAL_HSDIS_NAME := hsdis-$(OPENJDK_TARGET_CPU_LEGACY_LIB)$(SHARED_LIBRARY_SUFFIX)
|
||||
BUILT_HSDIS_LIB := $(HSDIS_OUTPUT_DIR)/$(REAL_HSDIS_NAME)
|
||||
|
||||
HSDIS_TOOLCHAIN := TOOLCHAIN_DEFAULT
|
||||
HSDIS_TOOLCHAIN_CFLAGS := $(CFLAGS_JDKLIB)
|
||||
HSDIS_TOOLCHAIN_LDFLAGS := $(LDFLAGS_JDKLIB)
|
||||
|
||||
ifeq ($(HSDIS_BACKEND), capstone)
|
||||
ifeq ($(call isTargetCpuArch, x86), true)
|
||||
CAPSTONE_ARCH := CS_ARCH_X86
|
||||
CAPSTONE_MODE := CS_MODE_$(OPENJDK_TARGET_CPU_BITS)
|
||||
else ifeq ($(call isTargetCpuArch, aarch64), true)
|
||||
CAPSTONE_ARCH := CS_ARCH_ARM64
|
||||
CAPSTONE_MODE := CS_MODE_ARM
|
||||
else
|
||||
$(error No support for Capstone on this platform)
|
||||
endif
|
||||
|
||||
HSDIS_CFLAGS += -DCAPSTONE_ARCH=$(CAPSTONE_ARCH) \
|
||||
-DCAPSTONE_MODE=$(CAPSTONE_MODE)
|
||||
endif
|
||||
|
||||
ifeq ($(HSDIS_BACKEND), llvm)
|
||||
# Use C++ instead of C
|
||||
HSDIS_TOOLCHAIN_CFLAGS := $(CXXFLAGS_JDKLIB)
|
||||
HSDIS_TOOLCHAIN := TOOLCHAIN_LINK_CXX
|
||||
|
||||
ifeq ($(call isTargetOs, linux), true)
|
||||
LLVM_OS := pc-linux-gnu
|
||||
else ifeq ($(call isTargetOs, macosx), true)
|
||||
LLVM_OS := apple-darwin
|
||||
else ifeq ($(call isTargetOs, windows), true)
|
||||
LLVM_OS := pc-windows-msvc
|
||||
else
|
||||
$(error No support for LLVM on this platform)
|
||||
endif
|
||||
|
||||
HSDIS_CFLAGS += -DLLVM_DEFAULT_TRIPLET='"$(OPENJDK_TARGET_CPU)-$(LLVM_OS)"'
|
||||
endif
|
||||
|
||||
ifeq ($(HSDIS_BACKEND), binutils)
|
||||
ifeq ($(call isTargetOs, windows), true)
|
||||
# On windows, we need to "fake" a completely different toolchain using gcc
|
||||
# instead of the normal microsoft toolchain. This is quite hacky...
|
||||
|
||||
MINGW_BASE := x86_64-w64-mingw32
|
||||
|
||||
MINGW_SYSROOT = $(shell $(MINGW_BASE)-gcc -print-sysroot)
|
||||
ifeq ($(wildcard $(MINGW_SYSROOT)), )
|
||||
# Use fallback path
|
||||
MINGW_SYSROOT := /usr/$(MINGW_BASE)
|
||||
ifeq ($(wildcard $(MINGW_SYSROOT)), )
|
||||
$(error mingw sysroot not found)
|
||||
endif
|
||||
endif
|
||||
|
||||
$(eval $(call DefineNativeToolchain, TOOLCHAIN_MINGW, \
|
||||
CC := $(MINGW_BASE)-gcc, \
|
||||
LD := $(MINGW_BASE)-ld, \
|
||||
OBJCOPY := $(MINGW_BASE)-objcopy, \
|
||||
RC := $(RC), \
|
||||
SYSROOT_CFLAGS := --sysroot=$(MINGW_SYSROOT), \
|
||||
SYSROOT_LDFLAGS := --sysroot=$(MINGW_SYSROOT), \
|
||||
))
|
||||
|
||||
MINGW_SYSROOT_LIB_PATH := $(MINGW_SYSROOT)/mingw/lib
|
||||
ifeq ($(wildcard $(MINGW_SYSROOT_LIB_PATH)), )
|
||||
# Try without mingw
|
||||
MINGW_SYSROOT_LIB_PATH := $(MINGW_SYSROOT)/lib
|
||||
ifeq ($(wildcard $(MINGW_SYSROOT_LIB_PATH)), )
|
||||
$(error mingw sysroot lib path not found)
|
||||
endif
|
||||
endif
|
||||
|
||||
MINGW_VERSION = $(shell $(MINGW_BASE)-gcc -v 2>&1 | $(GREP) "gcc version" | $(CUT) -d " " -f 3)
|
||||
MINGW_GCC_LIB_PATH := /usr/lib/gcc/$(MINGW_BASE)/$(MINGW_VERSION)
|
||||
ifeq ($(wildcard $(MINGW_GCC_LIB_PATH)), )
|
||||
# Try using only major version number
|
||||
MINGW_VERSION_MAJOR := $(firstword $(subst ., , $(MINGW_VERSION)))
|
||||
MINGW_GCC_LIB_PATH := /usr/lib/gcc/$(MINGW_BASE)/$(MINGW_VERSION_MAJOR)
|
||||
ifeq ($(wildcard $(MINGW_GCC_LIB_PATH)), )
|
||||
$(error mingw gcc lib path not found)
|
||||
endif
|
||||
endif
|
||||
|
||||
TOOLCHAIN_TYPE := gcc
|
||||
OPENJDK_TARGET_OS := linux
|
||||
CC_OUT_OPTION := -o$(SPACE)
|
||||
LD_OUT_OPTION := -o$(SPACE)
|
||||
GENDEPS_FLAGS := -MMD -MF
|
||||
CFLAGS_DEBUG_SYMBOLS := -g
|
||||
DISABLED_WARNINGS :=
|
||||
DISABLE_WARNING_PREFIX := -Wno-
|
||||
CFLAGS_WARNINGS_ARE_ERRORS := -Werror
|
||||
SHARED_LIBRARY_FLAGS := -shared
|
||||
|
||||
HSDIS_TOOLCHAIN := TOOLCHAIN_MINGW
|
||||
HSDIS_TOOLCHAIN_CFLAGS :=
|
||||
HSDIS_TOOLCHAIN_LDFLAGS := -L$(MINGW_GCC_LIB_PATH) -L$(MINGW_SYSROOT_LIB_PATH)
|
||||
MINGW_DLLCRT := $(MINGW_SYSROOT_LIB_PATH)/dllcrt2.o
|
||||
HSDIS_TOOLCHAIN_LIBS := $(MINGW_DLLCRT) -lmingw32 -lgcc -lgcc_eh -lmoldname \
|
||||
-lmingwex -lmsvcrt -lpthread -ladvapi32 -lshell32 -luser32 -lkernel32
|
||||
else
|
||||
HSDIS_TOOLCHAIN_LIBS := -ldl
|
||||
endif
|
||||
endif
|
||||
|
||||
$(eval $(call SetupJdkLibrary, BUILD_HSDIS, \
|
||||
NAME := hsdis, \
|
||||
SRC := $(TOPDIR)/src/utils/hsdis/$(HSDIS_BACKEND), \
|
||||
EXTRA_HEADER_DIRS := $(TOPDIR)/src/utils/hsdis, \
|
||||
TOOLCHAIN := $(HSDIS_TOOLCHAIN), \
|
||||
OUTPUT_DIR := $(HSDIS_OUTPUT_DIR), \
|
||||
OBJECT_DIR := $(HSDIS_OUTPUT_DIR), \
|
||||
DISABLED_WARNINGS_gcc := undef format-nonliteral sign-compare, \
|
||||
DISABLED_WARNINGS_clang := undef format-nonliteral, \
|
||||
CFLAGS := $(HSDIS_TOOLCHAIN_CFLAGS) $(HSDIS_CFLAGS), \
|
||||
LDFLAGS := $(HSDIS_TOOLCHAIN_LDFLAGS) $(HSDIS_LDFLAGS) $(SHARED_LIBRARY_FLAGS), \
|
||||
LIBS := $(HSDIS_LIBS) $(HSDIS_TOOLCHAIN_LIBS), \
|
||||
))
|
||||
|
||||
$(BUILT_HSDIS_LIB): $(BUILD_HSDIS_TARGET)
|
||||
$(install-file)
|
||||
|
||||
build: $(BUILD_HSDIS) $(BUILT_HSDIS_LIB)
|
||||
|
||||
TARGETS += build
|
||||
|
||||
ifeq ($(ENABLE_HSDIS_BUNDLING), false)
|
||||
|
||||
ifeq ($(call isTargetOs, windows), true)
|
||||
JDK_HSDIS_DIR := $(JDK_OUTPUTDIR)/bin
|
||||
IMAGE_HSDIS_DIR := $(JDK_IMAGE_DIR)/bin
|
||||
else
|
||||
JDK_HSDIS_DIR := $(JDK_OUTPUTDIR)/lib
|
||||
IMAGE_HSDIS_DIR := $(JDK_IMAGE_DIR)/lib
|
||||
endif
|
||||
|
||||
|
||||
INSTALLED_HSDIS_JDK := $(JDK_HSDIS_DIR)/$(REAL_HSDIS_NAME)
|
||||
INSTALLED_HSDIS_IMAGE := $(IMAGE_HSDIS_DIR)/$(REAL_HSDIS_NAME)
|
||||
|
||||
$(INSTALLED_HSDIS_JDK): $(BUILT_HSDIS_LIB)
|
||||
ifeq ($(HSDIS_BACKEND), binutils)
|
||||
$(call LogWarn, NOTE: The resulting build might not be redistributable. Seek legal advice before distributing.)
|
||||
endif
|
||||
$(install-file)
|
||||
|
||||
$(INSTALLED_HSDIS_IMAGE): $(BUILT_HSDIS_LIB)
|
||||
$(install-file)
|
||||
|
||||
install: $(INSTALLED_HSDIS_JDK) $(INSTALLED_HSDIS_IMAGE)
|
||||
|
||||
else
|
||||
|
||||
install:
|
||||
$(ECHO) NOTE: make install-hsdis is a no-op with --enable-hsdis-bundling
|
||||
|
||||
endif
|
||||
|
||||
TARGETS += install
|
||||
|
||||
################################################################################
|
||||
|
||||
all: $(TARGETS)
|
||||
|
||||
.PHONY: all default build install
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2014, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2014, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@@ -114,66 +114,67 @@ $(eval $(call SetupExecute, jlink_jre, \
|
||||
|
||||
JLINK_JRE_TARGETS := $(jlink_jre)
|
||||
|
||||
# Optimize CDS shared heap for small heap sizes, which are typically used
|
||||
# for small cloud-based apps that have the most critical start-up requirement.
|
||||
# The trade-off is that when larger heap sizes are used, the shared heap
|
||||
# may need to be relocated at runtime.
|
||||
CDS_DUMP_FLAGS = -Xmx128M -Xms128M
|
||||
|
||||
# Helper function for creating the CDS archives for the JDK and JRE
|
||||
#
|
||||
# Param1 - VM variant (e.g., server, client, zero, ...)
|
||||
# Param2 - _nocoops, or empty
|
||||
define CreateCDSArchive
|
||||
$1_$2_DUMP_EXTRA_ARG := $(if $(filter _nocoops, $2),-XX:-UseCompressedOops,)
|
||||
$1_$2_DUMP_TYPE := $(if $(filter _nocoops, $2),-NOCOOPS,)
|
||||
|
||||
# Only G1 supports dumping the shared heap, so explicitly use G1 if the JVM supports it.
|
||||
$1_$2_CDS_DUMP_FLAGS := $(CDS_DUMP_FLAGS) $(if $(filter g1gc, $(JVM_FEATURES_$1)),-XX:+UseG1GC)
|
||||
|
||||
ifeq ($(BUILD_CDS_ARCHIVE), true)
|
||||
ifeq ($(OPENJDK_TARGET_OS), windows)
|
||||
$1_$2_CDS_ARCHIVE := bin/$1/classes$2.jsa
|
||||
CDS_ARCHIVE := bin/server/classes.jsa
|
||||
CDS_NOCOOPS_ARCHIVE := bin/server/classes_nocoops.jsa
|
||||
else
|
||||
$1_$2_CDS_ARCHIVE := lib/$1/classes$2.jsa
|
||||
CDS_ARCHIVE := lib/server/classes.jsa
|
||||
CDS_NOCOOPS_ARCHIVE := lib/server/classes_nocoops.jsa
|
||||
endif
|
||||
|
||||
$$(eval $$(call SetupExecute, $1_$2_gen_cds_archive_jdk, \
|
||||
WARN := Creating CDS$$($1_$2_DUMP_TYPE) archive for jdk image for $1, \
|
||||
INFO := Using CDS flags for $1: $$($1_$2_CDS_DUMP_FLAGS), \
|
||||
DEPS := $$(jlink_jdk), \
|
||||
OUTPUT_FILE := $$(JDK_IMAGE_DIR)/$$($1_$2_CDS_ARCHIVE), \
|
||||
SUPPORT_DIR := $$(SUPPORT_OUTPUTDIR)/images/jdk, \
|
||||
COMMAND := $$(FIXPATH) $$(JDK_IMAGE_DIR)/bin/java -Xshare:dump \
|
||||
-XX:SharedArchiveFile=$$(JDK_IMAGE_DIR)/$$($1_$2_CDS_ARCHIVE) \
|
||||
-$1 $$($1_$2_DUMP_EXTRA_ARG) $$($1_$2_CDS_DUMP_FLAGS) $$(LOG_INFO), \
|
||||
$(eval $(call SetupExecute, gen_cds_archive_jdk, \
|
||||
WARN := Creating CDS archive for jdk image, \
|
||||
DEPS := $(jlink_jdk), \
|
||||
OUTPUT_FILE := $(JDK_IMAGE_DIR)/$(CDS_ARCHIVE), \
|
||||
SUPPORT_DIR := $(SUPPORT_OUTPUTDIR)/images/jdk, \
|
||||
COMMAND := $(FIXPATH) $(JDK_IMAGE_DIR)/bin/java -Xshare:dump \
|
||||
-XX:SharedArchiveFile=$(JDK_IMAGE_DIR)/$(CDS_ARCHIVE) \
|
||||
-Xmx128M -Xms128M $(LOG_INFO), \
|
||||
))
|
||||
|
||||
JDK_TARGETS += $$($1_$2_gen_cds_archive_jdk)
|
||||
JDK_TARGETS += $(gen_cds_archive_jdk)
|
||||
|
||||
$$(eval $$(call SetupExecute, $1_$2_gen_cds_archive_jre, \
|
||||
WARN := Creating CDS$$($1_$2_DUMP_TYPE) archive for jre image for $1, \
|
||||
INFO := Using CDS flags for $1: $$($1_$2_CDS_DUMP_FLAGS), \
|
||||
DEPS := $$(jlink_jre), \
|
||||
OUTPUT_FILE := $$(JRE_IMAGE_DIR)/$$($1_$2_CDS_ARCHIVE), \
|
||||
SUPPORT_DIR := $$(SUPPORT_OUTPUTDIR)/images/jre, \
|
||||
COMMAND := $$(FIXPATH) $$(JRE_IMAGE_DIR)/bin/java -Xshare:dump \
|
||||
-XX:SharedArchiveFile=$$(JRE_IMAGE_DIR)/$$($1_$2_CDS_ARCHIVE) \
|
||||
-$1 $$($1_$2_DUMP_EXTRA_ARG) $$($1_$2_CDS_DUMP_FLAGS) $$(LOG_INFO), \
|
||||
$(eval $(call SetupExecute, gen_cds_archive_jre, \
|
||||
WARN := Creating CDS archive for jre image, \
|
||||
DEPS := $(jlink_jre), \
|
||||
OUTPUT_FILE := $(JRE_IMAGE_DIR)/$(CDS_ARCHIVE), \
|
||||
SUPPORT_DIR := $(SUPPORT_OUTPUTDIR)/images/jre, \
|
||||
COMMAND := $(FIXPATH) $(JRE_IMAGE_DIR)/bin/java -Xshare:dump \
|
||||
-XX:SharedArchiveFile=$(JRE_IMAGE_DIR)/$(CDS_ARCHIVE) \
|
||||
-Xmx128M -Xms128M $(LOG_INFO), \
|
||||
))
|
||||
|
||||
JRE_TARGETS += $$($1_$2_gen_cds_archive_jre)
|
||||
endef
|
||||
|
||||
ifeq ($(BUILD_CDS_ARCHIVE), true)
|
||||
$(foreach v, $(JVM_VARIANTS), \
|
||||
$(eval $(call CreateCDSArchive,$v,)) \
|
||||
)
|
||||
JRE_TARGETS += $(gen_cds_archive_jre)
|
||||
|
||||
ifeq ($(call isTargetCpuBits, 64), true)
|
||||
$(foreach v, $(JVM_VARIANTS), \
|
||||
$(eval $(call CreateCDSArchive,$v,_nocoops)) \
|
||||
)
|
||||
$(eval $(call SetupExecute, gen_cds_nocoops_archive_jdk, \
|
||||
WARN := Creating CDS-NOCOOPS archive for jdk image, \
|
||||
DEPS := $(jlink_jdk), \
|
||||
OUTPUT_FILE := $(JDK_IMAGE_DIR)/$(CDS_NOCOOPS_ARCHIVE), \
|
||||
SUPPORT_DIR := $(SUPPORT_OUTPUTDIR)/images/jdk, \
|
||||
COMMAND := $(FIXPATH) $(JDK_IMAGE_DIR)/bin/java -Xshare:dump \
|
||||
-XX:SharedArchiveFile=$(JDK_IMAGE_DIR)/$(CDS_NOCOOPS_ARCHIVE) \
|
||||
-XX:-UseCompressedOops \
|
||||
-Xmx128M -Xms128M $(LOG_INFO), \
|
||||
))
|
||||
|
||||
JDK_TARGETS += $(gen_cds_nocoops_archive_jdk)
|
||||
|
||||
$(eval $(call SetupExecute, gen_cds_nocoops_archive_jre, \
|
||||
WARN := Creating CDS-NOCOOPS archive for jre image, \
|
||||
DEPS := $(jlink_jre), \
|
||||
OUTPUT_FILE := $(JRE_IMAGE_DIR)/$(CDS_NOCOOPS_ARCHIVE), \
|
||||
SUPPORT_DIR := $(SUPPORT_OUTPUTDIR)/images/jre, \
|
||||
COMMAND := $(FIXPATH) $(JRE_IMAGE_DIR)/bin/java -Xshare:dump \
|
||||
-XX:SharedArchiveFile=$(JRE_IMAGE_DIR)/$(CDS_NOCOOPS_ARCHIVE) \
|
||||
-XX:-UseCompressedOops \
|
||||
-Xmx128M -Xms128M $(LOG_INFO), \
|
||||
))
|
||||
|
||||
JRE_TARGETS += $(gen_cds_nocoops_archive_jre)
|
||||
endif
|
||||
|
||||
endif
|
||||
|
||||
################################################################################
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2012, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2012, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@@ -352,7 +352,7 @@ else # HAS_SPEC=true
|
||||
$(call PrintFailureReports)
|
||||
$(call PrintBuildLogFailures)
|
||||
$(call ReportProfileTimes)
|
||||
$(PRINTF) "HELP: Run 'make doctor' to diagnose build problems.\n\n"
|
||||
$(PRINTF) "Hint: See doc/building.html#troubleshooting for assistance.\n\n"
|
||||
ifneq ($(COMPARE_BUILD), )
|
||||
$(call CleanupCompareBuild)
|
||||
endif
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2011, 2021, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@@ -310,9 +310,17 @@ else # $(HAS_SPEC)=true
|
||||
# level of reproducible builds
|
||||
define SetupReproducibleBuild
|
||||
ifeq ($$(SOURCE_DATE), updated)
|
||||
# For static values of SOURCE_DATE (not "updated"), these are set in spec.gmk
|
||||
export SOURCE_DATE_EPOCH := $$(shell $$(DATE) +"%s")
|
||||
export SOURCE_DATE_ISO_8601 := $$(call EpochToISO8601, $$(SOURCE_DATE_EPOCH))
|
||||
SOURCE_DATE := $$(shell $$(DATE) +"%s")
|
||||
endif
|
||||
export SOURCE_DATE_EPOCH := $$(SOURCE_DATE)
|
||||
ifeq ($$(IS_GNU_DATE), yes)
|
||||
export SOURCE_DATE_ISO_8601 := $$(shell $$(DATE) --utc \
|
||||
--date="@$$(SOURCE_DATE_EPOCH)" \
|
||||
+"%Y-%m-%dT%H:%M:%SZ" 2> /dev/null)
|
||||
else
|
||||
export SOURCE_DATE_ISO_8601 := $$(shell $$(DATE) -u \
|
||||
-j -f "%s" "$$(SOURCE_DATE_EPOCH)" \
|
||||
+"%Y-%m-%dT%H:%M:%SZ" 2> /dev/null)
|
||||
endif
|
||||
endef
|
||||
|
||||
@@ -436,24 +444,21 @@ else # $(HAS_SPEC)=true
|
||||
|
||||
define PrintFailureReports
|
||||
$(if $(filter none, $(LOG_REPORT)), , \
|
||||
$(RM) $(MAKESUPPORT_OUTPUTDIR)/failure-summary.log ; \
|
||||
$(if $(wildcard $(MAKESUPPORT_OUTPUTDIR)/failure-logs/*.log), \
|
||||
( \
|
||||
$(PRINTF) "\n=== Output from failing command(s) repeated here ===\n" ; \
|
||||
$(foreach logfile, $(sort $(wildcard $(MAKESUPPORT_OUTPUTDIR)/failure-logs/*.log)), \
|
||||
$(PRINTF) "* For target $(notdir $(basename $(logfile))):\n" ; \
|
||||
$(if $(filter all, $(LOG_REPORT)), \
|
||||
$(GREP) -v -e "^Note: including file:" < $(logfile) || true ; \
|
||||
, \
|
||||
($(GREP) -v -e "^Note: including file:" < $(logfile) || true) | $(HEAD) -n 15 ; \
|
||||
if test `$(WC) -l < $(logfile)` -gt 15; then \
|
||||
$(ECHO) " ... (rest of output omitted)" ; \
|
||||
fi ; \
|
||||
) \
|
||||
) \
|
||||
$(PRINTF) "\n* All command lines available in $(MAKESUPPORT_OUTPUTDIR)/failure-logs.\n" ; \
|
||||
$(PRINTF) "=== End of repeated output ===\n" ; \
|
||||
) >> $(MAKESUPPORT_OUTPUTDIR)/failure-summary.log \
|
||||
$(PRINTF) "\n=== Output from failing command(s) repeated here ===\n" $(NEWLINE) \
|
||||
$(foreach logfile, $(sort $(wildcard $(MAKESUPPORT_OUTPUTDIR)/failure-logs/*.log)), \
|
||||
$(PRINTF) "* For target $(notdir $(basename $(logfile))):\n" $(NEWLINE) \
|
||||
$(if $(filter all, $(LOG_REPORT)), \
|
||||
$(GREP) -v -e "^Note: including file:" < $(logfile) || true $(NEWLINE) \
|
||||
, \
|
||||
($(GREP) -v -e "^Note: including file:" < $(logfile) || true) | $(HEAD) -n 15 $(NEWLINE) \
|
||||
if test `$(WC) -l < $(logfile)` -gt 15; then \
|
||||
$(ECHO) " ... (rest of output omitted)" ; \
|
||||
fi $(NEWLINE) \
|
||||
) \
|
||||
) \
|
||||
$(PRINTF) "\n* All command lines available in $(MAKESUPPORT_OUTPUTDIR)/failure-logs.\n" $(NEWLINE) \
|
||||
$(PRINTF) "=== End of repeated output ===\n" \
|
||||
) \
|
||||
)
|
||||
endef
|
||||
@@ -464,12 +469,11 @@ else # $(HAS_SPEC)=true
|
||||
$(PRINTF) "\n=== Make failed targets repeated here ===\n" ; \
|
||||
$(GREP) "recipe for target .* failed" $(BUILD_LOG) ; \
|
||||
$(PRINTF) "=== End of repeated output ===\n" ; \
|
||||
$(PRINTF) "\nHELP: Try searching the build log for the name of the first failed target.\n" ; \
|
||||
$(PRINTF) "\nHint: Try searching the build log for the name of the first failed target.\n" ; \
|
||||
else \
|
||||
$(PRINTF) "\nNo indication of failed target found.\n" ; \
|
||||
$(PRINTF) "HELP: Try searching the build log for '] Error'.\n" ; \
|
||||
fi >> $(MAKESUPPORT_OUTPUTDIR)/failure-summary.log ; \
|
||||
$(CAT) $(MAKESUPPORT_OUTPUTDIR)/failure-summary.log \
|
||||
$(PRINTF) "Hint: Try searching the build log for '] Error'.\n" ; \
|
||||
fi \
|
||||
)
|
||||
endef
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2014, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2014, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@@ -48,7 +48,6 @@ JIMAGE_PKGS := \
|
||||
|
||||
$(eval $(call SetupJavaCompilation, BUILD_JRTFS, \
|
||||
COMPILER := bootjdk, \
|
||||
DISABLED_WARNINGS := options, \
|
||||
TARGET_RELEASE := $(TARGET_RELEASE_JDK8), \
|
||||
SRC := $(TOPDIR)/src/java.base/share/classes, \
|
||||
EXCLUDE_FILES := module-info.java, \
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2011, 2021, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@@ -260,13 +260,6 @@ $(eval $(call SetupTarget, hotspot-ide-project, \
|
||||
ALL_TARGETS += $(HOTSPOT_VARIANT_TARGETS) $(HOTSPOT_VARIANT_GENSRC_TARGETS) \
|
||||
$(HOTSPOT_VARIANT_LIBS_TARGETS)
|
||||
|
||||
################################################################################
|
||||
# Help and user support
|
||||
|
||||
$(eval $(call SetupTarget, doctor, \
|
||||
MAKEFILE := Doctor, \
|
||||
))
|
||||
|
||||
################################################################################
|
||||
# Generate libs and launcher targets for creating compile_commands.json fragments
|
||||
define DeclareCompileCommandsRecipe
|
||||
@@ -533,19 +526,6 @@ $(eval $(call SetupTarget, update-x11wrappers, \
|
||||
DEPS := java.base-copy buildtools-jdk, \
|
||||
))
|
||||
|
||||
ifneq ($(HSDIS_BACKEND), none)
|
||||
$(eval $(call SetupTarget, build-hsdis, \
|
||||
MAKEFILE := Hsdis, \
|
||||
TARGET := build, \
|
||||
))
|
||||
|
||||
$(eval $(call SetupTarget, install-hsdis, \
|
||||
MAKEFILE := Hsdis, \
|
||||
TARGET := install, \
|
||||
DEPS := jdk-image, \
|
||||
))
|
||||
endif
|
||||
|
||||
################################################################################
|
||||
# Cross compilation support
|
||||
|
||||
@@ -869,10 +849,6 @@ else
|
||||
$(foreach t, $(filter-out java.base-libs, $(LIBS_TARGETS)), \
|
||||
$(eval $t: java.base-libs))
|
||||
|
||||
ifeq ($(ENABLE_HSDIS_BUNDLING), true)
|
||||
java.base-copy: build-hsdis
|
||||
endif
|
||||
|
||||
# jdk.accessibility depends on java.desktop
|
||||
jdk.accessibility-libs: java.desktop-libs
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2014, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2014, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@@ -35,8 +35,6 @@ default: all
|
||||
include $(SPEC)
|
||||
include MakeBase.gmk
|
||||
|
||||
MODULE_SRC := $(TOPDIR)/src/$(MODULE)
|
||||
|
||||
# All makefiles should add the targets to be built to this variable.
|
||||
TARGETS :=
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@@ -139,7 +139,7 @@ endif
|
||||
################################################################################
|
||||
|
||||
# Each factor variable comes in 3 variants. The first one is reserved for users
|
||||
# to use on command line. The other two are for predefined configurations in JDL
|
||||
# to use on command line. The other two are for predifined configurations in JDL
|
||||
# and for machine specific configurations respectively.
|
||||
TEST_JOBS_FACTOR ?= 1
|
||||
TEST_JOBS_FACTOR_JDL ?= 1
|
||||
@@ -200,10 +200,9 @@ $(eval $(call SetTestOpt,FAILURE_HANDLER_TIMEOUT,JTREG))
|
||||
$(eval $(call ParseKeywordVariable, JTREG, \
|
||||
SINGLE_KEYWORDS := JOBS TIMEOUT_FACTOR FAILURE_HANDLER_TIMEOUT \
|
||||
TEST_MODE ASSERT VERBOSE RETAIN MAX_MEM RUN_PROBLEM_LISTS \
|
||||
RETRY_COUNT REPEAT_COUNT MAX_OUTPUT $(CUSTOM_JTREG_SINGLE_KEYWORDS), \
|
||||
RETRY_COUNT REPEAT_COUNT MAX_OUTPUT, \
|
||||
STRING_KEYWORDS := OPTIONS JAVA_OPTIONS VM_OPTIONS KEYWORDS \
|
||||
EXTRA_PROBLEM_LISTS LAUNCHER_OPTIONS \
|
||||
$(CUSTOM_JTREG_STRING_KEYWORDS), \
|
||||
EXTRA_PROBLEM_LISTS LAUNCHER_OPTIONS, \
|
||||
))
|
||||
|
||||
ifneq ($(JTREG), )
|
||||
@@ -349,24 +348,13 @@ ExpandJtregPath = \
|
||||
)) \
|
||||
)
|
||||
|
||||
# with test id: dir/Test.java#selection -> Test.java#selection -> .java#selection -> #selection
|
||||
# without: dir/Test.java -> Test.java -> .java -> <<empty string>>
|
||||
TestID = \
|
||||
$(subst .java,,$(suffix $(notdir $1)))
|
||||
|
||||
# The test id starting with a hash (#testid) will be stripped by all
|
||||
# evals in ParseJtregTestSelectionInner and will be reinserted by calling
|
||||
# TestID (if it is present).
|
||||
ParseJtregTestSelection = \
|
||||
$(call IfAppend, $(call ParseJtregTestSelectionInner, $1), $(call TestID, $1))
|
||||
|
||||
# Helper function to determine if a test specification is a Jtreg test
|
||||
#
|
||||
# It is a Jtreg test if it optionally begins with jtreg:, and then is either
|
||||
# an unspecified group name (possibly prefixed by :), or a group in a
|
||||
# specified test root, or a path to a test or test directory,
|
||||
# either absolute or relative to any of the TEST_BASEDIRS or test roots.
|
||||
define ParseJtregTestSelectionInner
|
||||
define ParseJtregTestSelection
|
||||
$(eval TEST_NAME := $(strip $(patsubst jtreg:%, %, $1))) \
|
||||
$(if $(or $(findstring :, $(TEST_NAME)), $(findstring /, $(TEST_NAME))), , \
|
||||
$(eval TEST_NAME := :$(TEST_NAME)) \
|
||||
@@ -430,19 +418,28 @@ ifeq ($(TEST), )
|
||||
$(error Cannot continue)
|
||||
endif
|
||||
|
||||
ParseTestSelection = \
|
||||
$(strip $(or \
|
||||
$(call ParseCustomTestSelection, $1) \
|
||||
$(call ParseGtestTestSelection, $1) \
|
||||
$(call ParseMicroTestSelection, $1) \
|
||||
$(call ParseJtregTestSelection, $1) \
|
||||
$(call ParseSpecialTestSelection, $1) \
|
||||
))
|
||||
|
||||
# Now intelligently convert the test selection given by the user in TEST
|
||||
# into a list of fully qualified test descriptors of the tests to run.
|
||||
TESTS_TO_RUN := $(strip $(foreach test, $(TEST), $(call ParseTestSelection, $(test))))
|
||||
UNKNOWN_TEST := $(strip $(foreach test, $(TEST), $(if $(call ParseTestSelection, $(test)), , $(test))))
|
||||
TESTS_TO_RUN :=
|
||||
$(foreach test, $(TEST), \
|
||||
$(eval PARSED_TESTS := $(call ParseCustomTestSelection, $(test))) \
|
||||
$(if $(strip $(PARSED_TESTS)), , \
|
||||
$(eval PARSED_TESTS += $(call ParseGtestTestSelection, $(test))) \
|
||||
) \
|
||||
$(if $(strip $(PARSED_TESTS)), , \
|
||||
$(eval PARSED_TESTS += $(call ParseMicroTestSelection, $(test))) \
|
||||
) \
|
||||
$(if $(strip $(PARSED_TESTS)), , \
|
||||
$(eval PARSED_TESTS += $(call ParseJtregTestSelection, $(test))) \
|
||||
) \
|
||||
$(if $(strip $(PARSED_TESTS)), , \
|
||||
$(eval PARSED_TESTS += $(call ParseSpecialTestSelection, $(test))) \
|
||||
) \
|
||||
$(if $(strip $(PARSED_TESTS)), , \
|
||||
$(eval UNKNOWN_TEST := $(test)) \
|
||||
) \
|
||||
$(eval TESTS_TO_RUN += $(PARSED_TESTS)) \
|
||||
)
|
||||
|
||||
ifneq ($(UNKNOWN_TEST), )
|
||||
$(info Unknown test selection: '$(UNKNOWN_TEST)')
|
||||
@@ -450,6 +447,9 @@ ifneq ($(UNKNOWN_TEST), )
|
||||
$(error Cannot continue)
|
||||
endif
|
||||
|
||||
TESTS_TO_RUN := $(strip $(TESTS_TO_RUN))
|
||||
|
||||
|
||||
# Present the result of our parsing to the user
|
||||
$(info Test selection '$(TEST)', will run:)
|
||||
$(foreach test, $(TESTS_TO_RUN), $(info * $(test)))
|
||||
@@ -523,7 +523,7 @@ define SetupRunGtestTestBody
|
||||
$$(subst $$(TOPDIR)/, , $$($1_TEST_RESULTS_DIR))))
|
||||
$$(if $$(wildcard $$($1_RESULT_FILE)), \
|
||||
$$(eval $1_TOTAL := $$(shell $$(AWK) '/==========.* tests? from .* \
|
||||
test (cases?|suites?) ran/ { print $$$$2 }' $$($1_RESULT_FILE))) \
|
||||
test cases? ran/ { print $$$$2 }' $$($1_RESULT_FILE))) \
|
||||
$$(if $$($1_TOTAL), , $$(eval $1_TOTAL := 0)) \
|
||||
$$(eval $1_PASSED := $$(shell $$(AWK) '/\[ PASSED \] .* tests?./ \
|
||||
{ print $$$$4 }' $$($1_RESULT_FILE))) \
|
||||
@@ -781,12 +781,12 @@ define SetupRunJtregTestBody
|
||||
# Make it possible to specify the JIB_DATA_DIR for tests using the
|
||||
# JIB Artifact resolver
|
||||
$1_JTREG_BASIC_OPTIONS += -e:JIB_DATA_DIR
|
||||
# Some tests needs to find a boot JDK using the JDK8_HOME variable.
|
||||
$1_JTREG_BASIC_OPTIONS += -e:JDK8_HOME=$$(BOOT_JDK)
|
||||
# If running on Windows, propagate the _NT_SYMBOL_PATH to enable
|
||||
# symbol lookup in hserr files
|
||||
ifeq ($$(call isTargetOs, windows), true)
|
||||
$1_JTREG_BASIC_OPTIONS += -e:_NT_SYMBOL_PATH
|
||||
else ifeq ($$(call isTargetOs, linux), true)
|
||||
$1_JTREG_BASIC_OPTIONS += -e:_JVM_DWARF_PATH=$$(SYMBOLS_IMAGE_DIR)
|
||||
endif
|
||||
|
||||
$1_JTREG_BASIC_OPTIONS += \
|
||||
@@ -841,8 +841,6 @@ define SetupRunJtregTestBody
|
||||
endif
|
||||
endif
|
||||
|
||||
$$(eval $$(call SetupRunJtregTestCustom, $1))
|
||||
|
||||
clean-workdir-$1:
|
||||
$$(RM) -r $$($1_TEST_SUPPORT_DIR)
|
||||
|
||||
@@ -854,7 +852,7 @@ define SetupRunJtregTestBody
|
||||
-dir:$$(JTREG_TOPDIR) \
|
||||
-reportDir:$$($1_TEST_RESULTS_DIR) \
|
||||
-workDir:$$($1_TEST_SUPPORT_DIR) \
|
||||
$$$${JTREG_STATUS} \
|
||||
-status:$$$${JTREG_STATUS} \
|
||||
$$(JTREG_OPTIONS) \
|
||||
$$(JTREG_FAILURE_HANDLER_OPTIONS) \
|
||||
$$(JTREG_COV_OPTIONS) \
|
||||
@@ -1185,11 +1183,13 @@ ifeq ($(TEST_OPTS_JCOV), true)
|
||||
JCOV_SOURCE_DIFF := $(JCOV_OUTPUT_DIR)/source_diff
|
||||
JCOV_DIFF_COVERAGE_REPORT := $(JCOV_OUTPUT_DIR)/diff_coverage_report
|
||||
|
||||
ifneq ($(and $(GIT), $(wildcard $(TOPDIR)/.git)), )
|
||||
ifneq ($(and $(HG), $(wildcard $(TOPDIR)/.hg)), )
|
||||
DIFF_COMMAND := $(HG) -R $(TOPDIR) diff -r $(TEST_OPTS_JCOV_DIFF_CHANGESET) > $(JCOV_SOURCE_DIFF)
|
||||
else ifneq ($(and $(GIT), $(wildcard $(TOPDIR)/.git)), )
|
||||
DIFF_COMMAND := $(GIT) -C $(TOPDIR) diff $(TEST_OPTS_JCOV_DIFF_CHANGESET) > $(JCOV_SOURCE_DIFF)
|
||||
else
|
||||
$(info Error: Must be a git source tree for diff coverage.)
|
||||
$(error No git source tree.)
|
||||
$(info Error: Must be either hg or git source tree for diff coverage.)
|
||||
$(error Neither hg nor git source tree.)
|
||||
endif
|
||||
|
||||
jcov-gen-diffcoverage: jcov-stop-grabber
|
||||
|
||||
@@ -169,6 +169,7 @@ ZIPEXE := zip
|
||||
UNZIP := unzip
|
||||
EXPR := expr
|
||||
FILE := file
|
||||
HG := hg
|
||||
ULIMIT := ulimit
|
||||
|
||||
ifeq ($(OPENJDK_BUILD_OS), windows)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2016, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@@ -42,12 +42,16 @@ $(eval $(call IncludeCustomExtension, SourceRevision-pre.gmk))
|
||||
STORED_SOURCE_REVISION := $(TOPDIR)/.src-rev
|
||||
|
||||
USE_SCM := false
|
||||
ifneq ($(and $(GIT), $(wildcard $(TOPDIR)/.git)), )
|
||||
ifneq ($(and $(HG), $(wildcard $(TOPDIR)/.hg)), )
|
||||
USE_SCM := true
|
||||
SCM_DIR := .hg
|
||||
ID_COMMAND := $(PRINTF) "hg:%s" "$$($(HG) id -i)"
|
||||
else ifneq ($(and $(GIT), $(wildcard $(TOPDIR)/.git)), )
|
||||
USE_SCM := true
|
||||
SCM_DIR := .git
|
||||
ID_COMMAND := $(PRINTF) "git:%s%s\n" \
|
||||
"$$($(GIT) log -n1 --format=%H | cut -c1-12)" \
|
||||
"$$(if test -n "$$($(GIT) status --porcelain)"; then printf '+'; fi)"
|
||||
"$$(git log -n1 --format=%H | cut -c1-12)" \
|
||||
"$$(if test -n "$$(git status --porcelain)"; then printf '+'; fi)"
|
||||
endif
|
||||
|
||||
ifeq ($(USE_SCM), true)
|
||||
@@ -81,7 +85,7 @@ ifeq ($(USE_SCM), true)
|
||||
REPO_REVISIONS += $$(SUPPORT_OUTPUTDIR)/src-rev/$$($1_FILENAME)
|
||||
endef
|
||||
|
||||
# Setup rules for all repos. This makes sure all the "git log" calls are made
|
||||
# Setup rules for all repos. This makes sure all the "hg id" calls are made
|
||||
# in parallel.
|
||||
$(foreach repo, $(call FindAllReposRel), \
|
||||
$(eval $(call SetupGetRevisionForRepo, $(repo))) \
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2011, 2021, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@@ -44,13 +44,16 @@ TOOL_COMPILEFONTCONFIG = $(JAVA_SMALL) -cp $(BUILDTOOLS_OUTPUTDIR)/jdk_tools_cla
|
||||
--add-exports java.desktop/sun.awt=ALL-UNNAMED \
|
||||
build.tools.compilefontconfig.CompileFontConfig
|
||||
|
||||
TOOL_COMPILEPROPERTIES = $(JAVA_SMALL) -cp $(BUILDTOOLS_OUTPUTDIR)/jdk_tools_classes \
|
||||
build.tools.compileproperties.CompileProperties
|
||||
|
||||
TOOL_GENERATECHARACTER = $(JAVA_SMALL) -cp $(BUILDTOOLS_OUTPUTDIR)/jdk_tools_classes \
|
||||
build.tools.generatecharacter.GenerateCharacter
|
||||
|
||||
TOOL_CHARACTERNAME = $(JAVA_SMALL) -cp $(BUILDTOOLS_OUTPUTDIR)/jdk_tools_classes \
|
||||
build.tools.generatecharacter.CharacterName
|
||||
|
||||
TOOL_DTDBUILDER = $(JAVA_SMALL) -Ddtd_home=$(TOPDIR)/src/java.desktop/share/data/dtdbuilder \
|
||||
TOOL_DTDBUILDER = $(JAVA_SMALL) -Ddtd_home=$(TOPDIR)/make/data/dtdbuilder \
|
||||
-Djava.awt.headless=true \
|
||||
-cp $(BUILDTOOLS_OUTPUTDIR)/jdk_tools_classes build.tools.dtdbuilder.DTDBuilder
|
||||
|
||||
@@ -72,8 +75,6 @@ TOOL_MAKEJAVASECURITY = $(JAVA_SMALL) -cp $(BUILDTOOLS_OUTPUTDIR)/jdk_tools_clas
|
||||
build.tools.makejavasecurity.MakeJavaSecurity
|
||||
|
||||
TOOL_GENERATECACERTS = $(JAVA_SMALL) -cp $(BUILDTOOLS_OUTPUTDIR)/jdk_tools_classes \
|
||||
-Dkeystore.pkcs12.certProtectionAlgorithm=NONE \
|
||||
-Dkeystore.pkcs12.macAlgorithm=NONE \
|
||||
build.tools.generatecacerts.GenerateCacerts
|
||||
|
||||
TOOL_GENERATEEMOJIDATA = $(JAVA_SMALL) -cp $(BUILDTOOLS_OUTPUTDIR)/jdk_tools_classes \
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2012, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2012, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@@ -50,7 +50,7 @@ endif
|
||||
X11WRAPPERS_OUTPUT := $(SUPPORT_OUTPUTDIR)/x11wrappers
|
||||
GENERATOR_SOURCE_FILE := $(X11WRAPPERS_OUTPUT)/src/data_generator.c
|
||||
|
||||
GENSRC_X11WRAPPERS_DATADIR := $(TOPDIR)/src/java.desktop/unix/data/x11wrappergen
|
||||
GENSRC_X11WRAPPERS_DATADIR := $(TOPDIR)/make/data/x11wrappergen
|
||||
WRAPPER_OUTPUT_FILE := $(GENSRC_X11WRAPPERS_DATADIR)/sizes-$(BITS).txt
|
||||
|
||||
BITS := $(OPENJDK_TARGET_CPU_BITS)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2011, 2021, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@@ -116,82 +116,6 @@ AC_DEFUN([BASIC_EVAL_BUILD_DEVKIT_VARIABLE],
|
||||
fi
|
||||
])
|
||||
|
||||
###############################################################################
|
||||
AC_DEFUN([BASIC_SETUP_XCODE_SYSROOT],
|
||||
[
|
||||
AC_MSG_CHECKING([for sdk name])
|
||||
AC_ARG_WITH([sdk-name], [AS_HELP_STRING([--with-sdk-name],
|
||||
[use the Xcode platform SDK of the given name. @<:@macosx@:>@])],
|
||||
[SDK_NAME=$with_sdk_name]
|
||||
)
|
||||
if test "x$SDK_NAME" = x; then
|
||||
SDK_NAME=macosx
|
||||
fi
|
||||
AC_MSG_RESULT([$SDK_NAME])
|
||||
|
||||
if test "x$DEVKIT_ROOT" != x; then
|
||||
# We need to use xcodebuild from the devkit, if provided
|
||||
UTIL_LOOKUP_PROGS(XCODEBUILD, xcodebuild, $DEVKIT_TOOLCHAIN_PATH)
|
||||
if test "x$XCODEBUILD" = x; then
|
||||
AC_MSG_ERROR([No xcodebuild tool found in the provided devkit])
|
||||
fi
|
||||
XCODEBUILD_OUTPUT=`"$XCODEBUILD" -version 2>&1`
|
||||
if test $? -ne 0; then
|
||||
AC_MSG_ERROR([The xcodebuild tool in the devkit reports an error: $XCODEBUILD_OUTPUT])
|
||||
fi
|
||||
else
|
||||
UTIL_LOOKUP_PROGS(XCODEBUILD, xcodebuild)
|
||||
if test "x$XCODEBUILD" != x; then
|
||||
XCODEBUILD_OUTPUT=`"$XCODEBUILD" -version 2>&1`
|
||||
if test $? -ne 0; then
|
||||
AC_MSG_WARN([Ignoring the located xcodebuild tool $XCODEBUILD due to an error: $XCODEBUILD_OUTPUT])
|
||||
XCODEBUILD=
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "x$SYSROOT" != x; then
|
||||
if ! test -f "$SYSROOT/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h"; then
|
||||
AC_MSG_ERROR([Invalid sysroot, framework headers not found])
|
||||
fi
|
||||
if test "x$with_sdk_name" != x; then
|
||||
AC_MSG_WARN([--with-sdk-name will be ignored since a sysroot or devkit is provided])
|
||||
fi
|
||||
AC_MSG_NOTICE([Setting sysroot from devkit or --with-sysroot])
|
||||
else
|
||||
if test "x$XCODEBUILD" != x; then
|
||||
SYSROOT=`"$XCODEBUILD" -sdk "$SDK_NAME" -version | $GREP '^Path: ' | $SED 's/Path: //'`
|
||||
if test "x$SYSROOT" = x; then
|
||||
AC_MSG_ERROR([No sysroot found for SDK $SDK_NAME from xcodebuild. Check your Xcode installation.])
|
||||
fi
|
||||
if ! test -f "$SYSROOT/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h"; then
|
||||
AC_MSG_ERROR([Unable to find required framework headers, provide a path to an SDK via --with-sysroot or --with-sdk-name and be sure Xcode is installed properly])
|
||||
fi
|
||||
AC_MSG_NOTICE([Setting sysroot from xcodebuild with SDK $SDK_NAME])
|
||||
else
|
||||
UTIL_LOOKUP_PROGS(XCRUN, xcrun)
|
||||
if test "x$XCRUN" != x; then
|
||||
XCRUN_SDK_PATH=`"$XCRUN" --show-sdk-path -sdk "$SDK_NAME"`
|
||||
fi
|
||||
|
||||
if test "x$XCRUN_SDK_PATH" != x && test -f "$XCRUN_SDK_PATH/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h"; then
|
||||
AC_MSG_NOTICE([Setting sysroot from xcrun with SDK $SDK_NAME])
|
||||
SYSROOT="$XCRUN_SDK_PATH"
|
||||
elif test -f /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h; then
|
||||
AC_MSG_WARN([No devkit provided and no xcodebuild found. Proceeding using system headers.])
|
||||
if test "x$with_sdk_name" != x; then
|
||||
AC_MSG_WARN([--with-sdk-name will be ignored since no xcodebuild could be found])
|
||||
fi
|
||||
else
|
||||
AC_MSG_NOTICE([No devkit provided, no xcodebuild tool and no system headers found in the system.])
|
||||
AC_MSG_NOTICE([Check that Xcode is properly installed, or set a devkit with --with-devkit,])
|
||||
AC_MSG_NOTICE([or override SDK selection using --with-sysroot or --with-sdk-name.])
|
||||
AC_MSG_ERROR([Cannot continue])
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
])
|
||||
|
||||
###############################################################################
|
||||
AC_DEFUN_ONCE([BASIC_SETUP_DEVKIT],
|
||||
[
|
||||
@@ -248,7 +172,7 @@ AC_DEFUN_ONCE([BASIC_SETUP_DEVKIT],
|
||||
UTIL_PREPEND_TO_PATH([TOOLCHAIN_PATH],$DEVKIT_TOOLCHAIN_PATH)
|
||||
|
||||
# If DEVKIT_SYSROOT is set, use that, otherwise try a couple of known
|
||||
# places for backwards compatibility.
|
||||
# places for backwards compatiblity.
|
||||
if test "x$DEVKIT_SYSROOT" != x; then
|
||||
SYSROOT="$DEVKIT_SYSROOT"
|
||||
elif test -d "$DEVKIT_ROOT/$host_alias/libc"; then
|
||||
@@ -269,7 +193,7 @@ AC_DEFUN_ONCE([BASIC_SETUP_DEVKIT],
|
||||
# You can force the sysroot if the sysroot encoded into the compiler tools
|
||||
# is not correct.
|
||||
AC_ARG_WITH(sys-root, [AS_HELP_STRING([--with-sys-root],
|
||||
[alias for --with-sysroot for backwards compatibility])],
|
||||
[alias for --with-sysroot for backwards compatability])],
|
||||
[SYSROOT=$with_sys_root]
|
||||
)
|
||||
|
||||
@@ -294,22 +218,87 @@ AC_DEFUN_ONCE([BASIC_SETUP_DEVKIT],
|
||||
)
|
||||
|
||||
if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
|
||||
BASIC_SETUP_XCODE_SYSROOT
|
||||
# If a devkit has been supplied, find xcodebuild in the toolchain_path.
|
||||
# If not, detect if Xcode is installed by running xcodebuild -version
|
||||
# if no Xcode installed, xcodebuild exits with 1
|
||||
# if Xcode is installed, even if xcode-select is misconfigured, then it exits with 0
|
||||
if test "x$DEVKIT_ROOT" != x || /usr/bin/xcodebuild -version >/dev/null 2>&1; then
|
||||
# We need to use xcodebuild in the toolchain dir provided by the user
|
||||
UTIL_LOOKUP_PROGS(XCODEBUILD, xcodebuild, $TOOLCHAIN_PATH)
|
||||
if test x$XCODEBUILD = x; then
|
||||
# fall back on the stub binary in /usr/bin/xcodebuild
|
||||
XCODEBUILD=/usr/bin/xcodebuild
|
||||
fi
|
||||
else
|
||||
# this should result in SYSROOT being empty, unless --with-sysroot is provided
|
||||
# when only the command line tools are installed there are no SDKs, so headers
|
||||
# are copied into the system frameworks
|
||||
XCODEBUILD=
|
||||
AC_SUBST(XCODEBUILD)
|
||||
fi
|
||||
|
||||
AC_MSG_CHECKING([for sdk name])
|
||||
AC_ARG_WITH([sdk-name], [AS_HELP_STRING([--with-sdk-name],
|
||||
[use the platform SDK of the given name. @<:@macosx@:>@])],
|
||||
[SDKNAME=$with_sdk_name]
|
||||
)
|
||||
AC_MSG_RESULT([$SDKNAME])
|
||||
|
||||
# if toolchain path is specified then don't rely on system headers, they may not compile
|
||||
HAVE_SYSTEM_FRAMEWORK_HEADERS=0
|
||||
test -z "$TOOLCHAIN_PATH" && \
|
||||
HAVE_SYSTEM_FRAMEWORK_HEADERS=`test ! -f /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h; echo $?`
|
||||
|
||||
if test -z "$SYSROOT"; then
|
||||
if test -n "$XCODEBUILD"; then
|
||||
# if we don't have system headers, use default SDK name (last resort)
|
||||
if test -z "$SDKNAME" -a $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
|
||||
SDKNAME=${SDKNAME:-macosx}
|
||||
fi
|
||||
|
||||
if test -n "$SDKNAME"; then
|
||||
# Call xcodebuild to determine SYSROOT
|
||||
SYSROOT=`"$XCODEBUILD" -sdk $SDKNAME -version | $GREP '^Path: ' | $SED 's/Path: //'`
|
||||
fi
|
||||
else
|
||||
if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
|
||||
AC_MSG_ERROR([No xcodebuild tool and no system framework headers found, use --with-sysroot or --with-sdk-name to provide a path to a valid SDK])
|
||||
fi
|
||||
fi
|
||||
else
|
||||
# warn user if --with-sdk-name was also set
|
||||
if test -n "$with_sdk_name"; then
|
||||
AC_MSG_WARN([Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used])
|
||||
fi
|
||||
fi
|
||||
|
||||
if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0 -a -z "$SYSROOT"; then
|
||||
# If no system framework headers, then SYSROOT must be set, or we won't build
|
||||
AC_MSG_ERROR([Unable to determine SYSROOT and no headers found in /System/Library/Frameworks. Check Xcode configuration, --with-sysroot or --with-sdk-name arguments.])
|
||||
fi
|
||||
|
||||
# Perform a basic sanity test
|
||||
if test ! -f "$SYSROOT/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h"; then
|
||||
if test -z "$SYSROOT"; then
|
||||
AC_MSG_ERROR([Unable to find required framework headers, provide a path to an SDK via --with-sysroot or --with-sdk-name and be sure Xcode is installed properly])
|
||||
else
|
||||
AC_MSG_ERROR([Invalid SDK or SYSROOT path, dependent framework headers not found])
|
||||
fi
|
||||
fi
|
||||
|
||||
# set SDKROOT too, Xcode tools will pick it up
|
||||
SDKROOT="$SYSROOT"
|
||||
AC_SUBST(SDKROOT)
|
||||
fi
|
||||
|
||||
# Prepend the extra path to the global path
|
||||
UTIL_PREPEND_TO_PATH([PATH],$EXTRA_PATH)
|
||||
|
||||
UTIL_FIXUP_PATH([SYSROOT])
|
||||
|
||||
AC_MSG_CHECKING([for sysroot])
|
||||
AC_MSG_RESULT([$SYSROOT])
|
||||
AC_SUBST(SYSROOT)
|
||||
|
||||
AC_MSG_CHECKING([for toolchain path])
|
||||
AC_MSG_RESULT([$TOOLCHAIN_PATH])
|
||||
AC_SUBST(TOOLCHAIN_PATH)
|
||||
|
||||
AC_MSG_CHECKING([for extra path])
|
||||
AC_MSG_RESULT([$EXTRA_PATH])
|
||||
])
|
||||
@@ -449,11 +438,9 @@ AC_DEFUN([BASIC_CHECK_DIR_ON_LOCAL_DISK],
|
||||
AC_DEFUN_ONCE([BASIC_CHECK_SRC_PERMS],
|
||||
[
|
||||
if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
|
||||
# The choice of file here is somewhat arbitrary, it just needs to be there
|
||||
# in the source tree when configure runs
|
||||
file_to_test="$TOPDIR/Makefile"
|
||||
file_to_test="$TOPDIR/LICENSE"
|
||||
if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
|
||||
AC_MSG_ERROR([Bad file permissions on src files. This is usually caused by cloning the repositories with non cygwin tools in a directory not created in cygwin.])
|
||||
AC_MSG_ERROR([Bad file permissions on src files. This is usually caused by cloning the repositories with a non cygwin hg in a directory not created in cygwin.])
|
||||
fi
|
||||
fi
|
||||
])
|
||||
@@ -507,7 +494,7 @@ AC_DEFUN_ONCE([BASIC_SETUP_DEFAULT_MAKE_TARGET],
|
||||
AC_DEFUN_ONCE([BASIC_SETUP_DEFAULT_LOG],
|
||||
[
|
||||
AC_ARG_WITH(log, [AS_HELP_STRING([--with-log],
|
||||
[[default value for make LOG argument [warn]]])])
|
||||
[[default vaue for make LOG argument [warn]]])])
|
||||
AC_MSG_CHECKING([for default LOG value])
|
||||
if test "x$with_log" = x; then
|
||||
DEFAULT_LOG=""
|
||||
|
||||
@@ -80,7 +80,6 @@ AC_DEFUN_ONCE([BASIC_SETUP_FUNDAMENTAL_TOOLS],
|
||||
|
||||
# Optional tools, we can do without them
|
||||
UTIL_LOOKUP_PROGS(DF, df)
|
||||
UTIL_LOOKUP_PROGS(GIT, git)
|
||||
UTIL_LOOKUP_PROGS(NICE, nice)
|
||||
UTIL_LOOKUP_PROGS(READLINK, greadlink readlink)
|
||||
|
||||
@@ -161,23 +160,25 @@ AC_DEFUN([BASIC_CHECK_MAKE_VERSION],
|
||||
AC_DEFUN([BASIC_CHECK_MAKE_OUTPUT_SYNC],
|
||||
[
|
||||
# Check if make supports the output sync option and if so, setup using it.
|
||||
UTIL_ARG_WITH(NAME: output-sync, TYPE: literal,
|
||||
VALID_VALUES: [none recurse line target], DEFAULT: none,
|
||||
OPTIONAL: true, ENABLED_DEFAULT: true,
|
||||
ENABLED_RESULT: OUTPUT_SYNC_SUPPORTED,
|
||||
CHECKING_MSG: [for make --output-sync value],
|
||||
DESC: [set make --output-sync type if supported by make],
|
||||
CHECK_AVAILABLE:
|
||||
[
|
||||
AC_MSG_CHECKING([if make --output-sync is supported])
|
||||
if ! $MAKE --version -O > /dev/null 2>&1; then
|
||||
AC_MSG_RESULT([no])
|
||||
AVAILABLE=false
|
||||
else
|
||||
AC_MSG_RESULT([yes])
|
||||
fi
|
||||
]
|
||||
)
|
||||
AC_MSG_CHECKING([if make --output-sync is supported])
|
||||
if $MAKE --version -O > /dev/null 2>&1; then
|
||||
OUTPUT_SYNC_SUPPORTED=true
|
||||
AC_MSG_RESULT([yes])
|
||||
AC_MSG_CHECKING([for output-sync value])
|
||||
AC_ARG_WITH([output-sync], [AS_HELP_STRING([--with-output-sync],
|
||||
[set make output sync type if supported by make. @<:@recurse@:>@])],
|
||||
[OUTPUT_SYNC=$with_output_sync])
|
||||
if test "x$OUTPUT_SYNC" = "x"; then
|
||||
OUTPUT_SYNC=none
|
||||
fi
|
||||
AC_MSG_RESULT([$OUTPUT_SYNC])
|
||||
if ! $MAKE --version -O$OUTPUT_SYNC > /dev/null 2>&1; then
|
||||
AC_MSG_ERROR([Make did not the support the value $OUTPUT_SYNC as output sync type.])
|
||||
fi
|
||||
else
|
||||
OUTPUT_SYNC_SUPPORTED=false
|
||||
AC_MSG_RESULT([no])
|
||||
fi
|
||||
AC_SUBST(OUTPUT_SYNC_SUPPORTED)
|
||||
AC_SUBST(OUTPUT_SYNC)
|
||||
])
|
||||
@@ -342,6 +343,8 @@ AC_DEFUN_ONCE([BASIC_SETUP_COMPLEX_TOOLS],
|
||||
|
||||
UTIL_LOOKUP_PROGS(READELF, greadelf readelf)
|
||||
UTIL_LOOKUP_PROGS(DOT, dot)
|
||||
UTIL_LOOKUP_PROGS(HG, hg)
|
||||
UTIL_LOOKUP_PROGS(GIT, git)
|
||||
UTIL_LOOKUP_PROGS(STAT, stat)
|
||||
UTIL_LOOKUP_PROGS(TIME, time)
|
||||
UTIL_LOOKUP_PROGS(FLOCK, flock)
|
||||
@@ -350,7 +353,7 @@ AC_DEFUN_ONCE([BASIC_SETUP_COMPLEX_TOOLS],
|
||||
UTIL_LOOKUP_PROGS(DTRACE, dtrace, $PATH:/usr/sbin)
|
||||
UTIL_LOOKUP_PROGS(PATCH, gpatch patch)
|
||||
# Check if it's GNU time
|
||||
[ IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU [Tt]ime'` ]
|
||||
IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
|
||||
if test "x$IS_GNU_TIME" != x; then
|
||||
IS_GNU_TIME=yes
|
||||
else
|
||||
@@ -375,6 +378,43 @@ AC_DEFUN_ONCE([BASIC_SETUP_COMPLEX_TOOLS],
|
||||
UTIL_REQUIRE_PROGS(MIG, mig)
|
||||
UTIL_REQUIRE_PROGS(XATTR, xattr)
|
||||
UTIL_LOOKUP_PROGS(CODESIGN, codesign)
|
||||
|
||||
if test "x$CODESIGN" != "x"; then
|
||||
# Check for user provided code signing identity.
|
||||
# If no identity was provided, fall back to "openjdk_codesign".
|
||||
AC_ARG_WITH([macosx-codesign-identity], [AS_HELP_STRING([--with-macosx-codesign-identity],
|
||||
[specify the code signing identity])],
|
||||
[MACOSX_CODESIGN_IDENTITY=$with_macosx_codesign_identity],
|
||||
[MACOSX_CODESIGN_IDENTITY=openjdk_codesign]
|
||||
)
|
||||
|
||||
AC_SUBST(MACOSX_CODESIGN_IDENTITY)
|
||||
|
||||
# Verify that the codesign certificate is present
|
||||
AC_MSG_CHECKING([if codesign certificate is present])
|
||||
$RM codesign-testfile
|
||||
$TOUCH codesign-testfile
|
||||
$CODESIGN -s "$MACOSX_CODESIGN_IDENTITY" codesign-testfile 2>&AS_MESSAGE_LOG_FD \
|
||||
>&AS_MESSAGE_LOG_FD || CODESIGN=
|
||||
$RM codesign-testfile
|
||||
if test "x$CODESIGN" = x; then
|
||||
AC_MSG_RESULT([no])
|
||||
else
|
||||
AC_MSG_RESULT([yes])
|
||||
# Verify that the codesign has --option runtime
|
||||
AC_MSG_CHECKING([if codesign has --option runtime])
|
||||
$RM codesign-testfile
|
||||
$TOUCH codesign-testfile
|
||||
$CODESIGN --option runtime -s "$MACOSX_CODESIGN_IDENTITY" codesign-testfile \
|
||||
2>&AS_MESSAGE_LOG_FD >&AS_MESSAGE_LOG_FD || CODESIGN=
|
||||
$RM codesign-testfile
|
||||
if test "x$CODESIGN" = x; then
|
||||
AC_MSG_ERROR([codesign does not have --option runtime. macOS 10.13.6 and above is required.])
|
||||
else
|
||||
AC_MSG_RESULT([yes])
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
UTIL_REQUIRE_PROGS(SETFILE, SetFile)
|
||||
fi
|
||||
if ! test "x$OPENJDK_TARGET_OS" = "xwindows"; then
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2011, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@@ -34,10 +34,9 @@ AC_DEFUN([BASIC_SETUP_PATHS_WINDOWS],
|
||||
OPENJDK_BUILD_OS_ENV=windows.wsl1
|
||||
else
|
||||
# This test is not guaranteed, but there is no documented way of
|
||||
# distinguishing between WSL1 and WSL2.
|
||||
# Check whether "Hyper-V" appears in /proc/interrupts because WSL2 runs on Hyper-V.
|
||||
$GREP -q Hyper-V /proc/interrupts
|
||||
if test $? -eq 0; then
|
||||
# distinguishing between WSL1 and WSL2. Assume only WSL2 has WSL_INTEROP
|
||||
# in /run/WSL
|
||||
if test -d "/run/WSL" ; then
|
||||
OPENJDK_BUILD_OS_ENV=windows.wsl2
|
||||
else
|
||||
OPENJDK_BUILD_OS_ENV=windows.wsl1
|
||||
@@ -185,16 +184,6 @@ AC_DEFUN([BASIC_SETUP_PATHS_WINDOWS],
|
||||
AC_MSG_RESULT([unknown])
|
||||
AC_MSG_WARN([It seems that your find utility is non-standard.])
|
||||
fi
|
||||
|
||||
if test "x$GIT" != x && test -e $TOPDIR/.git; then
|
||||
git_autocrlf=`$GIT config core.autocrlf`
|
||||
if test "x$git_autocrlf" != x && test "x$git_autocrlf" != "xfalse"; then
|
||||
AC_MSG_NOTICE([Your git configuration does not set core.autocrlf to false.])
|
||||
AC_MSG_NOTICE([If you checked out this code using that setting, the build WILL fail.])
|
||||
AC_MSG_NOTICE([To correct, run "git config --global core.autocrlf false" and re-clone the repo.])
|
||||
AC_MSG_WARN([Code is potentially incorrectly cloned. HIGH RISK of build failure!])
|
||||
fi
|
||||
fi
|
||||
])
|
||||
|
||||
# Verify that the directory is usable on Windows
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
# This file handles detection of the Boot JDK. The Boot JDK detection
|
||||
# process has been developed as a response to solve a complex real-world
|
||||
# problem. Initially, it was simple, but it has grown as platform after
|
||||
# platform, idiosyncrasy after idiosyncrasy has been supported.
|
||||
# platform, idiosyncracy after idiosyncracy has been supported.
|
||||
#
|
||||
# The basic idea is this:
|
||||
# 1) You need an acceptable *) JDK to use as a Boot JDK
|
||||
@@ -300,28 +300,6 @@ AC_DEFUN([BOOTJDK_CHECK_TOOL_IN_BOOTJDK],
|
||||
])
|
||||
])
|
||||
|
||||
# Setup CLASSPATH environment variable
|
||||
AC_DEFUN([BOOTJDK_SETUP_CLASSPATH],
|
||||
[
|
||||
AC_ARG_WITH([classpath], [AS_HELP_STRING([--with-classpath],
|
||||
[Optional classpath to set as CLASSPATH to all Java invocations @<:@none@:>@])])
|
||||
|
||||
if test "x$CLASSPATH" != x; then
|
||||
AC_MSG_WARN([CLASSPATH is set in the environment. This will be ignored. Use --with-classpath instead.])
|
||||
fi
|
||||
|
||||
CLASSPATH=
|
||||
|
||||
if test "x$with_classpath" != x && test "x$with_classpath" != xyes &&
|
||||
test "x$with_classpath" != xno ; then
|
||||
CLASSPATH="$with_classpath"
|
||||
AC_MSG_CHECKING([for classpath to use for all Java invocations])
|
||||
AC_MSG_RESULT([$CLASSPATH])
|
||||
fi
|
||||
|
||||
AC_SUBST(CLASSPATH)
|
||||
])
|
||||
|
||||
###############################################################################
|
||||
#
|
||||
# We need a Boot JDK to bootstrap the build.
|
||||
@@ -428,8 +406,6 @@ AC_DEFUN_ONCE([BOOTJDK_SETUP_BOOT_JDK],
|
||||
BOOTJDK_USE_LOCAL_CDS=false
|
||||
AC_MSG_RESULT([no, -XX:SharedArchiveFile not supported])
|
||||
fi
|
||||
|
||||
BOOTJDK_SETUP_CLASSPATH
|
||||
])
|
||||
|
||||
AC_DEFUN_ONCE([BOOTJDK_SETUP_BOOT_JDK_ARGUMENTS],
|
||||
|
||||
13
make/autoconf/build-aux/config.guess
vendored
13
make/autoconf/build-aux/config.guess
vendored
@@ -1,6 +1,6 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Copyright (c) 2012, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2012, 2021, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2021, Azul Systems, Inc. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
@@ -67,7 +67,7 @@ fi
|
||||
|
||||
# Test and fix architecture string on AIX
|
||||
# On AIX 'config.guess' returns 'powerpc' as architecture but 'powerpc' is
|
||||
# implicitly handled as 32-bit architecture in 'platform.m4' so we check
|
||||
# implicitely handled as 32-bit architecture in 'platform.m4' so we check
|
||||
# for the kernel mode rewrite it to 'powerpc64' if we'Re running in 64-bit mode.
|
||||
# The check could also be done with `/usr/sbin/prtconf | grep "Kernel Type" | grep "64-bit"`
|
||||
echo $OUT | grep powerpc-ibm-aix > /dev/null 2> /dev/null
|
||||
@@ -111,15 +111,6 @@ if [ "x$OUT" = x ]; then
|
||||
fi
|
||||
fi
|
||||
|
||||
# Test and fix RISC-V.
|
||||
if [ "x$OUT" = x ]; then
|
||||
if [ `uname -s` = Linux ]; then
|
||||
if [ `uname -m` = riscv64 ]; then
|
||||
OUT=riscv64-unknown-linux-gnu
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
# Test and fix cpu on macos-aarch64, uname -p reports arm, buildsys expects aarch64
|
||||
echo $OUT | grep arm-apple-darwin > /dev/null 2> /dev/null
|
||||
if test $? != 0; then
|
||||
|
||||
10
make/autoconf/build-aux/config.sub
vendored
10
make/autoconf/build-aux/config.sub
vendored
@@ -1,6 +1,6 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# Copyright (c) 2014, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2014, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@@ -46,13 +46,6 @@ if echo $* | grep pc-msys >/dev/null ; then
|
||||
exit
|
||||
fi
|
||||
|
||||
# Canonicalize for riscv which autoconf-config.sub doesn't handle
|
||||
if echo $* | grep '^riscv\(32\|64\)-linux' >/dev/null ; then
|
||||
result=`echo $@ | sed 's/linux/unknown-linux/'`
|
||||
echo $result
|
||||
exit
|
||||
fi
|
||||
|
||||
# Filter out everything that doesn't begin with "aarch64-"
|
||||
if ! echo $* | grep '^aarch64-' >/dev/null ; then
|
||||
. $DIR/autoconf-config.sub "$@"
|
||||
@@ -85,3 +78,4 @@ result=`echo $result | sed "s/^arm-/aarch64-/"`
|
||||
|
||||
echo $result
|
||||
exit $exitcode
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# Copyright (c) 2012, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2012, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@@ -40,7 +40,6 @@ export AWK="@AWK@"
|
||||
export BASH="@BASH@"
|
||||
export CAT="@CAT@"
|
||||
export CMP="@CMP@"
|
||||
export CODESIGN="@CODESIGN@"
|
||||
export CP="@CP@"
|
||||
export CUT="@CUT@"
|
||||
export DIFF="@DIFF@"
|
||||
@@ -54,7 +53,7 @@ export LDD="@LDD@"
|
||||
export LN="@LN@"
|
||||
export MKDIR="@MKDIR@"
|
||||
export MV="@MV@"
|
||||
export NM="@NM@"
|
||||
export NM="@GNM@"
|
||||
export OBJDUMP="@OBJDUMP@"
|
||||
export OTOOL="@OTOOL@"
|
||||
export PRINTF="@PRINTF@"
|
||||
@@ -93,6 +92,7 @@ if [ "$OPENJDK_TARGET_OS" = "windows" ]; then
|
||||
export PATH="$PATH:@TOOLCHAIN_PATH@"
|
||||
fi
|
||||
|
||||
export HOTSPOT_BUILD_TIME="@HOTSPOT_BUILD_TIME@"
|
||||
export USE_PRECOMPILED_HEADER="@USE_PRECOMPILED_HEADER@"
|
||||
|
||||
# Now locate the main script and run it.
|
||||
|
||||
35
make/autoconf/configure
vendored
35
make/autoconf/configure
vendored
@@ -274,11 +274,11 @@ do
|
||||
# Check for certain autoconf options that require extra action
|
||||
case $conf_option in
|
||||
-build | --build | --buil | --bui | --bu |-build=* | --build=* | --buil=* | --bui=* | --bu=*)
|
||||
conf_build_set=true ;;
|
||||
conf_legacy_crosscompile="$conf_legacy_crosscompile $conf_option" ;;
|
||||
-target | --target | --targe | --targ | --tar | --ta | --t | -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
|
||||
conf_incompatible_crosscompile="$conf_incompatible_crosscompile $conf_option" ;;
|
||||
conf_legacy_crosscompile="$conf_legacy_crosscompile $conf_option" ;;
|
||||
-host | --host | --hos | --ho | -host=* | --host=* | --hos=* | --ho=*)
|
||||
conf_incompatible_crosscompile="$conf_incompatible_crosscompile $conf_option" ;;
|
||||
conf_legacy_crosscompile="$conf_legacy_crosscompile $conf_option" ;;
|
||||
-help | --help | --hel | --he | -h)
|
||||
conf_print_help=true ;;
|
||||
esac
|
||||
@@ -287,30 +287,23 @@ done
|
||||
# Save the quoted command line
|
||||
CONFIGURE_COMMAND_LINE="${conf_quoted_arguments[@]}"
|
||||
|
||||
if test "x$conf_incompatible_crosscompile" != "x"; then
|
||||
if test "x$conf_legacy_crosscompile" != "x"; then
|
||||
if test "x$conf_openjdk_target" != "x"; then
|
||||
echo "Error: --openjdk-target was specified together with"
|
||||
echo "incompatible autoconf cross-compilation flags."
|
||||
echo "You specified: --openjdk-target=$conf_openjdk_target and $conf_incompatible_crosscompile."
|
||||
echo "It is recommended that you only use --openjdk-target."
|
||||
echo "Error: Specifying --openjdk-target together with autoconf"
|
||||
echo "legacy cross-compilation flags is not supported."
|
||||
echo "You specified: --openjdk-target=$conf_openjdk_target and $conf_legacy_crosscompile."
|
||||
echo "The recommended use is just --openjdk-target."
|
||||
exit 1
|
||||
else
|
||||
echo "Warning: You are using misleading autoconf cross-compilation flag(s)."
|
||||
echo "This is not encouraged as use of such flags during building can"
|
||||
echo "quickly become confusing."
|
||||
echo "It is highly recommended that you use --openjdk-target instead."
|
||||
echo "Warning: You are using legacy autoconf cross-compilation flags."
|
||||
echo "It is recommended that you use --openjdk-target instead."
|
||||
echo ""
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "x$conf_openjdk_target" != "x"; then
|
||||
conf_processed_arguments=("--host=$conf_openjdk_target" "--target=$conf_openjdk_target" "${conf_processed_arguments[@]}")
|
||||
|
||||
# If --build has been explicitly set don't override that flag with our own
|
||||
if test "x$conf_build_set" != xtrue; then
|
||||
conf_build_platform=`sh $conf_script_dir/build-aux/config.guess`
|
||||
conf_processed_arguments=("--build=$conf_build_platform" "${conf_processed_arguments[@]}")
|
||||
fi
|
||||
conf_build_platform=`sh $conf_script_dir/build-aux/config.guess`
|
||||
conf_processed_arguments=("--build=$conf_build_platform" "--host=$conf_openjdk_target" "--target=$conf_openjdk_target" "${conf_processed_arguments[@]}")
|
||||
fi
|
||||
|
||||
# Make configure exit with error on invalid options as default.
|
||||
@@ -348,9 +341,7 @@ Additional (non-autoconf) OpenJDK Options:
|
||||
--openjdk-target=TARGET cross-compile with TARGET as target platform
|
||||
(i.e. the one you will run the resulting binary on).
|
||||
Equivalent to --host=TARGET --target=TARGET
|
||||
--build=<current platform>, or the platform you
|
||||
have provided if you have explicitly passed
|
||||
--build to configure
|
||||
--build=<current platform>
|
||||
--debug-configure Run the configure script with additional debug
|
||||
logging enabled.
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2011, 2021, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@@ -31,7 +31,7 @@
|
||||
|
||||
|
||||
AC_PREREQ([2.69])
|
||||
AC_INIT(OpenJDK, openjdk, build-dev@openjdk.org,,https://openjdk.org)
|
||||
AC_INIT(OpenJDK, openjdk, build-dev@openjdk.java.net,,http://openjdk.java.net)
|
||||
|
||||
AC_CONFIG_AUX_DIR([$TOPDIR/make/autoconf/build-aux])
|
||||
m4_include([build-aux/pkg.m4])
|
||||
@@ -133,7 +133,6 @@ BASIC_SETUP_DEFAULT_LOG
|
||||
###############################################################################
|
||||
|
||||
# We need build & target for this.
|
||||
JDKOPT_SETUP_JMOD_OPTIONS
|
||||
JDKOPT_SETUP_JLINK_OPTIONS
|
||||
JDKVER_SETUP_JDK_VERSION_NUMBERS
|
||||
|
||||
@@ -153,7 +152,6 @@ BOOTJDK_SETUP_DOCS_REFERENCE_JDK
|
||||
#
|
||||
###############################################################################
|
||||
|
||||
JDKOPT_SETUP_REPRODUCIBLE_BUILD
|
||||
JDKOPT_SETUP_JDK_OPTIONS
|
||||
|
||||
###############################################################################
|
||||
@@ -192,20 +190,24 @@ TOOLCHAIN_POST_DETECTION
|
||||
TOOLCHAIN_SETUP_BUILD_COMPILERS
|
||||
TOOLCHAIN_MISC_CHECKS
|
||||
|
||||
# Setup the JTReg Regression Test Harness.
|
||||
TOOLCHAIN_SETUP_JTREG
|
||||
|
||||
# Setup the Java Microbenchmark Harness (JMH)
|
||||
LIB_TESTS_SETUP_JMH
|
||||
|
||||
# Setup Jib dependency tool
|
||||
TOOLCHAIN_SETUP_JIB
|
||||
|
||||
# After toolchain setup, we need to process some flags to be able to continue.
|
||||
FLAGS_POST_TOOLCHAIN
|
||||
|
||||
# Setup the tools needed to test the JDK (JTReg Regression Test Harness,
|
||||
# Java Microbenchmark Harness (JMH) and the Jib dependency tool).
|
||||
LIB_TESTS_SETUP_JTREG
|
||||
LIB_TESTS_SETUP_JMH
|
||||
LIB_TESTS_SETUP_JIB
|
||||
|
||||
# Now we can test some aspects on the target using configure macros.
|
||||
PLATFORM_SETUP_OPENJDK_TARGET_BITS
|
||||
PLATFORM_SETUP_OPENJDK_TARGET_ENDIANNESS
|
||||
|
||||
# Configure flags for the tools. Need to know if we should build reproducible.
|
||||
JDKOPT_SETUP_REPRODUCIBLE_BUILD
|
||||
FLAGS_SETUP_FLAGS
|
||||
|
||||
# Setup debug symbols (need objcopy from the toolchain for that)
|
||||
@@ -241,14 +243,12 @@ HOTSPOT_SETUP_MISC
|
||||
#
|
||||
###############################################################################
|
||||
|
||||
LIB_TESTS_ENABLE_DISABLE_FAILURE_HANDLER
|
||||
|
||||
JDKOPT_ENABLE_DISABLE_FAILURE_HANDLER
|
||||
JDKOPT_ENABLE_DISABLE_GENERATE_CLASSLIST
|
||||
JDKOPT_EXCLUDE_TRANSLATIONS
|
||||
JDKOPT_ENABLE_DISABLE_MANPAGES
|
||||
JDKOPT_ENABLE_DISABLE_CDS_ARCHIVE
|
||||
JDKOPT_ENABLE_DISABLE_COMPATIBLE_CDS_ALIGNMENT
|
||||
JDKOPT_SETUP_MACOSX_SIGNING
|
||||
|
||||
###############################################################################
|
||||
#
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2011, 2021, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@@ -113,7 +113,7 @@ AC_DEFUN([FLAGS_SETUP_DEBUG_SYMBOLS],
|
||||
)
|
||||
fi
|
||||
|
||||
CFLAGS_DEBUG_SYMBOLS="-g -gdwarf-4"
|
||||
CFLAGS_DEBUG_SYMBOLS="-g"
|
||||
ASFLAGS_DEBUG_SYMBOLS="-g"
|
||||
elif test "x$TOOLCHAIN_TYPE" = xclang; then
|
||||
if test "x$ALLOW_ABSOLUTE_PATHS_IN_OUTPUT" = "xfalse"; then
|
||||
@@ -167,7 +167,11 @@ AC_DEFUN([FLAGS_SETUP_WARNINGS],
|
||||
CFLAGS_WARNINGS_ARE_ERRORS="-WX"
|
||||
|
||||
WARNINGS_ENABLE_ALL="-W3"
|
||||
DISABLED_WARNINGS="4800 5105"
|
||||
DISABLED_WARNINGS="4800"
|
||||
if test "x$TOOLCHAIN_VERSION" = x2017; then
|
||||
# VS2017 incorrectly triggers this warning for constexpr
|
||||
DISABLED_WARNINGS+=" 4307"
|
||||
fi
|
||||
;;
|
||||
|
||||
gcc)
|
||||
@@ -230,7 +234,7 @@ AC_DEFUN([FLAGS_SETUP_QUALITY_CHECKS],
|
||||
;;
|
||||
slowdebug )
|
||||
# FIXME: By adding this to C(XX)FLAGS_DEBUG_OPTIONS/JVM_CFLAGS_SYMBOLS it
|
||||
# gets added conditionally on whether we produce debug symbols or not.
|
||||
# get's added conditionally on whether we produce debug symbols or not.
|
||||
# This is most likely not really correct.
|
||||
|
||||
# Add runtime stack smashing and undefined behavior checks.
|
||||
@@ -468,11 +472,9 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_HELPER],
|
||||
elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
|
||||
# Access APIs for Windows 8 and above
|
||||
# see https://docs.microsoft.com/en-us/cpp/porting/modifying-winver-and-win32-winnt?view=msvc-170
|
||||
ALWAYS_DEFINES_JDK="-DWIN32_LEAN_AND_MEAN -D_WIN32_WINNT=0x0602 \
|
||||
-D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_DEPRECATE -DWIN32 -DIAL"
|
||||
ALWAYS_DEFINES_JVM="-DNOMINMAX -DWIN32_LEAN_AND_MEAN -D_WIN32_WINNT=0x0602 \
|
||||
-D_CRT_SECURE_NO_WARNINGS -D_CRT_NONSTDC_NO_DEPRECATE \
|
||||
-D_WINSOCK_DEPRECATED_NO_WARNINGS"
|
||||
ALWAYS_DEFINES_JDK="-DWIN32_LEAN_AND_MEAN -D_WIN32_WINNT=0x0602 -D_CRT_SECURE_NO_DEPRECATE \
|
||||
-D_CRT_NONSTDC_NO_DEPRECATE -DWIN32 -DIAL"
|
||||
ALWAYS_DEFINES_JVM="-DNOMINMAX -DWIN32_LEAN_AND_MEAN -D_WIN32_WINNT=0x0602"
|
||||
fi
|
||||
|
||||
###############################################################################
|
||||
@@ -530,15 +532,25 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_HELPER],
|
||||
TOOLCHAIN_CFLAGS_JVM="-qtbtable=full -qtune=balanced \
|
||||
-qalias=noansi -qstrict -qtls=default -qnortti -qnoeh -qignerrno -qstackprotect"
|
||||
elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
|
||||
TOOLCHAIN_CFLAGS_JVM="-nologo -MD -Zc:preprocessor -Zc:strictStrings -MP"
|
||||
TOOLCHAIN_CFLAGS_JDK="-nologo -MD -Zc:preprocessor -Zc:strictStrings -Zc:wchar_t-"
|
||||
TOOLCHAIN_CFLAGS_JVM="-nologo -MD -MP"
|
||||
TOOLCHAIN_CFLAGS_JDK="-nologo -MD -Zc:wchar_t-"
|
||||
fi
|
||||
|
||||
# CFLAGS C language level for JDK sources (hotspot only uses C++)
|
||||
# Ideally we would have a common level across all toolchains so that all sources
|
||||
# are sure to conform to the same standard. Unfortunately neither our sources nor
|
||||
# our toolchains are in a condition to support that. But what we loosely aim for is
|
||||
# C99 level.
|
||||
if test "x$TOOLCHAIN_TYPE" = xgcc || test "x$TOOLCHAIN_TYPE" = xclang || test "x$TOOLCHAIN_TYPE" = xxlc; then
|
||||
LANGSTD_CFLAGS="-std=c11"
|
||||
# Explicitly set C99. clang and xlclang support the same flag.
|
||||
LANGSTD_CFLAGS="-std=c99"
|
||||
elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
|
||||
LANGSTD_CFLAGS="-std:c11"
|
||||
# MSVC doesn't support C99/C11 explicitly, unless you compile as C++:
|
||||
# LANGSTD_CFLAGS="-TP"
|
||||
# but that requires numerous changes to the sources files. So we are limited
|
||||
# to C89/C90 plus whatever extensions Visual Studio has decided to implement.
|
||||
# This is the lowest bar for shared code.
|
||||
LANGSTD_CFLAGS=""
|
||||
fi
|
||||
TOOLCHAIN_CFLAGS_JDK_CONLY="$LANGSTD_CFLAGS $TOOLCHAIN_CFLAGS_JDK_CONLY"
|
||||
|
||||
@@ -670,7 +682,7 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_CPU_DEP],
|
||||
$1_DEFINES_CPU_JVM="${$1_DEFINES_CPU_JVM} -D_LP64=1"
|
||||
fi
|
||||
|
||||
# toolchain dependent, per-cpu
|
||||
# toolchain dependend, per-cpu
|
||||
if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
|
||||
if test "x$FLAGS_CPU" = xaarch64; then
|
||||
$1_DEFINES_CPU_JDK="${$1_DEFINES_CPU_JDK} -D_ARM64_ -Darm64"
|
||||
@@ -772,8 +784,10 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_CPU_DEP],
|
||||
$1_TOOLCHAIN_CFLAGS="${NO_DELETE_NULL_POINTER_CHECKS_CFLAG}"
|
||||
fi
|
||||
|
||||
if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
|
||||
REPRODUCIBLE_CFLAGS="-experimental:deterministic"
|
||||
if test "x$TOOLCHAIN_TYPE" = xmicrosoft && test "x$ENABLE_REPRODUCIBLE_BUILD" = xtrue; then
|
||||
# Enabling deterministic creates warnings if __DATE__ or __TIME__ are
|
||||
# used, and since we are, silence that warning.
|
||||
REPRODUCIBLE_CFLAGS="-experimental:deterministic -wd5048"
|
||||
FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [${REPRODUCIBLE_CFLAGS}],
|
||||
PREFIX: $3,
|
||||
IF_FALSE: [
|
||||
@@ -800,7 +814,8 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_CPU_DEP],
|
||||
FILE_MACRO_CFLAGS=
|
||||
]
|
||||
)
|
||||
elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
|
||||
elif test "x$TOOLCHAIN_TYPE" = xmicrosoft &&
|
||||
test "x$ENABLE_REPRODUCIBLE_BUILD" = xtrue; then
|
||||
# There is a known issue with the pathmap if the mapping is made to the
|
||||
# empty string. Add a minimal string "s" as prefix to work around this.
|
||||
# PATHMAP_FLAGS is also added to LDFLAGS in flags-ldflags.m4.
|
||||
@@ -824,19 +839,17 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_CPU_DEP],
|
||||
fi
|
||||
AC_SUBST(FILE_MACRO_CFLAGS)
|
||||
|
||||
FLAGS_SETUP_BRANCH_PROTECTION
|
||||
|
||||
# EXPORT to API
|
||||
CFLAGS_JVM_COMMON="$ALWAYS_CFLAGS_JVM $ALWAYS_DEFINES_JVM \
|
||||
$TOOLCHAIN_CFLAGS_JVM ${$1_TOOLCHAIN_CFLAGS_JVM} \
|
||||
$OS_CFLAGS $OS_CFLAGS_JVM $CFLAGS_OS_DEF_JVM $DEBUG_CFLAGS_JVM \
|
||||
$WARNING_CFLAGS $WARNING_CFLAGS_JVM $JVM_PICFLAG $FILE_MACRO_CFLAGS \
|
||||
$REPRODUCIBLE_CFLAGS $BRANCH_PROTECTION_CFLAGS"
|
||||
$REPRODUCIBLE_CFLAGS"
|
||||
|
||||
CFLAGS_JDK_COMMON="$ALWAYS_CFLAGS_JDK $ALWAYS_DEFINES_JDK $TOOLCHAIN_CFLAGS_JDK \
|
||||
$OS_CFLAGS $CFLAGS_OS_DEF_JDK $DEBUG_CFLAGS_JDK $DEBUG_OPTIONS_FLAGS_JDK \
|
||||
$WARNING_CFLAGS $WARNING_CFLAGS_JDK $DEBUG_SYMBOLS_CFLAGS_JDK \
|
||||
$FILE_MACRO_CFLAGS $REPRODUCIBLE_CFLAGS $BRANCH_PROTECTION_CFLAGS"
|
||||
$FILE_MACRO_CFLAGS $REPRODUCIBLE_CFLAGS"
|
||||
|
||||
# Use ${$2EXTRA_CFLAGS} to block EXTRA_CFLAGS to be added to build flags.
|
||||
# (Currently we don't have any OPENJDK_BUILD_EXTRA_CFLAGS, but that might
|
||||
@@ -890,8 +903,8 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_CPU_DEP],
|
||||
# $2 - Prefix for compiler variables (either BUILD_ or nothing).
|
||||
AC_DEFUN([FLAGS_SETUP_GCC6_COMPILER_FLAGS],
|
||||
[
|
||||
# These flags are required for GCC 6 builds as undefined behavior in OpenJDK code
|
||||
# runs afoul of the more aggressive versions of these optimizations.
|
||||
# These flags are required for GCC 6 builds as undefined behaviour in OpenJDK code
|
||||
# runs afoul of the more aggressive versions of these optimisations.
|
||||
# Notably, value range propagation now assumes that the this pointer of C++
|
||||
# member functions is non-null.
|
||||
NO_DELETE_NULL_POINTER_CHECKS_CFLAG="-fno-delete-null-pointer-checks"
|
||||
@@ -902,24 +915,3 @@ AC_DEFUN([FLAGS_SETUP_GCC6_COMPILER_FLAGS],
|
||||
PREFIX: $2, IF_FALSE: [NO_LIFETIME_DSE_CFLAG=""])
|
||||
$1_GCC6_CFLAGS="${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
|
||||
])
|
||||
|
||||
AC_DEFUN_ONCE([FLAGS_SETUP_BRANCH_PROTECTION],
|
||||
[
|
||||
# Is branch protection available?
|
||||
BRANCH_PROTECTION_AVAILABLE=false
|
||||
BRANCH_PROTECTION_FLAG="-mbranch-protection=standard"
|
||||
|
||||
if test "x$OPENJDK_TARGET_CPU" = xaarch64; then
|
||||
if test "x$TOOLCHAIN_TYPE" = xgcc || test "x$TOOLCHAIN_TYPE" = xclang; then
|
||||
FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [${BRANCH_PROTECTION_FLAG}],
|
||||
IF_TRUE: [BRANCH_PROTECTION_AVAILABLE=true])
|
||||
fi
|
||||
fi
|
||||
|
||||
BRANCH_PROTECTION_CFLAGS=""
|
||||
UTIL_ARG_ENABLE(NAME: branch-protection, DEFAULT: false,
|
||||
RESULT: USE_BRANCH_PROTECTION, AVAILABLE: $BRANCH_PROTECTION_AVAILABLE,
|
||||
DESC: [enable branch protection when compiling C/C++],
|
||||
IF_ENABLED: [ BRANCH_PROTECTION_CFLAGS=${BRANCH_PROTECTION_FLAG}])
|
||||
AC_SUBST(BRANCH_PROTECTION_CFLAGS)
|
||||
])
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2011, 2021, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@@ -32,10 +32,16 @@ AC_DEFUN([FLAGS_SETUP_LDFLAGS],
|
||||
|
||||
# Setup the target toolchain
|
||||
|
||||
# The target dir matches the name of VM variant
|
||||
TARGET_JVM_VARIANT_PATH=$JVM_VARIANT_MAIN
|
||||
|
||||
# On some platforms (mac) the linker warns about non existing -L dirs.
|
||||
# For any of the variants server, client or minimal, the dir matches the
|
||||
# variant name. The "main" variant should be used for linking. For the
|
||||
# rest, the dir is just server.
|
||||
if HOTSPOT_CHECK_JVM_VARIANT(server) || HOTSPOT_CHECK_JVM_VARIANT(client) \
|
||||
|| HOTSPOT_CHECK_JVM_VARIANT(minimal); then
|
||||
TARGET_JVM_VARIANT_PATH=$JVM_VARIANT_MAIN
|
||||
else
|
||||
TARGET_JVM_VARIANT_PATH=server
|
||||
fi
|
||||
FLAGS_SETUP_LDFLAGS_CPU_DEP([TARGET])
|
||||
|
||||
# Setup the build toolchain
|
||||
@@ -77,7 +83,7 @@ AC_DEFUN([FLAGS_SETUP_LDFLAGS_HELPER],
|
||||
-fPIC"
|
||||
|
||||
elif test "x$TOOLCHAIN_TYPE" = xxlc; then
|
||||
BASIC_LDFLAGS="-b64 -brtl -bnorwexec -bnolibpath -bnoexpall -bernotok -btextpsize:64K \
|
||||
BASIC_LDFLAGS="-b64 -brtl -bnorwexec -bnolibpath -bexpall -bernotok -btextpsize:64K \
|
||||
-bdatapsize:64K -bstackpsize:64K"
|
||||
# libjvm.so has gotten too large for normal TOC size; compile with qpic=large and link with bigtoc
|
||||
BASIC_LDFLAGS_JVM_ONLY="-Wl,-lC_r -bbigtoc"
|
||||
@@ -95,10 +101,13 @@ AC_DEFUN([FLAGS_SETUP_LDFLAGS_HELPER],
|
||||
fi
|
||||
|
||||
# Setup OS-dependent LDFLAGS
|
||||
if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$TOOLCHAIN_TYPE" = xclang; then
|
||||
# FIXME: We should really generalize SET_SHARED_LIBRARY_ORIGIN instead.
|
||||
OS_LDFLAGS_JVM_ONLY="-Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
|
||||
OS_LDFLAGS="-mmacosx-version-min=$MACOSX_VERSION_MIN"
|
||||
if test "x$TOOLCHAIN_TYPE" = xclang || test "x$TOOLCHAIN_TYPE" = xgcc; then
|
||||
if test "x$OPENJDK_TARGET_OS" = xmacosx; then
|
||||
# Assume clang or gcc.
|
||||
# FIXME: We should really generalize SET_SHARED_LIBRARY_ORIGIN instead.
|
||||
OS_LDFLAGS_JVM_ONLY="-Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
|
||||
OS_LDFLAGS="-mmacosx-version-min=$MACOSX_VERSION_MIN"
|
||||
fi
|
||||
fi
|
||||
|
||||
# Setup debug level-dependent LDFLAGS
|
||||
@@ -128,13 +137,10 @@ AC_DEFUN([FLAGS_SETUP_LDFLAGS_HELPER],
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
|
||||
REPRODUCIBLE_LDFLAGS="-experimental:deterministic"
|
||||
FLAGS_LINKER_CHECK_ARGUMENTS(ARGUMENT: [$REPRODUCIBLE_LDFLAGS],
|
||||
IF_FALSE: [
|
||||
REPRODUCIBLE_LDFLAGS=
|
||||
]
|
||||
)
|
||||
if test "x$ENABLE_REPRODUCIBLE_BUILD" = "xtrue"; then
|
||||
if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
|
||||
REPRODUCIBLE_LDFLAGS="-experimental:deterministic"
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "x$ALLOW_ABSOLUTE_PATHS_IN_OUTPUT" = "xfalse"; then
|
||||
|
||||
@@ -89,12 +89,11 @@ AC_DEFUN([FLAGS_SETUP_ASFLAGS],
|
||||
|
||||
# Fix linker warning.
|
||||
# Code taken from make/autoconf/flags-cflags.m4 and adapted.
|
||||
JVM_BASIC_ASFLAGS="$JVM_BASIC_ASFLAGS \
|
||||
-DMAC_OS_X_VERSION_MIN_REQUIRED=$MACOSX_VERSION_MIN_NODOTS \
|
||||
JVM_BASIC_ASFLAGS+=" -DMAC_OS_X_VERSION_MIN_REQUIRED=$MACOSX_VERSION_MIN_NODOTS \
|
||||
-mmacosx-version-min=$MACOSX_VERSION_MIN"
|
||||
|
||||
if test -n "$MACOSX_VERSION_MAX"; then
|
||||
JVM_BASIC_ASFLAGS="$JVM_BASIC_ASFLAGS $OS_CFLAGS \
|
||||
JVM_BASIC_ASFLAGS+=" $OS_CFLAGS \
|
||||
-DMAC_OS_X_VERSION_MAX_ALLOWED=$MACOSX_VERSION_MAX_NODOTS"
|
||||
fi
|
||||
fi
|
||||
|
||||
@@ -215,21 +215,8 @@ AC_DEFUN([FLAGS_SETUP_SYSROOT_FLAGS],
|
||||
$1SYSROOT_CFLAGS="--sysroot=[$]$1SYSROOT"
|
||||
$1SYSROOT_LDFLAGS="--sysroot=[$]$1SYSROOT"
|
||||
elif test "x$TOOLCHAIN_TYPE" = xclang; then
|
||||
if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
|
||||
# -isysroot has no effect on linux
|
||||
# https://bugs.llvm.org/show_bug.cgi?id=11503
|
||||
$1SYSROOT_CFLAGS="--sysroot=[$]$1SYSROOT"
|
||||
$1SYSROOT_LDFLAGS="--sysroot=[$]$1SYSROOT"
|
||||
if test -d "$DEVKIT_TOOLCHAIN_PATH"; then
|
||||
# In devkits, gcc is not located in the sysroot.
|
||||
# use --gcc-toolchain to let clang find the gcc installation.
|
||||
$1SYSROOT_CFLAGS="[$]$1SYSROOT_CFLAGS --gcc-toolchain=$DEVKIT_TOOLCHAIN_PATH/.."
|
||||
$1SYSROOT_LDFLAGS="[$]$1SYSROOT_LDFLAGS --gcc-toolchain=$DEVKIT_TOOLCHAIN_PATH/.."
|
||||
fi
|
||||
else
|
||||
$1SYSROOT_CFLAGS="-isysroot [$]$1SYSROOT"
|
||||
$1SYSROOT_LDFLAGS="-isysroot [$]$1SYSROOT"
|
||||
fi
|
||||
$1SYSROOT_CFLAGS="-isysroot [$]$1SYSROOT"
|
||||
$1SYSROOT_LDFLAGS="-isysroot [$]$1SYSROOT"
|
||||
fi
|
||||
fi
|
||||
|
||||
@@ -295,7 +282,7 @@ AC_DEFUN_ONCE([FLAGS_PRE_TOOLCHAIN],
|
||||
# FIXME: Don't really know how to do with this, but this was the old behavior
|
||||
GLOBAL_CPPFLAGS="$SYSROOT_CFLAGS"
|
||||
|
||||
# FIXME: For compatibility, export this as EXTRA_CFLAGS for now.
|
||||
# FIXME: For compatilibity, export this as EXTRA_CFLAGS for now.
|
||||
EXTRA_CFLAGS="$MACHINE_FLAG $USER_CFLAGS"
|
||||
EXTRA_CXXFLAGS="$MACHINE_FLAG $USER_CXXFLAGS"
|
||||
EXTRA_LDFLAGS="$MACHINE_FLAG $USER_LDFLAGS"
|
||||
@@ -340,7 +327,7 @@ AC_DEFUN([FLAGS_SETUP_TOOLCHAIN_CONTROL],
|
||||
# Check if @file is supported by gcc
|
||||
if test "x$TOOLCHAIN_TYPE" = xgcc; then
|
||||
AC_MSG_CHECKING([if @file is supported by gcc])
|
||||
# Extra empty "" to prevent ECHO from interpreting '--version' as argument
|
||||
# Extra emtpy "" to prevent ECHO from interpreting '--version' as argument
|
||||
$ECHO "" "--version" > command.file
|
||||
if $CXX @command.file 2>&AS_MESSAGE_LOG_FD >&AS_MESSAGE_LOG_FD; then
|
||||
AC_MSG_RESULT(yes)
|
||||
|
||||
@@ -82,14 +82,6 @@ cygwin_help() {
|
||||
PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P make )"
|
||||
HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
|
||||
;;
|
||||
i686-w64-mingw32-gcc)
|
||||
PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P gcc-core i686-w64-mingw32-gcc-core mingw64-i686-glib2.0 )"
|
||||
HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
|
||||
;;
|
||||
x86_64-w64-mingw32-gcc)
|
||||
PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P gcc-core x86_64-w64-mingw32-gcc-core mingw64-x86_64-glib2.0 )"
|
||||
HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
@@ -117,8 +109,6 @@ apt_help() {
|
||||
PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
|
||||
dtrace)
|
||||
PKGHANDLER_COMMAND="sudo apt-get install systemtap-sdt-dev" ;;
|
||||
capstone)
|
||||
PKGHANDLER_COMMAND="sudo apt-get install libcapstone-dev" ;;
|
||||
esac
|
||||
}
|
||||
|
||||
@@ -170,8 +160,6 @@ brew_help() {
|
||||
PKGHANDLER_COMMAND="brew install freetype" ;;
|
||||
ccache)
|
||||
PKGHANDLER_COMMAND="brew install ccache" ;;
|
||||
capstone)
|
||||
PKGHANDLER_COMMAND="brew install capstone" ;;
|
||||
esac
|
||||
}
|
||||
|
||||
@@ -296,13 +284,6 @@ AC_DEFUN_ONCE([HELP_PRINT_SUMMARY_AND_WARNINGS],
|
||||
printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
|
||||
printf "* Version string: $VERSION_STRING ($VERSION_SHORT)\n"
|
||||
|
||||
if test "x$SOURCE_DATE" != xupdated; then
|
||||
source_date_info="$SOURCE_DATE ($SOURCE_DATE_ISO_8601)"
|
||||
else
|
||||
source_date_info="Determined at build time"
|
||||
fi
|
||||
printf "* Source date: $source_date_info\n"
|
||||
|
||||
printf "\n"
|
||||
printf "Tools summary:\n"
|
||||
if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
|
||||
@@ -311,19 +292,12 @@ AC_DEFUN_ONCE([HELP_PRINT_SUMMARY_AND_WARNINGS],
|
||||
fi
|
||||
printf "* Boot JDK: $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
|
||||
printf "* Toolchain: $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)\n"
|
||||
if test "x$DEVKIT_NAME" != x; then
|
||||
printf "* Devkit: $DEVKIT_NAME ($DEVKIT_ROOT)\n"
|
||||
elif test "x$DEVKIT_ROOT" != x; then
|
||||
printf "* Devkit: $DEVKIT_ROOT\n"
|
||||
elif test "x$SYSROOT" != x; then
|
||||
printf "* Sysroot: $SYSROOT\n"
|
||||
fi
|
||||
printf "* C Compiler: Version $CC_VERSION_NUMBER (at ${CC#"$FIXPATH "})\n"
|
||||
printf "* C++ Compiler: Version $CXX_VERSION_NUMBER (at ${CXX#"$FIXPATH "})\n"
|
||||
|
||||
printf "\n"
|
||||
printf "Build performance summary:\n"
|
||||
printf "* Build jobs: $JOBS\n"
|
||||
printf "* Cores to use: $JOBS\n"
|
||||
printf "* Memory limit: $MEMORY_SIZE MB\n"
|
||||
if test "x$CCACHE_STATUS" != "x"; then
|
||||
printf "* ccache status: $CCACHE_STATUS\n"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2011, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@@ -83,10 +83,19 @@ AC_DEFUN_ONCE([HOTSPOT_SETUP_JVM_VARIANTS],
|
||||
AC_MSG_ERROR([Cannot continue])
|
||||
fi
|
||||
|
||||
# All "special" variants share the same output directory ("server")
|
||||
VALID_MULTIPLE_JVM_VARIANTS="server client minimal"
|
||||
UTIL_GET_NON_MATCHING_VALUES(INVALID_MULTIPLE_VARIANTS, $JVM_VARIANTS, \
|
||||
$VALID_MULTIPLE_JVM_VARIANTS)
|
||||
if test "x$INVALID_MULTIPLE_VARIANTS" != x && \
|
||||
test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = xtrue; then
|
||||
AC_MSG_ERROR([You can only build multiple variants using these variants: '$VALID_MULTIPLE_JVM_VARIANTS'])
|
||||
fi
|
||||
|
||||
# The "main" variant is the one used by other libs to link against during the
|
||||
# build.
|
||||
if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xtrue"; then
|
||||
MAIN_VARIANT_PRIO_ORDER="server client minimal zero"
|
||||
MAIN_VARIANT_PRIO_ORDER="server client minimal"
|
||||
for variant in $MAIN_VARIANT_PRIO_ORDER; do
|
||||
if HOTSPOT_CHECK_JVM_VARIANT($variant); then
|
||||
JVM_VARIANT_MAIN="$variant"
|
||||
@@ -114,26 +123,12 @@ AC_DEFUN_ONCE([HOTSPOT_SETUP_MISC],
|
||||
HOTSPOT_TARGET_CPU_ARCH=zero
|
||||
fi
|
||||
|
||||
|
||||
AC_ARG_WITH([hotspot-build-time], [AS_HELP_STRING([--with-hotspot-build-time],
|
||||
[timestamp to use in hotspot version string, empty means determined at build time @<:@source-date/empty@:>@])])
|
||||
|
||||
AC_MSG_CHECKING([what hotspot build time to use])
|
||||
[timestamp to use in hotspot version string, empty for on-the-fly @<:@empty@:>@])])
|
||||
|
||||
if test "x$with_hotspot_build_time" != x; then
|
||||
HOTSPOT_BUILD_TIME="$with_hotspot_build_time"
|
||||
AC_MSG_RESULT([$HOTSPOT_BUILD_TIME (from --with-hotspot-build-time)])
|
||||
else
|
||||
if test "x$SOURCE_DATE" = xupdated; then
|
||||
HOTSPOT_BUILD_TIME=""
|
||||
AC_MSG_RESULT([determined at build time (default)])
|
||||
else
|
||||
# If we have a fixed value for SOURCE_DATE, use it as default
|
||||
HOTSPOT_BUILD_TIME="$SOURCE_DATE_ISO_8601"
|
||||
AC_MSG_RESULT([$HOTSPOT_BUILD_TIME (from --with-source-date)])
|
||||
fi
|
||||
fi
|
||||
|
||||
AC_SUBST(HOTSPOT_BUILD_TIME)
|
||||
|
||||
|
||||
@@ -142,4 +137,10 @@ AC_DEFUN_ONCE([HOTSPOT_SETUP_MISC],
|
||||
HOTSPOT_TARGET_CPU=arm_32
|
||||
HOTSPOT_TARGET_CPU_DEFINE="ARM32"
|
||||
fi
|
||||
|
||||
# --with-cpu-port is no longer supported
|
||||
UTIL_DEPRECATED_ARG_WITH(with-cpu-port)
|
||||
|
||||
# in jdk15 hotspot-gtest was replaced with --with-gtest
|
||||
UTIL_DEPRECATED_ARG_ENABLE(hotspot-gtest)
|
||||
])
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2011, 2021, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@@ -23,6 +23,20 @@
|
||||
# questions.
|
||||
#
|
||||
|
||||
###############################################################################
|
||||
# Check which variant of the JDK that we want to build.
|
||||
# Currently we have:
|
||||
# normal: standard edition
|
||||
# but the custom make system may add other variants
|
||||
#
|
||||
# Effectively the JDK variant gives a name to a specific set of
|
||||
# modules to compile into the JDK.
|
||||
AC_DEFUN_ONCE([JDKOPT_SETUP_JDK_VARIANT],
|
||||
[
|
||||
# Deprecated in JDK 12
|
||||
UTIL_DEPRECATED_ARG_WITH([jdk-variant])
|
||||
])
|
||||
|
||||
###############################################################################
|
||||
# Set the debug level
|
||||
# release: no debug information, all optimizations, no asserts.
|
||||
@@ -197,16 +211,16 @@ AC_DEFUN_ONCE([JDKOPT_SETUP_JDK_OPTIONS],
|
||||
|
||||
# Setup default copyright year. Mostly overridden when building close to a new year.
|
||||
AC_ARG_WITH(copyright-year, [AS_HELP_STRING([--with-copyright-year],
|
||||
[Set copyright year value for build @<:@current year/source-date@:>@])])
|
||||
[Set copyright year value for build @<:@current year@:>@])])
|
||||
if test "x$with_copyright_year" = xyes; then
|
||||
AC_MSG_ERROR([Copyright year must have a value])
|
||||
elif test "x$with_copyright_year" != x; then
|
||||
COPYRIGHT_YEAR="$with_copyright_year"
|
||||
elif test "x$SOURCE_DATE" != xupdated; then
|
||||
elif test "x$SOURCE_DATE_EPOCH" != x; then
|
||||
if test "x$IS_GNU_DATE" = xyes; then
|
||||
COPYRIGHT_YEAR=`$DATE --date=@$SOURCE_DATE +%Y`
|
||||
COPYRIGHT_YEAR=`date --date=@$SOURCE_DATE_EPOCH +%Y`
|
||||
else
|
||||
COPYRIGHT_YEAR=`$DATE -j -f %s $SOURCE_DATE +%Y`
|
||||
COPYRIGHT_YEAR=`date -j -f %s $SOURCE_DATE_EPOCH +%Y`
|
||||
fi
|
||||
else
|
||||
COPYRIGHT_YEAR=`$DATE +'%Y'`
|
||||
@@ -472,31 +486,6 @@ AC_DEFUN_ONCE([JDKOPT_SETUP_STATIC_BUILD],
|
||||
AC_SUBST(STATIC_BUILD)
|
||||
])
|
||||
|
||||
################################################################################
|
||||
#
|
||||
# jmod options.
|
||||
#
|
||||
AC_DEFUN_ONCE([JDKOPT_SETUP_JMOD_OPTIONS],
|
||||
[
|
||||
# Final JMODs are recompiled often during development, and java.base JMOD
|
||||
# includes the JVM libraries. In release mode, prefer to compress JMODs fully.
|
||||
# In debug mode, pay with a little extra space, but win a lot of CPU time back
|
||||
# with the lightest (but still some) compression.
|
||||
if test "x$DEBUG_LEVEL" = xrelease; then
|
||||
DEFAULT_JMOD_COMPRESS="zip-6"
|
||||
else
|
||||
DEFAULT_JMOD_COMPRESS="zip-1"
|
||||
fi
|
||||
|
||||
UTIL_ARG_WITH(NAME: jmod-compress, TYPE: literal,
|
||||
VALID_VALUES: [zip-0 zip-1 zip-2 zip-3 zip-4 zip-5 zip-6 zip-7 zip-8 zip-9],
|
||||
DEFAULT: $DEFAULT_JMOD_COMPRESS,
|
||||
CHECKING_MSG: [for JMOD compression type],
|
||||
DESC: [specify JMOD compression type (zip-[0-9])]
|
||||
)
|
||||
AC_SUBST(JMOD_COMPRESS)
|
||||
])
|
||||
|
||||
################################################################################
|
||||
#
|
||||
# jlink options.
|
||||
@@ -511,6 +500,29 @@ AC_DEFUN_ONCE([JDKOPT_SETUP_JLINK_OPTIONS],
|
||||
AC_SUBST(JLINK_KEEP_PACKAGED_MODULES)
|
||||
])
|
||||
|
||||
################################################################################
|
||||
#
|
||||
# Check if building of the jtreg failure handler should be enabled.
|
||||
#
|
||||
AC_DEFUN_ONCE([JDKOPT_ENABLE_DISABLE_FAILURE_HANDLER],
|
||||
[
|
||||
UTIL_ARG_ENABLE(NAME: jtreg-failure-handler, DEFAULT: auto,
|
||||
RESULT: BUILD_FAILURE_HANDLER,
|
||||
DESC: [enable keeping of packaged modules in jdk image],
|
||||
DEFAULT_DESC: [enabled if jtreg is present],
|
||||
CHECKING_MSG: [if the jtreg failure handler should be built],
|
||||
CHECK_AVAILABLE: [
|
||||
AC_MSG_CHECKING([if the jtreg failure handler is available])
|
||||
if test "x$JT_HOME" != "x"; then
|
||||
AC_MSG_RESULT([yes])
|
||||
else
|
||||
AVAILABLE=false
|
||||
AC_MSG_RESULT([no (jtreg not present)])
|
||||
fi
|
||||
])
|
||||
AC_SUBST(BUILD_FAILURE_HANDLER)
|
||||
])
|
||||
|
||||
################################################################################
|
||||
#
|
||||
# Enable or disable generation of the classlist at build time
|
||||
@@ -650,28 +662,15 @@ AC_DEFUN([JDKOPT_ALLOW_ABSOLUTE_PATHS_IN_OUTPUT],
|
||||
AC_DEFUN_ONCE([JDKOPT_SETUP_REPRODUCIBLE_BUILD],
|
||||
[
|
||||
AC_ARG_WITH([source-date], [AS_HELP_STRING([--with-source-date],
|
||||
[how to set SOURCE_DATE_EPOCH ('updated', 'current', 'version' a timestamp or an ISO-8601 date) @<:@current/value of SOURCE_DATE_EPOCH@:>@])],
|
||||
[how to set SOURCE_DATE_EPOCH ('updated', 'current', 'version' a timestamp or an ISO-8601 date) @<:@updated@:>@])],
|
||||
[with_source_date_present=true], [with_source_date_present=false])
|
||||
|
||||
if test "x$SOURCE_DATE_EPOCH" != x && test "x$with_source_date" != x; then
|
||||
AC_MSG_WARN([--with-source-date will override SOURCE_DATE_EPOCH])
|
||||
fi
|
||||
|
||||
AC_MSG_CHECKING([what source date to use])
|
||||
|
||||
if test "x$with_source_date" = xyes; then
|
||||
AC_MSG_ERROR([--with-source-date must have a value])
|
||||
elif test "x$with_source_date" = x; then
|
||||
if test "x$SOURCE_DATE_EPOCH" != x; then
|
||||
SOURCE_DATE=$SOURCE_DATE_EPOCH
|
||||
with_source_date_present=true
|
||||
AC_MSG_RESULT([$SOURCE_DATE, from SOURCE_DATE_EPOCH])
|
||||
else
|
||||
# Tell makefiles to take the time from configure
|
||||
SOURCE_DATE=$($DATE +"%s")
|
||||
AC_MSG_RESULT([$SOURCE_DATE, from 'current' (default)])
|
||||
fi
|
||||
elif test "x$with_source_date" = xupdated; then
|
||||
elif test "x$with_source_date" = xupdated || test "x$with_source_date" = x; then
|
||||
# Tell the makefiles to update at each build
|
||||
SOURCE_DATE=updated
|
||||
AC_MSG_RESULT([determined at build time, from 'updated'])
|
||||
elif test "x$with_source_date" = xcurrent; then
|
||||
@@ -703,123 +702,28 @@ AC_DEFUN_ONCE([JDKOPT_SETUP_REPRODUCIBLE_BUILD],
|
||||
fi
|
||||
fi
|
||||
|
||||
ISO_8601_FORMAT_STRING="%Y-%m-%dT%H:%M:%SZ"
|
||||
if test "x$SOURCE_DATE" != xupdated; then
|
||||
# If we have a fixed value for SOURCE_DATE, we need to set SOURCE_DATE_EPOCH
|
||||
# for the rest of configure.
|
||||
SOURCE_DATE_EPOCH="$SOURCE_DATE"
|
||||
if test "x$IS_GNU_DATE" = xyes; then
|
||||
SOURCE_DATE_ISO_8601=`$DATE --utc --date="@$SOURCE_DATE" +"$ISO_8601_FORMAT_STRING" 2> /dev/null`
|
||||
else
|
||||
SOURCE_DATE_ISO_8601=`$DATE -u -j -f "%s" "$SOURCE_DATE" +"$ISO_8601_FORMAT_STRING" 2> /dev/null`
|
||||
fi
|
||||
REPRODUCIBLE_BUILD_DEFAULT=$with_source_date_present
|
||||
|
||||
if test "x$OPENJDK_BUILD_OS" = xwindows && \
|
||||
test "x$ALLOW_ABSOLUTE_PATHS_IN_OUTPUT" = xfalse; then
|
||||
# To support banning absolute paths on Windows, we must use the -pathmap
|
||||
# method, which requires reproducible builds.
|
||||
REPRODUCIBLE_BUILD_DEFAULT=true
|
||||
fi
|
||||
|
||||
UTIL_ARG_ENABLE(NAME: reproducible-build, DEFAULT: $REPRODUCIBLE_BUILD_DEFAULT,
|
||||
RESULT: ENABLE_REPRODUCIBLE_BUILD,
|
||||
DESC: [enable reproducible builds (not yet fully functional)],
|
||||
DEFAULT_DESC: [enabled if --with-source-date is given or on Windows without absolute paths])
|
||||
|
||||
if test "x$OPENJDK_BUILD_OS" = xwindows && \
|
||||
test "x$ALLOW_ABSOLUTE_PATHS_IN_OUTPUT" = xfalse && \
|
||||
test "x$ENABLE_REPRODUCIBLE_BUILD" = xfalse; then
|
||||
AC_MSG_NOTICE([On Windows it is not possible to combine --disable-reproducible-builds])
|
||||
AC_MSG_NOTICE([with --disable-absolute-paths-in-output.])
|
||||
AC_MSG_ERROR([Cannot continue])
|
||||
fi
|
||||
|
||||
AC_SUBST(SOURCE_DATE)
|
||||
AC_SUBST(ISO_8601_FORMAT_STRING)
|
||||
AC_SUBST(SOURCE_DATE_ISO_8601)
|
||||
|
||||
UTIL_DEPRECATED_ARG_ENABLE(reproducible-build)
|
||||
])
|
||||
|
||||
################################################################################
|
||||
#
|
||||
# Setup signing on macOS. This can either be setup to sign with a real identity
|
||||
# and enabling the hardened runtime, or it can simply add the debug entitlement
|
||||
# com.apple.security.get-task-allow without actually signing any binaries. The
|
||||
# latter is needed to be able to debug processes and dump core files on modern
|
||||
# versions of macOS. It can also be skipped completely.
|
||||
#
|
||||
# Check if codesign will run with the given parameters
|
||||
# $1: Parameters to run with
|
||||
# $2: Checking message
|
||||
# Sets CODESIGN_SUCCESS=true/false
|
||||
AC_DEFUN([JDKOPT_CHECK_CODESIGN_PARAMS],
|
||||
[
|
||||
PARAMS="$1"
|
||||
MESSAGE="$2"
|
||||
CODESIGN_TESTFILE="$CONFIGURESUPPORT_OUTPUTDIR/codesign-testfile"
|
||||
$RM "$CODESIGN_TESTFILE"
|
||||
$TOUCH "$CODESIGN_TESTFILE"
|
||||
CODESIGN_SUCCESS=false
|
||||
$CODESIGN $PARAMS "$CODESIGN_TESTFILE" 2>&AS_MESSAGE_LOG_FD \
|
||||
>&AS_MESSAGE_LOG_FD && CODESIGN_SUCCESS=true
|
||||
$RM "$CODESIGN_TESTFILE"
|
||||
AC_MSG_CHECKING([$MESSAGE])
|
||||
if test "x$CODESIGN_SUCCESS" = "xtrue"; then
|
||||
AC_MSG_RESULT([yes])
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
fi
|
||||
])
|
||||
|
||||
AC_DEFUN([JDKOPT_CHECK_CODESIGN_HARDENED],
|
||||
[
|
||||
JDKOPT_CHECK_CODESIGN_PARAMS([-s "$MACOSX_CODESIGN_IDENTITY" --option runtime],
|
||||
[if codesign with hardened runtime is possible])
|
||||
])
|
||||
|
||||
AC_DEFUN([JDKOPT_CHECK_CODESIGN_DEBUG],
|
||||
[
|
||||
JDKOPT_CHECK_CODESIGN_PARAMS([-s -], [if debug mode codesign is possible])
|
||||
])
|
||||
|
||||
AC_DEFUN([JDKOPT_SETUP_MACOSX_SIGNING],
|
||||
[
|
||||
ENABLE_CODESIGN=false
|
||||
if test "x$OPENJDK_TARGET_OS" = "xmacosx" && test "x$CODESIGN" != "x"; then
|
||||
|
||||
UTIL_ARG_WITH(NAME: macosx-codesign, TYPE: literal, OPTIONAL: true,
|
||||
VALID_VALUES: [hardened debug auto], DEFAULT: auto,
|
||||
ENABLED_DEFAULT: true,
|
||||
CHECKING_MSG: [for macosx code signing mode],
|
||||
DESC: [set the macosx code signing mode (hardened, debug, auto)]
|
||||
)
|
||||
|
||||
MACOSX_CODESIGN_MODE=disabled
|
||||
if test "x$MACOSX_CODESIGN_ENABLED" = "xtrue"; then
|
||||
|
||||
# Check for user provided code signing identity.
|
||||
UTIL_ARG_WITH(NAME: macosx-codesign-identity, TYPE: string,
|
||||
DEFAULT: openjdk_codesign, CHECK_VALUE: UTIL_CHECK_STRING_NON_EMPTY,
|
||||
DESC: [specify the macosx code signing identity],
|
||||
CHECKING_MSG: [for macosx code signing identity]
|
||||
)
|
||||
AC_SUBST(MACOSX_CODESIGN_IDENTITY)
|
||||
|
||||
if test "x$MACOSX_CODESIGN" = "xauto"; then
|
||||
# Only try to default to hardened signing on release builds
|
||||
if test "x$DEBUG_LEVEL" = "xrelease"; then
|
||||
JDKOPT_CHECK_CODESIGN_HARDENED
|
||||
if test "x$CODESIGN_SUCCESS" = "xtrue"; then
|
||||
MACOSX_CODESIGN_MODE=hardened
|
||||
fi
|
||||
fi
|
||||
if test "x$MACOSX_CODESIGN_MODE" = "xdisabled"; then
|
||||
JDKOPT_CHECK_CODESIGN_DEBUG
|
||||
if test "x$CODESIGN_SUCCESS" = "xtrue"; then
|
||||
MACOSX_CODESIGN_MODE=debug
|
||||
fi
|
||||
fi
|
||||
AC_MSG_CHECKING([for macosx code signing mode])
|
||||
AC_MSG_RESULT([$MACOSX_CODESIGN_MODE])
|
||||
elif test "x$MACOSX_CODESIGN" = "xhardened"; then
|
||||
JDKOPT_CHECK_CODESIGN_HARDENED
|
||||
if test "x$CODESIGN_SUCCESS" = "xfalse"; then
|
||||
AC_MSG_ERROR([Signing with hardened runtime is not possible])
|
||||
fi
|
||||
MACOSX_CODESIGN_MODE=hardened
|
||||
elif test "x$MACOSX_CODESIGN" = "xdebug"; then
|
||||
JDKOPT_CHECK_CODESIGN_DEBUG
|
||||
if test "x$CODESIGN_SUCCESS" = "xfalse"; then
|
||||
AC_MSG_ERROR([Signing in debug mode is not possible])
|
||||
fi
|
||||
MACOSX_CODESIGN_MODE=debug
|
||||
else
|
||||
AC_MSG_ERROR([unknown value for --with-macosx-codesign: $MACOSX_CODESIGN])
|
||||
fi
|
||||
fi
|
||||
AC_SUBST(MACOSX_CODESIGN_IDENTITY)
|
||||
AC_SUBST(MACOSX_CODESIGN_MODE)
|
||||
fi
|
||||
AC_SUBST(ENABLE_REPRODUCIBLE_BUILD)
|
||||
])
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2015, 2021, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2015, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@@ -72,9 +72,7 @@ AC_DEFUN_ONCE([JDKVER_SETUP_JDK_VERSION_NUMBERS],
|
||||
# Setup username (for use in adhoc version strings etc)
|
||||
AC_ARG_WITH([build-user], [AS_HELP_STRING([--with-build-user],
|
||||
[build username to use in version strings])])
|
||||
if test "x$with_build_user" = xyes || test "x$with_build_user" = xno; then
|
||||
AC_MSG_ERROR([--with-build-user must have a value])
|
||||
elif test "x$with_build_user" != x; then
|
||||
if test "x$with_build_user" != x; then
|
||||
USERNAME="$with_build_user"
|
||||
else
|
||||
# Outer [ ] to quote m4.
|
||||
@@ -86,7 +84,7 @@ AC_DEFUN_ONCE([JDKVER_SETUP_JDK_VERSION_NUMBERS],
|
||||
AC_ARG_WITH(jdk-rc-name, [AS_HELP_STRING([--with-jdk-rc-name],
|
||||
[Set JDK RC name. This is used for FileDescription and ProductName properties
|
||||
of MS Windows binaries. @<:@not specified@:>@])])
|
||||
if test "x$with_jdk_rc_name" = xyes || test "x$with_jdk_rc_name" = xno; then
|
||||
if test "x$with_jdk_rc_name" = xyes; then
|
||||
AC_MSG_ERROR([--with-jdk-rc-name must have a value])
|
||||
elif [ ! [[ $with_jdk_rc_name =~ ^[[:print:]]*$ ]] ]; then
|
||||
AC_MSG_ERROR([--with-jdk-rc-name contains non-printing characters: $with_jdk_rc_name])
|
||||
@@ -103,7 +101,7 @@ AC_DEFUN_ONCE([JDKVER_SETUP_JDK_VERSION_NUMBERS],
|
||||
AC_ARG_WITH(vendor-name, [AS_HELP_STRING([--with-vendor-name],
|
||||
[Set vendor name. Among others, used to set the 'java.vendor'
|
||||
and 'java.vm.vendor' system properties. @<:@not specified@:>@])])
|
||||
if test "x$with_vendor_name" = xyes || test "x$with_vendor_name" = xno; then
|
||||
if test "x$with_vendor_name" = xyes; then
|
||||
AC_MSG_ERROR([--with-vendor-name must have a value])
|
||||
elif [ ! [[ $with_vendor_name =~ ^[[:print:]]*$ ]] ]; then
|
||||
AC_MSG_ERROR([--with-vendor-name contains non-printing characters: $with_vendor_name])
|
||||
@@ -117,7 +115,7 @@ AC_DEFUN_ONCE([JDKVER_SETUP_JDK_VERSION_NUMBERS],
|
||||
# The vendor URL, if any
|
||||
AC_ARG_WITH(vendor-url, [AS_HELP_STRING([--with-vendor-url],
|
||||
[Set the 'java.vendor.url' system property @<:@not specified@:>@])])
|
||||
if test "x$with_vendor_url" = xyes || test "x$with_vendor_url" = xno; then
|
||||
if test "x$with_vendor_url" = xyes; then
|
||||
AC_MSG_ERROR([--with-vendor-url must have a value])
|
||||
elif [ ! [[ $with_vendor_url =~ ^[[:print:]]*$ ]] ]; then
|
||||
AC_MSG_ERROR([--with-vendor-url contains non-printing characters: $with_vendor_url])
|
||||
@@ -131,7 +129,7 @@ AC_DEFUN_ONCE([JDKVER_SETUP_JDK_VERSION_NUMBERS],
|
||||
# The vendor bug URL, if any
|
||||
AC_ARG_WITH(vendor-bug-url, [AS_HELP_STRING([--with-vendor-bug-url],
|
||||
[Set the 'java.vendor.url.bug' system property @<:@not specified@:>@])])
|
||||
if test "x$with_vendor_bug_url" = xyes || test "x$with_vendor_bug_url" = xno; then
|
||||
if test "x$with_vendor_bug_url" = xyes; then
|
||||
AC_MSG_ERROR([--with-vendor-bug-url must have a value])
|
||||
elif [ ! [[ $with_vendor_bug_url =~ ^[[:print:]]*$ ]] ]; then
|
||||
AC_MSG_ERROR([--with-vendor-bug-url contains non-printing characters: $with_vendor_bug_url])
|
||||
@@ -145,7 +143,7 @@ AC_DEFUN_ONCE([JDKVER_SETUP_JDK_VERSION_NUMBERS],
|
||||
# The vendor VM bug URL, if any
|
||||
AC_ARG_WITH(vendor-vm-bug-url, [AS_HELP_STRING([--with-vendor-vm-bug-url],
|
||||
[Sets the bug URL which will be displayed when the VM crashes @<:@not specified@:>@])])
|
||||
if test "x$with_vendor_vm_bug_url" = xyes || test "x$with_vendor_vm_bug_url" = xno; then
|
||||
if test "x$with_vendor_vm_bug_url" = xyes; then
|
||||
AC_MSG_ERROR([--with-vendor-vm-bug-url must have a value])
|
||||
elif [ ! [[ $with_vendor_vm_bug_url =~ ^[[:print:]]*$ ]] ]; then
|
||||
AC_MSG_ERROR([--with-vendor-vm-bug-url contains non-printing characters: $with_vendor_vm_bug_url])
|
||||
@@ -162,7 +160,7 @@ AC_DEFUN_ONCE([JDKVER_SETUP_JDK_VERSION_NUMBERS],
|
||||
# override parts with more specific flags, since these are processed later.
|
||||
AC_ARG_WITH(version-string, [AS_HELP_STRING([--with-version-string],
|
||||
[Set version string @<:@calculated@:>@])])
|
||||
if test "x$with_version_string" = xyes || test "x$with_version_string" = xno; then
|
||||
if test "x$with_version_string" = xyes; then
|
||||
AC_MSG_ERROR([--with-version-string must have a value])
|
||||
elif test "x$with_version_string" != x; then
|
||||
# Additional [] needed to keep m4 from mangling shell constructs.
|
||||
@@ -201,10 +199,6 @@ AC_DEFUN_ONCE([JDKVER_SETUP_JDK_VERSION_NUMBERS],
|
||||
&& test "x$VERSION_BUILD$VERSION_OPT" = x; then
|
||||
AC_MSG_ERROR([Version string contains + but both 'BUILD' and 'OPT' are missing])
|
||||
fi
|
||||
if test "x$VERSION_BUILD" = x0; then
|
||||
AC_MSG_WARN([Version build 0 is interpreted as no build number])
|
||||
VERSION_BUILD=
|
||||
fi
|
||||
# Stop the version part process from setting default values.
|
||||
# We still allow them to explicitly override though.
|
||||
NO_DEFAULT_VERSION_PARTS=true
|
||||
@@ -256,10 +250,9 @@ AC_DEFUN_ONCE([JDKVER_SETUP_JDK_VERSION_NUMBERS],
|
||||
fi
|
||||
else
|
||||
if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
|
||||
# Default is to calculate a string like this:
|
||||
# 'adhoc.<username>.<base dir name>'
|
||||
# Default is to calculate a string like this 'adhoc.<username>.<base dir name>'
|
||||
# Outer [ ] to quote m4.
|
||||
[ basedirname=`$BASENAME "$WORKSPACE_ROOT" | $TR -d -c '[a-z][A-Z][0-9].-'` ]
|
||||
[ basedirname=`$BASENAME "$TOPDIR" | $TR -d -c '[a-z][A-Z][0-9].-'` ]
|
||||
VERSION_OPT="adhoc.$USERNAME.$basedirname"
|
||||
fi
|
||||
fi
|
||||
@@ -278,15 +271,13 @@ AC_DEFUN_ONCE([JDKVER_SETUP_JDK_VERSION_NUMBERS],
|
||||
VERSION_BUILD=
|
||||
else
|
||||
JDKVER_CHECK_AND_SET_NUMBER(VERSION_BUILD, $with_version_build)
|
||||
if test "x$VERSION_BUILD" = "x0"; then
|
||||
AC_MSG_WARN([--with-version-build=0 is interpreted as --without-version-build])
|
||||
VERSION_BUILD=
|
||||
fi
|
||||
fi
|
||||
else
|
||||
if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
|
||||
# Default is to not have a build number.
|
||||
VERSION_BUILD=""
|
||||
# FIXME: Until all code can cope with an empty VERSION_BUILD, set it to 0.
|
||||
VERSION_BUILD=0
|
||||
fi
|
||||
fi
|
||||
|
||||
@@ -295,7 +286,7 @@ AC_DEFUN_ONCE([JDKVER_SETUP_JDK_VERSION_NUMBERS],
|
||||
[with_version_feature_present=true], [with_version_feature_present=false])
|
||||
|
||||
if test "x$with_version_feature_present" = xtrue; then
|
||||
if test "x$with_version_feature" = xyes || test "x$with_version_feature" = xno; then
|
||||
if test "x$with_version_feature" = xyes; then
|
||||
AC_MSG_ERROR([--with-version-feature must have a value])
|
||||
else
|
||||
JDKVER_CHECK_AND_SET_NUMBER(VERSION_FEATURE, $with_version_feature)
|
||||
@@ -459,22 +450,13 @@ AC_DEFUN_ONCE([JDKVER_SETUP_JDK_VERSION_NUMBERS],
|
||||
for i in 1 2 3 4 5 6 ; do stripped_version_number=${stripped_version_number%.0} ; done
|
||||
VERSION_NUMBER=$stripped_version_number
|
||||
|
||||
# A build number of "0" is interpreted as "no build number".
|
||||
if test "x$VERSION_BUILD" = x0; then
|
||||
VERSION_BUILD=
|
||||
fi
|
||||
|
||||
# Compute the complete version string, with additional build information
|
||||
version_with_pre=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
|
||||
if test "x$VERSION_BUILD" != x || \
|
||||
( test "x$VERSION_OPT" != x && test "x$VERSION_PRE" = x ); then
|
||||
# As per JEP 223, if build is set, or if opt is set but not pre,
|
||||
# we need a + separator
|
||||
version_with_build=$version_with_pre+$VERSION_BUILD
|
||||
# The complete version string, with additional build information
|
||||
if test "x$VERSION_BUILD$VERSION_OPT" = x; then
|
||||
VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
|
||||
else
|
||||
version_with_build=$version_with_pre
|
||||
# If either build or opt is set, we need a + separator
|
||||
VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}+$VERSION_BUILD${VERSION_OPT:+-$VERSION_OPT}
|
||||
fi
|
||||
VERSION_STRING=$version_with_build${VERSION_OPT:+-$VERSION_OPT}
|
||||
|
||||
# The short version string, just VERSION_NUMBER and PRE, if present.
|
||||
VERSION_SHORT=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
|
||||
@@ -482,7 +464,7 @@ AC_DEFUN_ONCE([JDKVER_SETUP_JDK_VERSION_NUMBERS],
|
||||
# The version date
|
||||
AC_ARG_WITH(version-date, [AS_HELP_STRING([--with-version-date],
|
||||
[Set version date @<:@current source value@:>@])])
|
||||
if test "x$with_version_date" = xyes || test "x$with_version_date" = xno; then
|
||||
if test "x$with_version_date" = xyes; then
|
||||
AC_MSG_ERROR([--with-version-date must have a value])
|
||||
elif test "x$with_version_date" != x; then
|
||||
if [ ! [[ $with_version_date =~ ^[0-9]{4}-[0-9]{2}-[0-9]{2}$ ]] ]; then
|
||||
@@ -501,10 +483,7 @@ AC_DEFUN_ONCE([JDKVER_SETUP_JDK_VERSION_NUMBERS],
|
||||
AC_MSG_ERROR([--with-vendor-version-string must have a value])
|
||||
elif [ ! [[ $with_vendor_version_string =~ ^[[:graph:]]*$ ]] ]; then
|
||||
AC_MSG_ERROR([--with--vendor-version-string contains non-graphical characters: $with_vendor_version_string])
|
||||
elif test "x$with_vendor_version_string" != xno; then
|
||||
# Set vendor version string if --without is not passed
|
||||
# Check not required if an empty value is passed, since VENDOR_VERSION_STRING
|
||||
# would then be set to ""
|
||||
else
|
||||
VENDOR_VERSION_STRING="$with_vendor_version_string"
|
||||
fi
|
||||
|
||||
@@ -512,7 +491,7 @@ AC_DEFUN_ONCE([JDKVER_SETUP_JDK_VERSION_NUMBERS],
|
||||
AC_ARG_WITH(macosx-bundle-name-base, [AS_HELP_STRING([--with-macosx-bundle-name-base],
|
||||
[Set the MacOSX Bundle Name base. This is the base name for calculating MacOSX Bundle Names.
|
||||
@<:@not specified@:>@])])
|
||||
if test "x$with_macosx_bundle_name_base" = xyes || test "x$with_macosx_bundle_name_base" = xno; then
|
||||
if test "x$with_macosx_bundle_name_base" = xyes; then
|
||||
AC_MSG_ERROR([--with-macosx-bundle-name-base must have a value])
|
||||
elif [ ! [[ $with_macosx_bundle_name_base =~ ^[[:print:]]*$ ]] ]; then
|
||||
AC_MSG_ERROR([--with-macosx-bundle-name-base contains non-printing characters: $with_macosx_bundle_name_base])
|
||||
@@ -526,7 +505,7 @@ AC_DEFUN_ONCE([JDKVER_SETUP_JDK_VERSION_NUMBERS],
|
||||
AC_ARG_WITH(macosx-bundle-id-base, [AS_HELP_STRING([--with-macosx-bundle-id-base],
|
||||
[Set the MacOSX Bundle ID base. This is the base ID for calculating MacOSX Bundle IDs.
|
||||
@<:@not specified@:>@])])
|
||||
if test "x$with_macosx_bundle_id_base" = xyes || test "x$with_macosx_bundle_id_base" = xno; then
|
||||
if test "x$with_macosx_bundle_id_base" = xyes; then
|
||||
AC_MSG_ERROR([--with-macosx-bundle-id-base must have a value])
|
||||
elif [ ! [[ $with_macosx_bundle_id_base =~ ^[[:print:]]*$ ]] ]; then
|
||||
AC_MSG_ERROR([--with-macosx-bundle-id-base contains non-printing characters: $with_macosx_bundle_id_base])
|
||||
@@ -547,22 +526,17 @@ AC_DEFUN_ONCE([JDKVER_SETUP_JDK_VERSION_NUMBERS],
|
||||
[Set the MacOSX Bundle CFBundleVersion field. This key is a machine-readable
|
||||
string composed of one to three period-separated integers and should represent the
|
||||
build version. Defaults to the build number.])])
|
||||
if test "x$with_macosx_bundle_build_version" = xyes || test "x$with_macosx_bundle_build_version" = xno; then
|
||||
if test "x$with_macosx_bundle_build_version" = xyes; then
|
||||
AC_MSG_ERROR([--with-macosx-bundle-build-version must have a value])
|
||||
elif [ ! [[ $with_macosx_bundle_build_version =~ ^[0-9\.]*$ ]] ]; then
|
||||
AC_MSG_ERROR([--with-macosx-bundle-build-version contains non numbers and periods: $with_macosx_bundle_build_version])
|
||||
elif test "x$with_macosx_bundle_build_version" != x; then
|
||||
MACOSX_BUNDLE_BUILD_VERSION="$with_macosx_bundle_build_version"
|
||||
else
|
||||
if test "x$VERSION_BUILD" != x; then
|
||||
MACOSX_BUNDLE_BUILD_VERSION="$VERSION_BUILD"
|
||||
else
|
||||
MACOSX_BUNDLE_BUILD_VERSION=0
|
||||
fi
|
||||
|
||||
MACOSX_BUNDLE_BUILD_VERSION="$VERSION_BUILD"
|
||||
# If VERSION_OPT consists of only numbers and periods, add it.
|
||||
if [ [[ $VERSION_OPT =~ ^[0-9\.]+$ ]] ]; then
|
||||
MACOSX_BUNDLE_BUILD_VERSION="$MACOSX_BUNDLE_BUILD_VERSION.$VERSION_OPT"
|
||||
MACOSX_BUNDLE_BUILD_VERSION+=".$VERSION_OPT"
|
||||
fi
|
||||
fi
|
||||
AC_SUBST(MACOSX_BUNDLE_BUILD_VERSION)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2011, 2021, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@@ -45,7 +45,7 @@ m4_define(jvm_features_valid, m4_normalize( \
|
||||
ifdef([custom_jvm_features_valid], custom_jvm_features_valid) \
|
||||
\
|
||||
cds compiler1 compiler2 dtrace epsilongc g1gc jfr jni-check \
|
||||
jvmci jvmti link-time-opt management minimal opt-size parallelgc \
|
||||
jvmci jvmti link-time-opt management minimal nmt opt-size parallelgc \
|
||||
serialgc services shenandoahgc static-build vm-structs zero zgc \
|
||||
))
|
||||
|
||||
@@ -68,6 +68,7 @@ m4_define(jvm_feature_desc_jvmti, [enable Java Virtual Machine Tool Interface (J
|
||||
m4_define(jvm_feature_desc_link_time_opt, [enable link time optimization])
|
||||
m4_define(jvm_feature_desc_management, [enable java.lang.management API support])
|
||||
m4_define(jvm_feature_desc_minimal, [support building variant 'minimal'])
|
||||
m4_define(jvm_feature_desc_nmt, [include native memory tracking (NMT)])
|
||||
m4_define(jvm_feature_desc_opt_size, [optimize the JVM library for size])
|
||||
m4_define(jvm_feature_desc_parallelgc, [include the parallel garbage collector])
|
||||
m4_define(jvm_feature_desc_serialgc, [include the serial garbage collector])
|
||||
@@ -264,6 +265,22 @@ AC_DEFUN_ONCE([JVM_FEATURES_CHECK_DTRACE],
|
||||
])
|
||||
])
|
||||
|
||||
###############################################################################
|
||||
# Check if the feature 'jfr' is available on this platform.
|
||||
#
|
||||
AC_DEFUN_ONCE([JVM_FEATURES_CHECK_JFR],
|
||||
[
|
||||
JVM_FEATURES_CHECK_AVAILABILITY(jfr, [
|
||||
AC_MSG_CHECKING([if platform is supported by JFR])
|
||||
if test "x$OPENJDK_TARGET_OS" = xaix; then
|
||||
AC_MSG_RESULT([no, $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU])
|
||||
AVAILABLE=false
|
||||
else
|
||||
AC_MSG_RESULT([yes])
|
||||
fi
|
||||
])
|
||||
])
|
||||
|
||||
###############################################################################
|
||||
# Check if the feature 'jvmci' is available on this platform.
|
||||
#
|
||||
@@ -275,8 +292,6 @@ AC_DEFUN_ONCE([JVM_FEATURES_CHECK_JVMCI],
|
||||
AC_MSG_RESULT([yes])
|
||||
elif test "x$OPENJDK_TARGET_CPU" = "xaarch64"; then
|
||||
AC_MSG_RESULT([yes])
|
||||
elif test "x$OPENJDK_TARGET_CPU" = "xriscv64"; then
|
||||
AC_MSG_RESULT([yes])
|
||||
else
|
||||
AC_MSG_RESULT([no, $OPENJDK_TARGET_CPU])
|
||||
AVAILABLE=false
|
||||
@@ -293,8 +308,7 @@ AC_DEFUN_ONCE([JVM_FEATURES_CHECK_SHENANDOAHGC],
|
||||
AC_MSG_CHECKING([if platform is supported by Shenandoah])
|
||||
if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86" || \
|
||||
test "x$OPENJDK_TARGET_CPU" = "xaarch64" || \
|
||||
test "x$OPENJDK_TARGET_CPU" = "xppc64le" || \
|
||||
test "x$OPENJDK_TARGET_CPU" = "xriscv64"; then
|
||||
test "x$OPENJDK_TARGET_CPU" = "xppc64le"; then
|
||||
AC_MSG_RESULT([yes])
|
||||
else
|
||||
AC_MSG_RESULT([no, $OPENJDK_TARGET_CPU])
|
||||
@@ -344,8 +358,7 @@ AC_DEFUN_ONCE([JVM_FEATURES_CHECK_ZGC],
|
||||
AC_MSG_RESULT([no, $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU])
|
||||
AVAILABLE=false
|
||||
fi
|
||||
elif test "x$OPENJDK_TARGET_CPU" = "xppc64le" || \
|
||||
test "x$OPENJDK_TARGET_CPU" = "xriscv64"; then
|
||||
elif test "x$OPENJDK_TARGET_CPU" = "xppc64le"; then
|
||||
if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
|
||||
AC_MSG_RESULT([yes])
|
||||
else
|
||||
@@ -387,11 +400,18 @@ AC_DEFUN_ONCE([JVM_FEATURES_PREPARE_PLATFORM],
|
||||
|
||||
JVM_FEATURES_CHECK_CDS
|
||||
JVM_FEATURES_CHECK_DTRACE
|
||||
JVM_FEATURES_CHECK_JFR
|
||||
JVM_FEATURES_CHECK_JVMCI
|
||||
JVM_FEATURES_CHECK_SHENANDOAHGC
|
||||
JVM_FEATURES_CHECK_STATIC_BUILD
|
||||
JVM_FEATURES_CHECK_ZGC
|
||||
|
||||
# Filter out features by default for all variants on certain platforms.
|
||||
# Make sure to just add to JVM_FEATURES_PLATFORM_FILTER, since it could
|
||||
# have a value already from custom extensions.
|
||||
if test "x$OPENJDK_TARGET_OS" = xaix; then
|
||||
JVM_FEATURES_PLATFORM_FILTER="$JVM_FEATURES_PLATFORM_FILTER jfr"
|
||||
fi
|
||||
])
|
||||
|
||||
###############################################################################
|
||||
@@ -412,7 +432,7 @@ AC_DEFUN([JVM_FEATURES_PREPARE_VARIANT],
|
||||
elif test "x$variant" = "xcore"; then
|
||||
JVM_FEATURES_VARIANT_UNAVAILABLE="cds minimal zero"
|
||||
elif test "x$variant" = "xzero"; then
|
||||
JVM_FEATURES_VARIANT_UNAVAILABLE="compiler1 compiler2 \
|
||||
JVM_FEATURES_VARIANT_UNAVAILABLE="cds compiler1 compiler2 \
|
||||
jvmci minimal zgc"
|
||||
else
|
||||
JVM_FEATURES_VARIANT_UNAVAILABLE="minimal zero"
|
||||
@@ -423,7 +443,7 @@ AC_DEFUN([JVM_FEATURES_PREPARE_VARIANT],
|
||||
JVM_FEATURES_VARIANT_FILTER="compiler2 jvmci link-time-opt opt-size"
|
||||
elif test "x$variant" = "xminimal"; then
|
||||
JVM_FEATURES_VARIANT_FILTER="cds compiler2 dtrace epsilongc g1gc \
|
||||
jfr jni-check jvmci jvmti management parallelgc services \
|
||||
jfr jni-check jvmci jvmti management nmt parallelgc services \
|
||||
shenandoahgc vm-structs zgc"
|
||||
if test "x$OPENJDK_TARGET_CPU" = xarm ; then
|
||||
JVM_FEATURES_VARIANT_FILTER="$JVM_FEATURES_VARIANT_FILTER opt-size"
|
||||
@@ -518,6 +538,10 @@ AC_DEFUN([JVM_FEATURES_VERIFY],
|
||||
AC_MSG_ERROR([Specified JVM feature 'jvmti' requires feature 'services' for variant '$variant'])
|
||||
fi
|
||||
|
||||
if JVM_FEATURES_IS_ACTIVE(management) && ! JVM_FEATURES_IS_ACTIVE(nmt); then
|
||||
AC_MSG_ERROR([Specified JVM feature 'management' requires feature 'nmt' for variant '$variant'])
|
||||
fi
|
||||
|
||||
# For backwards compatibility, disable a feature "globally" if one variant
|
||||
# is missing the feature.
|
||||
if ! JVM_FEATURES_IS_ACTIVE(cds); then
|
||||
|
||||
@@ -166,9 +166,7 @@ AC_DEFUN_ONCE([LIB_SETUP_ZLIB],
|
||||
|
||||
DEFAULT_ZLIB=system
|
||||
if test "x$OPENJDK_TARGET_OS" = xwindows -o "x$OPENJDK_TARGET_OS" = xaix; then
|
||||
# On windows and aix default is bundled
|
||||
DEFAULT_ZLIB=bundled
|
||||
elif test "x$OPENJDK_TARGET_OS" = xmacosx -a "x$OPENJDK_TARGET_CPU" = xaarch64; then
|
||||
# On windows and aix default is bundled, on others default is system
|
||||
DEFAULT_ZLIB=bundled
|
||||
fi
|
||||
|
||||
|
||||
@@ -149,7 +149,7 @@ AC_DEFUN_ONCE([LIB_SETUP_LIBFFI],
|
||||
else
|
||||
AC_MSG_ERROR([Could not locate libffi.so.? for bundling])
|
||||
fi
|
||||
elif test "x${OPENJDK_TARGET_CPU}" = "xx86_64" || test "x${OPENJDK_TARGET_CPU}" = "xaarch64"; then
|
||||
elif test "x${OPENJDK_TARGET_CPU}" = "xx86_64"; then
|
||||
if test -e ${SYSROOT}/usr/lib64/libffi.so.? ; then
|
||||
LIBFFI_LIB_FILE="${SYSROOT}/usr/lib64/libffi.so.?"
|
||||
elif test -e ${SYSROOT}/usr/lib/x86_64-linux-gnu/libffi.so.? ; then
|
||||
|
||||
@@ -1,336 +0,0 @@
|
||||
#
|
||||
# Copyright (c) 2021, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License version 2 only, as
|
||||
# published by the Free Software Foundation. Oracle designates this
|
||||
# particular file as subject to the "Classpath" exception as provided
|
||||
# by Oracle in the LICENSE file that accompanied this code.
|
||||
#
|
||||
# This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# version 2 for more details (a copy is included in the LICENSE file that
|
||||
# accompanied this code).
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License version
|
||||
# 2 along with this work; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
# or visit www.oracle.com if you need additional information or have any
|
||||
# questions.
|
||||
#
|
||||
|
||||
################################################################################
|
||||
#
|
||||
# Helper function to setup hsdis using Capstone
|
||||
#
|
||||
AC_DEFUN([LIB_SETUP_HSDIS_CAPSTONE],
|
||||
[
|
||||
AC_ARG_WITH(capstone, [AS_HELP_STRING([--with-capstone],
|
||||
[where to find the Capstone files needed for hsdis/capstone])])
|
||||
|
||||
if test "x$with_capstone" != x; then
|
||||
AC_MSG_CHECKING([for capstone])
|
||||
CAPSTONE="$with_capstone"
|
||||
AC_MSG_RESULT([$CAPSTONE])
|
||||
|
||||
HSDIS_CFLAGS="-I${CAPSTONE}/include/capstone"
|
||||
if test "x$OPENJDK_TARGET_OS" != xwindows; then
|
||||
HSDIS_LDFLAGS="-L${CAPSTONE}/lib"
|
||||
HSDIS_LIBS="-lcapstone"
|
||||
else
|
||||
HSDIS_LDFLAGS="-nodefaultlib:libcmt.lib"
|
||||
HSDIS_LIBS="${CAPSTONE}/capstone.lib"
|
||||
fi
|
||||
else
|
||||
if test "x$OPENJDK_TARGET_OS" = xwindows; then
|
||||
# There is no way to auto-detect capstone on Windows
|
||||
AC_MSG_NOTICE([You must specify capstone location using --with-capstone=<path>])
|
||||
AC_MSG_ERROR([Cannot continue])
|
||||
fi
|
||||
|
||||
PKG_CHECK_MODULES(CAPSTONE, capstone, [CAPSTONE_FOUND=yes], [CAPSTONE_FOUND=no])
|
||||
if test "x$CAPSTONE_FOUND" = xyes; then
|
||||
HSDIS_CFLAGS="$CAPSTONE_CFLAGS"
|
||||
HSDIS_LDFLAGS="$CAPSTONE_LDFLAGS"
|
||||
HSDIS_LIBS="$CAPSTONE_LIBS"
|
||||
else
|
||||
HELP_MSG_MISSING_DEPENDENCY([capstone])
|
||||
AC_MSG_NOTICE([Cannot locate capstone which is needed for hsdis/capstone. Try using --with-capstone=<path>. $HELP_MSG])
|
||||
AC_MSG_ERROR([Cannot continue])
|
||||
fi
|
||||
fi
|
||||
])
|
||||
|
||||
################################################################################
|
||||
#
|
||||
# Helper function to setup hsdis using LLVM
|
||||
#
|
||||
AC_DEFUN([LIB_SETUP_HSDIS_LLVM],
|
||||
[
|
||||
AC_ARG_WITH([llvm], [AS_HELP_STRING([--with-llvm],
|
||||
[where to find the LLVM files needed for hsdis/llvm])])
|
||||
|
||||
if test "x$with_llvm" != x; then
|
||||
LLVM_DIR="$with_llvm"
|
||||
fi
|
||||
|
||||
if test "x$OPENJDK_TARGET_OS" != xwindows; then
|
||||
if test "x$LLVM_DIR" = x; then
|
||||
# Macs with homebrew can have llvm in different places
|
||||
UTIL_LOOKUP_PROGS(LLVM_CONFIG, llvm-config, [$PATH:/usr/local/opt/llvm/bin:/opt/homebrew/opt/llvm/bin])
|
||||
if test "x$LLVM_CONFIG" = x; then
|
||||
AC_MSG_NOTICE([Cannot locate llvm-config which is needed for hsdis/llvm. Try using --with-llvm=<LLVM home>.])
|
||||
AC_MSG_ERROR([Cannot continue])
|
||||
fi
|
||||
else
|
||||
UTIL_LOOKUP_PROGS(LLVM_CONFIG, llvm-config, [$LLVM_DIR/bin])
|
||||
if test "x$LLVM_CONFIG" = x; then
|
||||
AC_MSG_NOTICE([Cannot locate llvm-config in $LLVM_DIR. Check your --with-llvm argument.])
|
||||
AC_MSG_ERROR([Cannot continue])
|
||||
fi
|
||||
fi
|
||||
|
||||
# We need the LLVM flags and libs, and llvm-config provides them for us.
|
||||
HSDIS_CFLAGS=`$LLVM_CONFIG --cflags`
|
||||
HSDIS_LDFLAGS=`$LLVM_CONFIG --ldflags`
|
||||
HSDIS_LIBS=`$LLVM_CONFIG --libs $OPENJDK_TARGET_CPU_ARCH ${OPENJDK_TARGET_CPU_ARCH}disassembler`
|
||||
else
|
||||
if test "x$LLVM_DIR" = x; then
|
||||
AC_MSG_NOTICE([--with-llvm is needed on Windows to point out the LLVM home])
|
||||
AC_MSG_ERROR([Cannot continue])
|
||||
fi
|
||||
|
||||
# Official Windows installation of LLVM do not ship llvm-config, and self-built llvm-config
|
||||
# produced unusable output, so just ignore it on Windows.
|
||||
if ! test -e $LLVM_DIR/include/llvm-c/lto.h; then
|
||||
AC_MSG_NOTICE([$LLVM_DIR does not seem like a valid LLVM home; include dir is missing])
|
||||
AC_MSG_ERROR([Cannot continue])
|
||||
fi
|
||||
if ! test -e $LLVM_DIR/include/llvm-c/Disassembler.h; then
|
||||
AC_MSG_NOTICE([$LLVM_DIR does not point to a complete LLVM installation. ])
|
||||
AC_MSG_NOTICE([The official LLVM distribution is missing crucical files; you need to build LLVM yourself or get all include files elsewhere])
|
||||
AC_MSG_ERROR([Cannot continue])
|
||||
fi
|
||||
if ! test -e $LLVM_DIR/lib/llvm-c.lib; then
|
||||
AC_MSG_NOTICE([$LLVM_DIR does not seem like a valid LLVM home; lib dir is missing])
|
||||
AC_MSG_ERROR([Cannot continue])
|
||||
fi
|
||||
HSDIS_CFLAGS="-I$LLVM_DIR/include"
|
||||
HSDIS_LDFLAGS="-libpath:$LLVM_DIR/lib"
|
||||
HSDIS_LIBS="llvm-c.lib"
|
||||
fi
|
||||
])
|
||||
|
||||
################################################################################
|
||||
#
|
||||
# Helper function to build binutils from source.
|
||||
#
|
||||
AC_DEFUN([LIB_BUILD_BINUTILS],
|
||||
[
|
||||
BINUTILS_SRC="$with_binutils_src"
|
||||
UTIL_FIXUP_PATH(BINUTILS_SRC)
|
||||
|
||||
if ! test -d $BINUTILS_SRC; then
|
||||
AC_MSG_ERROR([--with-binutils-src is not pointing to a directory])
|
||||
fi
|
||||
if ! test -x $BINUTILS_SRC/configure; then
|
||||
AC_MSG_ERROR([--with-binutils-src does not look like a binutils source directory])
|
||||
fi
|
||||
|
||||
if test -e $BINUTILS_SRC/bfd/libbfd.a && \
|
||||
test -e $BINUTILS_SRC/opcodes/libopcodes.a && \
|
||||
test -e $BINUTILS_SRC/libiberty/libiberty.a && \
|
||||
test -e $BINUTILS_SRC/zlib/libz.a; then
|
||||
AC_MSG_NOTICE([Found binutils binaries in binutils source directory -- not building])
|
||||
else
|
||||
# On Windows, we cannot build with the normal Microsoft CL, but must instead use
|
||||
# a separate mingw toolchain.
|
||||
if test "x$OPENJDK_BUILD_OS" = xwindows; then
|
||||
if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
|
||||
target_base="i686-w64-mingw32"
|
||||
else
|
||||
target_base="$OPENJDK_TARGET_CPU-w64-mingw32"
|
||||
fi
|
||||
binutils_cc="$target_base-gcc"
|
||||
binutils_target="--host=$target_base --target=$target_base"
|
||||
# Somehow the uint typedef is not included when building with mingw
|
||||
binutils_cflags="-Duint=unsigned"
|
||||
compiler_version=`$binutils_cc --version 2>&1`
|
||||
if ! [ [[ "$compiler_version" =~ GCC ]] ]; then
|
||||
AC_MSG_NOTICE([Could not find correct mingw compiler $binutils_cc.])
|
||||
HELP_MSG_MISSING_DEPENDENCY([$binutils_cc])
|
||||
AC_MSG_ERROR([Cannot continue. $HELP_MSG])
|
||||
else
|
||||
AC_MSG_NOTICE([Using compiler $binutils_cc with version $compiler_version])
|
||||
fi
|
||||
elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
|
||||
if test "x$OPENJDK_TARGET_CPU" = "xaarch64"; then
|
||||
binutils_target="--enable-targets=aarch64-darwin"
|
||||
else
|
||||
binutils_target=""
|
||||
fi
|
||||
else
|
||||
binutils_cc="$CC $SYSROOT_CFLAGS"
|
||||
binutils_target=""
|
||||
fi
|
||||
binutils_cflags="$binutils_cflags $MACHINE_FLAG $JVM_PICFLAG $C_O_FLAG_NORM"
|
||||
|
||||
AC_MSG_NOTICE([Running binutils configure])
|
||||
AC_MSG_NOTICE([configure command line: ./configure --disable-nls CFLAGS="$binutils_cflags" CC="$binutils_cc" $binutils_target])
|
||||
saved_dir=`pwd`
|
||||
cd "$BINUTILS_SRC"
|
||||
./configure --disable-nls CFLAGS="$binutils_cflags" CC="$binutils_cc" $binutils_target
|
||||
if test $? -ne 0 || ! test -e $BINUTILS_SRC/Makefile; then
|
||||
AC_MSG_NOTICE([Automatic building of binutils failed on configure. Try building it manually])
|
||||
AC_MSG_ERROR([Cannot continue])
|
||||
fi
|
||||
AC_MSG_NOTICE([Running binutils make])
|
||||
$MAKE all-opcodes
|
||||
if test $? -ne 0; then
|
||||
AC_MSG_NOTICE([Automatic building of binutils failed on make. Try building it manually])
|
||||
AC_MSG_ERROR([Cannot continue])
|
||||
fi
|
||||
cd $saved_dir
|
||||
AC_MSG_NOTICE([Building of binutils done])
|
||||
fi
|
||||
|
||||
BINUTILS_DIR="$BINUTILS_SRC"
|
||||
])
|
||||
|
||||
################################################################################
|
||||
#
|
||||
# Helper function to setup hsdis using binutils
|
||||
#
|
||||
AC_DEFUN([LIB_SETUP_HSDIS_BINUTILS],
|
||||
[
|
||||
AC_ARG_WITH([binutils], [AS_HELP_STRING([--with-binutils],
|
||||
[where to find the binutils files needed for hsdis/binutils])])
|
||||
|
||||
AC_ARG_WITH([binutils-src], [AS_HELP_STRING([--with-binutils-src],
|
||||
[where to find the binutils source for building])])
|
||||
|
||||
# We need the binutils static libs and includes.
|
||||
if test "x$with_binutils_src" != x; then
|
||||
# Try building the source first. If it succeeds, it sets $BINUTILS_DIR.
|
||||
LIB_BUILD_BINUTILS
|
||||
fi
|
||||
|
||||
if test "x$with_binutils" != x; then
|
||||
BINUTILS_DIR="$with_binutils"
|
||||
fi
|
||||
|
||||
binutils_system_error=""
|
||||
HSDIS_LIBS=""
|
||||
if test "x$BINUTILS_DIR" = xsystem; then
|
||||
AC_CHECK_LIB(bfd, bfd_openr, [ HSDIS_LIBS="-lbfd" ], [ binutils_system_error="libbfd not found" ])
|
||||
AC_CHECK_LIB(opcodes, disassembler, [ HSDIS_LIBS="$HSDIS_LIBS -lopcodes" ], [ binutils_system_error="libopcodes not found" ])
|
||||
AC_CHECK_LIB(iberty, xmalloc, [ HSDIS_LIBS="$HSDIS_LIBS -liberty" ], [ binutils_system_error="libiberty not found" ])
|
||||
AC_CHECK_LIB(z, deflate, [ HSDIS_LIBS="$HSDIS_LIBS -lz" ], [ binutils_system_error="libz not found" ])
|
||||
HSDIS_CFLAGS="-DLIBARCH_$OPENJDK_TARGET_CPU_LEGACY_LIB"
|
||||
elif test "x$BINUTILS_DIR" != x; then
|
||||
if test -e $BINUTILS_DIR/bfd/libbfd.a && \
|
||||
test -e $BINUTILS_DIR/opcodes/libopcodes.a && \
|
||||
test -e $BINUTILS_DIR/libiberty/libiberty.a; then
|
||||
HSDIS_CFLAGS="-I$BINUTILS_DIR/include -I$BINUTILS_DIR/bfd -DLIBARCH_$OPENJDK_TARGET_CPU_LEGACY_LIB"
|
||||
HSDIS_LDFLAGS=""
|
||||
HSDIS_LIBS="$BINUTILS_DIR/bfd/libbfd.a $BINUTILS_DIR/opcodes/libopcodes.a $BINUTILS_DIR/libiberty/libiberty.a $BINUTILS_DIR/zlib/libz.a"
|
||||
fi
|
||||
fi
|
||||
|
||||
AC_MSG_CHECKING([for binutils to use with hsdis])
|
||||
case "x$BINUTILS_DIR" in
|
||||
xsystem)
|
||||
if test "x$OPENJDK_TARGET_OS" != xlinux; then
|
||||
AC_MSG_RESULT([invalid])
|
||||
AC_MSG_ERROR([binutils on system is supported for Linux only])
|
||||
elif test "x$binutils_system_error" = x; then
|
||||
AC_MSG_RESULT([system])
|
||||
HSDIS_CFLAGS="$HSDIS_CFLAGS -DSYSTEM_BINUTILS"
|
||||
else
|
||||
AC_MSG_RESULT([invalid])
|
||||
AC_MSG_ERROR([$binutils_system_error])
|
||||
fi
|
||||
;;
|
||||
x)
|
||||
AC_MSG_RESULT([missing])
|
||||
AC_MSG_NOTICE([--with-hsdis=binutils requires specifying a binutils installation.])
|
||||
AC_MSG_NOTICE([Download binutils from https://www.gnu.org/software/binutils and unpack it,])
|
||||
AC_MSG_NOTICE([and point --with-binutils-src to the resulting directory, or use])
|
||||
AC_MSG_NOTICE([--with-binutils to point to a pre-built binutils installation.])
|
||||
AC_MSG_ERROR([Cannot continue])
|
||||
;;
|
||||
*)
|
||||
if test "x$HSDIS_LIBS" != x; then
|
||||
AC_MSG_RESULT([$BINUTILS_DIR])
|
||||
else
|
||||
AC_MSG_RESULT([invalid])
|
||||
AC_MSG_ERROR([$BINUTILS_DIR does not contain a proper binutils installation])
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
])
|
||||
|
||||
################################################################################
|
||||
#
|
||||
# Determine if hsdis should be built, and if so, with which backend.
|
||||
#
|
||||
AC_DEFUN_ONCE([LIB_SETUP_HSDIS],
|
||||
[
|
||||
AC_ARG_WITH([hsdis], [AS_HELP_STRING([--with-hsdis],
|
||||
[what hsdis backend to use ('none', 'capstone', 'llvm', 'binutils') @<:@none@:>@])])
|
||||
|
||||
UTIL_ARG_ENABLE(NAME: hsdis-bundling, DEFAULT: false,
|
||||
RESULT: ENABLE_HSDIS_BUNDLING,
|
||||
DESC: [enable bundling of hsdis to allow HotSpot disassembly out-of-the-box])
|
||||
|
||||
AC_MSG_CHECKING([what hsdis backend to use])
|
||||
|
||||
if test "x$with_hsdis" = xyes; then
|
||||
AC_MSG_ERROR([--with-hsdis must have a value])
|
||||
elif test "x$with_hsdis" = xnone || test "x$with_hsdis" = xno || test "x$with_hsdis" = x; then
|
||||
HSDIS_BACKEND=none
|
||||
AC_MSG_RESULT(['none', hsdis will not be built])
|
||||
elif test "x$with_hsdis" = xcapstone; then
|
||||
HSDIS_BACKEND=capstone
|
||||
AC_MSG_RESULT(['capstone'])
|
||||
|
||||
LIB_SETUP_HSDIS_CAPSTONE
|
||||
elif test "x$with_hsdis" = xllvm; then
|
||||
HSDIS_BACKEND=llvm
|
||||
AC_MSG_RESULT(['llvm'])
|
||||
|
||||
LIB_SETUP_HSDIS_LLVM
|
||||
elif test "x$with_hsdis" = xbinutils; then
|
||||
HSDIS_BACKEND=binutils
|
||||
AC_MSG_RESULT(['binutils'])
|
||||
|
||||
LIB_SETUP_HSDIS_BINUTILS
|
||||
else
|
||||
AC_MSG_RESULT([invalid])
|
||||
AC_MSG_ERROR([Incorrect hsdis backend "$with_hsdis"])
|
||||
fi
|
||||
|
||||
AC_SUBST(HSDIS_BACKEND)
|
||||
AC_SUBST(HSDIS_CFLAGS)
|
||||
AC_SUBST(HSDIS_LDFLAGS)
|
||||
AC_SUBST(HSDIS_LIBS)
|
||||
|
||||
AC_MSG_CHECKING([if hsdis should be bundled])
|
||||
if test "x$ENABLE_HSDIS_BUNDLING" = "xtrue"; then
|
||||
if test "x$HSDIS_BACKEND" = xnone; then
|
||||
AC_MSG_RESULT([no, backend missing])
|
||||
AC_MSG_ERROR([hsdis-bundling requires a hsdis backend. Please set --with-hsdis=<backend>]);
|
||||
fi
|
||||
AC_MSG_RESULT([yes])
|
||||
if test "x$HSDIS_BACKEND" = xbinutils; then
|
||||
AC_MSG_WARN([The resulting build might not be redistributable. Seek legal advice before distributing.])
|
||||
fi
|
||||
else
|
||||
AC_MSG_RESULT([no])
|
||||
fi
|
||||
AC_SUBST(ENABLE_HSDIS_BUNDLING)
|
||||
])
|
||||
@@ -31,7 +31,7 @@
|
||||
################################################################################
|
||||
AC_DEFUN_ONCE([LIB_SETUP_STD_LIBS],
|
||||
[
|
||||
# statically link libstdc++ before C++ ABI is stabilized on Linux unless
|
||||
# statically link libstdc++ before C++ ABI is stablized on Linux unless
|
||||
# dynamic build is configured on command line.
|
||||
AC_ARG_WITH([stdc++lib], [AS_HELP_STRING([--with-stdc++lib=<static>,<dynamic>,<default>],
|
||||
[force linking of the C++ runtime on Linux to either static or dynamic, default is static with dynamic as fallback])],
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2018, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2018, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@@ -23,13 +23,6 @@
|
||||
# questions.
|
||||
#
|
||||
|
||||
################################################################################
|
||||
# Setup libraries and functionalities needed to test the JDK.
|
||||
################################################################################
|
||||
|
||||
# Minimum supported version
|
||||
JTREG_MINIMUM_VERSION=7
|
||||
|
||||
###############################################################################
|
||||
#
|
||||
# Setup and check for gtest framework source files
|
||||
@@ -125,163 +118,3 @@ AC_DEFUN_ONCE([LIB_TESTS_SETUP_JMH],
|
||||
AC_SUBST(JMH_COMMONS_MATH_JAR)
|
||||
AC_SUBST(JMH_VERSION)
|
||||
])
|
||||
|
||||
# Setup the JTReg Regression Test Harness.
|
||||
AC_DEFUN_ONCE([LIB_TESTS_SETUP_JTREG],
|
||||
[
|
||||
AC_ARG_WITH(jtreg, [AS_HELP_STRING([--with-jtreg],
|
||||
[Regression Test Harness @<:@probed@:>@])])
|
||||
|
||||
if test "x$with_jtreg" = xno; then
|
||||
# jtreg disabled
|
||||
AC_MSG_CHECKING([for jtreg test harness])
|
||||
AC_MSG_RESULT([no, disabled])
|
||||
elif test "x$with_jtreg" != xyes && test "x$with_jtreg" != x; then
|
||||
if test -d "$with_jtreg"; then
|
||||
# An explicit path is specified, use it.
|
||||
JT_HOME="$with_jtreg"
|
||||
else
|
||||
case "$with_jtreg" in
|
||||
*.zip )
|
||||
JTREG_SUPPORT_DIR=$CONFIGURESUPPORT_OUTPUTDIR/jtreg
|
||||
$RM -rf $JTREG_SUPPORT_DIR
|
||||
$MKDIR -p $JTREG_SUPPORT_DIR
|
||||
$UNZIP -qq -d $JTREG_SUPPORT_DIR $with_jtreg
|
||||
|
||||
# Try to find jtreg to determine JT_HOME path
|
||||
JTREG_PATH=`$FIND $JTREG_SUPPORT_DIR | $GREP "/bin/jtreg"`
|
||||
if test "x$JTREG_PATH" != x; then
|
||||
JT_HOME=$($DIRNAME $($DIRNAME $JTREG_PATH))
|
||||
fi
|
||||
;;
|
||||
* )
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
UTIL_FIXUP_PATH([JT_HOME])
|
||||
if test ! -d "$JT_HOME"; then
|
||||
AC_MSG_ERROR([jtreg home directory from --with-jtreg=$with_jtreg does not exist])
|
||||
fi
|
||||
|
||||
if test ! -e "$JT_HOME/lib/jtreg.jar"; then
|
||||
AC_MSG_ERROR([jtreg home directory from --with-jtreg=$with_jtreg is not a valid jtreg home])
|
||||
fi
|
||||
|
||||
AC_MSG_CHECKING([for jtreg test harness])
|
||||
AC_MSG_RESULT([$JT_HOME])
|
||||
else
|
||||
# Try to locate jtreg using the JT_HOME environment variable
|
||||
if test "x$JT_HOME" != x; then
|
||||
# JT_HOME set in environment, use it
|
||||
if test ! -d "$JT_HOME"; then
|
||||
AC_MSG_WARN([Ignoring JT_HOME pointing to invalid directory: $JT_HOME])
|
||||
JT_HOME=
|
||||
else
|
||||
if test ! -e "$JT_HOME/lib/jtreg.jar"; then
|
||||
AC_MSG_WARN([Ignoring JT_HOME which is not a valid jtreg home: $JT_HOME])
|
||||
JT_HOME=
|
||||
else
|
||||
AC_MSG_NOTICE([Located jtreg using JT_HOME from environment])
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "x$JT_HOME" = x; then
|
||||
# JT_HOME is not set in environment, or was deemed invalid.
|
||||
# Try to find jtreg on path
|
||||
UTIL_LOOKUP_PROGS(JTREGEXE, jtreg)
|
||||
if test "x$JTREGEXE" != x; then
|
||||
# That's good, now try to derive JT_HOME
|
||||
JT_HOME=`(cd $($DIRNAME $JTREGEXE)/.. && pwd)`
|
||||
if test ! -e "$JT_HOME/lib/jtreg.jar"; then
|
||||
AC_MSG_WARN([Ignoring jtreg from path since a valid jtreg home cannot be found])
|
||||
JT_HOME=
|
||||
else
|
||||
AC_MSG_NOTICE([Located jtreg using jtreg executable in path])
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
AC_MSG_CHECKING([for jtreg test harness])
|
||||
if test "x$JT_HOME" != x; then
|
||||
AC_MSG_RESULT([$JT_HOME])
|
||||
else
|
||||
AC_MSG_RESULT([no, not found])
|
||||
|
||||
if test "x$with_jtreg" = xyes; then
|
||||
AC_MSG_ERROR([--with-jtreg was specified, but no jtreg found.])
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
UTIL_FIXUP_PATH(JT_HOME)
|
||||
AC_SUBST(JT_HOME)
|
||||
|
||||
# Verify jtreg version
|
||||
if test "x$JT_HOME" != x; then
|
||||
AC_MSG_CHECKING([jtreg version number])
|
||||
# jtreg -version looks like this: "jtreg 6.1+1-19"
|
||||
# Extract actual version part ("6.1" in this case)
|
||||
jtreg_version_full=`$JAVA -jar $JT_HOME/lib/jtreg.jar -version | $HEAD -n 1 | $CUT -d ' ' -f 2`
|
||||
jtreg_version=${jtreg_version_full/%+*}
|
||||
AC_MSG_RESULT([$jtreg_version])
|
||||
|
||||
# This is a simplified version of TOOLCHAIN_CHECK_COMPILER_VERSION
|
||||
comparable_actual_version=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", [$]1, [$]2, [$]3, [$]4) }' <<< "$jtreg_version"`
|
||||
comparable_minimum_version=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", [$]1, [$]2, [$]3, [$]4) }' <<< "$JTREG_MINIMUM_VERSION"`
|
||||
if test $comparable_actual_version -lt $comparable_minimum_version ; then
|
||||
AC_MSG_ERROR([jtreg version is too old, at least version $JTREG_MINIMUM_VERSION is required])
|
||||
fi
|
||||
fi
|
||||
])
|
||||
|
||||
# Setup the JIB dependency resolver
|
||||
AC_DEFUN_ONCE([LIB_TESTS_SETUP_JIB],
|
||||
[
|
||||
AC_ARG_WITH(jib, [AS_HELP_STRING([--with-jib],
|
||||
[Jib dependency management tool @<:@not used@:>@])])
|
||||
|
||||
if test "x$with_jib" = xno || test "x$with_jib" = x; then
|
||||
# jib disabled
|
||||
AC_MSG_CHECKING([for jib])
|
||||
AC_MSG_RESULT(no)
|
||||
elif test "x$with_jib" = xyes; then
|
||||
AC_MSG_ERROR([Must supply a value to --with-jib])
|
||||
else
|
||||
JIB_HOME="${with_jib}"
|
||||
AC_MSG_CHECKING([for jib])
|
||||
AC_MSG_RESULT(${JIB_HOME})
|
||||
if test ! -d "${JIB_HOME}"; then
|
||||
AC_MSG_ERROR([--with-jib must be a directory])
|
||||
fi
|
||||
JIB_JAR=$(ls ${JIB_HOME}/lib/jib-*.jar)
|
||||
if test ! -f "${JIB_JAR}"; then
|
||||
AC_MSG_ERROR([Could not find jib jar file in ${JIB_HOME}])
|
||||
fi
|
||||
fi
|
||||
|
||||
AC_SUBST(JIB_HOME)
|
||||
])
|
||||
|
||||
################################################################################
|
||||
#
|
||||
# Check if building of the jtreg failure handler should be enabled.
|
||||
#
|
||||
AC_DEFUN_ONCE([LIB_TESTS_ENABLE_DISABLE_FAILURE_HANDLER],
|
||||
[
|
||||
UTIL_ARG_ENABLE(NAME: jtreg-failure-handler, DEFAULT: auto,
|
||||
RESULT: BUILD_FAILURE_HANDLER,
|
||||
DESC: [enable building of the jtreg failure handler],
|
||||
DEFAULT_DESC: [enabled if jtreg is present],
|
||||
CHECKING_MSG: [if the jtreg failure handler should be built],
|
||||
CHECK_AVAILABLE: [
|
||||
AC_MSG_CHECKING([if the jtreg failure handler is available])
|
||||
if test "x$JT_HOME" != "x"; then
|
||||
AC_MSG_RESULT([yes])
|
||||
else
|
||||
AVAILABLE=false
|
||||
AC_MSG_RESULT([no (jtreg not present)])
|
||||
fi
|
||||
])
|
||||
AC_SUBST(BUILD_FAILURE_HANDLER)
|
||||
])
|
||||
|
||||
@@ -1,162 +0,0 @@
|
||||
#
|
||||
# Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2023, JetBrains s.r.o.. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License version 2 only, as
|
||||
# published by the Free Software Foundation. Oracle designates this
|
||||
# particular file as subject to the "Classpath" exception as provided
|
||||
# by Oracle in the LICENSE file that accompanied this code.
|
||||
#
|
||||
# This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# version 2 for more details (a copy is included in the LICENSE file that
|
||||
# accompanied this code).
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License version
|
||||
# 2 along with this work; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
# or visit www.oracle.com if you need additional information or have any
|
||||
# questions.
|
||||
#
|
||||
|
||||
################################################################################
|
||||
# Setup wayland
|
||||
################################################################################
|
||||
AC_DEFUN_ONCE([LIB_SETUP_WAYLAND],
|
||||
[
|
||||
AC_ARG_WITH(wayland, [AS_HELP_STRING([--with-wayland],
|
||||
[specify prefix directory for the wayland package
|
||||
(expecting the headers under PATH/include)])])
|
||||
AC_ARG_WITH(wayland-include, [AS_HELP_STRING([--with-wayland-include],
|
||||
[specify directory for the wayland include files])])
|
||||
|
||||
if test "x$NEEDS_LIB_WAYLAND" = xfalse; then
|
||||
if (test "x${with_wayland}" != x && test "x${with_wayland}" != xno) || \
|
||||
(test "x${with_wayland_include}" != x && test "x${with_wayland_include}" != xno); then
|
||||
AC_MSG_WARN([[wayland not used, so --with-wayland[-*] is ignored]])
|
||||
fi
|
||||
WAYLAND_CFLAGS=
|
||||
WAYLAND_LIBS=
|
||||
VULKAN_FLAGS=
|
||||
VULKAN_ENABLED=false
|
||||
else
|
||||
WAYLAND_FOUND=no
|
||||
|
||||
if test "x${with_wayland}" = xno || test "x${with_wayland_include}" = xno; then
|
||||
AC_MSG_ERROR([It is not possible to disable the use of wayland. Remove the --without-wayland option.])
|
||||
fi
|
||||
|
||||
if test "x${with_wayland}" != x; then
|
||||
AC_MSG_CHECKING([for wayland headers])
|
||||
if test -s "${with_wayland}/include/wayland-client.h" && test -s "${with_wayland}/include/wayland-cursor.h"; then
|
||||
WAYLAND_CFLAGS="-I${with_wayland}/include"
|
||||
WAYLAND_LIBS="-L${with_wayland}/lib -lwayland-client -lwayland-cursor"
|
||||
|
||||
WAYLAND_FOUND=yes
|
||||
AC_MSG_RESULT([$WAYLAND_FOUND])
|
||||
else
|
||||
AC_MSG_ERROR([Can't find 'include/wayland-client.h' and 'include/wayland-cursor.h' under ${with_wayland} given with the --with-wayland option.])
|
||||
fi
|
||||
fi
|
||||
if test "x${with_wayland_include}" != x; then
|
||||
AC_MSG_CHECKING([for wayland headers])
|
||||
if test -s "${with_wayland_include}/wayland-client.h" && test -s "${with_wayland_include}/wayland-cursor.h"; then
|
||||
WAYLAND_CFLAGS="-I${with_wayland_include}"
|
||||
WAYLAND_FOUND=yes
|
||||
AC_MSG_RESULT([$WAYLAND_FOUND])
|
||||
else
|
||||
AC_MSG_ERROR([Can't find 'wayland-client.h' and 'wayland-cursor.h' under ${with_wayland_include} given with the --with-wayland-include option.])
|
||||
fi
|
||||
fi
|
||||
if test "x$WAYLAND_FOUND" = xno; then
|
||||
# Are the wayland headers installed in the default /usr/include location?
|
||||
AC_CHECK_HEADERS([wayland-client.h wayland-cursor.h],
|
||||
[ WAYLAND_FOUND=yes ],
|
||||
[ WAYLAND_FOUND=no; break ]
|
||||
)
|
||||
if test "x$WAYLAND_FOUND" = xyes; then
|
||||
WAYLAND_CFLAGS=
|
||||
WAYLAND_LIBS="-lwayland-client -lwayland-cursor"
|
||||
DEFAULT_WAYLAND=yes
|
||||
fi
|
||||
fi
|
||||
if test "x$WAYLAND_FOUND" = xno; then
|
||||
HELP_MSG_MISSING_DEPENDENCY([wayland])
|
||||
AC_MSG_ERROR([Could not find wayland! $HELP_MSG ])
|
||||
fi
|
||||
|
||||
|
||||
# Checking for vulkan sdk
|
||||
|
||||
AC_ARG_WITH(vulkan, [AS_HELP_STRING([--with-vulkan],
|
||||
[specify whether we use vulkan])])
|
||||
|
||||
AC_ARG_WITH(vulkan-include, [AS_HELP_STRING([--with-vulkan-include],
|
||||
[specify directory for the vulkan include files])])
|
||||
|
||||
if test "x$SUPPORTS_LIB_VULKAN" = xfalse; then
|
||||
|
||||
if (test "x${with_vulkan}" != x && test "x${with_vulkan}" != xno) || \
|
||||
(test "x${with_vulkan_include}" != x && test "x${with_vulkan_include}" != xno); then
|
||||
AC_MSG_WARN([[vulkan not used, so --with-vulkan-include is ignored]])
|
||||
fi
|
||||
VULKAN_FLAGS=
|
||||
VULKAN_ENABLED=false
|
||||
else
|
||||
# Do not build vulkan rendering pipeline by default
|
||||
if (test "x${with_vulkan}" = x && test "x${with_vulkan_include}" = x) || \
|
||||
test "x${with_vulkan}" = xno || test "x${with_vulkan_include}" = xno ; then
|
||||
VULKAN_FLAGS=
|
||||
VULKAN_ENABLED=false
|
||||
else
|
||||
VULKAN_FOUND=no
|
||||
|
||||
if test "x${with_vulkan_include}" != x; then
|
||||
AC_CHECK_HEADERS([${with_vulkan_include}/include/vulkan/vulkan.h],
|
||||
[ VULKAN_FOUND=yes
|
||||
VULKAN_FLAGS="-DVK_USE_PLATFORM_WAYLAND_KHR -I${with_vulkan_include}/include -DVULKAN_ENABLED"
|
||||
VULKAN_ENABLED=true
|
||||
],
|
||||
[ AC_MSG_ERROR([Can't find 'vulkan/vulkan.h' under '${with_vulkan_include}']) ]
|
||||
)
|
||||
fi
|
||||
|
||||
if test "x$VULKAN_FOUND" = xno; then
|
||||
# Check vulkan sdk location
|
||||
AC_CHECK_HEADERS([$VULKAN_SDK/include/vulkan/vulkan.h],
|
||||
[ VULKAN_FOUND=yes
|
||||
VULKAN_FLAGS="-DVK_USE_PLATFORM_WAYLAND_KHR -I${VULKAN_SDK}/include -DVULKAN_ENABLED"
|
||||
VULKAN_ENABLED=true
|
||||
],
|
||||
[ VULKAN_FOUND=no; break ]
|
||||
)
|
||||
fi
|
||||
|
||||
if test "x$VULKAN_FOUND" = xno; then
|
||||
# Check default /usr/include location
|
||||
AC_CHECK_HEADERS([vulkan/vulkan.h],
|
||||
[ VULKAN_FOUND=yes
|
||||
VULKAN_FLAGS="-DVK_USE_PLATFORM_WAYLAND_KHR -DVULKAN_ENABLED"
|
||||
VULKAN_ENABLED=true
|
||||
],
|
||||
[ VULKAN_FOUND=no; break ]
|
||||
)
|
||||
fi
|
||||
|
||||
if test "x$VULKAN_FOUND" = xno; then
|
||||
HELP_MSG_MISSING_DEPENDENCY([vulkan])
|
||||
AC_MSG_ERROR([Could not find vulkan! $HELP_MSG ])
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
AC_SUBST(VULKAN_FLAGS)
|
||||
AC_SUBST(VULKAN_ENABLED)
|
||||
AC_SUBST(WAYLAND_CFLAGS)
|
||||
AC_SUBST(WAYLAND_LIBS)
|
||||
])
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2011, 2021, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@@ -28,13 +28,10 @@ m4_include([lib-alsa.m4])
|
||||
m4_include([lib-bundled.m4])
|
||||
m4_include([lib-cups.m4])
|
||||
m4_include([lib-ffi.m4])
|
||||
m4_include([lib-fontconfig.m4])
|
||||
m4_include([lib-freetype.m4])
|
||||
m4_include([lib-hsdis.m4])
|
||||
m4_include([lib-std.m4])
|
||||
m4_include([lib-x11.m4])
|
||||
m4_include([lib-wayland.m4])
|
||||
|
||||
m4_include([lib-fontconfig.m4])
|
||||
m4_include([lib-tests.m4])
|
||||
|
||||
################################################################################
|
||||
@@ -42,23 +39,16 @@ m4_include([lib-tests.m4])
|
||||
################################################################################
|
||||
AC_DEFUN_ONCE([LIB_DETERMINE_DEPENDENCIES],
|
||||
[
|
||||
# Check if X11, wayland and vulkan is needed
|
||||
# Check if X11 is needed
|
||||
if test "x$OPENJDK_TARGET_OS" = xwindows || test "x$OPENJDK_TARGET_OS" = xmacosx; then
|
||||
# No X11 and wayland support on windows or macosx
|
||||
# No X11 support on windows or macosx
|
||||
NEEDS_LIB_X11=false
|
||||
NEEDS_LIB_WAYLAND=false
|
||||
SUPPORTS_LIB_VULKAN=false
|
||||
elif test "x$ENABLE_HEADLESS_ONLY" = xtrue; then
|
||||
# No X11 support needed when building headless only
|
||||
NEEDS_LIB_X11=false
|
||||
NEEDS_LIB_WAYLAND=false
|
||||
SUPPORTS_LIB_VULKAN=false
|
||||
else
|
||||
# All other instances need X11 and wayland, even if building headless only, libawt still
|
||||
# needs X11 headers.
|
||||
# All other instances need X11
|
||||
NEEDS_LIB_X11=true
|
||||
NEEDS_LIB_WAYLAND=true
|
||||
SUPPORTS_LIB_VULKAN=true
|
||||
fi
|
||||
|
||||
# Check if fontconfig is needed
|
||||
@@ -105,18 +95,14 @@ AC_DEFUN_ONCE([LIB_DETERMINE_DEPENDENCIES],
|
||||
AC_DEFUN_ONCE([LIB_SETUP_LIBRARIES],
|
||||
[
|
||||
LIB_SETUP_STD_LIBS
|
||||
|
||||
LIB_SETUP_ALSA
|
||||
LIB_SETUP_BUNDLED_LIBS
|
||||
LIB_SETUP_X11
|
||||
LIB_SETUP_CUPS
|
||||
LIB_SETUP_FONTCONFIG
|
||||
LIB_SETUP_FREETYPE
|
||||
LIB_SETUP_HSDIS
|
||||
LIB_SETUP_ALSA
|
||||
LIB_SETUP_LIBFFI
|
||||
LIB_SETUP_BUNDLED_LIBS
|
||||
LIB_SETUP_MISC_LIBS
|
||||
LIB_SETUP_X11
|
||||
LIB_SETUP_WAYLAND
|
||||
|
||||
LIB_TESTS_SETUP_GTEST
|
||||
|
||||
BASIC_JDKLIB_LIBS=""
|
||||
@@ -155,18 +141,11 @@ AC_DEFUN_ONCE([LIB_SETUP_LIBRARIES],
|
||||
test "x$OPENJDK_TARGET_CPU" = xmips ||
|
||||
test "x$OPENJDK_TARGET_CPU" = xmipsel ||
|
||||
test "x$OPENJDK_TARGET_CPU" = xppc ||
|
||||
test "x$OPENJDK_TARGET_CPU" = xsh ||
|
||||
test "x$OPENJDK_TARGET_CPU" = xriscv32); then
|
||||
test "x$OPENJDK_TARGET_CPU" = xsh); then
|
||||
BASIC_JVM_LIBS="$BASIC_JVM_LIBS -latomic"
|
||||
fi
|
||||
fi
|
||||
|
||||
# Because RISC-V only has word-sized atomics, it requires libatomic where
|
||||
# other common architectures do not. So link libatomic by default.
|
||||
if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xriscv64; then
|
||||
BASIC_JVM_LIBS="$BASIC_JVM_LIBS -latomic"
|
||||
fi
|
||||
|
||||
# perfstat lib
|
||||
if test "x$OPENJDK_TARGET_OS" = xaix; then
|
||||
BASIC_JVM_LIBS="$BASIC_JVM_LIBS -lperfstat"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2011, 2021, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@@ -126,12 +126,6 @@ AC_DEFUN([PLATFORM_EXTRACT_VARS_FROM_CPU],
|
||||
VAR_CPU_BITS=64
|
||||
VAR_CPU_ENDIAN=little
|
||||
;;
|
||||
riscv32)
|
||||
VAR_CPU=riscv32
|
||||
VAR_CPU_ARCH=riscv
|
||||
VAR_CPU_BITS=32
|
||||
VAR_CPU_ENDIAN=little
|
||||
;;
|
||||
riscv64)
|
||||
VAR_CPU=riscv64
|
||||
VAR_CPU_ARCH=riscv
|
||||
@@ -384,7 +378,7 @@ AC_DEFUN([PLATFORM_EXTRACT_TARGET_AND_BUILD],
|
||||
fi
|
||||
])
|
||||
|
||||
# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behavior
|
||||
# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
|
||||
# accordingly. Must be done after setting up build and target system, but before
|
||||
# doing anything else with these values.
|
||||
AC_DEFUN([PLATFORM_SETUP_TARGET_CPU_BITS],
|
||||
@@ -567,10 +561,6 @@ AC_DEFUN([PLATFORM_SETUP_LEGACY_VARS_HELPER],
|
||||
HOTSPOT_$1_CPU_DEFINE=PPC64
|
||||
elif test "x$OPENJDK_$1_CPU" = xppc64le; then
|
||||
HOTSPOT_$1_CPU_DEFINE=PPC64
|
||||
elif test "x$OPENJDK_$1_CPU" = xriscv32; then
|
||||
HOTSPOT_$1_CPU_DEFINE=RISCV32
|
||||
elif test "x$OPENJDK_$1_CPU" = xriscv64; then
|
||||
HOTSPOT_$1_CPU_DEFINE=RISCV64
|
||||
|
||||
# The cpu defines below are for zero, we don't support them directly.
|
||||
elif test "x$OPENJDK_$1_CPU" = xsparc; then
|
||||
@@ -581,6 +571,8 @@ AC_DEFUN([PLATFORM_SETUP_LEGACY_VARS_HELPER],
|
||||
HOTSPOT_$1_CPU_DEFINE=S390
|
||||
elif test "x$OPENJDK_$1_CPU" = xs390x; then
|
||||
HOTSPOT_$1_CPU_DEFINE=S390
|
||||
elif test "x$OPENJDK_$1_CPU" = xriscv64; then
|
||||
HOTSPOT_$1_CPU_DEFINE=RISCV
|
||||
elif test "x$OPENJDK_$1_CPU" != x; then
|
||||
HOTSPOT_$1_CPU_DEFINE=$(echo $OPENJDK_$1_CPU | tr a-z A-Z)
|
||||
fi
|
||||
@@ -656,6 +648,9 @@ AC_DEFUN_ONCE([PLATFORM_SETUP_OPENJDK_BUILD_AND_TARGET],
|
||||
PLATFORM_SET_MODULE_TARGET_OS_VALUES
|
||||
PLATFORM_SET_RELEASE_FILE_OS_VALUES
|
||||
PLATFORM_SETUP_LEGACY_VARS
|
||||
|
||||
# Deprecated in JDK 15
|
||||
UTIL_DEPRECATED_ARG_ENABLE(deprecated-ports)
|
||||
])
|
||||
|
||||
AC_DEFUN_ONCE([PLATFORM_SETUP_OPENJDK_BUILD_OS_VERSION],
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2011, 2021, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@@ -38,7 +38,7 @@ CONFIGURE_START_DIR:=@CONFIGURE_START_DIR@
|
||||
# A self-referential reference to this file.
|
||||
SPEC:=@SPEC@
|
||||
|
||||
# Path to autoconf if overridden by the user, to be used by "make reconfigure"
|
||||
# Path to autoconf if overriden by the user, to be used by "make reconfigure"
|
||||
AUTOCONF := @AUTOCONF@
|
||||
|
||||
# SPACE and COMMA are defined in MakeBase.gmk, but they are also used in
|
||||
@@ -54,9 +54,6 @@ MAKE := @MAKE@
|
||||
# Make sure all shell commands are executed with the C locale
|
||||
export LC_ALL := C
|
||||
|
||||
# Make sure we override any local CLASSPATH variable
|
||||
export CLASSPATH := @CLASSPATH@
|
||||
|
||||
# The default make arguments
|
||||
MAKE_ARGS = $(MAKE_LOG_FLAGS) -r -R -I $(TOPDIR)/make/common SPEC=$(SPEC) \
|
||||
MAKE_LOG_FLAGS="$(MAKE_LOG_FLAGS)" $(MAKE_LOG_VARS)
|
||||
@@ -129,13 +126,7 @@ RELEASE_FILE_OS_ARCH:=@RELEASE_FILE_OS_ARCH@
|
||||
RELEASE_FILE_LIBC:=@RELEASE_FILE_LIBC@
|
||||
|
||||
SOURCE_DATE := @SOURCE_DATE@
|
||||
ISO_8601_FORMAT_STRING := @ISO_8601_FORMAT_STRING@
|
||||
|
||||
ifneq ($(SOURCE_DATE), updated)
|
||||
# For "updated" source date value, these are set in InitSupport.gmk
|
||||
export SOURCE_DATE_EPOCH := $(SOURCE_DATE)
|
||||
SOURCE_DATE_ISO_8601 := @SOURCE_DATE_ISO_8601@
|
||||
endif
|
||||
ENABLE_REPRODUCIBLE_BUILD := @ENABLE_REPRODUCIBLE_BUILD@
|
||||
|
||||
LIBM:=@LIBM@
|
||||
LIBDL:=@LIBDL@
|
||||
@@ -147,7 +138,7 @@ ifneq ($(findstring windows.wsl, @OPENJDK_BUILD_OS_ENV@), )
|
||||
# Tell WSL to convert PATH between linux and windows
|
||||
export WSLENV := PATH/l
|
||||
else ifeq (@OPENJDK_BUILD_OS_ENV@, windows.msys2)
|
||||
# Prohibit msys2 from attempting any path wrangling
|
||||
# Prohibit msys2 from attemping any path wrangling
|
||||
export MSYS2_ARG_CONV_EXCL := "*"
|
||||
endif
|
||||
|
||||
@@ -245,7 +236,7 @@ VERSION_DOCS_API_SINCE := @VERSION_DOCS_API_SINCE@
|
||||
JDK_SOURCE_TARGET_VERSION := @JDK_SOURCE_TARGET_VERSION@
|
||||
|
||||
# Convenience CFLAGS settings for passing version information into native programs.
|
||||
VERSION_CFLAGS = \
|
||||
VERSION_CFLAGS := \
|
||||
-DVERSION_FEATURE=$(VERSION_FEATURE) \
|
||||
-DVERSION_INTERIM=$(VERSION_INTERIM) \
|
||||
-DVERSION_UPDATE=$(VERSION_UPDATE) \
|
||||
@@ -365,12 +356,6 @@ ENABLE_COMPATIBLE_CDS_ALIGNMENT := @ENABLE_COMPATIBLE_CDS_ALIGNMENT@
|
||||
|
||||
ALLOW_ABSOLUTE_PATHS_IN_OUTPUT := @ALLOW_ABSOLUTE_PATHS_IN_OUTPUT@
|
||||
|
||||
HSDIS_BACKEND := @HSDIS_BACKEND@
|
||||
ENABLE_HSDIS_BUNDLING := @ENABLE_HSDIS_BUNDLING@
|
||||
HSDIS_CFLAGS := @HSDIS_CFLAGS@
|
||||
HSDIS_LDFLAGS := @HSDIS_LDFLAGS@
|
||||
HSDIS_LIBS := @HSDIS_LIBS@
|
||||
|
||||
# The boot jdk to use. This is overridden in bootcycle-spec.gmk. Make sure to keep
|
||||
# it in sync.
|
||||
BOOT_JDK:=@BOOT_JDK@
|
||||
@@ -414,7 +399,6 @@ LIBFFI_CFLAGS:=@LIBFFI_CFLAGS@
|
||||
ENABLE_LIBFFI_BUNDLING:=@ENABLE_LIBFFI_BUNDLING@
|
||||
LIBFFI_LIB_FILE:=@LIBFFI_LIB_FILE@
|
||||
FILE_MACRO_CFLAGS := @FILE_MACRO_CFLAGS@
|
||||
BRANCH_PROTECTION_CFLAGS := @BRANCH_PROTECTION_CFLAGS@
|
||||
|
||||
STATIC_LIBS_CFLAGS := @STATIC_LIBS_CFLAGS@
|
||||
|
||||
@@ -428,7 +412,7 @@ GTEST_FRAMEWORK_SRC := @GTEST_FRAMEWORK_SRC@
|
||||
|
||||
# Source file for cacerts
|
||||
CACERTS_FILE=@CACERTS_FILE@
|
||||
# Source folder for user provided cacerts PEM files
|
||||
# Source folder for user provided cacerts PEM files
|
||||
CACERTS_SRC=@CACERTS_SRC@
|
||||
|
||||
# Enable unlimited crypto policy
|
||||
@@ -453,17 +437,13 @@ endif
|
||||
# Necessary additional compiler flags to compile X11
|
||||
X_CFLAGS:=@X_CFLAGS@
|
||||
X_LIBS:=@X_LIBS@
|
||||
WAYLAND_CFLAGS:=@WAYLAND_CFLAGS@
|
||||
WAYLAND_LIBS:=@WAYLAND_LIBS@
|
||||
VULKAN_FLAGS:=@VULKAN_FLAGS@
|
||||
VULKAN_ENABLED:=@VULKAN_ENABLED@
|
||||
|
||||
# The lowest required version of macosx
|
||||
MACOSX_VERSION_MIN=@MACOSX_VERSION_MIN@
|
||||
# The highest allowed version of macosx
|
||||
MACOSX_VERSION_MAX=@MACOSX_VERSION_MAX@
|
||||
|
||||
# The macosx code signing configuration
|
||||
MACOSX_CODESIGN_MODE:=@MACOSX_CODESIGN_MODE@
|
||||
# The macosx code signing identity to use
|
||||
MACOSX_CODESIGN_IDENTITY=@MACOSX_CODESIGN_IDENTITY@
|
||||
|
||||
# Toolchain type: gcc, clang, xlc, microsoft...
|
||||
@@ -551,7 +531,8 @@ CPP := @CPP@
|
||||
# The linker can be gcc or ld on unix systems, or link.exe on windows systems.
|
||||
LD := @LD@
|
||||
|
||||
SYSROOT := @SYSROOT@
|
||||
# Xcode SDK path
|
||||
SDKROOT:=@SDKROOT@
|
||||
|
||||
# LDFLAGS used to link the jdk native libraries (C-code)
|
||||
LDFLAGS_JDKLIB:=@LDFLAGS_JDKLIB@
|
||||
@@ -593,6 +574,7 @@ AR := @AR@
|
||||
ARFLAGS:=@ARFLAGS@
|
||||
|
||||
NM:=@NM@
|
||||
GNM:=@GNM@
|
||||
STRIP:=@STRIP@
|
||||
OBJDUMP:=@OBJDUMP@
|
||||
CXXFILT:=@CXXFILT@
|
||||
@@ -625,7 +607,7 @@ SET_SHARED_LIBRARY_NAME=@SET_SHARED_LIBRARY_NAME@
|
||||
|
||||
SHARED_LIBRARY_FLAGS=@SHARED_LIBRARY_FLAGS@
|
||||
|
||||
# Set origin using the linker, ie use the relative path to the dependent library to find the dependencies.
|
||||
# Set origin using the linker, ie use the relative path to the dependent library to find the dependees.
|
||||
# (Note absence of := assignment, because we do not want to evaluate the macro body here)
|
||||
SET_SHARED_LIBRARY_ORIGIN=@SET_SHARED_LIBRARY_ORIGIN@
|
||||
SET_EXECUTABLE_ORIGIN=@SET_EXECUTABLE_ORIGIN@
|
||||
@@ -668,7 +650,7 @@ JAVAC = $(JAVAC_CMD)
|
||||
JAVADOC = $(JAVADOC_CMD)
|
||||
JAR = $(JAR_CMD)
|
||||
JLINK = $(JLINK_CMD)
|
||||
JMOD = $(JMOD_CMD)
|
||||
JMOD = $(JMOD_CMD) $(JAVA_TOOL_FLAGS_SMALL)
|
||||
|
||||
BUILD_JAVA_FLAGS := @BOOTCYCLE_JVM_ARGS_BIG@
|
||||
BUILD_JAVA=@FIXPATH@ $(BUILD_JDK)/bin/java $(BUILD_JAVA_FLAGS)
|
||||
@@ -705,7 +687,6 @@ JAVADOC_MAIN_CLASS = -m jdk.javadoc.interim/jdk.javadoc.internal.tool.Main
|
||||
NEW_JAVAC = $(INTERIM_LANGTOOLS_ARGS) $(JAVAC_MAIN_CLASS)
|
||||
NEW_JAVADOC = $(INTERIM_LANGTOOLS_ARGS) $(JAVADOC_MAIN_CLASS)
|
||||
|
||||
JMOD_COMPRESS:=@JMOD_COMPRESS@
|
||||
JLINK_KEEP_PACKAGED_MODULES:=@JLINK_KEEP_PACKAGED_MODULES@
|
||||
|
||||
RCFLAGS := @RCFLAGS@
|
||||
@@ -772,12 +753,14 @@ READELF:=@READELF@
|
||||
EXPR:=@EXPR@
|
||||
FILE:=@FILE@
|
||||
DOT:=@DOT@
|
||||
HG:=@HG@
|
||||
GIT:=@GIT@
|
||||
OBJCOPY:=@OBJCOPY@
|
||||
SETFILE:=@SETFILE@
|
||||
XATTR:=@XATTR@
|
||||
JT_HOME:=@JT_HOME@
|
||||
JIB_HOME:=@JIB_HOME@
|
||||
XCODEBUILD=@XCODEBUILD@
|
||||
DTRACE := @DTRACE@
|
||||
FIXPATH := @FIXPATH@
|
||||
FIXPATH_BASE := @FIXPATH_BASE@
|
||||
@@ -939,12 +922,7 @@ JDK_MACOSX_CONTENTS_DIR=$(JDK_MACOSX_BUNDLE_DIR)/$(JDK_MACOSX_CONTENTS_SUBDIR)
|
||||
JRE_MACOSX_CONTENTS_DIR=$(JRE_MACOSX_BUNDLE_DIR)/$(JRE_MACOSX_CONTENTS_SUBDIR)
|
||||
|
||||
# Bundle names
|
||||
ifneq ($(VERSION_BUILD), )
|
||||
BASE_NAME := $(VERSION_SHORT)+$(VERSION_BUILD)_$(OPENJDK_TARGET_BUNDLE_PLATFORM)
|
||||
else
|
||||
BASE_NAME := $(VERSION_SHORT)_$(OPENJDK_TARGET_BUNDLE_PLATFORM)
|
||||
endif
|
||||
|
||||
BASE_NAME := $(VERSION_SHORT)+$(VERSION_BUILD)_$(OPENJDK_TARGET_BUNDLE_PLATFORM)
|
||||
ifeq ($(DEBUG_LEVEL), fastdebug)
|
||||
DEBUG_PART := -debug
|
||||
else ifneq ($(DEBUG_LEVEL), release)
|
||||
|
||||
@@ -39,7 +39,7 @@ VALID_TOOLCHAINS_all="gcc clang xlc microsoft"
|
||||
|
||||
# These toolchains are valid on different platforms
|
||||
VALID_TOOLCHAINS_linux="gcc clang"
|
||||
VALID_TOOLCHAINS_macosx="clang"
|
||||
VALID_TOOLCHAINS_macosx="gcc clang"
|
||||
VALID_TOOLCHAINS_aix="xlc"
|
||||
VALID_TOOLCHAINS_windows="microsoft"
|
||||
|
||||
@@ -51,8 +51,8 @@ TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++"
|
||||
|
||||
# Minimum supported versions, empty means unspecified
|
||||
TOOLCHAIN_MINIMUM_VERSION_clang="3.5"
|
||||
TOOLCHAIN_MINIMUM_VERSION_gcc="6.0"
|
||||
TOOLCHAIN_MINIMUM_VERSION_microsoft="19.28.0.0" # VS2019 16.8, aka MSVC 14.28
|
||||
TOOLCHAIN_MINIMUM_VERSION_gcc="5.0"
|
||||
TOOLCHAIN_MINIMUM_VERSION_microsoft="19.10.0.0" # VS2017
|
||||
TOOLCHAIN_MINIMUM_VERSION_xlc=""
|
||||
|
||||
# Minimum supported linker versions, empty means unspecified
|
||||
@@ -231,8 +231,34 @@ AC_DEFUN_ONCE([TOOLCHAIN_DETERMINE_TOOLCHAIN_TYPE],
|
||||
toolchain_var_name=VALID_TOOLCHAINS_$OPENJDK_BUILD_OS
|
||||
VALID_TOOLCHAINS=${!toolchain_var_name}
|
||||
|
||||
# First toolchain type in the list is the default
|
||||
DEFAULT_TOOLCHAIN=${VALID_TOOLCHAINS%% *}
|
||||
if test "x$OPENJDK_TARGET_OS" = xmacosx; then
|
||||
if test -n "$XCODEBUILD"; then
|
||||
# On Mac OS X, default toolchain to clang after Xcode 5
|
||||
XCODE_VERSION_OUTPUT=`"$XCODEBUILD" -version | $HEAD -n 1`
|
||||
$ECHO "$XCODE_VERSION_OUTPUT" | $GREP "Xcode " > /dev/null
|
||||
if test $? -ne 0; then
|
||||
AC_MSG_NOTICE([xcodebuild output: $XCODE_VERSION_OUTPUT])
|
||||
AC_MSG_ERROR([Failed to determine Xcode version.])
|
||||
fi
|
||||
XCODE_MAJOR_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | \
|
||||
$SED -e 's/^Xcode \(@<:@1-9@:>@@<:@0-9.@:>@*\)/\1/' | \
|
||||
$CUT -f 1 -d .`
|
||||
AC_MSG_NOTICE([Xcode major version: $XCODE_MAJOR_VERSION])
|
||||
if test $XCODE_MAJOR_VERSION -ge 5; then
|
||||
DEFAULT_TOOLCHAIN="clang"
|
||||
else
|
||||
DEFAULT_TOOLCHAIN="gcc"
|
||||
fi
|
||||
else
|
||||
# If Xcode is not installed, but the command line tools are
|
||||
# then we can't run xcodebuild. On these systems we should
|
||||
# default to clang
|
||||
DEFAULT_TOOLCHAIN="clang"
|
||||
fi
|
||||
else
|
||||
# First toolchain type in the list is the default
|
||||
DEFAULT_TOOLCHAIN=${VALID_TOOLCHAINS%% *}
|
||||
fi
|
||||
|
||||
if test "x$with_toolchain_type" = xlist; then
|
||||
# List all toolchains
|
||||
@@ -315,19 +341,10 @@ AC_DEFUN_ONCE([TOOLCHAIN_PRE_DETECTION],
|
||||
# autoconf magic only relies on PATH, so update it if tools dir is specified
|
||||
OLD_PATH="$PATH"
|
||||
|
||||
if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
|
||||
if test "x$XCODEBUILD" != x; then
|
||||
XCODE_VERSION_OUTPUT=`"$XCODEBUILD" -version 2> /dev/null | $HEAD -n 1`
|
||||
$ECHO "$XCODE_VERSION_OUTPUT" | $GREP "^Xcode " > /dev/null
|
||||
if test $? -ne 0; then
|
||||
AC_MSG_NOTICE([xcodebuild -version output: $XCODE_VERSION_OUTPUT])
|
||||
AC_MSG_ERROR([Failed to determine Xcode version])
|
||||
fi
|
||||
|
||||
# For Xcode, we set the Xcode version as TOOLCHAIN_VERSION
|
||||
TOOLCHAIN_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | $CUT -f 2 -d ' '`
|
||||
TOOLCHAIN_DESCRIPTION="$TOOLCHAIN_DESCRIPTION from Xcode $TOOLCHAIN_VERSION"
|
||||
fi
|
||||
if test "x$XCODE_VERSION_OUTPUT" != x; then
|
||||
# For Xcode, we set the Xcode version as TOOLCHAIN_VERSION
|
||||
TOOLCHAIN_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | $CUT -f 2 -d ' '`
|
||||
TOOLCHAIN_DESCRIPTION="$TOOLCHAIN_DESCRIPTION from Xcode $TOOLCHAIN_VERSION"
|
||||
fi
|
||||
AC_SUBST(TOOLCHAIN_VERSION)
|
||||
|
||||
@@ -681,10 +698,10 @@ AC_DEFUN_ONCE([TOOLCHAIN_DETECT_TOOLCHAIN_CORE],
|
||||
AS="$CC -c"
|
||||
else
|
||||
if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
|
||||
# On 64 bit windows, the assembler is "ml64.exe"
|
||||
# On 64 bit windows, the assember is "ml64.exe"
|
||||
UTIL_LOOKUP_TOOLCHAIN_PROGS(AS, ml64)
|
||||
else
|
||||
# otherwise, the assembler is "ml.exe"
|
||||
# otherwise, the assember is "ml.exe"
|
||||
UTIL_LOOKUP_TOOLCHAIN_PROGS(AS, ml)
|
||||
fi
|
||||
fi
|
||||
@@ -755,6 +772,8 @@ AC_DEFUN_ONCE([TOOLCHAIN_DETECT_TOOLCHAIN_EXTRA],
|
||||
else
|
||||
UTIL_LOOKUP_TOOLCHAIN_PROGS(NM, nm)
|
||||
fi
|
||||
GNM="$NM"
|
||||
AC_SUBST(GNM)
|
||||
fi
|
||||
|
||||
# objcopy is used for moving debug symbols to separate files when
|
||||
@@ -864,13 +883,13 @@ AC_DEFUN_ONCE([TOOLCHAIN_SETUP_BUILD_COMPILERS],
|
||||
UTIL_REQUIRE_PROGS(BUILD_CC, cl, [$VS_PATH])
|
||||
UTIL_REQUIRE_PROGS(BUILD_CXX, cl, [$VS_PATH])
|
||||
|
||||
# On windows, the assembler is "ml.exe". We currently don't need this so
|
||||
# On windows, the assember is "ml.exe". We currently don't need this so
|
||||
# do not require.
|
||||
if test "x$OPENJDK_BUILD_CPU_BITS" = "x64"; then
|
||||
# On 64 bit windows, the assembler is "ml64.exe"
|
||||
# On 64 bit windows, the assember is "ml64.exe"
|
||||
UTIL_LOOKUP_PROGS(BUILD_AS, ml64, [$VS_PATH])
|
||||
else
|
||||
# otherwise the assembler is "ml.exe"
|
||||
# otherwise the assember is "ml.exe"
|
||||
UTIL_LOOKUP_PROGS(BUILD_AS, ml, [$VS_PATH])
|
||||
fi
|
||||
|
||||
@@ -884,8 +903,8 @@ AC_DEFUN_ONCE([TOOLCHAIN_SETUP_BUILD_COMPILERS],
|
||||
BUILD_LDCXX="$BUILD_LD"
|
||||
else
|
||||
if test "x$OPENJDK_BUILD_OS" = xmacosx; then
|
||||
UTIL_REQUIRE_PROGS(BUILD_CC, clang)
|
||||
UTIL_REQUIRE_PROGS(BUILD_CXX, clang++)
|
||||
UTIL_REQUIRE_PROGS(BUILD_CC, clang cc gcc)
|
||||
UTIL_REQUIRE_PROGS(BUILD_CXX, clang++ CC g++)
|
||||
else
|
||||
UTIL_REQUIRE_PROGS(BUILD_CC, cc gcc)
|
||||
UTIL_REQUIRE_PROGS(BUILD_CXX, CC g++)
|
||||
@@ -972,3 +991,123 @@ AC_DEFUN_ONCE([TOOLCHAIN_MISC_CHECKS],
|
||||
fi
|
||||
AC_SUBST(HOTSPOT_TOOLCHAIN_TYPE)
|
||||
])
|
||||
|
||||
# Setup the JTReg Regression Test Harness.
|
||||
AC_DEFUN_ONCE([TOOLCHAIN_SETUP_JTREG],
|
||||
[
|
||||
AC_ARG_WITH(jtreg, [AS_HELP_STRING([--with-jtreg],
|
||||
[Regression Test Harness @<:@probed@:>@])])
|
||||
|
||||
if test "x$with_jtreg" = xno; then
|
||||
# jtreg disabled
|
||||
AC_MSG_CHECKING([for jtreg test harness])
|
||||
AC_MSG_RESULT([no, disabled])
|
||||
elif test "x$with_jtreg" != xyes && test "x$with_jtreg" != x; then
|
||||
if test -d "$with_jtreg"; then
|
||||
# An explicit path is specified, use it.
|
||||
JT_HOME="$with_jtreg"
|
||||
else
|
||||
case "$with_jtreg" in
|
||||
*.zip )
|
||||
JTREG_SUPPORT_DIR=$CONFIGURESUPPORT_OUTPUTDIR/jtreg
|
||||
$RM -rf $JTREG_SUPPORT_DIR
|
||||
$MKDIR -p $JTREG_SUPPORT_DIR
|
||||
$UNZIP -qq -d $JTREG_SUPPORT_DIR $with_jtreg
|
||||
|
||||
# Try to find jtreg to determine JT_HOME path
|
||||
JTREG_PATH=`$FIND $JTREG_SUPPORT_DIR | $GREP "/bin/jtreg"`
|
||||
if test "x$JTREG_PATH" != x; then
|
||||
JT_HOME=$($DIRNAME $($DIRNAME $JTREG_PATH))
|
||||
fi
|
||||
;;
|
||||
* )
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
UTIL_FIXUP_PATH([JT_HOME])
|
||||
if test ! -d "$JT_HOME"; then
|
||||
AC_MSG_ERROR([jtreg home directory from --with-jtreg=$with_jtreg does not exist])
|
||||
fi
|
||||
|
||||
if test ! -e "$JT_HOME/lib/jtreg.jar"; then
|
||||
AC_MSG_ERROR([jtreg home directory from --with-jtreg=$with_jtreg is not a valid jtreg home])
|
||||
fi
|
||||
|
||||
AC_MSG_CHECKING([for jtreg test harness])
|
||||
AC_MSG_RESULT([$JT_HOME])
|
||||
else
|
||||
# Try to locate jtreg using the JT_HOME environment variable
|
||||
if test "x$JT_HOME" != x; then
|
||||
# JT_HOME set in environment, use it
|
||||
if test ! -d "$JT_HOME"; then
|
||||
AC_MSG_WARN([Ignoring JT_HOME pointing to invalid directory: $JT_HOME])
|
||||
JT_HOME=
|
||||
else
|
||||
if test ! -e "$JT_HOME/lib/jtreg.jar"; then
|
||||
AC_MSG_WARN([Ignoring JT_HOME which is not a valid jtreg home: $JT_HOME])
|
||||
JT_HOME=
|
||||
else
|
||||
AC_MSG_NOTICE([Located jtreg using JT_HOME from environment])
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "x$JT_HOME" = x; then
|
||||
# JT_HOME is not set in environment, or was deemed invalid.
|
||||
# Try to find jtreg on path
|
||||
UTIL_LOOKUP_PROGS(JTREGEXE, jtreg)
|
||||
if test "x$JTREGEXE" != x; then
|
||||
# That's good, now try to derive JT_HOME
|
||||
JT_HOME=`(cd $($DIRNAME $JTREGEXE)/.. && pwd)`
|
||||
if test ! -e "$JT_HOME/lib/jtreg.jar"; then
|
||||
AC_MSG_WARN([Ignoring jtreg from path since a valid jtreg home cannot be found])
|
||||
JT_HOME=
|
||||
else
|
||||
AC_MSG_NOTICE([Located jtreg using jtreg executable in path])
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
AC_MSG_CHECKING([for jtreg test harness])
|
||||
if test "x$JT_HOME" != x; then
|
||||
AC_MSG_RESULT([$JT_HOME])
|
||||
else
|
||||
AC_MSG_RESULT([no, not found])
|
||||
|
||||
if test "x$with_jtreg" = xyes; then
|
||||
AC_MSG_ERROR([--with-jtreg was specified, but no jtreg found.])
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
UTIL_FIXUP_PATH(JT_HOME)
|
||||
AC_SUBST(JT_HOME)
|
||||
])
|
||||
|
||||
# Setup the JIB dependency resolver
|
||||
AC_DEFUN_ONCE([TOOLCHAIN_SETUP_JIB],
|
||||
[
|
||||
AC_ARG_WITH(jib, [AS_HELP_STRING([--with-jib],
|
||||
[Jib dependency management tool @<:@not used@:>@])])
|
||||
|
||||
if test "x$with_jib" = xno || test "x$with_jib" = x; then
|
||||
# jib disabled
|
||||
AC_MSG_CHECKING([for jib])
|
||||
AC_MSG_RESULT(no)
|
||||
elif test "x$with_jib" = xyes; then
|
||||
AC_MSG_ERROR([Must supply a value to --with-jib])
|
||||
else
|
||||
JIB_HOME="${with_jib}"
|
||||
AC_MSG_CHECKING([for jib])
|
||||
AC_MSG_RESULT(${JIB_HOME})
|
||||
if test ! -d "${JIB_HOME}"; then
|
||||
AC_MSG_ERROR([--with-jib must be a directory])
|
||||
fi
|
||||
JIB_JAR=$(ls ${JIB_HOME}/lib/jib-*.jar)
|
||||
if test ! -f "${JIB_JAR}"; then
|
||||
AC_MSG_ERROR([Could not find jib jar file in ${JIB_HOME}])
|
||||
fi
|
||||
fi
|
||||
|
||||
AC_SUBST(JIB_HOME)
|
||||
])
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2011, 2021, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@@ -25,7 +25,21 @@
|
||||
|
||||
################################################################################
|
||||
# The order of these defines the priority by which we try to find them.
|
||||
VALID_VS_VERSIONS="2022 2019"
|
||||
VALID_VS_VERSIONS="2019 2017 2022"
|
||||
|
||||
VS_DESCRIPTION_2017="Microsoft Visual Studio 2017"
|
||||
VS_VERSION_INTERNAL_2017=141
|
||||
VS_MSVCR_2017=vcruntime140.dll
|
||||
VS_MSVCP_2017=msvcp140.dll
|
||||
VS_ENVVAR_2017="VS150COMNTOOLS"
|
||||
VS_USE_UCRT_2017="true"
|
||||
VS_VS_INSTALLDIR_2017="Microsoft Visual Studio/2017"
|
||||
VS_EDITIONS_2017="BuildTools Community Professional Enterprise"
|
||||
VS_SDK_INSTALLDIR_2017=
|
||||
VS_VS_PLATFORM_NAME_2017="v141"
|
||||
VS_SDK_PLATFORM_NAME_2017=
|
||||
VS_SUPPORTED_2017=true
|
||||
VS_TOOLSET_SUPPORTED_2017=true
|
||||
|
||||
VS_DESCRIPTION_2019="Microsoft Visual Studio 2019"
|
||||
VS_VERSION_INTERNAL_2019=142
|
||||
@@ -70,7 +84,7 @@ AC_DEFUN([TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT],
|
||||
UTIL_FIXUP_PATH(VS_BASE, NOFAIL)
|
||||
|
||||
if test "x$VS_BASE" != x && test -d "$VS_BASE"; then
|
||||
# In VS 2019, the default installation is in a subdir named after the edition.
|
||||
# In VS 2017 and VS 2019, the default installation is in a subdir named after the edition.
|
||||
# Find the first one present and use that.
|
||||
if test "x$VS_EDITIONS" != x; then
|
||||
for edition in $VS_EDITIONS; do
|
||||
@@ -83,18 +97,19 @@ AC_DEFUN([TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT],
|
||||
|
||||
AC_MSG_NOTICE([Found Visual Studio installation at $VS_BASE using $METHOD])
|
||||
if test "x$TARGET_CPU" = xx86; then
|
||||
VCVARSFILES="vcvars32.bat vcvarsamd64_x86.bat"
|
||||
VCVARSFILES="vc/bin/vcvars32.bat vc/auxiliary/build/vcvars32.bat"
|
||||
elif test "x$TARGET_CPU" = xx86_64; then
|
||||
VCVARSFILES="vcvars64.bat vcvarsx86_amd64.bat"
|
||||
VCVARSFILES="vc/bin/amd64/vcvars64.bat vc/bin/x86_amd64/vcvarsx86_amd64.bat \
|
||||
vc/auxiliary/build/vcvarsx86_amd64.bat vc/auxiliary/build/vcvars64.bat"
|
||||
elif test "x$TARGET_CPU" = xaarch64; then
|
||||
# for host x86-64, target aarch64
|
||||
# aarch64 requires Visual Studio 16.8 or higher
|
||||
VCVARSFILES="vcvarsamd64_arm64.bat vcvarsx86_arm64.bat"
|
||||
VCVARSFILES="vc/auxiliary/build/vcvarsamd64_arm64.bat \
|
||||
vc/auxiliary/build/vcvarsx86_arm64.bat"
|
||||
fi
|
||||
|
||||
for VCVARSFILE in $VCVARSFILES; do
|
||||
if test -f "$VS_BASE/vc/auxiliary/build/$VCVARSFILE"; then
|
||||
VS_ENV_CMD="$VS_BASE/vc/auxiliary/build/$VCVARSFILE"
|
||||
if test -f "$VS_BASE/$VCVARSFILE"; then
|
||||
VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
|
||||
break
|
||||
fi
|
||||
done
|
||||
@@ -156,9 +171,11 @@ AC_DEFUN([TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT],
|
||||
# build environment and assigns it to VS_ENV_CMD
|
||||
AC_DEFUN([TOOLCHAIN_FIND_VISUAL_STUDIO_BAT_FILE],
|
||||
[
|
||||
# Since VS2017 MS provides the option to install previous minor versions of
|
||||
# the toolset. In order to build with a previous minor compiler toolset
|
||||
# version, pass -vcvars_ver=<toolset_version> argument to vcvarsall.bat.
|
||||
# VS2017 provides the option to install previous minor versions of the MSVC
|
||||
# toolsets. It is not possible to directly download earlier minor versions of
|
||||
# VS2017 and in order to build with a previous minor compiler toolset version,
|
||||
# it is now possible to compile with earlier minor versions by passing
|
||||
# -vcvars_ver=<toolset_version> argument to vcvarsall.bat.
|
||||
AC_ARG_WITH(msvc-toolset-version, [AS_HELP_STRING([--with-msvc-toolset-version],
|
||||
[specific MSVC toolset version to use, passed as -vcvars_ver argument to
|
||||
pass to vcvarsall.bat (Windows only)])])
|
||||
@@ -299,7 +316,7 @@ AC_DEFUN([TOOLCHAIN_FIND_VISUAL_STUDIO],
|
||||
eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
|
||||
eval USE_UCRT="\${VS_USE_UCRT_${VS_VERSION}}"
|
||||
eval VS_SUPPORTED="\${VS_SUPPORTED_${VS_VERSION}}"
|
||||
# The rest of the variables are already evaluated while probing
|
||||
# The rest of the variables are already evaled while probing
|
||||
AC_MSG_NOTICE([Found $VS_DESCRIPTION])
|
||||
break
|
||||
fi
|
||||
@@ -337,7 +354,7 @@ AC_DEFUN([TOOLCHAIN_EXTRACT_VISUAL_STUDIO_ENV],
|
||||
PATH="$OLDPATH"
|
||||
|
||||
if test ! -s $VS_ENV_TMP_DIR/set-vs-env.sh; then
|
||||
AC_MSG_NOTICE([Could not successfully extract the environment variables needed for the VS setup.])
|
||||
AC_MSG_NOTICE([Could not succesfully extract the environment variables needed for the VS setup.])
|
||||
AC_MSG_NOTICE([Try setting --with-tools-dir to the VC/bin directory within the VS installation.])
|
||||
AC_MSG_NOTICE([To analyze the problem, see extract-vs-env.log and extract-vs-env.bat in])
|
||||
AC_MSG_NOTICE([$VS_ENV_TMP_DIR.])
|
||||
@@ -463,7 +480,6 @@ AC_DEFUN([TOOLCHAIN_CHECK_POSSIBLE_MSVC_DLL],
|
||||
AC_DEFUN([TOOLCHAIN_SETUP_MSVC_DLL],
|
||||
[
|
||||
DLL_NAME="$1"
|
||||
DLL_HELP="$2"
|
||||
MSVC_DLL=
|
||||
|
||||
if test "x$OPENJDK_TARGET_CPU" = xx86; then
|
||||
@@ -476,9 +492,14 @@ AC_DEFUN([TOOLCHAIN_SETUP_MSVC_DLL],
|
||||
|
||||
if test "x$MSVC_DLL" = x; then
|
||||
if test "x$VCINSTALLDIR" != x; then
|
||||
# Probe: Using well-known location
|
||||
POSSIBLE_MSVC_DLL="`ls $VCToolsRedistDir/$vs_target_cpu/microsoft.vc${VS_VERSION_INTERNAL}.crt/$DLL_NAME 2> /dev/null`"
|
||||
# If the above finds more than one file, loop over them.
|
||||
if test "$VS_VERSION" -lt 2017; then
|
||||
# Probe: Using well-known location from Visual Studio 12.0 and older
|
||||
POSSIBLE_MSVC_DLL="$VCINSTALLDIR/redist/$vs_target_cpu/microsoft.vc${VS_VERSION_INTERNAL}.crt/$DLL_NAME"
|
||||
else
|
||||
# Probe: Using well-known location from VS 2017 and VS 2019
|
||||
POSSIBLE_MSVC_DLL="`ls $VCToolsRedistDir/$vs_target_cpu/microsoft.vc${VS_VERSION_INTERNAL}.crt/$DLL_NAME 2> /dev/null`"
|
||||
fi
|
||||
# In case any of the above finds more than one file, loop over them.
|
||||
for possible_msvc_dll in $POSSIBLE_MSVC_DLL; do
|
||||
TOOLCHAIN_CHECK_POSSIBLE_MSVC_DLL([$DLL_NAME], [$possible_msvc_dll],
|
||||
[well-known location in VCINSTALLDIR])
|
||||
@@ -543,7 +564,7 @@ AC_DEFUN([TOOLCHAIN_SETUP_MSVC_DLL],
|
||||
if test "x$MSVC_DLL" = x; then
|
||||
AC_MSG_CHECKING([for $DLL_NAME])
|
||||
AC_MSG_RESULT([no])
|
||||
AC_MSG_ERROR([Could not find $DLL_NAME. Please specify using ${DLL_HELP}.])
|
||||
AC_MSG_ERROR([Could not find $DLL_NAME. Please specify using --with-msvcr-dll.])
|
||||
fi
|
||||
])
|
||||
|
||||
@@ -566,7 +587,7 @@ AC_DEFUN([TOOLCHAIN_SETUP_VS_RUNTIME_DLLS],
|
||||
fi
|
||||
MSVCR_DLL="$MSVC_DLL"
|
||||
else
|
||||
TOOLCHAIN_SETUP_MSVC_DLL([${MSVCR_NAME}], [--with-msvcr-dll])
|
||||
TOOLCHAIN_SETUP_MSVC_DLL([${MSVCR_NAME}])
|
||||
MSVCR_DLL="$MSVC_DLL"
|
||||
fi
|
||||
AC_SUBST(MSVCR_DLL)
|
||||
@@ -589,7 +610,7 @@ AC_DEFUN([TOOLCHAIN_SETUP_VS_RUNTIME_DLLS],
|
||||
fi
|
||||
MSVCP_DLL="$MSVC_DLL"
|
||||
else
|
||||
TOOLCHAIN_SETUP_MSVC_DLL([${MSVCP_NAME}], [--with-msvcp-dll])
|
||||
TOOLCHAIN_SETUP_MSVC_DLL([${MSVCP_NAME}])
|
||||
MSVCP_DLL="$MSVC_DLL"
|
||||
fi
|
||||
AC_SUBST(MSVCP_DLL)
|
||||
@@ -614,7 +635,7 @@ AC_DEFUN([TOOLCHAIN_SETUP_VS_RUNTIME_DLLS],
|
||||
fi
|
||||
VCRUNTIME_1_DLL="$MSVC_DLL"
|
||||
else
|
||||
TOOLCHAIN_SETUP_MSVC_DLL([${VCRUNTIME_1_NAME}], [--with-vcruntime-1-dll])
|
||||
TOOLCHAIN_SETUP_MSVC_DLL([${VCRUNTIME_1_NAME}])
|
||||
VCRUNTIME_1_DLL="$MSVC_DLL"
|
||||
fi
|
||||
fi
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2011, 2021, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@@ -230,6 +230,8 @@ AC_DEFUN([UTIL_GET_MATCHING_VALUES],
|
||||
# Converts an ISO-8601 date/time string to a unix epoch timestamp. If no
|
||||
# suitable conversion method was found, an empty string is returned.
|
||||
#
|
||||
# Sets the specified variable to the resulting list.
|
||||
#
|
||||
# $1: result variable name
|
||||
# $2: input date/time string
|
||||
AC_DEFUN([UTIL_GET_EPOCH_TIMESTAMP],
|
||||
@@ -239,16 +241,11 @@ AC_DEFUN([UTIL_GET_EPOCH_TIMESTAMP],
|
||||
timestamp=$($DATE --utc --date=$2 +"%s" 2> /dev/null)
|
||||
else
|
||||
# BSD date
|
||||
# ISO-8601 date&time in Zulu 'date'T'time'Z
|
||||
timestamp=$($DATE -u -j -f "%FT%TZ" "$2" "+%s" 2> /dev/null)
|
||||
timestamp=$($DATE -u -j -f "%F %T" "$2" "+%s" 2> /dev/null)
|
||||
if test "x$timestamp" = x; then
|
||||
# BSD date cannot handle trailing milliseconds.
|
||||
# Try again ignoring characters at end
|
||||
timestamp=$($DATE -u -j -f "%Y-%m-%dT%H:%M:%S" "$2" "+%s" 2> /dev/null)
|
||||
fi
|
||||
if test "x$timestamp" = x; then
|
||||
# Perhaps the time was missing.
|
||||
timestamp=$($DATE -u -j -f "%FT%TZ" "$2""T00:00:00Z" "+%s" 2> /dev/null)
|
||||
# Perhaps the time was missing
|
||||
timestamp=$($DATE -u -j -f "%F %T" "$2 00:00:00" "+%s" 2> /dev/null)
|
||||
# If this did not work, we give up and return the empty string
|
||||
fi
|
||||
fi
|
||||
$1=$timestamp
|
||||
@@ -328,12 +325,12 @@ AC_DEFUN([UTIL_ALIASED_ARG_ENABLE],
|
||||
# Creates a command-line option using the --enable-* pattern. Will return a
|
||||
# value of 'true' or 'false' in the RESULT variable, depending on whether the
|
||||
# option was enabled or not by the user. The option can not be turned on if it
|
||||
# is not available, as specified by AVAILABLE and/or CHECK_AVAILABLE.
|
||||
# is not available, as specified by AVAILABLE and/or AVAILABLE_CHECK.
|
||||
#
|
||||
# Arguments:
|
||||
# NAME: The base name of this option (i.e. what follows --enable-). Required.
|
||||
# RESULT: The name of the variable to set to the result. Defaults to
|
||||
# <NAME in uppercase>_ENABLED.
|
||||
# <NAME in uppercase>_RESULT.
|
||||
# DEFAULT: The default value for this option. Can be true, false or auto.
|
||||
# Defaults to true.
|
||||
# AVAILABLE: If true, this option is allowed to be selected. Defaults to true.
|
||||
@@ -379,7 +376,7 @@ UTIL_DEFUN_NAMED([UTIL_ARG_ENABLE],
|
||||
m4_define([ARG_DESC], m4_if(ARG_DESC, , [Enable the ARG_NAME feature], m4_normalize(ARG_DESC)))
|
||||
|
||||
# If CHECKING_MSG is not specified, set it to a generic description.
|
||||
m4_define([ARG_CHECKING_MSG], m4_if(ARG_CHECKING_MSG, , [for --enable-ARG_NAME], m4_normalize(ARG_CHECKING_MSG)))
|
||||
m4_define([ARG_CHECKING_MSG], m4_if(ARG_CHECKING_MSG, , [for --enable-ARG_NAME], ARG_CHECKING_MSG))
|
||||
|
||||
# If the code blocks are not given, set them to the empty statements to avoid
|
||||
# tripping up bash.
|
||||
@@ -466,350 +463,3 @@ UTIL_DEFUN_NAMED([UTIL_ARG_ENABLE],
|
||||
fi
|
||||
])
|
||||
|
||||
###############################################################################
|
||||
# Helper functions for ARG_WITH, to validate different types of argument
|
||||
|
||||
# Dispatcher to call the correct UTIL_CHECK_TYPE_* function depending on the ARG_TYPE
|
||||
AC_DEFUN([UTIL_CHECK_TYPE],
|
||||
[
|
||||
UTIL_CHECK_TYPE_$1($2)
|
||||
])
|
||||
|
||||
AC_DEFUN([UTIL_CHECK_TYPE_string],
|
||||
[
|
||||
# All strings always passes
|
||||
])
|
||||
|
||||
AC_DEFUN([UTIL_CHECK_TYPE_integer],
|
||||
[
|
||||
# Check that the argument is an integer
|
||||
# Additional [] needed to keep m4 from mangling shell constructs.
|
||||
[ if [[ ! "$1" =~ ^[0-9]+$ ]] ; then ]
|
||||
FAILURE="Not an integer: $1"
|
||||
fi
|
||||
])
|
||||
|
||||
AC_DEFUN([UTIL_CHECK_TYPE_file],
|
||||
[
|
||||
# Check that the argument is an existing file
|
||||
if test ! -f "$1" ; then
|
||||
FAILURE="File $1 does not exist or is not readable"
|
||||
fi
|
||||
])
|
||||
|
||||
AC_DEFUN([UTIL_CHECK_TYPE_directory],
|
||||
[
|
||||
# Check that the argument is an existing directory
|
||||
if test ! -d "$1" ; then
|
||||
FAILURE="Directory $1 does not exist or is not readable"
|
||||
fi
|
||||
|
||||
if test "[x]ARG_CHECK_FOR_FILES" != x; then
|
||||
for file in ARG_CHECK_FOR_FILES; do
|
||||
found_files=$($ECHO $(ls $1/$file 2> /dev/null))
|
||||
if test "x$found_files" = x; then
|
||||
FAILURE="Directory $1 does not contain $file"
|
||||
break
|
||||
elif ! test -e "$found_files"; then
|
||||
FAILURE="Directory $1 contains multiple $file: $found_files"
|
||||
break
|
||||
fi
|
||||
done
|
||||
fi
|
||||
])
|
||||
|
||||
AC_DEFUN([UTIL_CHECK_TYPE_literal],
|
||||
[
|
||||
# Check if it contains a space between non-space characters
|
||||
# Additional [] needed to keep m4 from mangling shell constructs.
|
||||
[ if [[ "$1" =~ [^' ']' '+[^' '] ]] ; then ]
|
||||
FAILURE="Multiple words: $1"
|
||||
fi
|
||||
|
||||
# Check that the selected variants are valid
|
||||
UTIL_GET_NON_MATCHING_VALUES(invalid_value, $1, \
|
||||
ARG_VALID_VALUES)
|
||||
if test "x$invalid_value" != x; then
|
||||
FAILURE="Invalid value: $invalid_value. Valid values are: ARG_VALID_VALUES"
|
||||
fi
|
||||
])
|
||||
|
||||
AC_DEFUN([UTIL_CHECK_TYPE_multivalue],
|
||||
[
|
||||
# We accept either space or comma as separator, but use space internally
|
||||
values=`$ECHO $1 | $SED -e 's/,/ /g'`
|
||||
|
||||
# Check that the selected variants are valid
|
||||
UTIL_GET_NON_MATCHING_VALUES(invalid_value, $values, \
|
||||
ARG_VALID_VALUES)
|
||||
if test "x$invalid_value" != x; then
|
||||
FAILURE="Invalid value(s): $invalid_value. Valid values are: ARG_VALID_VALUES"
|
||||
fi
|
||||
|
||||
# Update to version without comma
|
||||
ARG_RESULT=$($ECHO $values)
|
||||
])
|
||||
|
||||
AC_DEFUN([UTIL_CHECK_TYPE_features],
|
||||
[
|
||||
# We accept either space or comma as separator, but use space internally
|
||||
feature_list=`$ECHO $1 | $SED -e 's/,/ /g'`
|
||||
features_enabled=`$ECHO $feature_list | \
|
||||
$AWK '{ for (i=1; i<=NF; i++) if (!match($i, /^-.*/)) printf("%s ", $i) }'`
|
||||
features_disabled=`$ECHO $feature_list | \
|
||||
$AWK '{ for (i=1; i<=NF; i++) if (match($i, /^-.*/)) printf("%s ", substr($i, 2))}'`
|
||||
|
||||
# Check that the selected features are valid
|
||||
UTIL_GET_NON_MATCHING_VALUES(invalid_features, $features_enabled \
|
||||
$features_disabled, ARG_VALID_VALUES)
|
||||
if test "x$invalid_features" != x; then
|
||||
FAILURE="Invalid feature(s): $invalid_features. Valid values are: ARG_VALID_VALUES"
|
||||
fi
|
||||
|
||||
# Update to version without comma
|
||||
ARG_RESULT=$($ECHO $feature_list)
|
||||
])
|
||||
|
||||
###############################################################################
|
||||
# Creates a command-line option using the --with-* pattern. Will return a
|
||||
# string in the RESULT variable with the option provided by the user, or the
|
||||
# empty string if the --with-* option was not given. The option can not be given
|
||||
# if it is not available, as specified by AVAILABLE and/or CHECK_AVAILABLE.
|
||||
#
|
||||
# Arguments:
|
||||
# NAME: The base name of this option (i.e. what follows --with-). Required.
|
||||
# TYPE: The type of the value. Can be one of "string", "integer", "file",
|
||||
# "directory", "literal", "multivalue" or "features". Required.
|
||||
# DEFAULT: The default value for this option. Can be any valid string.
|
||||
# Required.
|
||||
# OPTIONAL: If this feature can be disabled. Defaults to false. If true,
|
||||
# the feature can be disabled using --without-FOO, --with-FOO=no, or
|
||||
# --with-FOO=. Check the ENABLED_RESULT variable for the enabled/disabled
|
||||
# state.
|
||||
# RESULT: The name of the variable to set to the result. Defaults to
|
||||
# <NAME in uppercase>. Set to empty if ENABLED_RESULT is false.
|
||||
# ENABLED_DEFAULT: If the value is enabled by default. Defaults to false. Only
|
||||
# relevant if OPTIONAL is true.
|
||||
# ENABLED_RESULT: The name of the variable to set to the enabled/disabled
|
||||
# result state. Defaults to <NAME in uppercase>_ENABLED.
|
||||
# AVAILABLE: If true, this option is allowed to be selected. Defaults to true.
|
||||
# DESC: A description of this option. Defaults to a generic and unhelpful
|
||||
# string.
|
||||
# DEFAULT_DESC: A message describing the default value, for the help. Defaults
|
||||
# to the literal value of DEFAULT, or "<none>" if DEFAULT is empty.
|
||||
# CHECKING_MSG: The message to present to user when checking this option.
|
||||
# Defaults to a generic message.
|
||||
# CHECK_AVAILABLE: An optional code block to execute to determine if the
|
||||
# option should be available. Must set AVAILABLE to 'false' if not.
|
||||
# VALID_VALUES: A list of literals that are the allowed values. Only valid if
|
||||
# TYPE is "literal", "multivalue" or "features".
|
||||
# CHECK_VALUE: An optional code block to execute to determine if the value
|
||||
# is correct. Must set FAILURE to a non-empty string if not. This string
|
||||
# will be displayed. The value is given in $RESULT.
|
||||
# CHECK_FOR_FILES: A list of files to verify the presence for. Only valid if
|
||||
# TYPE is "directory". Paths are relative the directory given as value.
|
||||
# Wildcards are accepted. Exactly one matching file must be found, for each
|
||||
# listed file, or FAILURE is set.
|
||||
# IF_AUTO: An optional code block to execute if the value is "auto", either by
|
||||
# default or given by the command line. Must set RESULT to the calculated
|
||||
# value.
|
||||
# IF_GIVEN: An optional code block to execute if the option was given on the
|
||||
# command line (regardless of the value).
|
||||
# IF_NOT_GIVEN: An optional code block to execute if the option was not given
|
||||
# on the command line (regardless of the value).
|
||||
#
|
||||
UTIL_DEFUN_NAMED([UTIL_ARG_WITH],
|
||||
[*NAME *TYPE *DEFAULT OPTIONAL RESULT ENABLED_DEFAULT ENABLED_RESULT
|
||||
AVAILABLE DESC DEFAULT_DESC CHECKING_MSG CHECK_AVAILABLE VALID_VALUES
|
||||
CHECK_VALUE CHECK_FOR_FILES IF_AUTO IF_GIVEN IF_NOT_GIVEN], [$@],
|
||||
[
|
||||
##########################
|
||||
# Part 1: Set up m4 macros
|
||||
##########################
|
||||
|
||||
# If ENABLED_DEFAULT is not specified, set it to 'false'.
|
||||
m4_define([ARG_ENABLED_DEFAULT], m4_if(ARG_ENABLED_DEFAULT, , false, ARG_ENABLED_DEFAULT))
|
||||
|
||||
# If AVAILABLE is not specified, set it to 'true'.
|
||||
m4_define([ARG_AVAILABLE], m4_if(ARG_AVAILABLE, , true, ARG_AVAILABLE))
|
||||
|
||||
# If OPTIONAL is not specified, set it to 'false'.
|
||||
m4_define([ARG_OPTIONAL], m4_if(ARG_OPTIONAL, , false, ARG_OPTIONAL))
|
||||
|
||||
# If DEFAULT_DESC is not specified, calculate it from DEFAULT.
|
||||
m4_define([ARG_DEFAULT_DESC], m4_if(ARG_DEFAULT_DESC, , m4_if(ARG_DEFAULT, , <none>, ARG_DEFAULT), ARG_DEFAULT_DESC))
|
||||
|
||||
# If RESULT is not specified, set it to 'ARG_NAME'.
|
||||
m4_define([ARG_RESULT], m4_if(ARG_RESULT, , m4_translit(ARG_NAME, [a-z-], [A-Z_]), ARG_RESULT))
|
||||
|
||||
# If ENABLED_RESULT is not specified, set it to 'ARG_NAME[_ENABLED]'.
|
||||
m4_define([ARG_ENABLED_RESULT], m4_if(ARG_ENABLED_RESULT, , m4_translit(ARG_NAME, [a-z-], [A-Z_])[_ENABLED], ARG_ENABLED_RESULT))
|
||||
|
||||
# Construct shell variable names for the option
|
||||
m4_define(ARG_OPTION, [with_]m4_translit(ARG_NAME, [-], [_]))
|
||||
m4_define(ARG_GIVEN, m4_translit(ARG_NAME, [a-z-], [A-Z_])[_GIVEN])
|
||||
|
||||
# If DESC is not specified, set it to a generic description.
|
||||
m4_define([ARG_DESC], m4_if(ARG_DESC, , [Give a value for the ARG_NAME feature], m4_normalize(ARG_DESC)))
|
||||
|
||||
# If CHECKING_MSG is not specified, set it to a generic description.
|
||||
m4_define([ARG_CHECKING_MSG], m4_if(ARG_CHECKING_MSG, , [for --with-ARG_NAME], m4_normalize(ARG_CHECKING_MSG)))
|
||||
|
||||
m4_define([ARG_HAS_AUTO_BLOCK], m4_if(ARG_IF_AUTO, , false, true))
|
||||
|
||||
# If the code blocks are not given, set them to the empty statements to avoid
|
||||
# tripping up bash.
|
||||
m4_define([ARG_CHECK_AVAILABLE], m4_if(ARG_CHECK_AVAILABLE, , :, ARG_CHECK_AVAILABLE))
|
||||
m4_define([ARG_CHECK_VALUE], m4_if(ARG_CHECK_VALUE, , :, ARG_CHECK_VALUE))
|
||||
m4_define([ARG_CHECK_FOR_FILES], m4_if(ARG_CHECK_FOR_FILES, , :, ARG_CHECK_FOR_FILES))
|
||||
m4_define([ARG_IF_AUTO], m4_if(ARG_IF_AUTO, , :, ARG_IF_AUTO))
|
||||
m4_define([ARG_IF_GIVEN], m4_if(ARG_IF_GIVEN, , :, ARG_IF_GIVEN))
|
||||
m4_define([ARG_IF_NOT_GIVEN], m4_if(ARG_IF_NOT_GIVEN, , :, ARG_IF_NOT_GIVEN))
|
||||
|
||||
##########################
|
||||
# Part 2: Set up autoconf shell code
|
||||
##########################
|
||||
|
||||
# Check that OPTIONAL has a valid value
|
||||
if test "[x]ARG_OPTIONAL" != xtrue && test "[x]ARG_OPTIONAL" != xfalse ; then
|
||||
AC_MSG_ERROR([Internal error: Argument OPTIONAL to [UTIL_ARG_WITH] can only be true or false, was: 'ARG_OPTIONAL'])
|
||||
fi
|
||||
|
||||
# Check that ENABLED_DEFAULT has a valid value
|
||||
if test "[x]ARG_ENABLED_DEFAULT" != xtrue && test "[x]ARG_ENABLED_DEFAULT" != xfalse ; then
|
||||
AC_MSG_ERROR([Internal error: Argument ENABLED_DEFAULT to [UTIL_ARG_WITH] can only be true or false, was: 'ARG_ENABLED_DEFAULT'])
|
||||
fi
|
||||
|
||||
# Check that AVAILABLE has a valid value
|
||||
if test "[x]ARG_AVAILABLE" != xtrue && test "[x]ARG_AVAILABLE" != xfalse; then
|
||||
AC_MSG_ERROR([Internal error: Argument AVAILABLE to [UTIL_ARG_WITH] can only be true or false, was: 'ARG_AVAILABLE'])
|
||||
fi
|
||||
|
||||
# Check that TYPE has a valid value
|
||||
# Need to assign since we can't expand ARG TYPE inside the m4 quoted if statement
|
||||
TEST_TYPE="ARG_TYPE"
|
||||
# Additional [] needed to keep m4 from mangling shell constructs.
|
||||
[ if [[ ! "$TEST_TYPE" =~ ^(string|integer|file|directory|literal|multivalue|features)$ ]] ; then ]
|
||||
AC_MSG_ERROR([Internal error: Argument TYPE to [UTIL_ARG_WITH] must be a valid type, was: 'ARG_TYPE'])
|
||||
fi
|
||||
|
||||
AC_ARG_WITH(ARG_NAME, AS_HELP_STRING([--with-]ARG_NAME,
|
||||
[ARG_DESC [ARG_DEFAULT_DESC]]), [ARG_GIVEN=true], [ARG_GIVEN=false])
|
||||
|
||||
# Check if the option is available
|
||||
AVAILABLE=ARG_AVAILABLE
|
||||
# Run the available check block (if any), which can overwrite AVAILABLE.
|
||||
ARG_CHECK_AVAILABLE
|
||||
|
||||
# Check if the option should be turned on
|
||||
AC_MSG_CHECKING(ARG_CHECKING_MSG)
|
||||
|
||||
if test x$AVAILABLE = xfalse; then
|
||||
ARG_RESULT="$ARG_OPTION"
|
||||
ARG_ENABLED_RESULT=false
|
||||
REASON="not available"
|
||||
else
|
||||
if test x$ARG_GIVEN = xfalse; then
|
||||
ARG_RESULT="ARG_DEFAULT"
|
||||
if test "[x]ARG_OPTIONAL" = xtrue; then
|
||||
ARG_ENABLED_RESULT=ARG_ENABLED_DEFAULT
|
||||
else
|
||||
ARG_ENABLED_RESULT=true
|
||||
fi
|
||||
REASON="default"
|
||||
|
||||
else # ARG_GIVEN is true
|
||||
# Special treatment of "yes" and "no" for "--with-ARG" and "--without-ARG"
|
||||
if test "x$ARG_OPTION" = xyes || test "x$ARG_OPTION" = xno || test "x$ARG_OPTION" = x ; then
|
||||
if test "[x]ARG_OPTIONAL" = xfalse; then
|
||||
if test "x$ARG_OPTION" = x; then
|
||||
# If not optional, the empty string is a valid value
|
||||
ARG_RESULT=""
|
||||
ARG_ENABLED_RESULT=true
|
||||
REASON="from command line"
|
||||
else
|
||||
AC_MSG_RESULT([invalid])
|
||||
AC_MSG_ERROR([Option [--with-]ARG_NAME must have a specified value])
|
||||
fi
|
||||
else
|
||||
if test "x$ARG_OPTION" = xyes; then
|
||||
ARG_RESULT="ARG_DEFAULT"
|
||||
ARG_ENABLED_RESULT=true
|
||||
REASON="default as enabled from command line"
|
||||
else
|
||||
# For optional values, both --without-FOO and --with-FOO= disables
|
||||
ARG_RESULT=""
|
||||
ARG_ENABLED_RESULT=false
|
||||
REASON="from command line"
|
||||
fi
|
||||
fi
|
||||
else
|
||||
# The most common case -- the user gives a value for the option.
|
||||
ARG_RESULT="$ARG_OPTION"
|
||||
ARG_ENABLED_RESULT=true
|
||||
REASON="from command line"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
if test "x$ARG_ENABLED_RESULT" = xfalse; then
|
||||
if test "x$REASON" = "xnot available"; then
|
||||
AC_MSG_RESULT([<invalid>, $REASON])
|
||||
if test "x$ARG_RESULT" != "x" && test "x$ARG_RESULT" != "xno" ; then
|
||||
AC_MSG_WARN([Option [--with-]ARG_NAME is not available for this configuration])
|
||||
fi
|
||||
else
|
||||
AC_MSG_RESULT([<disabled>, $REASON])
|
||||
fi
|
||||
ARG_RESULT=""
|
||||
else
|
||||
if test [x]ARG_HAS_AUTO_BLOCK = xtrue && test "x$ARG_RESULT" = xauto; then
|
||||
# Execute "auto" payload
|
||||
ARG_IF_AUTO
|
||||
|
||||
ARG_RESULT="$RESULT"
|
||||
REASON="$REASON (calculated from 'auto')"
|
||||
fi
|
||||
|
||||
if test "x$ARG_RESULT" = x; then
|
||||
AC_MSG_RESULT([<none>, $REASON])
|
||||
else
|
||||
AC_MSG_RESULT([$ARG_RESULT, $REASON])
|
||||
fi
|
||||
fi
|
||||
|
||||
# Verify value
|
||||
# First use our dispatcher to verify that type requirements are satisfied
|
||||
UTIL_CHECK_TYPE(ARG_TYPE, $ARG_RESULT)
|
||||
|
||||
if test "x$FAILURE" = x; then
|
||||
# Execute custom verification payload, if present
|
||||
RESULT="$ARG_RESULT"
|
||||
|
||||
ARG_CHECK_VALUE
|
||||
|
||||
ARG_RESULT="$RESULT"
|
||||
fi
|
||||
|
||||
if test "x$FAILURE" != x; then
|
||||
AC_MSG_NOTICE([Invalid value for [--with-]ARG_NAME: "$ARG_RESULT"])
|
||||
AC_MSG_NOTICE([$FAILURE])
|
||||
AC_MSG_ERROR([Cannot continue])
|
||||
fi
|
||||
|
||||
# Execute result payloads, if present
|
||||
if test x$ARG_GIVEN = xtrue; then
|
||||
ARG_IF_GIVEN
|
||||
else
|
||||
ARG_IF_NOT_GIVEN
|
||||
fi
|
||||
])
|
||||
|
||||
###############################################################################
|
||||
# Helper functions for CHECK_VALUE in ARG_WITH.
|
||||
AC_DEFUN([UTIL_CHECK_STRING_NON_EMPTY],
|
||||
[
|
||||
if test "x$RESULT" = "x"; then
|
||||
FAILURE="Value cannot be empty"
|
||||
fi
|
||||
])
|
||||
|
||||
@@ -118,7 +118,7 @@ define SetupJarArchiveBody
|
||||
$1_JARINDEX = true
|
||||
endif
|
||||
# When this macro is run in the same makefile as the java compilation, dependencies are
|
||||
# transferred in make variables. When the macro is run in a different makefile than the
|
||||
# transfered in make variables. When the macro is run in a different makefile than the
|
||||
# java compilation, the dependencies need to be found in the filesystem.
|
||||
$1_ORIG_DEPS := $$($1_DEPENDENCIES)
|
||||
ifeq ($$($1_DEPENDENCIES), )
|
||||
@@ -150,9 +150,9 @@ define SetupJarArchiveBody
|
||||
# Capture extra files is the same for both CAPTURE_CONTENTS and SCAPTURE_CONTENTS so
|
||||
# only define it once to avoid duplication.
|
||||
# The list of extra files might be long, so need to use ListPathsSafely to print
|
||||
# them out to a separate file. Then process the contents of that file to rewrite
|
||||
# them out to a separte file. Then process the contents of that file to rewrite
|
||||
# into -C <dir> <file> lines.
|
||||
# The EXTRA_FILES_RESOLVED variable must be set in the macro so that it's evaluated
|
||||
# The EXTRA_FILES_RESOLVED varible must be set in the macro so that it's evaluated
|
||||
# in the recipe when the files are guaranteed to exist.
|
||||
$1_CAPTURE_EXTRA_FILES=\
|
||||
$$(eval $1_EXTRA_FILES_RESOLVED:=$$(call DoubleDollar, \
|
||||
@@ -223,8 +223,10 @@ define SetupJarArchiveBody
|
||||
# If reproducible build and the boot jdk jar supports --date option
|
||||
# then specify the --date using SOURCE_DATE in ISO-8601
|
||||
$1_JAR_OPTIONS :=
|
||||
ifeq ($$(BOOT_JDK_JAR_SUPPORTS_DATE), true)
|
||||
$1_JAR_OPTIONS += --date $(SOURCE_DATE_ISO_8601)
|
||||
ifeq ($$(ENABLE_REPRODUCIBLE_BUILD), true)
|
||||
ifeq ($$(BOOT_JDK_JAR_SUPPORTS_DATE), true)
|
||||
$1_JAR_OPTIONS += --date $(SOURCE_DATE_ISO_8601)
|
||||
endif
|
||||
endif
|
||||
ifneq (,$$($1_CHECK_COMPRESS_JAR))
|
||||
ifneq ($(COMPRESS_JARS), true)
|
||||
|
||||
@@ -99,7 +99,7 @@ define add_file_to_clean
|
||||
$2_TARGET:=$2
|
||||
# Remove the source prefix.
|
||||
$$(foreach i,$$($1_SRC),$$(eval $$(call remove_string,$$i,$2_TARGET)))
|
||||
# Now we can setup the dependency that will trigger the copying.
|
||||
# Now we can setup the depency that will trigger the copying.
|
||||
# To allow for automatic overrides, do not create a rule for a target file that
|
||||
# already has one
|
||||
ifneq ($$($1_CLEAN_$$($2_TARGET)), 1)
|
||||
@@ -161,7 +161,7 @@ endef
|
||||
# EXTRA_FILES:=List of extra source files to include in compilation. Can be used to
|
||||
# specify files that need to be generated by other rules first.
|
||||
# HEADERS:=path to directory where all generated c-headers are written.
|
||||
# DEPENDS:=Extra dependency
|
||||
# DEPENDS:=Extra dependecy
|
||||
# KEEP_DUPS:=Do not remove duplicate file names from different source roots.
|
||||
# FAIL_NO_SRC:=Set to false to not fail the build if no source files are found,
|
||||
# default is true.
|
||||
@@ -402,11 +402,8 @@ define SetupJavaCompilationBody
|
||||
|
||||
$1_COMPILE_TARGET := $$($1_BIN)$$($1_MODULE_SUBDIR)/_the.$1_batch
|
||||
$1_FILELIST := $$($1_BIN)$$($1_MODULE_SUBDIR)/_the.$1_batch.filelist
|
||||
$1_MODFILELIST := $$($1_BIN)$$($1_MODULE_SUBDIR)/_the.$1_batch.modfiles
|
||||
$1_MODFILELIST_FIXED := $$($1_MODFILELIST).fixed
|
||||
|
||||
$1_API_TARGET := $$($1_BIN)$$($1_MODULE_SUBDIR)/_the.$1_pubapi
|
||||
$1_API_INTERNAL := $$($1_BIN)$$($1_MODULE_SUBDIR)/_the.$1_internalapi
|
||||
|
||||
# Put headers in a temp dir to filter out those that actually
|
||||
# changed before copying them to the real header dir.
|
||||
@@ -440,8 +437,6 @@ define SetupJavaCompilationBody
|
||||
$1_API_DIGEST_FLAGS := \
|
||||
-classpath $$(BUILDTOOLS_OUTPUTDIR)/depend \
|
||||
-Xplugin:"depend $$($1_API_TARGET)" \
|
||||
"-XDinternalAPIPath=$$($1_API_INTERNAL)" \
|
||||
"-XDLOG_LEVEL=$(LOG_LEVEL)" \
|
||||
#
|
||||
|
||||
$1_EXTRA_DEPS := $$(BUILDTOOLS_OUTPUTDIR)/depend/_the.COMPILE_DEPEND_batch
|
||||
@@ -452,39 +447,16 @@ define SetupJavaCompilationBody
|
||||
# list of files.
|
||||
$$($1_FILELIST): $$($1_SRCS) $$($1_VARDEPS_FILE)
|
||||
$$(call MakeDir, $$(@D))
|
||||
$$(call LogWarn, Compiling up to $$(words $$($1_SRCS)) files for $1)
|
||||
$$(call LogWarn, Compiling $$(words $$($1_SRCS)) files for $1)
|
||||
$$(eval $$(call ListPathsSafely, $1_SRCS, $$($1_FILELIST)))
|
||||
|
||||
# Create a $$($1_MODFILELIST) file with significant modified dependencies
|
||||
# (either sources files or the other mark dependencies).
|
||||
# It is then sent using a side-channel
|
||||
# to the custom Depend plugin. The Depend plugin will check the provided list
|
||||
# of modified files, and if none of the Java source files is changed in a way
|
||||
# observable from outside of the file, and the list of modified files does
|
||||
# not include a non-Java source file, it will only compile the modified files.
|
||||
# Otherwise, all module's sources will be compiled. If a non-Java file is included,
|
||||
# it will be considered to be a significant change, and all module source will
|
||||
# be recompiled
|
||||
$$($1_MODFILELIST): $$($1_SRCS) $$($1_DEPENDS) \
|
||||
$$($1_VARDEPS_FILE) $$($1_EXTRA_DEPS) $$($1_JAVAC_SERVER_CONFIG)
|
||||
$$(eval $1_MODFILES := $$?)
|
||||
$$(eval $$(call ListPathsSafely, $1_MODFILES, $$($1_MODFILELIST)))
|
||||
|
||||
# Convert the paths in the MODFILELIST file to Windows-style paths
|
||||
# on Windows. This is needed because javac operates on Windows-style paths
|
||||
# when running on Windows. On other platforms this just copies the MODFILELIST file.
|
||||
$$($1_MODFILELIST_FIXED): $$($1_MODFILELIST)
|
||||
$$(call FixPathFile, $$($1_MODFILELIST), $$($1_MODFILELIST_FIXED))
|
||||
|
||||
# Do the actual compilation
|
||||
$$($1_COMPILE_TARGET): $$($1_SRCS) $$($1_FILELIST) $$($1_DEPENDS) \
|
||||
$$($1_VARDEPS_FILE) $$($1_EXTRA_DEPS) $$($1_JAVAC_SERVER_CONFIG) \
|
||||
$$($1_MODFILELIST_FIXED)
|
||||
$$($1_VARDEPS_FILE) $$($1_EXTRA_DEPS) $$($1_JAVAC_SERVER_CONFIG)
|
||||
$$(call MakeDir, $$(@D))
|
||||
$$(call ExecuteWithLog, $$($1_BIN)$$($1_MODULE_SUBDIR)/_the.$$($1_SAFE_NAME)_batch, \
|
||||
$$($1_JAVAC_CMD) $$($1_FLAGS) \
|
||||
$$($1_API_DIGEST_FLAGS) \
|
||||
-XDmodifiedInputs=$$($1_MODFILELIST_FIXED) \
|
||||
-d $$($1_BIN) $$($1_HEADERS_ARG) @$$($1_FILELIST)) && \
|
||||
$(TOUCH) $$@
|
||||
|
||||
|
||||
@@ -127,13 +127,14 @@ endef
|
||||
# the build was created from
|
||||
SOURCE_REVISION_TRACKER := $(SUPPORT_OUTPUTDIR)/src-rev/source-revision-tracker
|
||||
|
||||
# Locate all sourcecode repositories included in the forest, as absolute paths
|
||||
# Locate all hg repositories included in the forest, as absolute paths
|
||||
FindAllReposAbs = \
|
||||
$(strip $(sort $(dir $(filter-out $(TOPDIR)/build/%, $(wildcard \
|
||||
$(addprefix $(TOPDIR)/, .hg */.hg */*/.hg */*/*/.hg */*/*/*/.hg) \
|
||||
$(addprefix $(TOPDIR)/, .git */.git */*/.git */*/*/.git */*/*/*/.git) \
|
||||
)))))
|
||||
|
||||
# Locate all sourcecode repositories included in the forest, as relative paths
|
||||
# Locate all hg repositories included in the forest, as relative paths
|
||||
FindAllReposRel = \
|
||||
$(strip $(subst $(TOPDIR)/,.,$(patsubst $(TOPDIR)/%/, %, $(FindAllReposAbs))))
|
||||
|
||||
@@ -442,23 +443,12 @@ endif
|
||||
# list.
|
||||
# This is normally not needed since we use the FIXPATH prefix for command lines,
|
||||
# but might be needed in certain circumstances.
|
||||
#
|
||||
# FixPathFile is the file version of FixPath. It instead takes a file with paths in $1
|
||||
# and outputs the 'fixed' paths into the file in $2. If the file in $2 already exists
|
||||
# it is overwritten.
|
||||
# On non-Windows platforms this instead does a copy, so that $2 can still be used
|
||||
# as a depenendency of a make rule, instead of having to conditionally depend on
|
||||
# $1 instead, based on the target platform.
|
||||
ifeq ($(call isTargetOs, windows), true)
|
||||
FixPath = \
|
||||
$(strip $(subst \,\\, $(shell $(FIXPATH_BASE) print $(patsubst $(FIXPATH), , $1))))
|
||||
FixPathFile = \
|
||||
$(shell $(FIXPATH_BASE) convert $1 $2)
|
||||
else
|
||||
FixPath = \
|
||||
$1
|
||||
FixPathFile = \
|
||||
$(shell $(CP) $1 $2)
|
||||
endif
|
||||
|
||||
################################################################################
|
||||
|
||||
@@ -37,7 +37,7 @@ endif
|
||||
|
||||
################################################################################
|
||||
# ListPathsSafely can be used to print command parameters to a file. This is
|
||||
# typically done if the command line length risk being too long for the
|
||||
# typically done if the command line lenght risk being too long for the
|
||||
# OS/shell. In later make versions, the file function can be used for this
|
||||
# purpose. For earlier versions, a more complex implementation is provided.
|
||||
#
|
||||
|
||||
@@ -61,7 +61,7 @@ endef
|
||||
|
||||
################################################################################
|
||||
# Creates a recipe that creates a compile_commands.json fragment. Remove any
|
||||
# occurrences of FIXPATH programs from the command to show the actual invocation.
|
||||
# occurences of FIXPATH programs from the command to show the actual invocation.
|
||||
#
|
||||
# Param 1: Name of file to create
|
||||
# Param 2: Working directory
|
||||
@@ -236,7 +236,7 @@ ifeq ($(ALLOW_ABSOLUTE_PATHS_IN_OUTPUT)-$(FILE_MACRO_CFLAGS), false-)
|
||||
# add WORKSPACE_ROOT to any line not starting with /, while allowing for
|
||||
# leading spaces. There may also be multiple entries on the same line, so start
|
||||
# with splitting such lines.
|
||||
# Non GNU sed (BSD on macosx) cannot substitute in literal \n using regex.
|
||||
# Non GNU sed (BSD on macosx) cannot substitue in literal \n using regex.
|
||||
# Instead use a bash escaped literal newline. To avoid having unmatched quotes
|
||||
# ruin the ability for an editor to properly syntax highlight this file, define
|
||||
# that newline sequence as a separate variable and add the closing quote behind
|
||||
@@ -267,15 +267,10 @@ endif
|
||||
# specialized file is found, returns the default file.
|
||||
# $1 Executable to find entitlements file for.
|
||||
ENTITLEMENTS_DIR := $(TOPDIR)/make/data/macosxsigning
|
||||
ifeq ($(MACOSX_CODESIGN_MODE), debug)
|
||||
CODESIGN_PLIST_SUFFIX := -debug
|
||||
else
|
||||
CODESIGN_PLIST_SUFFIX :=
|
||||
endif
|
||||
DEFAULT_ENTITLEMENTS_FILE := $(ENTITLEMENTS_DIR)/default$(CODESIGN_PLIST_SUFFIX).plist
|
||||
DEFAULT_ENTITLEMENTS_FILE := $(ENTITLEMENTS_DIR)/default.plist
|
||||
|
||||
GetEntitlementsFile = \
|
||||
$(foreach f, $(ENTITLEMENTS_DIR)/$(strip $(notdir $1))$(CODESIGN_PLIST_SUFFIX).plist, \
|
||||
$(foreach f, $(ENTITLEMENTS_DIR)/$(strip $(notdir $1)).plist, \
|
||||
$(if $(wildcard $f), $f, $(DEFAULT_ENTITLEMENTS_FILE)) \
|
||||
)
|
||||
|
||||
@@ -343,15 +338,10 @@ define SetupCompileNativeFileBody
|
||||
endif
|
||||
endif
|
||||
|
||||
ifneq ($(DISABLE_WARNING_PREFIX), )
|
||||
$1_WARNINGS_FLAGS := $$(addprefix $(DISABLE_WARNING_PREFIX), \
|
||||
$$($$($1_BASE)_DISABLED_WARNINGS_$(TOOLCHAIN_TYPE)_$$($1_FILENAME)))
|
||||
endif
|
||||
|
||||
$1_BASE_CFLAGS := $$($$($1_BASE)_CFLAGS) $$($$($1_BASE)_EXTRA_CFLAGS) \
|
||||
$$($$($1_BASE)_SYSROOT_CFLAGS) $$($1_WARNINGS_FLAGS)
|
||||
$$($$($1_BASE)_SYSROOT_CFLAGS)
|
||||
$1_BASE_CXXFLAGS := $$($$($1_BASE)_CXXFLAGS) $$($$($1_BASE)_EXTRA_CXXFLAGS) \
|
||||
$$($$($1_BASE)_SYSROOT_CFLAGS) $$($1_EXTRA_CXXFLAGS) $$($1_WARNINGS_FLAGS)
|
||||
$$($$($1_BASE)_SYSROOT_CFLAGS) $$($1_EXTRA_CXXFLAGS)
|
||||
$1_BASE_ASFLAGS := $$($$($1_BASE)_ASFLAGS) $$($$($1_BASE)_EXTRA_ASFLAGS)
|
||||
|
||||
ifneq ($$(filter %.c, $$($1_FILENAME)), )
|
||||
@@ -416,7 +406,9 @@ define SetupCompileNativeFileBody
|
||||
# For reproducible builds with gcc and clang ensure random symbol generation is
|
||||
# seeded deterministically
|
||||
ifneq ($(findstring $(TOOLCHAIN_TYPE), gcc clang), )
|
||||
$1_COMPILE_OPTIONS += -frandom-seed="$$($1_FILENAME)"
|
||||
ifeq ($$(ENABLE_REPRODUCIBLE_BUILD), true)
|
||||
$1_COMPILE_OPTIONS += -frandom-seed="$$($1_FILENAME)"
|
||||
endif
|
||||
endif
|
||||
|
||||
$$($1_OBJ_JSON): $$($1_OBJ_DEPS)
|
||||
@@ -684,7 +676,7 @@ define SetupNativeCompilationBody
|
||||
ifneq ($$($1_SUPERFLUOUS_OBJS), )
|
||||
$$(shell $(RM) -f $$($1_SUPERFLUOUS_OBJS))
|
||||
endif
|
||||
# Sort to remove duplicates and provide a reproducible order on the input files to the linker.
|
||||
# Sort to remove dupliates and provide a reproducable order on the input files to the linker.
|
||||
$1_ALL_OBJS := $$(sort $$($1_EXPECTED_OBJS) $$($1_EXTRA_OBJECT_FILES))
|
||||
|
||||
# Pickup extra OPENJDK_TARGET_OS_TYPE, OPENJDK_TARGET_OS, and/or OPENJDK_TARGET_OS plus
|
||||
@@ -812,7 +804,7 @@ define SetupNativeCompilationBody
|
||||
ifeq ($(TOOLCHAIN_TYPE), microsoft)
|
||||
$1_PCH_FILE := $$($1_OBJECT_DIR)/$1.pch
|
||||
$1_GENERATED_PCH_SRC := $$($1_OBJECT_DIR)/$1_pch.cpp
|
||||
$1_GENERATED_PCH_OBJ := $$($1_OBJECT_DIR)/$1_pch$(OBJ_SUFFIX)
|
||||
$1_GENERATED_PCH_OBJ := $$($1_OBJECT_DIR)/$1_pch.obj
|
||||
|
||||
$$(eval $$(call SetupCompileNativeFile, $1_$$(notdir $$($1_GENERATED_PCH_SRC)), \
|
||||
FILE := $$($1_GENERATED_PCH_SRC), \
|
||||
@@ -919,15 +911,15 @@ define SetupNativeCompilationBody
|
||||
# For some unknown reason, in this case CL actually outputs the show
|
||||
# includes to stderr so need to redirect it to hide the output from the
|
||||
# main log.
|
||||
$$(call ExecuteWithLog, $$($1_RES_DEPS_FILE)$(OBJ_SUFFIX), \
|
||||
$$(call ExecuteWithLog, $$($1_RES_DEPS_FILE).obj, \
|
||||
$$($1_CC) $$(filter-out -l%, $$($1_RCFLAGS)) \
|
||||
$$($1_SYSROOT_CFLAGS) -showIncludes -nologo -TC \
|
||||
$(CC_OUT_OPTION)$$($1_RES_DEPS_FILE)$(OBJ_SUFFIX) -P -Fi$$($1_RES_DEPS_FILE).pp \
|
||||
$(CC_OUT_OPTION)$$($1_RES_DEPS_FILE).obj -P -Fi$$($1_RES_DEPS_FILE).pp \
|
||||
$$($1_VERSIONINFO_RESOURCE)) 2>&1 \
|
||||
| $(TR) -d '\r' | $(GREP) -v -e "^Note: including file:" \
|
||||
-e "^$$(notdir $$($1_VERSIONINFO_RESOURCE))$$$$" || test "$$$$?" = "1" ; \
|
||||
$(ECHO) $$($1_RES): \\ > $$($1_RES_DEPS_FILE) ; \
|
||||
$(SED) $(WINDOWS_SHOWINCLUDE_SED_PATTERN) $$($1_RES_DEPS_FILE)$(OBJ_SUFFIX).log \
|
||||
$(SED) $(WINDOWS_SHOWINCLUDE_SED_PATTERN) $$($1_RES_DEPS_FILE).obj.log \
|
||||
>> $$($1_RES_DEPS_FILE) ; \
|
||||
$(ECHO) >> $$($1_RES_DEPS_FILE) ;\
|
||||
$(SED) $(DEPENDENCY_TARGET_SED_PATTERN) $$($1_RES_DEPS_FILE) \
|
||||
@@ -1214,16 +1206,11 @@ define SetupNativeCompilationBody
|
||||
$$($1_MT) -nologo -manifest $$($1_MANIFEST) -identity:"$$($1_NAME).exe, version=$$($1_MANIFEST_VERSION)" -outputresource:$$@;#1
|
||||
endif
|
||||
endif
|
||||
# On macosx, optionally run codesign on every binary.
|
||||
# Remove signature explicitly first to avoid warnings if the linker
|
||||
# added a default adhoc signature.
|
||||
ifeq ($(MACOSX_CODESIGN_MODE), hardened)
|
||||
$(CODESIGN) --remove-signature $$@
|
||||
# This only works if the openjdk_codesign identity is present on the system. Let
|
||||
# silently fail otherwise.
|
||||
ifneq ($(CODESIGN), )
|
||||
$(CODESIGN) -f -s "$(MACOSX_CODESIGN_IDENTITY)" --timestamp --options runtime \
|
||||
--entitlements $$(call GetEntitlementsFile, $$@) $$@
|
||||
else ifeq ($(MACOSX_CODESIGN_MODE), debug)
|
||||
$(CODESIGN) --remove-signature $$@
|
||||
$(CODESIGN) -f -s - --entitlements $$(call GetEntitlementsFile, $$@) $$@
|
||||
endif
|
||||
endif
|
||||
|
||||
|
||||
@@ -103,7 +103,7 @@ define ProcessMarkdown
|
||||
$$(call LogInfo, Post-processing markdown file $2)
|
||||
$$(call MakeDir, $$(SUPPORT_OUTPUTDIR)/markdown $$($1_$2_TARGET_DIR))
|
||||
$$(call ExecuteWithLog, $$(SUPPORT_OUTPUTDIR)/markdown/$$($1_$2_MARKER)_post, \
|
||||
( $$($1_POST_PROCESS) $$($1_$2_PANDOC_OUTPUT) > $$($1_$2_OUTPUT_FILE) ) )
|
||||
( $$($1_POST_PROCESS) < $$($1_$2_PANDOC_OUTPUT) > $$($1_$2_OUTPUT_FILE) ) )
|
||||
endif
|
||||
|
||||
$1 += $$($1_$2_OUTPUT_FILE)
|
||||
|
||||
@@ -62,7 +62,11 @@ define SetupTestFilesCompilationBody
|
||||
$1_OUTPUT_SUBDIR := lib
|
||||
$1_BASE_CFLAGS := $(CFLAGS_JDKLIB)
|
||||
$1_BASE_CXXFLAGS := $(CXXFLAGS_JDKLIB)
|
||||
$1_LDFLAGS := $(LDFLAGS_JDKLIB) $$(call SET_SHARED_LIBRARY_ORIGIN)
|
||||
ifeq ($(call isTargetOs, windows), false)
|
||||
$1_LDFLAGS := $(LDFLAGS_JDKLIB) $$(call SET_SHARED_LIBRARY_ORIGIN) -pthread
|
||||
else
|
||||
$1_LDFLAGS := $(LDFLAGS_JDKLIB) $$(call SET_SHARED_LIBRARY_ORIGIN)
|
||||
endif
|
||||
$1_COMPILATION_TYPE := LIBRARY
|
||||
else ifeq ($$($1_TYPE), PROGRAM)
|
||||
$1_PREFIX = exe
|
||||
|
||||
@@ -65,7 +65,7 @@ endef
|
||||
# SOURCE_DIRS)
|
||||
# EXCLUDE_FILES exclude files matching these patterns (used only with
|
||||
# SOURCE_DIRS)
|
||||
# INCLUDES replace the occurrences of a pattern with the contents of a file;
|
||||
# INCLUDES replace the occurances of a pattern with the contents of a file;
|
||||
# one or more such include pattern, using the syntax:
|
||||
# PLACEHOLDER => FILE_TO_INCLUDE ; ...
|
||||
# Each PLACEHOLDER must be on a single, otherwise empty line (whitespace
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2011, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@@ -68,12 +68,6 @@ _sequence-do = \
|
||||
$(words $(SEQUENCE_COUNT)) \
|
||||
$(call _sequence-do,$1))
|
||||
|
||||
################################################################################
|
||||
# Strip both arguments. Append the first argument to the second argument. If the
|
||||
# first argument is empty, return the empty string.
|
||||
IfAppend = \
|
||||
$(if $(strip $1),$(strip $1)$(strip $2),)
|
||||
|
||||
################################################################################
|
||||
# Replace question marks with space in string. This macro needs to be called on
|
||||
# files from FindFiles in case any of them contains space in their file name,
|
||||
@@ -152,7 +146,7 @@ RelativePathHelper = \
|
||||
$(if $($2_dotdots), $($2_dotdots), .))
|
||||
|
||||
################################################################################
|
||||
# Filter out duplicate sub strings while preserving order. Keeps the first occurrence.
|
||||
# Filter out duplicate sub strings while preserving order. Keeps the first occurance.
|
||||
uniq = \
|
||||
$(strip $(if $1,$(firstword $1) $(call uniq,$(filter-out $(firstword $1),$1))))
|
||||
|
||||
@@ -222,21 +216,6 @@ Or = \
|
||||
$(strip $(if $(filter-out true false, $1), $(error Non-boolean values: $1)) \
|
||||
$(if $(strip $(filter-out false, $1)), true, false))
|
||||
|
||||
|
||||
################################################################################
|
||||
# Convert an UNIX epoch based timestamp (as an integer) to an ISO 8601 date
|
||||
# string.
|
||||
# Param 1 - timestamp
|
||||
ifeq ($(IS_GNU_DATE), yes)
|
||||
EpochToISO8601 = \
|
||||
$(shell $(DATE) --utc --date="@$(strip $1)" \
|
||||
+"$(ISO_8601_FORMAT_STRING)" 2> /dev/null)
|
||||
else
|
||||
EpochToISO8601 = \
|
||||
$(shell $(DATE) -u -j -f "%s" "$(strip $1)" \
|
||||
+"$(ISO_8601_FORMAT_STRING)" 2> /dev/null)
|
||||
endif
|
||||
|
||||
################################################################################
|
||||
# Parse a multiple-keyword variable, like FOO="KEYWORD1=val1;KEYWORD2=val2;..."
|
||||
# These will be converted into a series of variables like FOO_KEYWORD1=val1,
|
||||
@@ -373,9 +352,6 @@ isBuildCpu = \
|
||||
isBuildCpuArch = \
|
||||
$(strip $(if $(filter $(OPENJDK_BUILD_CPU_ARCH), $1), true, false))
|
||||
|
||||
isCompiler = \
|
||||
$(strip $(if $(filter $(TOOLCHAIN_TYPE), $1), true, false))
|
||||
|
||||
################################################################################
|
||||
# Converts a space separated list to a comma separated list.
|
||||
#
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2011, 2021, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@@ -54,7 +54,7 @@ endif
|
||||
# FOLLOW_SYMLINKS - Set to explicitly follow symlinks. Affects performance of
|
||||
# finding files.
|
||||
# ZIP_OPTIONS extra options to pass to zip
|
||||
# REPRODUCIBLE set to false to disable the step that makes zip reproducible
|
||||
# REPRODUCIBLE override ENABLE_REPRODUCIBLE_BUILD (to make zip reproducible or not)
|
||||
|
||||
SetupZipArchive = $(NamedParamsMacroTemplate)
|
||||
define SetupZipArchiveBody
|
||||
@@ -130,7 +130,7 @@ define SetupZipArchiveBody
|
||||
)
|
||||
|
||||
ifeq ($$($1_REPRODUCIBLE), )
|
||||
$1_REPRODUCIBLE := true
|
||||
$1_REPRODUCIBLE := $$(ENABLE_REPRODUCIBLE_BUILD)
|
||||
endif
|
||||
|
||||
# Use a slightly shorter name for logging, but with enough path to identify this zip.
|
||||
@@ -139,7 +139,7 @@ define SetupZipArchiveBody
|
||||
# Now $1_ALL_SRCS should contain all sources that are going to be put into the zip.
|
||||
# I.e. the zip -i and -x options should match the filtering done in the makefile.
|
||||
# Explicitly excluded files can be given with absolute path. The patsubst solution
|
||||
# isn't perfect but the likelihood of an absolute path to match something in a src
|
||||
# isn't perfect but the likelyhood of an absolute path to match something in a src
|
||||
# dir is very small.
|
||||
# If zip has nothing to do, it returns 12 and would fail the build. Check for 12
|
||||
# and only fail if it's not.
|
||||
|
||||
@@ -1,43 +0,0 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License version 2 only, as
|
||||
# published by the Free Software Foundation. Oracle designates this
|
||||
# particular file as subject to the "Classpath" exception as provided
|
||||
# by Oracle in the LICENSE file that accompanied this code.
|
||||
#
|
||||
# This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# version 2 for more details (a copy is included in the LICENSE file that
|
||||
# accompanied this code).
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License version
|
||||
# 2 along with this work; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
# or visit www.oracle.com if you need additional information or have any
|
||||
# questions.
|
||||
#
|
||||
|
||||
include Execute.gmk
|
||||
include TextFileProcessing.gmk
|
||||
include ToolsJdk.gmk
|
||||
|
||||
################################################################################
|
||||
# Sets up a rule that creates a version.properties file in the gensrc output
|
||||
# directory.
|
||||
# Param 1 - Variable to add generated file name to
|
||||
# Param 2 - Name of version.properties file including packages from the src
|
||||
# root.
|
||||
define SetupVersionProperties
|
||||
$(SUPPORT_OUTPUTDIR)/gensrc/$(MODULE)/$$(strip $2):
|
||||
$$(call MakeTargetDir)
|
||||
$(PRINTF) "jdk=$(VERSION_NUMBER)\nfull=$(VERSION_STRING)\nrelease=$(VERSION_SHORT)\n" \
|
||||
> $$@
|
||||
|
||||
$$(strip $1) += $(SUPPORT_OUTPUTDIR)/gensrc/$(MODULE)/$$(strip $2)
|
||||
endef
|
||||
30
make/common/modules/GensrcCommonJdk.gmk
Normal file
30
make/common/modules/GensrcCommonJdk.gmk
Normal file
@@ -0,0 +1,30 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License version 2 only, as
|
||||
# published by the Free Software Foundation. Oracle designates this
|
||||
# particular file as subject to the "Classpath" exception as provided
|
||||
# by Oracle in the LICENSE file that accompanied this code.
|
||||
#
|
||||
# This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# version 2 for more details (a copy is included in the LICENSE file that
|
||||
# accompanied this code).
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License version
|
||||
# 2 along with this work; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
# or visit www.oracle.com if you need additional information or have any
|
||||
# questions.
|
||||
#
|
||||
|
||||
include Execute.gmk
|
||||
include JavaCompilation.gmk
|
||||
include NativeCompilation.gmk
|
||||
include TextFileProcessing.gmk
|
||||
include ToolsJdk.gmk
|
||||
129
make/common/modules/GensrcCommonLangtools.gmk
Normal file
129
make/common/modules/GensrcCommonLangtools.gmk
Normal file
@@ -0,0 +1,129 @@
|
||||
#
|
||||
# Copyright (c) 2014, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License version 2 only, as
|
||||
# published by the Free Software Foundation. Oracle designates this
|
||||
# particular file as subject to the "Classpath" exception as provided
|
||||
# by Oracle in the LICENSE file that accompanied this code.
|
||||
#
|
||||
# This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
# version 2 for more details (a copy is included in the LICENSE file that
|
||||
# accompanied this code).
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License version
|
||||
# 2 along with this work; if not, write to the Free Software Foundation,
|
||||
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
|
||||
# or visit www.oracle.com if you need additional information or have any
|
||||
# questions.
|
||||
#
|
||||
include JavaCompilation.gmk
|
||||
|
||||
################################################################################
|
||||
# The compileprops tools compiles a properties file into a resource bundle.
|
||||
TOOL_COMPILEPROPS_CMD := $(JAVA_SMALL) -cp $(BUILDTOOLS_OUTPUTDIR)/langtools_tools_classes \
|
||||
compileproperties.CompileProperties -quiet
|
||||
|
||||
################################################################################
|
||||
# The compileprops tools compiles a properties file into an enum-like class.
|
||||
TOOL_PARSEPROPS_CMD := $(JAVA_SMALL) -cp $(BUILDTOOLS_OUTPUTDIR)/langtools_tools_classes \
|
||||
propertiesparser.PropertiesParser
|
||||
|
||||
|
||||
################################################################################
|
||||
# Sets up a rule that creates a version.properties file in the gensrc output
|
||||
# directory.
|
||||
# Param 1 - Variable to add generated file name to
|
||||
# Param 2 - Name of version.properties file including packages from the src
|
||||
# root.
|
||||
define SetupVersionProperties
|
||||
$(SUPPORT_OUTPUTDIR)/gensrc/$(MODULE)/$$(strip $2):
|
||||
$$(call MakeTargetDir)
|
||||
$(PRINTF) "jdk=$(VERSION_NUMBER)\nfull=$(VERSION_STRING)\nrelease=$(VERSION_SHORT)\n" \
|
||||
> $$@
|
||||
|
||||
$$(strip $1) += $(SUPPORT_OUTPUTDIR)/gensrc/$(MODULE)/$$(strip $2)
|
||||
endef
|
||||
|
||||
################################################################################
|
||||
# Finds all properties files in the module source and creates a rule that runs
|
||||
# CompileProperties on them into the gensrc dir.
|
||||
# Param 1 - Variable to add targets to
|
||||
# Param 2 - Extra properties files to process
|
||||
define SetupCompileProperties
|
||||
# Lookup the properties that need to be compiled into resource bundles.
|
||||
PROPSOURCES := $2 \
|
||||
$$(call FindFiles, $(TOPDIR)/src/$(MODULE)/share/classes, *.properties)
|
||||
|
||||
# Filter out any excluded translations
|
||||
PROPSOURCES := $$(call FilterExcludedTranslations, $$(PROPSOURCES), .properties)
|
||||
|
||||
# Convert .../src/<module>/share/classes/com/sun/tools/javac/resources/javac_zh_CN.properties
|
||||
# to .../langtools/gensrc/<module>/com/sun/tools/javac/resources/javac_zh_CN.java
|
||||
# Strip away prefix and suffix, leaving for example only:
|
||||
# "<module>/share/classes/com/sun/tools/javac/resources/javac_zh_CN"
|
||||
PROPJAVAS := $$(patsubst $(TOPDIR)/src/%, \
|
||||
$(SUPPORT_OUTPUTDIR)/gensrc/%, \
|
||||
$$(patsubst %.properties, %.java, \
|
||||
$$(subst /share/classes,, $$(PROPSOURCES))))
|
||||
|
||||
# Generate the package dirs for the to be generated java files. Sort to remove
|
||||
# duplicates.
|
||||
PROPDIRS := $$(sort $$(dir $$(PROPJAVAS)))
|
||||
|
||||
# Now generate a sequence of:
|
||||
# "-compile ...javac_zh_CN.properties ...javac_zh_CN.java java.util.ListResourceBundle"
|
||||
# suitable to be fed into the CompileProperties command.
|
||||
PROPCMDLINE := $$(subst _SPACE_, $(SPACE), \
|
||||
$$(join $$(addprefix -compile_SPACE_, $$(PROPSOURCES)), \
|
||||
$$(addsuffix _SPACE_java.util.ListResourceBundle, \
|
||||
$$(addprefix _SPACE_, $$(PROPJAVAS)))))
|
||||
|
||||
# Now setup the rule for the generation of the resource bundles.
|
||||
PROPS_BASE := $(SUPPORT_OUTPUTDIR)/gensrc/$(MODULE)/_the_props
|
||||
$$(PROPS_BASE): $$(PROPSOURCES)
|
||||
$$(call MakeDir, $$(@D) $$(PROPDIRS))
|
||||
$(FIND) $$(@D) -name "*.java" -a ! -name "*Properties.java" $(FIND_DELETE)
|
||||
$(ECHO) Compiling $$(words $$(PROPSOURCES)) properties into resource bundles for $(MODULE)
|
||||
$$(call ExecuteWithLog, $$(PROPS_BASE)_exec, \
|
||||
$(TOOL_COMPILEPROPS_CMD) $$(PROPCMDLINE))
|
||||
$(TOUCH) $$@
|
||||
|
||||
$$(strip $1) += $$(PROPS_BASE)
|
||||
endef
|
||||
|
||||
################################################################################
|
||||
# Parse property files in given location and generate a Java-like enum in the gensrc folder.
|
||||
# Param 1 - Variable to add targets to
|
||||
# Param 2 - Extra properties files to process
|
||||
define SetupParseProperties
|
||||
# property files to process
|
||||
PARSEPROPSOURCES := $$(addprefix $(TOPDIR)/src/$(MODULE)/share/classes/, $2)
|
||||
PARSEPROPSOURCES := $$(call FilterExcludedTranslations, $$(PARSEPROPSOURCES), .properties)
|
||||
|
||||
PARSEPROPALLDIRS := $$(patsubst $(TOPDIR)/src/$(MODULE)/share/classes/%, \
|
||||
$(SUPPORT_OUTPUTDIR)/gensrc/$(MODULE)/%, \
|
||||
$$(dir $$(PARSEPROPSOURCES)))
|
||||
|
||||
PARSEPROPDIRS := $$(sort $$(PARSEPROPALLDIRS))
|
||||
|
||||
PARSEPROPCMDLINE := $$(subst _SPACE_, $$(SPACE), \
|
||||
$$(join $$(foreach var,$$(PARSEPROPSOURCES),$$(addprefix -compile_SPACE_,$$(var))), \
|
||||
$$(addprefix _SPACE_, $$(PARSEPROPALLDIRS))))
|
||||
|
||||
# Now setup the rule for the generation of the resource bundles.
|
||||
$(SUPPORT_OUTPUTDIR)/gensrc/$(MODULE)/_the_parsed_props: $$(PARSEPROPSOURCES)
|
||||
$$(call MakeDir, $$(@D) $$(PARSEPROPDIRS))
|
||||
$(FIND) $$(@D) -name "*Properties.java" $(FIND_DELETE)
|
||||
$(ECHO) Parsing $$(words $$(PARSEPROPSOURCES)) properties into enum-like class for $(MODULE)
|
||||
$(TOOL_PARSEPROPS_CMD) $$(PARSEPROPCMDLINE)
|
||||
$(TOUCH) $$@
|
||||
|
||||
$$(strip $1) += $(SUPPORT_OUTPUTDIR)/gensrc/$(MODULE)/_the_parsed_props
|
||||
endef
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2011, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@@ -26,8 +26,6 @@
|
||||
# This file defines macros that sets up rules for generating java classes
|
||||
# from resource bundle properties files.
|
||||
|
||||
include JavaCompilation.gmk
|
||||
|
||||
################################################################################
|
||||
# Helper macro for SetupCopy-zh_HK.
|
||||
define SetupOneCopy-zh_HK
|
||||
@@ -58,10 +56,8 @@ endef
|
||||
#
|
||||
# Remaining parameters are named arguments. These include:
|
||||
# SRC_DIRS Directories containing properties files to process.
|
||||
# EXTRA_FILES Also include these specifically named files
|
||||
# EXCLUDE Exclude files matching this pattern.
|
||||
# CLASS The super class for the generated classes.
|
||||
# TYPE Whether to use "langtools" or normal compiler.
|
||||
# MODULE_PATH_ROOT Module path root, defaults to $(TOPDIR)/src.
|
||||
# KEEP_ALL_TRANSLATIONS Set to true to skip filtering of excluded translations.
|
||||
SetupCompileProperties = $(NamedParamsMacroTemplate)
|
||||
@@ -74,8 +70,6 @@ define SetupCompilePropertiesBody
|
||||
# Locate all properties files in the given source dirs.
|
||||
$1_SRC_FILES := $$(call FindFiles, $$($1_SRC_DIRS), *.properties)
|
||||
|
||||
$1_SRC_FILES += $$($1_EXTRA_FILES)
|
||||
|
||||
ifneq ($$($1_EXCLUDE), )
|
||||
$1_SRC_FILES := $$(filter-out $$($1_EXCLUDE), $$($1_SRC_FILES))
|
||||
endif
|
||||
@@ -108,29 +102,13 @@ define SetupCompilePropertiesBody
|
||||
|
||||
$1_TARGET := $(SUPPORT_OUTPUTDIR)/gensrc/$(MODULE)/_the.$1.marker
|
||||
$1_CMDLINE_FILE := $(SUPPORT_OUTPUTDIR)/gensrc/$(MODULE)/_the.$1.cmdline
|
||||
$1_EXEC_MARKER := $(SUPPORT_OUTPUTDIR)/gensrc/$(MODULE)/_the.$1.exec
|
||||
|
||||
ifeq ($$($1_TYPE), langtools)
|
||||
$1_TOOL := -cp $(BUILDTOOLS_OUTPUTDIR)/langtools_tools_classes \
|
||||
compileproperties.CompileProperties
|
||||
$1_TOOL_DEPS := $(BUILD_TOOLS_LANGTOOLS)
|
||||
else
|
||||
$1_TOOL := -cp $(BUILDTOOLS_OUTPUTDIR)/jdk_tools_classes \
|
||||
build.tools.compileproperties.CompileProperties
|
||||
$1_TOOL_DEPS := $(BUILD_TOOLS_JDK)
|
||||
endif
|
||||
|
||||
ifeq ($(findstring $(LOG_LEVEL), debug trace), )
|
||||
$1_QUIET := -quiet
|
||||
endif
|
||||
|
||||
# Now setup the rule for the generation of the resource bundles.
|
||||
$$($1_TARGET): $$($1_SRC_FILES) $$($1_JAVAS) $$($1_TOOL_DEPS)
|
||||
$$($1_TARGET): $$($1_SRC_FILES) $$($1_JAVAS) $(BUILD_TOOLS_JDK)
|
||||
$$(call LogWarn, Compiling $$(words $$($1_SRC_FILES)) properties into resource bundles for $(MODULE))
|
||||
$$(call MakeDir, $$(@D) $$($1_DIRS))
|
||||
$$(eval $$(call ListPathsSafely, $1_CMDLINE, $$($1_CMDLINE_FILE)))
|
||||
$$(call ExecuteWithLog, $$($1_EXEC_MARKER), \
|
||||
$(JAVA_SMALL) $$($1_TOOL) $$($1_QUIET) @$$($1_CMDLINE_FILE))
|
||||
$(TOOL_COMPILEPROPERTIES) -quiet @$$($1_CMDLINE_FILE)
|
||||
$(TOUCH) $$@
|
||||
|
||||
$$($1_JAVAS): $$($1_SRC_FILES)
|
||||
@@ -142,3 +120,5 @@ define SetupCompilePropertiesBody
|
||||
|
||||
$1 += $$($1_JAVAS) $$($1_TARGET) $$($1_HK)
|
||||
endef
|
||||
|
||||
################################################################################
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2011, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@@ -33,14 +33,13 @@ include ToolsJdk.gmk
|
||||
# On Mac, we have always exported all symbols, probably due to oversight
|
||||
# and/or misunderstanding. To emulate this, don't hide any symbols
|
||||
# by default.
|
||||
# On AIX/xlc we need at least xlc 13.1 for the symbol hiding (see JDK-8214063)
|
||||
# Also provide an override for non-conformant libraries.
|
||||
ifeq ($(TOOLCHAIN_TYPE), gcc)
|
||||
LAUNCHER_CFLAGS += -fvisibility=hidden
|
||||
LDFLAGS_JDKEXE += -Wl,--exclude-libs,ALL
|
||||
else ifeq ($(TOOLCHAIN_TYPE), clang)
|
||||
LAUNCHER_CFLAGS += -fvisibility=hidden
|
||||
else ifeq ($(TOOLCHAIN_TYPE), xlc)
|
||||
LAUNCHER_CFLAGS += -qvisibility=hidden
|
||||
endif
|
||||
|
||||
LAUNCHER_SRC := $(TOPDIR)/src/java.base/share/native/launcher
|
||||
@@ -87,8 +86,8 @@ define SetupBuildLauncherBody
|
||||
$1_MAIN_MODULE := $(MODULE)
|
||||
endif
|
||||
|
||||
$1_JAVA_ARGS += -ms8m
|
||||
ifneq ($$($1_MAIN_CLASS), )
|
||||
$1_JAVA_ARGS += -ms8m
|
||||
$1_LAUNCHER_CLASS := -m $$($1_MAIN_MODULE)/$$($1_MAIN_CLASS)
|
||||
endif
|
||||
|
||||
@@ -97,12 +96,9 @@ define SetupBuildLauncherBody
|
||||
$$(addprefix -J, $$($1_EXTRA_JAVA_ARGS)), "$$a"$(COMMA) )) }'
|
||||
$1_CFLAGS += -DEXTRA_JAVA_ARGS=$$($1_EXTRA_JAVA_ARGS_STR)
|
||||
endif
|
||||
|
||||
ifneq ($$($1_JAVA_ARGS), )
|
||||
$1_JAVA_ARGS_STR := '{ $$(strip $$(foreach a, \
|
||||
$$(addprefix -J, $$($1_JAVA_ARGS)) $$($1_LAUNCHER_CLASS), "$$a"$(COMMA) )) }'
|
||||
$1_CFLAGS += -DJAVA_ARGS=$$($1_JAVA_ARGS_STR)
|
||||
endif
|
||||
$1_JAVA_ARGS_STR := '{ $$(strip $$(foreach a, \
|
||||
$$(addprefix -J, $$($1_JAVA_ARGS)) $$($1_LAUNCHER_CLASS), "$$a"$(COMMA) )) }'
|
||||
$1_CFLAGS += -DJAVA_ARGS=$$($1_JAVA_ARGS_STR)
|
||||
|
||||
ifeq ($(call isTargetOs, macosx), true)
|
||||
ifeq ($$($1_MACOSX_PRIVILEGED), true)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2011, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@@ -36,6 +36,7 @@ WIN_JAVA_LIB := $(SUPPORT_OUTPUTDIR)/native/java.base/libjava/java.lib
|
||||
# On Mac, we have always exported all symbols, probably due to oversight
|
||||
# and/or misunderstanding. To emulate this, don't hide any symbols
|
||||
# by default.
|
||||
# On AIX/xlc we need at least xlc 13.1 for the symbol hiding (see JDK-8214063)
|
||||
# Also provide an override for non-conformant libraries.
|
||||
ifeq ($(TOOLCHAIN_TYPE), gcc)
|
||||
CFLAGS_JDKLIB += -fvisibility=hidden
|
||||
@@ -46,10 +47,6 @@ else ifeq ($(TOOLCHAIN_TYPE), clang)
|
||||
CFLAGS_JDKLIB += -fvisibility=hidden
|
||||
CXXFLAGS_JDKLIB += -fvisibility=hidden
|
||||
EXPORT_ALL_SYMBOLS := -fvisibility=default
|
||||
else ifeq ($(TOOLCHAIN_TYPE), xlc)
|
||||
CFLAGS_JDKLIB += -qvisibility=hidden
|
||||
CXXFLAGS_JDKLIB += -qvisibility=hidden
|
||||
EXPORT_ALL_SYMBOLS := -qvisibility=default
|
||||
endif
|
||||
|
||||
# Put the libraries here.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2011, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2011, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@@ -29,7 +29,7 @@ PRODUCT_SUFFIX="Runtime Environment"
|
||||
JDK_RC_PLATFORM_NAME=Platform
|
||||
COMPANY_NAME=N/A
|
||||
HOTSPOT_VM_DISTRO="OpenJDK"
|
||||
VENDOR_URL=https://openjdk.org/
|
||||
VENDOR_URL=https://openjdk.java.net/
|
||||
VENDOR_URL_BUG=https://bugreport.java.com/bugreport/
|
||||
VENDOR_URL_VM_BUG=https://bugreport.java.com/bugreport/crash.jsp
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2014, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2014, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@@ -42,7 +42,6 @@ DOCS_MODULES= \
|
||||
jdk.hotspot.agent \
|
||||
jdk.httpserver \
|
||||
jdk.jpackage \
|
||||
jdk.incubator.concurrent \
|
||||
jdk.incubator.vector \
|
||||
jdk.jartool \
|
||||
jdk.javadoc \
|
||||
@@ -56,6 +55,7 @@ DOCS_MODULES= \
|
||||
jdk.jsobject \
|
||||
jdk.jshell \
|
||||
jdk.jstatd \
|
||||
jdk.incubator.foreign \
|
||||
jdk.localedata \
|
||||
jdk.management \
|
||||
jdk.management.agent \
|
||||
|
||||
@@ -26,16 +26,16 @@
|
||||
# Versions and download locations for dependencies used by GitHub Actions (GHA)
|
||||
|
||||
GTEST_VERSION=1.8.1
|
||||
JTREG_VERSION=7+1
|
||||
JTREG_VERSION=6.1+2
|
||||
|
||||
LINUX_X64_BOOT_JDK_EXT=tar.gz
|
||||
LINUX_X64_BOOT_JDK_URL=https://download.java.net/java/GA/jdk19/877d6127e982470ba2a7faa31cc93d04/36/GPL/openjdk-19_linux-x64_bin.tar.gz
|
||||
LINUX_X64_BOOT_JDK_SHA256=f47aba585cfc9ecff1ed8e023524e8309f4315ed8b80100b40c7dcc232c12f96
|
||||
|
||||
MACOS_X64_BOOT_JDK_EXT=tar.gz
|
||||
MACOS_X64_BOOT_JDK_URL=https://download.java.net/java/GA/jdk19/877d6127e982470ba2a7faa31cc93d04/36/GPL/openjdk-19_macos-x64_bin.tar.gz
|
||||
MACOS_X64_BOOT_JDK_SHA256=bfd33f5b2590fd552ae2d9231340c6b4704a872f927dce1c52860b78c49a5a11
|
||||
LINUX_X64_BOOT_JDK_URL=https://github.com/adoptium/temurin17-binaries/releases/download/jdk-17.0.2%2B8/OpenJDK17U-jdk_x64_linux_hotspot_17.0.2_8.tar.gz
|
||||
LINUX_X64_BOOT_JDK_SHA256=288f34e3ba8a4838605636485d0365ce23e57d5f2f68997ac4c2e4c01967cd48
|
||||
|
||||
WINDOWS_X64_BOOT_JDK_EXT=zip
|
||||
WINDOWS_X64_BOOT_JDK_URL=https://download.java.net/java/GA/jdk19/877d6127e982470ba2a7faa31cc93d04/36/GPL/openjdk-19_windows-x64_bin.zip
|
||||
WINDOWS_X64_BOOT_JDK_SHA256=8fabcee7c4e8d3b53486777ecd27bb906d67d7c1efd1bf22a8290cf659afa487
|
||||
WINDOWS_X64_BOOT_JDK_URL=https://github.com/adoptium/temurin17-binaries/releases/download/jdk-17.0.2%2B8/OpenJDK17U-jdk_x64_windows_hotspot_17.0.2_8.zip
|
||||
WINDOWS_X64_BOOT_JDK_SHA256=d083479ca927dce2f586f779373d895e8bf668c632505740279390384edf03fa
|
||||
|
||||
MACOS_X64_BOOT_JDK_EXT=tar.gz
|
||||
MACOS_X64_BOOT_JDK_URL=https://github.com/adoptium/temurin17-binaries/releases/download/jdk-17.0.2%2B8/OpenJDK17U-jdk_x64_mac_hotspot_17.0.2_8.tar.gz
|
||||
MACOS_X64_BOOT_JDK_SHA256=3630e21a571b7180876bf08f85d0aac0bdbb3267b2ae9bd242f4933b21f9be32
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2015, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2015, 2021, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@@ -244,7 +244,7 @@ var getJibProfilesCommon = function (input, data) {
|
||||
"linux-aarch64", "linux-arm32", "linux-ppc64le", "linux-s390x"
|
||||
];
|
||||
|
||||
// These are the base settings for all the main build profiles.
|
||||
// These are the base setttings for all the main build profiles.
|
||||
common.main_profile_base = {
|
||||
dependencies: ["boot_jdk", "gnumake", "jtreg", "jib", "autoconf", "jmh", "jcov"],
|
||||
default_make_targets: ["product-bundles", "test-bundles", "static-libs-bundles"],
|
||||
@@ -254,7 +254,13 @@ var getJibProfilesCommon = function (input, data) {
|
||||
"--disable-jvm-feature-shenandoahgc",
|
||||
versionArgs(input, common))
|
||||
};
|
||||
|
||||
// Extra settings for release profiles
|
||||
common.release_profile_base = {
|
||||
configure_args: [
|
||||
"--enable-reproducible-build",
|
||||
"--with-source-date=current",
|
||||
],
|
||||
};
|
||||
// Extra settings for debug profiles
|
||||
common.debug_suffix = "-debug";
|
||||
common.debug_profile_base = {
|
||||
@@ -388,8 +394,13 @@ var getJibProfilesCommon = function (input, data) {
|
||||
};
|
||||
};
|
||||
|
||||
common.boot_jdk_version = "19";
|
||||
common.boot_jdk_build_number = "36";
|
||||
if (input.build_os == 'macosx' && input.build_cpu == 'aarch64') {
|
||||
common.boot_jdk_version = "17";
|
||||
common.boot_jdk_build_number = "24";
|
||||
} else {
|
||||
common.boot_jdk_version = "16";
|
||||
common.boot_jdk_build_number = "36";
|
||||
}
|
||||
common.boot_jdk_home = input.get("boot_jdk", "install_path") + "/jdk-"
|
||||
+ common.boot_jdk_version
|
||||
+ (input.build_os == "macosx" ? ".jdk/Contents/Home" : "");
|
||||
@@ -444,8 +455,8 @@ var getJibProfilesProfiles = function (input, common, data) {
|
||||
"macosx-aarch64": {
|
||||
target_os: "macosx",
|
||||
target_cpu: "aarch64",
|
||||
dependencies: ["devkit", "gtest", "pandoc"],
|
||||
configure_args: concat(common.configure_args_64bit,
|
||||
dependencies: ["devkit", "gtest"],
|
||||
configure_args: concat(common.configure_args_64bit, "--with-zlib=system",
|
||||
"--with-macosx-version-max=11.00.00"),
|
||||
},
|
||||
|
||||
@@ -553,7 +564,7 @@ var getJibProfilesProfiles = function (input, common, data) {
|
||||
"ANT_HOME": input.get("ant", "home_path")
|
||||
}
|
||||
};
|
||||
[ "linux-x64", "macosx-aarch64", "macosx-x64", "windows-x64", "linux-aarch64"]
|
||||
[ "linux-x64", "macosx-x64", "windows-x64"]
|
||||
.forEach(function (name) {
|
||||
var maketestName = name + "-testmake";
|
||||
profiles[maketestName] = concatObjects(profiles[name], testmakeBase);
|
||||
@@ -582,17 +593,6 @@ var getJibProfilesProfiles = function (input, common, data) {
|
||||
])
|
||||
},
|
||||
|
||||
"linux-aarch64-zero": {
|
||||
target_os: "linux",
|
||||
target_cpu: "aarch64",
|
||||
dependencies: ["devkit", "gtest"],
|
||||
configure_args: concat(common.configure_args_64bit, [
|
||||
"--with-zlib=system",
|
||||
"--with-jvm-variants=zero",
|
||||
"--enable-libffi-bundling"
|
||||
])
|
||||
},
|
||||
|
||||
"linux-x86-zero": {
|
||||
target_os: "linux",
|
||||
target_cpu: "x86",
|
||||
@@ -615,7 +615,7 @@ var getJibProfilesProfiles = function (input, common, data) {
|
||||
});
|
||||
|
||||
// Define a profile with precompiled headers disabled. This is just used for
|
||||
// verification of this build configuration.
|
||||
// verfication of this build configuration.
|
||||
var noPchProfiles = {
|
||||
"linux-x64-debug-nopch": {
|
||||
target_os: "linux",
|
||||
@@ -638,7 +638,7 @@ var getJibProfilesProfiles = function (input, common, data) {
|
||||
// Bootcycle profiles runs the build with itself as the boot jdk. This can
|
||||
// be done in two ways. Either using the builtin bootcycle target in the
|
||||
// build system. Or by supplying the main jdk build as bootjdk to configure.
|
||||
[ "linux-x64", "macosx-x64", "windows-x64", "linux-aarch64" ]
|
||||
[ "linux-x64", "macosx-x64", "windows-x64" ]
|
||||
.forEach(function (name) {
|
||||
var bootcycleName = name + "-bootcycle";
|
||||
var bootcyclePrebuiltName = name + "-bootcycle-prebuilt";
|
||||
@@ -832,7 +832,7 @@ var getJibProfilesProfiles = function (input, common, data) {
|
||||
[ "", common.open_suffix ].forEach(function (suffix) {
|
||||
var cmpBaselineName = name + suffix + "-cmp-baseline";
|
||||
profiles[cmpBaselineName] = clone(profiles[name + suffix]);
|
||||
// Only compare the images target. This should presumably be expanded
|
||||
// Only compare the images target. This should pressumably be expanded
|
||||
// to include more build targets when possible.
|
||||
profiles[cmpBaselineName].default_make_targets = [ "images", "test-image" ];
|
||||
if (name == "linux-x64") {
|
||||
@@ -849,6 +849,13 @@ var getJibProfilesProfiles = function (input, common, data) {
|
||||
});
|
||||
});
|
||||
|
||||
// After creating all derived profiles, we can add the release profile base
|
||||
// to the main profiles
|
||||
common.main_profile_names.forEach(function (name) {
|
||||
profiles[name] = concatObjects(profiles[name],
|
||||
common.release_profile_base);
|
||||
});
|
||||
|
||||
// Artifacts of JCov profiles
|
||||
[ "linux-aarch64", "linux-x64", "macosx-x64", "macosx-aarch64", "windows-x64" ]
|
||||
.forEach(function (name) {
|
||||
@@ -943,7 +950,7 @@ var getJibProfilesProfiles = function (input, common, data) {
|
||||
target_cpu: input.build_cpu,
|
||||
dependencies: [
|
||||
"jtreg", "gnumake", "boot_jdk", "devkit", "jib", "jcov", testedProfileJdk,
|
||||
testedProfileTest, testedProfile + ".jdk_symbols",
|
||||
testedProfileTest
|
||||
],
|
||||
src: "src.conf",
|
||||
make_args: testOnlyMake,
|
||||
@@ -951,8 +958,7 @@ var getJibProfilesProfiles = function (input, common, data) {
|
||||
"BOOT_JDK": common.boot_jdk_home,
|
||||
"JT_HOME": input.get("jtreg", "home_path"),
|
||||
"JDK_IMAGE_DIR": input.get(testedProfileJdk, "home_path"),
|
||||
"TEST_IMAGE_DIR": input.get(testedProfileTest, "home_path"),
|
||||
"SYMBOLS_IMAGE_DIR": input.get(testedProfile + ".jdk_symbols", "home_path")
|
||||
"TEST_IMAGE_DIR": input.get(testedProfileTest, "home_path")
|
||||
},
|
||||
labels: "test"
|
||||
}
|
||||
@@ -992,6 +998,17 @@ var getJibProfilesProfiles = function (input, common, data) {
|
||||
profiles["run-test"] = concatObjects(profiles["run-test"], macosxRunTestExtra);
|
||||
profiles["run-test-prebuilt"] = concatObjects(profiles["run-test-prebuilt"], macosxRunTestExtra);
|
||||
}
|
||||
// On windows we want the debug symbols available at test time
|
||||
if (input.build_os == "windows") {
|
||||
windowsRunTestPrebuiltExtra = {
|
||||
dependencies: [ testedProfile + ".jdk_symbols" ],
|
||||
environment: {
|
||||
"SYMBOLS_IMAGE_DIR": input.get(testedProfile + ".jdk_symbols", "home_path"),
|
||||
}
|
||||
};
|
||||
profiles["run-test-prebuilt"] = concatObjects(profiles["run-test-prebuilt"],
|
||||
windowsRunTestPrebuiltExtra);
|
||||
}
|
||||
|
||||
// The profile run-test-prebuilt defines src.conf as the src bundle. When
|
||||
// running in Mach 5, this reduces the time it takes to populate the
|
||||
@@ -1000,10 +1017,10 @@ var getJibProfilesProfiles = function (input, common, data) {
|
||||
// get src.full as a dependency, and define the work_dir (where make gets
|
||||
// run) to be in the src.full install path. By running in the install path,
|
||||
// the same cached installation of the full src can be reused for multiple
|
||||
// test tasks. Care must however be taken not to pollute that work dir by
|
||||
// test tasks. Care must however be taken not to polute that work dir by
|
||||
// setting the appropriate make variables to control output directories.
|
||||
//
|
||||
// Use the existence of the top level README.md as indication of if this is
|
||||
// Use the existance of the top level README.md as indication of if this is
|
||||
// the full source or just src.conf.
|
||||
if (!new java.io.File(__DIR__, "../../README.md").exists()) {
|
||||
var runTestPrebuiltSrcFullExtra = {
|
||||
@@ -1030,10 +1047,10 @@ var getJibProfilesProfiles = function (input, common, data) {
|
||||
var getJibProfilesDependencies = function (input, common) {
|
||||
|
||||
var devkit_platform_revisions = {
|
||||
linux_x64: "gcc11.2.0-OL6.4+1.0",
|
||||
linux_x64: "gcc10.3.0-OL6.4+1.0",
|
||||
macosx: "Xcode12.4+1.0",
|
||||
windows_x64: "VS2022-17.1.0+1.0",
|
||||
linux_aarch64: "gcc11.2.0-OL7.6+1.0",
|
||||
linux_aarch64: "gcc10.3.0-OL7.6+1.0",
|
||||
linux_arm: "gcc8.2.0-Fedora27+1.0",
|
||||
linux_ppc64le: "gcc8.2.0-Fedora27+1.0",
|
||||
linux_s390x: "gcc8.2.0-Fedora27+1.0"
|
||||
@@ -1056,7 +1073,11 @@ var getJibProfilesDependencies = function (input, common) {
|
||||
}
|
||||
var boot_jdk_os = input.build_os;
|
||||
if (input.build_os == "macosx") {
|
||||
boot_jdk_os = "macos";
|
||||
if (input.build_cpu == "aarch64") {
|
||||
boot_jdk_os = "macos";
|
||||
} else {
|
||||
boot_jdk_os = "osx";
|
||||
}
|
||||
}
|
||||
var boot_jdk_platform = boot_jdk_os + "-" + input.build_cpu;
|
||||
var boot_jdk_ext = (input.build_os == "windows" ? ".zip" : ".tar.gz")
|
||||
@@ -1077,17 +1098,6 @@ var getJibProfilesDependencies = function (input, common) {
|
||||
environment_path: common.boot_jdk_home + "/bin"
|
||||
}
|
||||
|
||||
var pandoc_version;
|
||||
if (input.build_cpu == "aarch64") {
|
||||
if (input.build_os == "macosx") {
|
||||
pandoc_version = "2.14.0.2+1.0";
|
||||
} else {
|
||||
pandoc_version = "2.5+1.0";
|
||||
}
|
||||
} else {
|
||||
pandoc_version = "2.3.1+1.0";
|
||||
}
|
||||
|
||||
var makeBinDir = (input.build_os == "windows"
|
||||
? input.get("gnumake", "install_path") + "/cygwin/bin"
|
||||
: input.get("gnumake", "install_path") + "/bin");
|
||||
@@ -1131,9 +1141,9 @@ var getJibProfilesDependencies = function (input, common) {
|
||||
jtreg: {
|
||||
server: "jpg",
|
||||
product: "jtreg",
|
||||
version: "7",
|
||||
version: "6",
|
||||
build_number: "1",
|
||||
file: "bundles/jtreg-7+1.zip",
|
||||
file: "bundles/jtreg-6+1.zip",
|
||||
environment_name: "JT_HOME",
|
||||
environment_path: input.get("jtreg", "home_path") + "/bin",
|
||||
configure_args: "--with-jtreg=" + input.get("jtreg", "home_path"),
|
||||
@@ -1142,12 +1152,19 @@ var getJibProfilesDependencies = function (input, common) {
|
||||
jmh: {
|
||||
organization: common.organization,
|
||||
ext: "tar.gz",
|
||||
revision: "1.35+1.0"
|
||||
revision: "1.28+1.0"
|
||||
},
|
||||
|
||||
jcov: {
|
||||
// Use custom build of JCov
|
||||
// See CODETOOLS-7902734 for more info.
|
||||
// server: "jpg",
|
||||
// product: "jcov",
|
||||
// version: "3.0",
|
||||
// build_number: "b07",
|
||||
// file: "bundles/jcov-3_0.zip",
|
||||
organization: common.organization,
|
||||
revision: "3.0-13-jdk-asm+1.0",
|
||||
revision: "3.0-7-jdk-asm+1.0",
|
||||
ext: "zip",
|
||||
environment_name: "JCOV_HOME",
|
||||
},
|
||||
@@ -1193,7 +1210,7 @@ var getJibProfilesDependencies = function (input, common) {
|
||||
pandoc: {
|
||||
organization: common.organization,
|
||||
ext: "tar.gz",
|
||||
revision: pandoc_version,
|
||||
revision: (input.build_cpu == 'aarch64' ? "2.5+1.0" : "2.3.1+1.0"),
|
||||
module: "pandoc-" + input.build_platform,
|
||||
configure_args: "PANDOC=" + input.get("pandoc", "install_path") + "/pandoc/pandoc",
|
||||
environment_path: input.get("pandoc", "install_path") + "/pandoc"
|
||||
@@ -1401,10 +1418,7 @@ var getVersion = function (feature, interim, update, patch, extra1, extra2, extr
|
||||
* other version inputs
|
||||
*/
|
||||
var versionArgs = function(input, common) {
|
||||
var args = [];
|
||||
if (common.build_number != 0) {
|
||||
args = concat(args, "--with-version-build=" + common.build_number);
|
||||
}
|
||||
var args = ["--with-version-build=" + common.build_number];
|
||||
if (input.build_type == "promoted") {
|
||||
args = concat(args,
|
||||
"--with-version-pre=" + version_numbers.get("DEFAULT_PROMOTED_VERSION_PRE"),
|
||||
@@ -1424,14 +1438,6 @@ var versionArgs = function(input, common) {
|
||||
} else {
|
||||
args = concat(args, "--with-version-opt=" + common.build_id);
|
||||
}
|
||||
var sourceDate
|
||||
if (input.build_id_data && input.build_id_data.creationTime) {
|
||||
sourceDate = Math.floor(Date.parse(input.build_id_data.creationTime)/1000);
|
||||
} else {
|
||||
sourceDate = "current";
|
||||
}
|
||||
args = concat(args, "--with-source-date=" + sourceDate);
|
||||
|
||||
return args;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (c) 2014, 2022, Oracle and/or its affiliates. All rights reserved.
|
||||
# Copyright (c) 2014, 2021, Oracle and/or its affiliates. All rights reserved.
|
||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
@@ -43,7 +43,7 @@ BOOT_MODULES= \
|
||||
java.rmi \
|
||||
java.security.sasl \
|
||||
java.xml \
|
||||
jdk.incubator.concurrent \
|
||||
jdk.incubator.foreign \
|
||||
jdk.incubator.vector \
|
||||
jdk.internal.vm.ci \
|
||||
jdk.jfr \
|
||||
|
||||
@@ -26,17 +26,17 @@
|
||||
# Default version, product, and vendor information to use,
|
||||
# unless overridden by configure
|
||||
|
||||
DEFAULT_VERSION_FEATURE=20
|
||||
DEFAULT_VERSION_FEATURE=17
|
||||
DEFAULT_VERSION_INTERIM=0
|
||||
DEFAULT_VERSION_UPDATE=0
|
||||
DEFAULT_VERSION_UPDATE=5
|
||||
DEFAULT_VERSION_PATCH=0
|
||||
DEFAULT_VERSION_EXTRA1=0
|
||||
DEFAULT_VERSION_EXTRA2=0
|
||||
DEFAULT_VERSION_EXTRA3=0
|
||||
DEFAULT_VERSION_DATE=2023-03-21
|
||||
DEFAULT_VERSION_CLASSFILE_MAJOR=64 # "`$EXPR $DEFAULT_VERSION_FEATURE + 44`"
|
||||
DEFAULT_VERSION_DATE=2022-10-18
|
||||
DEFAULT_VERSION_CLASSFILE_MAJOR=61 # "`$EXPR $DEFAULT_VERSION_FEATURE + 44`"
|
||||
DEFAULT_VERSION_CLASSFILE_MINOR=0
|
||||
DEFAULT_VERSION_DOCS_API_SINCE=11
|
||||
DEFAULT_ACCEPTABLE_BOOT_VERSIONS="19 20"
|
||||
DEFAULT_JDK_SOURCE_TARGET_VERSION=20
|
||||
DEFAULT_ACCEPTABLE_BOOT_VERSIONS="16 17"
|
||||
DEFAULT_JDK_SOURCE_TARGET_VERSION=17
|
||||
DEFAULT_PROMOTED_VERSION_PRE=ea
|
||||
|
||||
@@ -4,9 +4,7 @@
|
||||
#
|
||||
# This code is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License version 2 only, as
|
||||
# published by the Free Software Foundation. Oracle designates this
|
||||
# particular file as subject to the "Classpath" exception as provided
|
||||
# by Oracle in the LICENSE file that accompanied this code.
|
||||
# published by the Free Software Foundation.
|
||||
#
|
||||
# This code is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user