mirror of
https://github.com/JetBrains/JetBrainsRuntime.git
synced 2025-12-17 14:59:41 +01:00
Compare commits
1193 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3d679087b0 | ||
|
|
0b3a303053 | ||
|
|
8ba0db0de8 | ||
|
|
7690a45f77 | ||
|
|
2826d17025 | ||
|
|
4cc75be80e | ||
|
|
eb9e04598d | ||
|
|
134c3ef41e | ||
|
|
7fcce27096 | ||
|
|
85996572b6 | ||
|
|
85715e1050 | ||
|
|
fdc11a1569 | ||
|
|
4e2a85f750 | ||
|
|
7a3025e3d7 | ||
|
|
af18ff8d7c | ||
|
|
34c3ac0316 | ||
|
|
5cd7721ad4 | ||
|
|
c968a672c0 | ||
|
|
385c132989 | ||
|
|
46ae1ee871 | ||
|
|
703d930e4d | ||
|
|
4d4e51c41f | ||
|
|
edae355e95 | ||
|
|
33244c8244 | ||
|
|
5c9f60dc5a | ||
|
|
1d3364b007 | ||
|
|
f3de386263 | ||
|
|
9e3fa3216f | ||
|
|
b7b01d6f56 | ||
|
|
2705e880b6 | ||
|
|
8ab8d02e40 | ||
|
|
af9b9050ec | ||
|
|
53b3e0567d | ||
|
|
8cd4e7d856 | ||
|
|
f96403986b | ||
|
|
24a734938e | ||
|
|
a12e9fcebd | ||
|
|
cc6d34b2fa | ||
|
|
b653ae92d5 | ||
|
|
f10c85fbc3 | ||
|
|
0632617670 | ||
|
|
a1ab12b772 | ||
|
|
a25dde6279 | ||
|
|
002f936ef2 | ||
|
|
4fc917c250 | ||
|
|
f51e442b0e | ||
|
|
cfb809344c | ||
|
|
e16c510071 | ||
|
|
67bb22f3d6 | ||
|
|
ecfba66d3d | ||
|
|
680bf75898 | ||
|
|
0aee7bf24d | ||
|
|
4ec63e8f5d | ||
|
|
81a1e8e136 | ||
|
|
56e37352d5 | ||
|
|
3e68d7d99f | ||
|
|
85441cec35 | ||
|
|
cb58e6560a | ||
|
|
55af9d8380 | ||
|
|
323b02016e | ||
|
|
48831c65b5 | ||
|
|
ab12fbfda2 | ||
|
|
6765a9d775 | ||
|
|
166ef5e7b1 | ||
|
|
bcff857ba0 | ||
|
|
03c54d4288 | ||
|
|
a272696813 | ||
|
|
5e423e034f | ||
|
|
bea2b029a7 | ||
|
|
051f39e12c | ||
|
|
fb1924d2e3 | ||
|
|
f9dc640ef0 | ||
|
|
b0ca9bf61e | ||
|
|
8a6b8751e1 | ||
|
|
14a40fd579 | ||
|
|
6bb15a542b | ||
|
|
e8c7d2aaf3 | ||
|
|
dbf4ffffe3 | ||
|
|
cdc8b5eb83 | ||
|
|
1ebe949507 | ||
|
|
b674a42553 | ||
|
|
3824c7cd06 | ||
|
|
4ab2b5bdb4 | ||
|
|
e2a503e26e | ||
|
|
c6c451ac39 | ||
|
|
a17058b5bb | ||
|
|
9cca4f7c76 | ||
|
|
9f4d5b2398 | ||
|
|
ceacf6f785 | ||
|
|
1e90af08ab | ||
|
|
33794d1614 | ||
|
|
124fcf1d9a | ||
|
|
0dad3f1ae8 | ||
|
|
e6fa8aae61 | ||
|
|
a2f8d3c4c2 | ||
|
|
0d7f8f83c7 | ||
|
|
40a602520b | ||
|
|
b7b64bb6c8 | ||
|
|
581070715a | ||
|
|
945aaf8932 | ||
|
|
1dc1d56f79 | ||
|
|
8520fd3f6a | ||
|
|
f90d520308 | ||
|
|
79a1a98cab | ||
|
|
e190355777 | ||
|
|
80873a09bf | ||
|
|
8c50bed867 | ||
|
|
53d4e928ef | ||
|
|
ab9f70dd5a | ||
|
|
986ecff5f9 | ||
|
|
1495dd94e9 | ||
|
|
222ae365c8 | ||
|
|
49fd6a0cb4 | ||
|
|
2527e9e58d | ||
|
|
a03302d41b | ||
|
|
62bc7b7c42 | ||
|
|
90a2db1ecb | ||
|
|
4d1dfabcb4 | ||
|
|
f4d73d2a3d | ||
|
|
11743b1ed3 | ||
|
|
ed62bda2e0 | ||
|
|
02dd21196e | ||
|
|
becc35f287 | ||
|
|
431f467246 | ||
|
|
8d236615b7 | ||
|
|
e3b36e3bab | ||
|
|
a40afdd08f | ||
|
|
d5935af228 | ||
|
|
3abaa83610 | ||
|
|
2a5f149bb8 | ||
|
|
3b2f3e53d7 | ||
|
|
6dda2f6fad | ||
|
|
7c70e73414 | ||
|
|
8c4090c2cf | ||
|
|
e268563a10 | ||
|
|
5052a7eee5 | ||
|
|
b50c11f907 | ||
|
|
991ac9e616 | ||
|
|
80fb7088a1 | ||
|
|
0d85f076cc | ||
|
|
c935d1ce1c | ||
|
|
48ba8ed243 | ||
|
|
ecf05ca541 | ||
|
|
444a8fa14e | ||
|
|
a029245a4e | ||
|
|
710354369e | ||
|
|
1feb9bd559 | ||
|
|
eea50fbc1b | ||
|
|
31847149c1 | ||
|
|
e66ed4d729 | ||
|
|
ef7872cc31 | ||
|
|
523bc77981 | ||
|
|
af532cc1b2 | ||
|
|
d19eab4f08 | ||
|
|
3fb9246af9 | ||
|
|
55e7af0560 | ||
|
|
efb81dafaf | ||
|
|
8f11d83a01 | ||
|
|
f58d612b61 | ||
|
|
b06459d3a8 | ||
|
|
99223eea03 | ||
|
|
5110d54d93 | ||
|
|
98af18921a | ||
|
|
7f0cd6488b | ||
|
|
fc77e7600f | ||
|
|
dacd9af9a0 | ||
|
|
56713817c0 | ||
|
|
fe4c7a0429 | ||
|
|
3ca44c8dea | ||
|
|
48f70d7ad8 | ||
|
|
a9f3cb23d1 | ||
|
|
d5d94db12a | ||
|
|
dbac620b99 | ||
|
|
a6e2a329a0 | ||
|
|
ba90ccc6a8 | ||
|
|
86f48ab559 | ||
|
|
12dc568b3d | ||
|
|
685da0323b | ||
|
|
2894240602 | ||
|
|
a668f437e4 | ||
|
|
2427c901b3 | ||
|
|
80ab094a75 | ||
|
|
bdc39818ce | ||
|
|
9339a6a232 | ||
|
|
12e6a0b6d0 | ||
|
|
0e7399318b | ||
|
|
f23c150709 | ||
|
|
d4ce630cea | ||
|
|
849570a94a | ||
|
|
d594ef3a3e | ||
|
|
ae9607725c | ||
|
|
937d61bfba | ||
|
|
86d6a2e05e | ||
|
|
a2da75a6b6 | ||
|
|
b8cdf31a2e | ||
|
|
05da2137f1 | ||
|
|
9f70965bb9 | ||
|
|
aaac8c0636 | ||
|
|
33d00a77f3 | ||
|
|
8c6d12250b | ||
|
|
452b052fe3 | ||
|
|
993babb326 | ||
|
|
8051aaf068 | ||
|
|
afa8e79ba1 | ||
|
|
22ae137400 | ||
|
|
79d8a34a92 | ||
|
|
8f864fd563 | ||
|
|
5c78c7cd83 | ||
|
|
b0f5b23ed2 | ||
|
|
a5a2340054 | ||
|
|
7469a274bb | ||
|
|
d06c66f7f5 | ||
|
|
ab1f2af4f0 | ||
|
|
57df267e42 | ||
|
|
443b172638 | ||
|
|
501e6aed44 | ||
|
|
075ddef831 | ||
|
|
bd4c0f4a7d | ||
|
|
f1c0b4ed72 | ||
|
|
b43c2c6635 | ||
|
|
79cea6dd17 | ||
|
|
1d53ac30f1 | ||
|
|
124575b4c2 | ||
|
|
32df2d17f3 | ||
|
|
19f0755c48 | ||
|
|
0ca38bdc4d | ||
|
|
b39c73696d | ||
|
|
88c3979367 | ||
|
|
aaff9dec24 | ||
|
|
0d54329304 | ||
|
|
1aca920f59 | ||
|
|
82289f6559 | ||
|
|
1ff73cb2ec | ||
|
|
69645fd4ba | ||
|
|
23670fd418 | ||
|
|
b426151a33 | ||
|
|
c755345177 | ||
|
|
c203e7093e | ||
|
|
2b44ed7070 | ||
|
|
6a480ad07a | ||
|
|
caaef3a04c | ||
|
|
173dedfb24 | ||
|
|
aae13af04b | ||
|
|
22d3a6dd34 | ||
|
|
28602f3d3e | ||
|
|
3641c32c11 | ||
|
|
2ae3ea2ad9 | ||
|
|
68abf76e90 | ||
|
|
5013d69d96 | ||
|
|
e38c6f9827 | ||
|
|
deec6aa76d | ||
|
|
e5ec464120 | ||
|
|
98e64cffff | ||
|
|
e7d2a52d35 | ||
|
|
0f7c0e956e | ||
|
|
e5077660c4 | ||
|
|
21efd25c11 | ||
|
|
a629424248 | ||
|
|
1a7ac16d23 | ||
|
|
63faa50428 | ||
|
|
040cc7aee0 | ||
|
|
d24449f696 | ||
|
|
45726a1f8b | ||
|
|
5cc8673841 | ||
|
|
57434c73ea | ||
|
|
28bd29f396 | ||
|
|
7fa501e398 | ||
|
|
d99fb09a20 | ||
|
|
1f0dfdbcca | ||
|
|
0b8ae26028 | ||
|
|
15601b4718 | ||
|
|
58e7581527 | ||
|
|
09aad0aea8 | ||
|
|
7b9969dc8f | ||
|
|
f28f618972 | ||
|
|
603526b55b | ||
|
|
c01b4fc348 | ||
|
|
ae0dac43c0 | ||
|
|
19882220ec | ||
|
|
e916ce8ce9 | ||
|
|
dba0d54505 | ||
|
|
f5f414f9fc | ||
|
|
e1c58f858a | ||
|
|
f0498c2aed | ||
|
|
8e44856992 | ||
|
|
558d06399c | ||
|
|
584137cf96 | ||
|
|
3468c6e5ef | ||
|
|
52747256bb | ||
|
|
11eccfc85f | ||
|
|
bdf9834b81 | ||
|
|
d757246823 | ||
|
|
cf70cb70bc | ||
|
|
fb651fd6d2 | ||
|
|
1548ac4f54 | ||
|
|
02fe095d29 | ||
|
|
a3fd4248b7 | ||
|
|
f61b247fe3 | ||
|
|
ed260e8cae | ||
|
|
f0e706698d | ||
|
|
9439d76309 | ||
|
|
b735ef99b2 | ||
|
|
5ede5b47d4 | ||
|
|
5febc4e3bb | ||
|
|
a7c0f4b845 | ||
|
|
c74c60fb8b | ||
|
|
78d50c0215 | ||
|
|
2e06a91765 | ||
|
|
ecab52c09b | ||
|
|
ed7d5fe840 | ||
|
|
be6c15ecb4 | ||
|
|
9041f4c47f | ||
|
|
3e60ab51fe | ||
|
|
5ca8d7c2a7 | ||
|
|
ebf5ae8435 | ||
|
|
e912977a66 | ||
|
|
1383b8ef87 | ||
|
|
51d710e3cc | ||
|
|
908f3c9697 | ||
|
|
169d145e99 | ||
|
|
70f3469310 | ||
|
|
9c338f6f87 | ||
|
|
4ffd2a8aa4 | ||
|
|
c220a6c7bb | ||
|
|
40bc083267 | ||
|
|
320235ccb8 | ||
|
|
b453eb63c6 | ||
|
|
506625b768 | ||
|
|
640b71da48 | ||
|
|
eca2032c06 | ||
|
|
95577ca97f | ||
|
|
55e7494dee | ||
|
|
3bbaa772b0 | ||
|
|
0858743dee | ||
|
|
884076f6e2 | ||
|
|
024292ac4d | ||
|
|
0755477c9a | ||
|
|
4ed268ff9a | ||
|
|
0b2d0817f1 | ||
|
|
999761d0f6 | ||
|
|
812434c420 | ||
|
|
626bea80ab | ||
|
|
4c80780f6a | ||
|
|
655dc516c2 | ||
|
|
f2f7a490c0 | ||
|
|
e04a310375 | ||
|
|
ec7361e082 | ||
|
|
a0053012a4 | ||
|
|
bad38a0f92 | ||
|
|
285adff24e | ||
|
|
c9ecedd226 | ||
|
|
2a16cc890b | ||
|
|
81c6ed3882 | ||
|
|
c1198bba0e | ||
|
|
a42ba1ff1a | ||
|
|
6e91ccd1c3 | ||
|
|
2b756ab1e8 | ||
|
|
ca753ebad6 | ||
|
|
190e113031 | ||
|
|
166ea12d73 | ||
|
|
e7ca8c7d55 | ||
|
|
f364fcab79 | ||
|
|
bd65d483df | ||
|
|
57210af9bc | ||
|
|
a70521c62e | ||
|
|
b023fea062 | ||
|
|
b69a3849b2 | ||
|
|
6e760b9b74 | ||
|
|
39a3652968 | ||
|
|
08db4b9962 | ||
|
|
dbae90c950 | ||
|
|
059b49b955 | ||
|
|
b6d5f49b8d | ||
|
|
5856dc34c8 | ||
|
|
fa2eb61648 | ||
|
|
e3aeebec17 | ||
|
|
6fb6f3d39b | ||
|
|
44b19c01ac | ||
|
|
a65f200220 | ||
|
|
8c363b3e3e | ||
|
|
c5cbcac828 | ||
|
|
dccca0fb7a | ||
|
|
ba23105231 | ||
|
|
26ccb3cef1 | ||
|
|
b0f98df75a | ||
|
|
dd113c8df0 | ||
|
|
41520998aa | ||
|
|
98f54d90ea | ||
|
|
7698c373a6 | ||
|
|
e320162815 | ||
|
|
3e3298509f | ||
|
|
a6be228642 | ||
|
|
c22e01d776 | ||
|
|
9dcc502cc8 | ||
|
|
9c266ae83c | ||
|
|
9660320041 | ||
|
|
4680dc9831 | ||
|
|
ecbdd3405a | ||
|
|
38a261415d | ||
|
|
899e13f40a | ||
|
|
001aaa1e49 | ||
|
|
f3b34d32d6 | ||
|
|
e77cdd93ea | ||
|
|
72e22b4de5 | ||
|
|
25480f0011 | ||
|
|
636c61a386 | ||
|
|
87d734012e | ||
|
|
d023982600 | ||
|
|
4c03e5938d | ||
|
|
ad0fd13f20 | ||
|
|
a382996bb4 | ||
|
|
391ea15118 | ||
|
|
19a76a45e9 | ||
|
|
95b7a8b3e3 | ||
|
|
16e461ef31 | ||
|
|
3c0eed8e47 | ||
|
|
f155f7d6e5 | ||
|
|
b81f4faed7 | ||
|
|
5a442197d2 | ||
|
|
db12f1934a | ||
|
|
d78fa5a9f6 | ||
|
|
72d3a2a977 | ||
|
|
6927fc3904 | ||
|
|
9593730a23 | ||
|
|
8cd79752c6 | ||
|
|
958383d69c | ||
|
|
e9e331b2a9 | ||
|
|
bdb1646a1e | ||
|
|
23985c29b4 | ||
|
|
0ad919c1e5 | ||
|
|
43cfd80c1c | ||
|
|
a60e523f88 | ||
|
|
fd766b27b9 | ||
|
|
8b5bb01355 | ||
|
|
1fc0b01601 | ||
|
|
0c39228ec1 | ||
|
|
10762d408b | ||
|
|
f28126ebc2 | ||
|
|
c31f4861fb | ||
|
|
15e8609a2c | ||
|
|
022e29a775 | ||
|
|
e13b4c8de9 | ||
|
|
f83454cd61 | ||
|
|
8ad1fcc48a | ||
|
|
c1c0155604 | ||
|
|
cd50d78d44 | ||
|
|
241808e13f | ||
|
|
1b3e23110b | ||
|
|
a26a6f3152 | ||
|
|
47017e3864 | ||
|
|
bcca5cee2d | ||
|
|
198782c957 | ||
|
|
d0624f8b62 | ||
|
|
4c9eaddaef | ||
|
|
c71be802b5 | ||
|
|
b8acbc3ed8 | ||
|
|
244e6293c3 | ||
|
|
c0e6ffabc2 | ||
|
|
5116d9e5fe | ||
|
|
78117eff56 | ||
|
|
02e187119d | ||
|
|
90ea42f716 | ||
|
|
e29346dbd6 | ||
|
|
e606278fc8 | ||
|
|
83953c458e | ||
|
|
bc3d865640 | ||
|
|
8d73fe91bc | ||
|
|
c56fb0b6ef | ||
|
|
487cc3c5be | ||
|
|
078d0d4968 | ||
|
|
7e484e2a63 | ||
|
|
f95af744b0 | ||
|
|
72d1066ae3 | ||
|
|
0ceb366dc2 | ||
|
|
9dffbc9c4c | ||
|
|
e304d37996 | ||
|
|
8d529bc4f3 | ||
|
|
ca41644538 | ||
|
|
6656e767db | ||
|
|
68a35511eb | ||
|
|
d906e45026 | ||
|
|
8a571ee7f2 | ||
|
|
ba0ae4cb28 | ||
|
|
df736eb582 | ||
|
|
d25b9befe0 | ||
|
|
67ba8b45dd | ||
|
|
febd4b26b2 | ||
|
|
c0c7d39b59 | ||
|
|
6b360ac99a | ||
|
|
0f4c3dc944 | ||
|
|
84a4a3647c | ||
|
|
f96b6bcd4d | ||
|
|
dc4d9b4849 | ||
|
|
da3a5da81b | ||
|
|
0d0d93e8f6 | ||
|
|
d1e362e9a8 | ||
|
|
05f8a6fca8 | ||
|
|
b5f450a599 | ||
|
|
6c52b73465 | ||
|
|
567c0c9335 | ||
|
|
fc4755535d | ||
|
|
a9f3d3a290 | ||
|
|
500462fb69 | ||
|
|
68a4396dbc | ||
|
|
da0d9598d0 | ||
|
|
b96b9c3d5b | ||
|
|
3bc449797e | ||
|
|
cf5a25538e | ||
|
|
ea7e943874 | ||
|
|
3387b3195c | ||
|
|
8269fdc78e | ||
|
|
57553ca1db | ||
|
|
158e59ab91 | ||
|
|
1a206d2a6c | ||
|
|
a5e0c9d0c5 | ||
|
|
819de07117 | ||
|
|
f40381e41d | ||
|
|
e801e51311 | ||
|
|
7ea08d3928 | ||
|
|
8e921aee5a | ||
|
|
6d0bbc8a18 | ||
|
|
ee3665bca0 | ||
|
|
2ba8a06f0c | ||
|
|
8ac4a88f3c | ||
|
|
6c5804722b | ||
|
|
812bd8e94d | ||
|
|
7fbeede14c | ||
|
|
d80b5c8728 | ||
|
|
7d63c9fa4d | ||
|
|
beda14e3cb | ||
|
|
ae11d8f446 | ||
|
|
e82d7f5810 | ||
|
|
577ac0610a | ||
|
|
c9b8bd6ff4 | ||
|
|
913d318c97 | ||
|
|
724e8c076e | ||
|
|
e0e82066fe | ||
|
|
443afdc77f | ||
|
|
fe09e93b8f | ||
|
|
d19442399c | ||
|
|
c4fbfa2103 | ||
|
|
1b9efaa11e | ||
|
|
b2b56cfc00 | ||
|
|
53d152e7db | ||
|
|
d4705947d8 | ||
|
|
5f357fa27d | ||
|
|
e544cd9920 | ||
|
|
458f033d4d | ||
|
|
3f21c8bd1f | ||
|
|
ddb64836e5 | ||
|
|
8ed214f3b1 | ||
|
|
b9f7caed77 | ||
|
|
ebb7f5d39b | ||
|
|
05c63e8009 | ||
|
|
559795b0eb | ||
|
|
413ac74ecc | ||
|
|
3bdac53178 | ||
|
|
57d02d9ac5 | ||
|
|
a2e86ff3c5 | ||
|
|
e2feff8599 | ||
|
|
16da81eb43 | ||
|
|
c851735631 | ||
|
|
317dacc308 | ||
|
|
a6fb87dbe8 | ||
|
|
7af3cd9558 | ||
|
|
4da1c9df52 | ||
|
|
302508df9e | ||
|
|
c6d64edfbe | ||
|
|
1be412dca0 | ||
|
|
164d0368f6 | ||
|
|
c671089d6e | ||
|
|
3488f53d2c | ||
|
|
330ee87131 | ||
|
|
d5d311f026 | ||
|
|
ea754316fd | ||
|
|
c239c0ab00 | ||
|
|
0226c0298f | ||
|
|
965b68107f | ||
|
|
a34994476e | ||
|
|
2202156acc | ||
|
|
3fe0d29ec3 | ||
|
|
28297411b1 | ||
|
|
4669005123 | ||
|
|
3e4e5dd06f | ||
|
|
ea0b49c36d | ||
|
|
fe4d7f8c1b | ||
|
|
f53d0519b9 | ||
|
|
70ebb5e8c9 | ||
|
|
b4028c91d5 | ||
|
|
08b0b34623 | ||
|
|
7bf4c608e7 | ||
|
|
b7703f7948 | ||
|
|
d25ad881eb | ||
|
|
011de4c894 | ||
|
|
3e2d12d85a | ||
|
|
bdc1ef2021 | ||
|
|
af5932efb5 | ||
|
|
3b0da29879 | ||
|
|
e307b5cca8 | ||
|
|
4189fcbac4 | ||
|
|
3263361a28 | ||
|
|
8fcbb110e9 | ||
|
|
de59da27a6 | ||
|
|
d288ca28be | ||
|
|
e756c0dbbb | ||
|
|
89fe586edd | ||
|
|
9e209fef86 | ||
|
|
75ff7e15fe | ||
|
|
06fdb61e1c | ||
|
|
41c94eed37 | ||
|
|
518d5f4bbb | ||
|
|
f79bd54bbb | ||
|
|
52155dbbb0 | ||
|
|
ac9e51023f | ||
|
|
971ea23c95 | ||
|
|
4e53a9d9df | ||
|
|
8477630970 | ||
|
|
2f1aed2a16 | ||
|
|
67e93281a4 | ||
|
|
ed9066bdf4 | ||
|
|
7a22b76b73 | ||
|
|
0ba2942c6e | ||
|
|
fc8038441d | ||
|
|
b746701e57 | ||
|
|
2da0cdadb8 | ||
|
|
ad510fb25e | ||
|
|
2292246f8c | ||
|
|
03e9ea169b | ||
|
|
594c080b2b | ||
|
|
e6ebefaa40 | ||
|
|
38cd860daa | ||
|
|
743c821289 | ||
|
|
b02c125676 | ||
|
|
06f9ff047f | ||
|
|
e6ac956a7a | ||
|
|
9f796da377 | ||
|
|
ceb0c0fc39 | ||
|
|
5160cfb496 | ||
|
|
0735dc27c7 | ||
|
|
79f9d8d832 | ||
|
|
4994bd5942 | ||
|
|
016694bf74 | ||
|
|
5540a7859b | ||
|
|
aae9902234 | ||
|
|
ea6674fec8 | ||
|
|
d714b5d3da | ||
|
|
ce02836232 | ||
|
|
ac141c2fa1 | ||
|
|
ed70910b0f | ||
|
|
f155661151 | ||
|
|
c68697e178 | ||
|
|
dccb1782ec | ||
|
|
699b8112f8 | ||
|
|
0385975f44 | ||
|
|
7d7d308d9a | ||
|
|
eceb3bbc80 | ||
|
|
3acdba38ce | ||
|
|
523993e9e8 | ||
|
|
b8da9695f0 | ||
|
|
48ba9d415f | ||
|
|
9dd93c6a2c | ||
|
|
f8c8bcf4fd | ||
|
|
15b5b54ac7 | ||
|
|
644e400cd1 | ||
|
|
fd7f78a535 | ||
|
|
1b94a3466e | ||
|
|
13bab09bff | ||
|
|
8f1bb59e1a | ||
|
|
1bd683b588 | ||
|
|
37b70707bd | ||
|
|
62a58062e5 | ||
|
|
9609f57cef | ||
|
|
441dbde2c3 | ||
|
|
ee0bcc5526 | ||
|
|
ceb51d4444 | ||
|
|
d83346dcff | ||
|
|
9334fe2eca | ||
|
|
03230f8565 | ||
|
|
a3843e8e6e | ||
|
|
60c29ff57b | ||
|
|
30d2003698 | ||
|
|
9dc62825b5 | ||
|
|
6949e34575 | ||
|
|
7da274ded4 | ||
|
|
4e0b03580d | ||
|
|
a23987fecb | ||
|
|
04c0b130f0 | ||
|
|
cab515962b | ||
|
|
bd55d7a495 | ||
|
|
2b11a28997 | ||
|
|
5ed72775a7 | ||
|
|
dc08cf016e | ||
|
|
ea774b74e8 | ||
|
|
365660e667 | ||
|
|
1d73f8842a | ||
|
|
cb9358b561 | ||
|
|
bc9ece9698 | ||
|
|
1cde536b98 | ||
|
|
1a6cbe421f | ||
|
|
3fd89be6d1 | ||
|
|
18190519e7 | ||
|
|
be0161a8e6 | ||
|
|
bc72f476d1 | ||
|
|
a65d9532ed | ||
|
|
20b5f09777 | ||
|
|
3b44d7bfa4 | ||
|
|
8193856af8 | ||
|
|
10ae602944 | ||
|
|
770d2b41d1 | ||
|
|
70c1ff7e15 | ||
|
|
6ed81641b1 | ||
|
|
5e4a2ead71 | ||
|
|
b787ad6f69 | ||
|
|
6b4a5ef105 | ||
|
|
9f7dc19ffd | ||
|
|
805f1deebc | ||
|
|
b85440d085 | ||
|
|
fd2ee0844a | ||
|
|
27c58c06cf | ||
|
|
cbb3d23e19 | ||
|
|
6e368e0c69 | ||
|
|
e1b2229b0b | ||
|
|
bdd37b0e5e | ||
|
|
5ddeb56759 | ||
|
|
a5c9bc7032 | ||
|
|
5fd2b7d61a | ||
|
|
9bef2d1610 | ||
|
|
6fc032de2c | ||
|
|
413c6bd040 | ||
|
|
2eaddd5b0a | ||
|
|
7db8bff9e1 | ||
|
|
5ad102ca3f | ||
|
|
a56cd371a2 | ||
|
|
d3429ada8f | ||
|
|
db3f6eabb5 | ||
|
|
017dc093ac | ||
|
|
1d8cca2b84 | ||
|
|
eefbfdce31 | ||
|
|
401af27b9d | ||
|
|
38af17d078 | ||
|
|
820263e48a | ||
|
|
b65fdf5af0 | ||
|
|
d2082c58ff | ||
|
|
563e876246 | ||
|
|
c70258ca1c | ||
|
|
9697e5bf74 | ||
|
|
c9ecc82666 | ||
|
|
bf225c201f | ||
|
|
e5ab210713 | ||
|
|
18c2e40de7 | ||
|
|
40d159d4a9 | ||
|
|
25e509b0db | ||
|
|
0acd065bf5 | ||
|
|
f36147b326 | ||
|
|
5cf672e778 | ||
|
|
a10ee46e6d | ||
|
|
6cff49c0fe | ||
|
|
ebb1095805 | ||
|
|
bcd86d575f | ||
|
|
5edd546585 | ||
|
|
a531c9aece | ||
|
|
99c299f098 | ||
|
|
272e66d017 | ||
|
|
14c79be161 | ||
|
|
7c34bdf73c | ||
|
|
0029554d20 | ||
|
|
77bd417c99 | ||
|
|
bc828c8fb6 | ||
|
|
917d0182cb | ||
|
|
3bacf7ea85 | ||
|
|
4a351e3e57 | ||
|
|
189017f750 | ||
|
|
3f59eae3d0 | ||
|
|
46988e1073 | ||
|
|
f7e8d255cc | ||
|
|
26b002805a | ||
|
|
8c00c374ec | ||
|
|
59bec29c35 | ||
|
|
a86dd56de3 | ||
|
|
76442f39b9 | ||
|
|
445e5ecd98 | ||
|
|
3ffc5b9ef7 | ||
|
|
529049be6b | ||
|
|
eddfc6449f | ||
|
|
2e7e272d7b | ||
|
|
ee0d309bbd | ||
|
|
2300a212dd | ||
|
|
3d74cbe0ac | ||
|
|
f5afbbd32a | ||
|
|
cbc7090b91 | ||
|
|
f735275021 | ||
|
|
3d37c4e37a | ||
|
|
73ab54e4c3 | ||
|
|
80662a485a | ||
|
|
c118543efe | ||
|
|
13e0f99626 | ||
|
|
bf3cfbeff4 | ||
|
|
2a53f5a5c2 | ||
|
|
f67e435431 | ||
|
|
c28bb8bf7a | ||
|
|
518536c607 | ||
|
|
0f7808f333 | ||
|
|
c9bea77342 | ||
|
|
6681fc72d3 | ||
|
|
7282f68cee | ||
|
|
6e203384f8 | ||
|
|
6249259c80 | ||
|
|
a41d35073e | ||
|
|
7daf9813c0 | ||
|
|
a201be8555 | ||
|
|
db4b4a5b35 | ||
|
|
d886ae12a2 | ||
|
|
eec04dd010 | ||
|
|
a9bd1ad40c | ||
|
|
b1fa1ecc98 | ||
|
|
83feb7a238 | ||
|
|
963b83fcf1 | ||
|
|
68b27b88b5 | ||
|
|
e0245682c8 | ||
|
|
4761479608 | ||
|
|
fe26467633 | ||
|
|
e2c5d03546 | ||
|
|
19bb6ebfaf | ||
|
|
54e37629f6 | ||
|
|
974ad4e8cd | ||
|
|
117f0b4051 | ||
|
|
dedcce0450 | ||
|
|
03526e250d | ||
|
|
1de2acea77 | ||
|
|
fa32bfe113 | ||
|
|
91df797879 | ||
|
|
92712ef45d | ||
|
|
5850bf4488 | ||
|
|
853319439e | ||
|
|
63e08d4af7 | ||
|
|
5c67e3d6e5 | ||
|
|
2349304bb1 | ||
|
|
0bd2f9cba2 | ||
|
|
27e6a4d2f7 | ||
|
|
1934bd8d2c | ||
|
|
7b255b8a62 | ||
|
|
310ef85667 | ||
|
|
5205eae6ff | ||
|
|
bbc5c98b14 | ||
|
|
563a3358f6 | ||
|
|
ec7c6be6a9 | ||
|
|
197fde5363 | ||
|
|
ec3bb93d79 | ||
|
|
39c9de2ace | ||
|
|
05c9eec8d0 | ||
|
|
fea73c1d40 | ||
|
|
afb4a1be9e | ||
|
|
7c13a2cd9a | ||
|
|
4df9c87345 | ||
|
|
9449fea2cd | ||
|
|
1fa772e814 | ||
|
|
8ad4836883 | ||
|
|
d75ea7e679 | ||
|
|
e9a434165a | ||
|
|
45300dd123 | ||
|
|
44cff9d6ab | ||
|
|
3bcbcc5747 | ||
|
|
f3e0588d0b | ||
|
|
f2d2eef988 | ||
|
|
1c560727b8 | ||
|
|
f153e415d7 | ||
|
|
fba74f796e | ||
|
|
56ebb8c1b9 | ||
|
|
5cf349c3b0 | ||
|
|
21f2e9a71c | ||
|
|
854de8c9c6 | ||
|
|
16af473397 | ||
|
|
da0a51ce97 | ||
|
|
566279af49 | ||
|
|
77e69e02eb | ||
|
|
dcc7254a38 | ||
|
|
003be0dee2 | ||
|
|
2d9f0324ba | ||
|
|
25ed36f3ef | ||
|
|
a2315ddd2a | ||
|
|
66836d40b8 | ||
|
|
3daa03c30f | ||
|
|
24117c6e9a | ||
|
|
5e40fb6bda | ||
|
|
2528c620a6 | ||
|
|
1be29bd725 | ||
|
|
2f683fdc4a | ||
|
|
c75df634be | ||
|
|
fd13e1ce98 | ||
|
|
6c9236c80c | ||
|
|
1926aeb1a3 | ||
|
|
74822ce12a | ||
|
|
ea86a20e6d | ||
|
|
5e30bf6835 | ||
|
|
c50370599e | ||
|
|
c460f842bf | ||
|
|
549b875866 | ||
|
|
832bfbc0dd | ||
|
|
3066a67e62 | ||
|
|
ce9986991d | ||
|
|
eac8f5d2c9 | ||
|
|
2304044ab2 | ||
|
|
0f1cd987b3 | ||
|
|
1ac7489874 | ||
|
|
055d2ffa69 | ||
|
|
2bff8e0a13 | ||
|
|
c6448dc3af | ||
|
|
1703915d3f | ||
|
|
a910b20b51 | ||
|
|
7d7e60c8ae | ||
|
|
534d2b33dc | ||
|
|
e9a62d79cd | ||
|
|
13a3927855 | ||
|
|
282ee40a56 | ||
|
|
e7a450038a | ||
|
|
38f59f84c9 | ||
|
|
e1681c4828 | ||
|
|
e138297323 | ||
|
|
7583a7b857 | ||
|
|
e85c7d09df | ||
|
|
eec1153993 | ||
|
|
fc739fee53 | ||
|
|
aeca49e43f | ||
|
|
54c95cf226 | ||
|
|
cd6caedd0a | ||
|
|
b32ccf2cb2 | ||
|
|
0572b6ece7 | ||
|
|
d1052c70cb | ||
|
|
61a590e9be | ||
|
|
9d518b3213 | ||
|
|
1dda79cfab | ||
|
|
aa1911191c | ||
|
|
00adbbe553 | ||
|
|
c2d76f9844 | ||
|
|
4dd1b3a610 | ||
|
|
240541e1c1 | ||
|
|
a23de2ec09 | ||
|
|
3525a40f39 | ||
|
|
712d866b72 | ||
|
|
da7080fffb | ||
|
|
4edf791aec | ||
|
|
12196baf67 | ||
|
|
a471fe992f | ||
|
|
839cede1a4 | ||
|
|
ecd2d83096 | ||
|
|
d8f9b188fa | ||
|
|
aa26cede63 | ||
|
|
20e983a97c | ||
|
|
97ec9d3e0a | ||
|
|
01b15bc1f9 | ||
|
|
6d05a1d3f4 | ||
|
|
8ea544c33f | ||
|
|
334683e634 | ||
|
|
20e0055e20 | ||
|
|
83fe688d80 | ||
|
|
a49ecb26c5 | ||
|
|
7f702cf483 | ||
|
|
bd666f90eb | ||
|
|
a0c3efa6a8 | ||
|
|
7576064a10 | ||
|
|
8df6b2c4a3 | ||
|
|
ff24088c86 | ||
|
|
5a1301df19 | ||
|
|
5039b42de1 | ||
|
|
1ca008fd02 | ||
|
|
cf75f1f9c6 | ||
|
|
52526080ba | ||
|
|
f799cf180a | ||
|
|
56c75453cd | ||
|
|
7447276475 | ||
|
|
c90c31b07e | ||
|
|
52c6044fe4 | ||
|
|
4e1bf31368 | ||
|
|
878497fb85 | ||
|
|
f2ef809719 | ||
|
|
1fa090524a | ||
|
|
f71d64fbeb | ||
|
|
850bc20306 | ||
|
|
75ce44aa84 | ||
|
|
5c4f92ba9a | ||
|
|
263e32bb85 | ||
|
|
7d6c902ce8 | ||
|
|
5091057614 | ||
|
|
ba0c12231b | ||
|
|
cbcf401170 | ||
|
|
f8de5bc582 | ||
|
|
9a726df373 | ||
|
|
2af869b193 | ||
|
|
5c1f77fab1 | ||
|
|
54acadbe66 | ||
|
|
0514cee6c8 | ||
|
|
28e96e333b | ||
|
|
f5201ac117 | ||
|
|
a3609ba5ac | ||
|
|
116b8543b0 | ||
|
|
fdfc557878 | ||
|
|
54fec2b98b | ||
|
|
03d66d9ee2 | ||
|
|
f6ff38ab42 | ||
|
|
dbbfa76b73 | ||
|
|
9af36b13c5 | ||
|
|
34412da52b | ||
|
|
a350a1115a | ||
|
|
bcad87eacb | ||
|
|
2a70a6dc58 | ||
|
|
6df0f5e390 | ||
|
|
9c3eaa49f7 | ||
|
|
dfcea0547e | ||
|
|
c748d358b2 | ||
|
|
72679c94ee | ||
|
|
10e6eec9e6 | ||
|
|
251f2ac785 | ||
|
|
fe7ec31259 | ||
|
|
516197f50b | ||
|
|
ad1033d68f | ||
|
|
c220b1358c | ||
|
|
9ae39b62b9 | ||
|
|
3d35b408e1 | ||
|
|
de34bb8e66 | ||
|
|
620df7ec34 | ||
|
|
6b4393917a | ||
|
|
81985d422d | ||
|
|
d627282f0c | ||
|
|
96f71a9a6b | ||
|
|
17cf49746d | ||
|
|
c6ab63d306 | ||
|
|
ff54a6493a | ||
|
|
c11f36e620 | ||
|
|
8f121a173c | ||
|
|
33970629ac | ||
|
|
c51bed739d | ||
|
|
a6464b74a8 | ||
|
|
0dd50dbb3e | ||
|
|
dec42bebb8 | ||
|
|
2fe1298447 | ||
|
|
2e3bdec985 | ||
|
|
c4fb00a7be | ||
|
|
01d4b772de | ||
|
|
c7125aa2af | ||
|
|
0dce98b716 | ||
|
|
08b1fa4cb3 | ||
|
|
23e1e2ff4a | ||
|
|
5a62e99523 | ||
|
|
982064e50c | ||
|
|
b52af182c4 | ||
|
|
7bc0d82450 | ||
|
|
b7fcd0b235 | ||
|
|
984d7f9cdf | ||
|
|
42d3604a31 | ||
|
|
cf78925859 | ||
|
|
ba32b78bfa | ||
|
|
547ce03016 | ||
|
|
f07f5ce984 | ||
|
|
cabd7c1f7a | ||
|
|
57266064a7 | ||
|
|
2b94b70ef5 | ||
|
|
1130c1bc33 | ||
|
|
2f63d3aee5 | ||
|
|
382f870cd5 | ||
|
|
8c760e78b9 | ||
|
|
afa52e4681 | ||
|
|
164cae469c | ||
|
|
49a82d8806 | ||
|
|
96070212ad | ||
|
|
53a83d15a1 | ||
|
|
21b72dea78 | ||
|
|
51877f568b | ||
|
|
c1deb9eebf | ||
|
|
f62f1178aa | ||
|
|
a08208283b | ||
|
|
f7cd3fad24 | ||
|
|
ff75f763c0 | ||
|
|
a16d23557b | ||
|
|
e55ddabffa | ||
|
|
9a1c1f2efb | ||
|
|
e57a214e2a | ||
|
|
2f2acb2e3f | ||
|
|
06d804a0f0 | ||
|
|
6e390ef17c | ||
|
|
9652ae9a8d | ||
|
|
59460ff700 | ||
|
|
9d060574e5 | ||
|
|
fedd0a0ee3 | ||
|
|
79497ef7f5 | ||
|
|
8416ca3104 | ||
|
|
d8c3533a91 | ||
|
|
eacfcd86d3 | ||
|
|
534a8605e5 | ||
|
|
6fe9143bbb | ||
|
|
1a01839f8c | ||
|
|
26848a7d6c | ||
|
|
0e725c6fb1 | ||
|
|
b3f56086c9 | ||
|
|
ee35f6384f | ||
|
|
12a0dd03b8 | ||
|
|
366650a438 | ||
|
|
78b1360e7d | ||
|
|
417f8ecf07 | ||
|
|
57cabc6d74 | ||
|
|
b4c4496ef8 | ||
|
|
b5334fe237 | ||
|
|
e8ef93ae9d | ||
|
|
25b22c9b55 | ||
|
|
ead4529c92 | ||
|
|
3a1887269b | ||
|
|
e7f63ba310 | ||
|
|
a0fb35c837 | ||
|
|
032ead1d90 | ||
|
|
a8b4284848 | ||
|
|
ed39e17e34 | ||
|
|
6749c62b9e | ||
|
|
9aeacf2de5 | ||
|
|
991097b7bf | ||
|
|
523a4efe1c | ||
|
|
0dd7c69b9e | ||
|
|
66535fe26d | ||
|
|
db7af2b3c3 | ||
|
|
99829950f6 | ||
|
|
0ef0986731 | ||
|
|
610a18e7b3 | ||
|
|
8d33ea7395 | ||
|
|
3c53057fa6 | ||
|
|
1fcede053c | ||
|
|
fae9c7a3f0 | ||
|
|
dd68829017 | ||
|
|
b85fe02be5 | ||
|
|
e18277b470 | ||
|
|
e5ce5c57c8 | ||
|
|
91fdd72c97 | ||
|
|
b6ec93b038 | ||
|
|
65e63b6ab4 | ||
|
|
3f0fef2c9c | ||
|
|
3e0ef832cc | ||
|
|
7b7136b4ec | ||
|
|
5886ef728f | ||
|
|
d7aa349820 | ||
|
|
3b32f6a8ec | ||
|
|
8f73357004 | ||
|
|
429158218b | ||
|
|
ef4cbec6fb | ||
|
|
e9216efefc | ||
|
|
e5196fc24d | ||
|
|
c98dffa186 | ||
|
|
7d7fc69355 | ||
|
|
42ab8fcfb9 | ||
|
|
bf7d40d048 | ||
|
|
5ae32c4c86 | ||
|
|
56ce70c5df | ||
|
|
abc76c6b5b | ||
|
|
9586817cea | ||
|
|
38b877e941 | ||
|
|
8f487d26c0 | ||
|
|
500a3a2d0a | ||
|
|
a2f99fd88b | ||
|
|
0582bd290d | ||
|
|
3ff83ec49e | ||
|
|
7c9c8ba363 | ||
|
|
ca7b885873 | ||
|
|
92be7821f5 | ||
|
|
bcf860703d | ||
|
|
d186dacdb7 | ||
|
|
ef45c8154c | ||
|
|
cd9b1bc820 | ||
|
|
fcb68ea22d | ||
|
|
eb256deb80 | ||
|
|
156187accc | ||
|
|
a377773fa7 | ||
|
|
cae1fd3385 | ||
|
|
eb8ee8bdc7 | ||
|
|
2103dc15cb | ||
|
|
1c72b350e4 | ||
|
|
52338c94f6 | ||
|
|
91f12600d2 | ||
|
|
6c616c71ec | ||
|
|
e94ad551c6 | ||
|
|
d735255919 | ||
|
|
d024f58e61 | ||
|
|
026975a1aa | ||
|
|
8adb052b46 | ||
|
|
9658cecde3 | ||
|
|
b2e7cda6a0 | ||
|
|
65fda5c02a | ||
|
|
d1b788005b | ||
|
|
bb2611ad43 | ||
|
|
e918a59b1d | ||
|
|
28acca609b | ||
|
|
029e3bf8f5 | ||
|
|
78158f30ae | ||
|
|
c793de989f | ||
|
|
15178aa298 | ||
|
|
fe3be498b8 | ||
|
|
62fde68708 | ||
|
|
af87035b71 |
2
.github/actions/build-jtreg/action.yml
vendored
2
.github/actions/build-jtreg/action.yml
vendored
@@ -65,4 +65,4 @@ runs:
|
|||||||
with:
|
with:
|
||||||
name: bundles-jtreg-${{ steps.version.outputs.value }}
|
name: bundles-jtreg-${{ steps.version.outputs.value }}
|
||||||
path: jtreg/installed
|
path: jtreg/installed
|
||||||
retention-days: 1
|
retention-days: 5
|
||||||
|
|||||||
8
.github/actions/get-msys2/action.yml
vendored
8
.github/actions/get-msys2/action.yml
vendored
@@ -30,15 +30,15 @@ runs:
|
|||||||
using: composite
|
using: composite
|
||||||
steps:
|
steps:
|
||||||
- name: 'Install MSYS2'
|
- name: 'Install MSYS2'
|
||||||
uses: msys2/setup-msys2@v2.22.0
|
id: msys2
|
||||||
|
uses: msys2/setup-msys2@v2.28.0
|
||||||
with:
|
with:
|
||||||
install: 'autoconf tar unzip zip make'
|
install: 'autoconf tar unzip zip make'
|
||||||
path-type: minimal
|
path-type: minimal
|
||||||
location: ${{ runner.tool_cache }}/msys2
|
release: false
|
||||||
|
|
||||||
# We can't run bash until this is completed, so stick with pwsh
|
# We can't run bash until this is completed, so stick with pwsh
|
||||||
- name: 'Set MSYS2 path'
|
- name: 'Set MSYS2 path'
|
||||||
run: |
|
run: |
|
||||||
# Prepend msys2/msys64/usr/bin to the PATH
|
echo "${{ steps.msys2.outputs.msys2-location }}/usr/bin" >> $env:GITHUB_PATH
|
||||||
echo "$env:RUNNER_TOOL_CACHE/msys2/msys64/usr/bin" >> $env:GITHUB_PATH
|
|
||||||
shell: pwsh
|
shell: pwsh
|
||||||
|
|||||||
2
.github/actions/upload-bundles/action.yml
vendored
2
.github/actions/upload-bundles/action.yml
vendored
@@ -91,5 +91,5 @@ runs:
|
|||||||
with:
|
with:
|
||||||
name: bundles-${{ inputs.platform }}${{ inputs.debug-suffix }}${{ inputs.static-suffix }}${{ inputs.bundle-suffix }}
|
name: bundles-${{ inputs.platform }}${{ inputs.debug-suffix }}${{ inputs.static-suffix }}${{ inputs.bundle-suffix }}
|
||||||
path: bundles
|
path: bundles
|
||||||
retention-days: 1
|
retention-days: 5
|
||||||
if: steps.bundles.outputs.bundles-found == 'true'
|
if: steps.bundles.outputs.bundles-found == 'true'
|
||||||
|
|||||||
6
.github/workflows/build-alpine-linux.yml
vendored
6
.github/workflows/build-alpine-linux.yml
vendored
@@ -51,6 +51,10 @@ on:
|
|||||||
make-arguments:
|
make-arguments:
|
||||||
required: false
|
required: false
|
||||||
type: string
|
type: string
|
||||||
|
dry-run:
|
||||||
|
required: false
|
||||||
|
type: boolean
|
||||||
|
default: false
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-linux:
|
build-linux:
|
||||||
@@ -104,9 +108,11 @@ jobs:
|
|||||||
make-target: '${{ inputs.make-target }} ${{ inputs.make-arguments }}'
|
make-target: '${{ inputs.make-target }} ${{ inputs.make-arguments }}'
|
||||||
platform: ${{ inputs.platform }}
|
platform: ${{ inputs.platform }}
|
||||||
debug-suffix: '${{ matrix.suffix }}'
|
debug-suffix: '${{ matrix.suffix }}'
|
||||||
|
if: ${{ inputs.dry-run == false }}
|
||||||
|
|
||||||
- name: 'Upload bundles'
|
- name: 'Upload bundles'
|
||||||
uses: ./.github/actions/upload-bundles
|
uses: ./.github/actions/upload-bundles
|
||||||
with:
|
with:
|
||||||
platform: ${{ inputs.platform }}
|
platform: ${{ inputs.platform }}
|
||||||
debug-suffix: '${{ matrix.suffix }}'
|
debug-suffix: '${{ matrix.suffix }}'
|
||||||
|
if: ${{ inputs.dry-run == false }}
|
||||||
|
|||||||
18
.github/workflows/build-cross-compile.yml
vendored
18
.github/workflows/build-cross-compile.yml
vendored
@@ -40,6 +40,10 @@ on:
|
|||||||
make-arguments:
|
make-arguments:
|
||||||
required: false
|
required: false
|
||||||
type: string
|
type: string
|
||||||
|
dry-run:
|
||||||
|
required: false
|
||||||
|
type: boolean
|
||||||
|
default: false
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-cross-compile:
|
build-cross-compile:
|
||||||
@@ -60,33 +64,33 @@ jobs:
|
|||||||
gnu-arch: aarch64
|
gnu-arch: aarch64
|
||||||
debian-arch: arm64
|
debian-arch: arm64
|
||||||
debian-repository: https://httpredir.debian.org/debian/
|
debian-repository: https://httpredir.debian.org/debian/
|
||||||
debian-version: bullseye
|
debian-version: trixie
|
||||||
tolerate-sysroot-errors: false
|
tolerate-sysroot-errors: false
|
||||||
- target-cpu: arm
|
- target-cpu: arm
|
||||||
gnu-arch: arm
|
gnu-arch: arm
|
||||||
debian-arch: armhf
|
debian-arch: armhf
|
||||||
debian-repository: https://httpredir.debian.org/debian/
|
debian-repository: https://httpredir.debian.org/debian/
|
||||||
debian-version: bullseye
|
debian-version: trixie
|
||||||
tolerate-sysroot-errors: false
|
tolerate-sysroot-errors: false
|
||||||
gnu-abi: eabihf
|
gnu-abi: eabihf
|
||||||
- target-cpu: s390x
|
- target-cpu: s390x
|
||||||
gnu-arch: s390x
|
gnu-arch: s390x
|
||||||
debian-arch: s390x
|
debian-arch: s390x
|
||||||
debian-repository: https://httpredir.debian.org/debian/
|
debian-repository: https://httpredir.debian.org/debian/
|
||||||
debian-version: bullseye
|
debian-version: trixie
|
||||||
tolerate-sysroot-errors: false
|
tolerate-sysroot-errors: false
|
||||||
- target-cpu: ppc64le
|
- target-cpu: ppc64le
|
||||||
gnu-arch: powerpc64le
|
gnu-arch: powerpc64le
|
||||||
debian-arch: ppc64el
|
debian-arch: ppc64el
|
||||||
debian-repository: https://httpredir.debian.org/debian/
|
debian-repository: https://httpredir.debian.org/debian/
|
||||||
debian-version: bullseye
|
debian-version: trixie
|
||||||
tolerate-sysroot-errors: false
|
tolerate-sysroot-errors: false
|
||||||
- target-cpu: riscv64
|
- target-cpu: riscv64
|
||||||
gnu-arch: riscv64
|
gnu-arch: riscv64
|
||||||
debian-arch: riscv64
|
debian-arch: riscv64
|
||||||
debian-repository: https://httpredir.debian.org/debian/
|
debian-repository: https://httpredir.debian.org/debian/
|
||||||
debian-version: sid
|
debian-version: trixie
|
||||||
tolerate-sysroot-errors: true
|
tolerate-sysroot-errors: false
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: 'Checkout the JDK source'
|
- name: 'Checkout the JDK source'
|
||||||
@@ -189,4 +193,4 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
make-target: 'hotspot ${{ inputs.make-arguments }}'
|
make-target: 'hotspot ${{ inputs.make-arguments }}'
|
||||||
platform: linux-${{ matrix.target-cpu }}
|
platform: linux-${{ matrix.target-cpu }}
|
||||||
if: steps.create-sysroot.outcome == 'success' || steps.get-cached-sysroot.outputs.cache-hit == 'true'
|
if: ((steps.create-sysroot.outcome == 'success' || steps.get-cached-sysroot.outputs.cache-hit == 'true') && inputs.dry-run == false)
|
||||||
|
|||||||
6
.github/workflows/build-linux.yml
vendored
6
.github/workflows/build-linux.yml
vendored
@@ -61,6 +61,10 @@ on:
|
|||||||
make-arguments:
|
make-arguments:
|
||||||
required: false
|
required: false
|
||||||
type: string
|
type: string
|
||||||
|
dry-run:
|
||||||
|
required: false
|
||||||
|
type: boolean
|
||||||
|
default: false
|
||||||
bundle-suffix:
|
bundle-suffix:
|
||||||
required: false
|
required: false
|
||||||
type: string
|
type: string
|
||||||
@@ -139,6 +143,7 @@ jobs:
|
|||||||
make-target: '${{ inputs.make-target }} ${{ inputs.make-arguments }}'
|
make-target: '${{ inputs.make-target }} ${{ inputs.make-arguments }}'
|
||||||
platform: ${{ inputs.platform }}
|
platform: ${{ inputs.platform }}
|
||||||
debug-suffix: "${{ matrix.debug-level == 'debug' && '-debug' || '' }}"
|
debug-suffix: "${{ matrix.debug-level == 'debug' && '-debug' || '' }}"
|
||||||
|
if: ${{ inputs.dry-run == false }}
|
||||||
|
|
||||||
- name: 'Upload bundles'
|
- name: 'Upload bundles'
|
||||||
uses: ./.github/actions/upload-bundles
|
uses: ./.github/actions/upload-bundles
|
||||||
@@ -147,3 +152,4 @@ jobs:
|
|||||||
debug-suffix: "${{ matrix.debug-level == 'debug' && '-debug' || '' }}"
|
debug-suffix: "${{ matrix.debug-level == 'debug' && '-debug' || '' }}"
|
||||||
bundle-suffix: ${{ inputs.bundle-suffix }}
|
bundle-suffix: ${{ inputs.bundle-suffix }}
|
||||||
static-suffix: ${{ inputs.static-suffix }}
|
static-suffix: ${{ inputs.static-suffix }}
|
||||||
|
if: ${{ inputs.dry-run == false }}
|
||||||
|
|||||||
6
.github/workflows/build-macos.yml
vendored
6
.github/workflows/build-macos.yml
vendored
@@ -54,6 +54,10 @@ on:
|
|||||||
make-arguments:
|
make-arguments:
|
||||||
required: false
|
required: false
|
||||||
type: string
|
type: string
|
||||||
|
dry-run:
|
||||||
|
required: false
|
||||||
|
type: boolean
|
||||||
|
default: false
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-macos:
|
build-macos:
|
||||||
@@ -118,9 +122,11 @@ jobs:
|
|||||||
make-target: '${{ inputs.make-target }} ${{ inputs.make-arguments }}'
|
make-target: '${{ inputs.make-target }} ${{ inputs.make-arguments }}'
|
||||||
platform: ${{ inputs.platform }}
|
platform: ${{ inputs.platform }}
|
||||||
debug-suffix: '${{ matrix.suffix }}'
|
debug-suffix: '${{ matrix.suffix }}'
|
||||||
|
if: ${{ inputs.dry-run == false }}
|
||||||
|
|
||||||
- name: 'Upload bundles'
|
- name: 'Upload bundles'
|
||||||
uses: ./.github/actions/upload-bundles
|
uses: ./.github/actions/upload-bundles
|
||||||
with:
|
with:
|
||||||
platform: ${{ inputs.platform }}
|
platform: ${{ inputs.platform }}
|
||||||
debug-suffix: '${{ matrix.suffix }}'
|
debug-suffix: '${{ matrix.suffix }}'
|
||||||
|
if: ${{ inputs.dry-run == false }}
|
||||||
|
|||||||
7
.github/workflows/build-windows.yml
vendored
7
.github/workflows/build-windows.yml
vendored
@@ -54,6 +54,10 @@ on:
|
|||||||
make-arguments:
|
make-arguments:
|
||||||
required: false
|
required: false
|
||||||
type: string
|
type: string
|
||||||
|
dry-run:
|
||||||
|
required: false
|
||||||
|
type: boolean
|
||||||
|
default: false
|
||||||
|
|
||||||
env:
|
env:
|
||||||
# These are needed to make the MSYS2 bash work properly
|
# These are needed to make the MSYS2 bash work properly
|
||||||
@@ -139,6 +143,7 @@ jobs:
|
|||||||
# Set PATH to "", so just GITHUB_PATH is included
|
# Set PATH to "", so just GITHUB_PATH is included
|
||||||
PATH: ''
|
PATH: ''
|
||||||
shell: env /usr/bin/bash --login -eo pipefail {0}
|
shell: env /usr/bin/bash --login -eo pipefail {0}
|
||||||
|
if: ${{ inputs.dry-run == false }}
|
||||||
|
|
||||||
- name: 'Build'
|
- name: 'Build'
|
||||||
id: build
|
id: build
|
||||||
@@ -147,9 +152,11 @@ jobs:
|
|||||||
make-target: '${{ inputs.make-target }} ${{ inputs.make-arguments }}'
|
make-target: '${{ inputs.make-target }} ${{ inputs.make-arguments }}'
|
||||||
platform: ${{ inputs.platform }}
|
platform: ${{ inputs.platform }}
|
||||||
debug-suffix: '${{ matrix.suffix }}'
|
debug-suffix: '${{ matrix.suffix }}'
|
||||||
|
if: ${{ inputs.dry-run == false }}
|
||||||
|
|
||||||
- name: 'Upload bundles'
|
- name: 'Upload bundles'
|
||||||
uses: ./.github/actions/upload-bundles
|
uses: ./.github/actions/upload-bundles
|
||||||
with:
|
with:
|
||||||
platform: ${{ inputs.platform }}
|
platform: ${{ inputs.platform }}
|
||||||
debug-suffix: '${{ matrix.suffix }}'
|
debug-suffix: '${{ matrix.suffix }}'
|
||||||
|
if: ${{ inputs.dry-run == false }}
|
||||||
|
|||||||
62
.github/workflows/main.yml
vendored
62
.github/workflows/main.yml
vendored
@@ -28,9 +28,7 @@ name: 'OpenJDK GHA Sanity Checks'
|
|||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches-ignore:
|
branches-ignore:
|
||||||
- master
|
|
||||||
- pr/*
|
- pr/*
|
||||||
- jdk*
|
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
inputs:
|
inputs:
|
||||||
platforms:
|
platforms:
|
||||||
@@ -43,6 +41,9 @@ on:
|
|||||||
make-arguments:
|
make-arguments:
|
||||||
description: 'Additional make arguments'
|
description: 'Additional make arguments'
|
||||||
required: false
|
required: false
|
||||||
|
dry-run:
|
||||||
|
description: 'Dry run: skip actual builds and tests'
|
||||||
|
required: false
|
||||||
|
|
||||||
concurrency:
|
concurrency:
|
||||||
group: ${{ github.workflow }}-${{ github.ref }}
|
group: ${{ github.workflow }}-${{ github.ref }}
|
||||||
@@ -70,6 +71,7 @@ jobs:
|
|||||||
windows-x64: ${{ steps.include.outputs.windows-x64 }}
|
windows-x64: ${{ steps.include.outputs.windows-x64 }}
|
||||||
windows-aarch64: ${{ steps.include.outputs.windows-aarch64 }}
|
windows-aarch64: ${{ steps.include.outputs.windows-aarch64 }}
|
||||||
docs: ${{ steps.include.outputs.docs }}
|
docs: ${{ steps.include.outputs.docs }}
|
||||||
|
dry-run: ${{ steps.include.outputs.dry-run }}
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: 'Checkout the scripts'
|
- name: 'Checkout the scripts'
|
||||||
@@ -143,6 +145,35 @@ jobs:
|
|||||||
echo 'false'
|
echo 'false'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function check_dry_run() {
|
||||||
|
if [[ $GITHUB_EVENT_NAME == workflow_dispatch ]]; then
|
||||||
|
# Take the user-specified one.
|
||||||
|
echo '${{ github.event.inputs.dry-run }}'
|
||||||
|
return
|
||||||
|
elif [[ $GITHUB_EVENT_NAME == push ]]; then
|
||||||
|
# Cut out the real branch name
|
||||||
|
BRANCH=${GITHUB_REF##*/}
|
||||||
|
|
||||||
|
# Dry run rebuilds the caches in current branch, so they can be reused
|
||||||
|
# for any child PR branches. Because of this, we want to trigger this
|
||||||
|
# workflow in master branch, so that actual PR branches can use the cache.
|
||||||
|
# This workflow would trigger every time contributors sync their master
|
||||||
|
# branches in their personal forks.
|
||||||
|
if [[ $BRANCH == "master" ]]; then
|
||||||
|
echo 'true'
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
|
||||||
|
# ...same for stabilization branches
|
||||||
|
if [[ $BRANCH =~ "jdk(.*)" ]]; then
|
||||||
|
echo 'true'
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo 'false'
|
||||||
|
}
|
||||||
|
|
||||||
echo "linux-x64=$(check_platform linux-x64 linux x64)" >> $GITHUB_OUTPUT
|
echo "linux-x64=$(check_platform linux-x64 linux x64)" >> $GITHUB_OUTPUT
|
||||||
echo "linux-x64-variants=$(check_platform linux-x64-variants variants)" >> $GITHUB_OUTPUT
|
echo "linux-x64-variants=$(check_platform linux-x64-variants variants)" >> $GITHUB_OUTPUT
|
||||||
echo "linux-cross-compile=$(check_platform linux-cross-compile cross-compile)" >> $GITHUB_OUTPUT
|
echo "linux-cross-compile=$(check_platform linux-cross-compile cross-compile)" >> $GITHUB_OUTPUT
|
||||||
@@ -152,6 +183,7 @@ jobs:
|
|||||||
echo "windows-x64=$(check_platform windows-x64 windows x64)" >> $GITHUB_OUTPUT
|
echo "windows-x64=$(check_platform windows-x64 windows x64)" >> $GITHUB_OUTPUT
|
||||||
echo "windows-aarch64=$(check_platform windows-aarch64 windows aarch64)" >> $GITHUB_OUTPUT
|
echo "windows-aarch64=$(check_platform windows-aarch64 windows aarch64)" >> $GITHUB_OUTPUT
|
||||||
echo "docs=$(check_platform docs)" >> $GITHUB_OUTPUT
|
echo "docs=$(check_platform docs)" >> $GITHUB_OUTPUT
|
||||||
|
echo "dry-run=$(check_dry_run)" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
###
|
###
|
||||||
### Build jobs
|
### Build jobs
|
||||||
@@ -166,6 +198,7 @@ jobs:
|
|||||||
gcc-major-version: '10'
|
gcc-major-version: '10'
|
||||||
configure-arguments: ${{ github.event.inputs.configure-arguments }}
|
configure-arguments: ${{ github.event.inputs.configure-arguments }}
|
||||||
make-arguments: ${{ github.event.inputs.make-arguments }}
|
make-arguments: ${{ github.event.inputs.make-arguments }}
|
||||||
|
dry-run: ${{ needs.prepare.outputs.dry-run == 'true' }}
|
||||||
if: needs.prepare.outputs.linux-x64 == 'true'
|
if: needs.prepare.outputs.linux-x64 == 'true'
|
||||||
|
|
||||||
build-linux-x64-hs-nopch:
|
build-linux-x64-hs-nopch:
|
||||||
@@ -180,6 +213,7 @@ jobs:
|
|||||||
extra-conf-options: '--disable-precompiled-headers'
|
extra-conf-options: '--disable-precompiled-headers'
|
||||||
configure-arguments: ${{ github.event.inputs.configure-arguments }}
|
configure-arguments: ${{ github.event.inputs.configure-arguments }}
|
||||||
make-arguments: ${{ github.event.inputs.make-arguments }}
|
make-arguments: ${{ github.event.inputs.make-arguments }}
|
||||||
|
dry-run: ${{ needs.prepare.outputs.dry-run == 'true' }}
|
||||||
if: needs.prepare.outputs.linux-x64-variants == 'true'
|
if: needs.prepare.outputs.linux-x64-variants == 'true'
|
||||||
|
|
||||||
build-linux-x64-hs-zero:
|
build-linux-x64-hs-zero:
|
||||||
@@ -194,6 +228,7 @@ jobs:
|
|||||||
extra-conf-options: '--with-jvm-variants=zero --disable-precompiled-headers'
|
extra-conf-options: '--with-jvm-variants=zero --disable-precompiled-headers'
|
||||||
configure-arguments: ${{ github.event.inputs.configure-arguments }}
|
configure-arguments: ${{ github.event.inputs.configure-arguments }}
|
||||||
make-arguments: ${{ github.event.inputs.make-arguments }}
|
make-arguments: ${{ github.event.inputs.make-arguments }}
|
||||||
|
dry-run: ${{ needs.prepare.outputs.dry-run == 'true' }}
|
||||||
if: needs.prepare.outputs.linux-x64-variants == 'true'
|
if: needs.prepare.outputs.linux-x64-variants == 'true'
|
||||||
|
|
||||||
build-linux-x64-hs-minimal:
|
build-linux-x64-hs-minimal:
|
||||||
@@ -208,6 +243,7 @@ jobs:
|
|||||||
extra-conf-options: '--with-jvm-variants=minimal --disable-precompiled-headers'
|
extra-conf-options: '--with-jvm-variants=minimal --disable-precompiled-headers'
|
||||||
configure-arguments: ${{ github.event.inputs.configure-arguments }}
|
configure-arguments: ${{ github.event.inputs.configure-arguments }}
|
||||||
make-arguments: ${{ github.event.inputs.make-arguments }}
|
make-arguments: ${{ github.event.inputs.make-arguments }}
|
||||||
|
dry-run: ${{ needs.prepare.outputs.dry-run == 'true' }}
|
||||||
if: needs.prepare.outputs.linux-x64-variants == 'true'
|
if: needs.prepare.outputs.linux-x64-variants == 'true'
|
||||||
|
|
||||||
build-linux-x64-hs-optimized:
|
build-linux-x64-hs-optimized:
|
||||||
@@ -223,6 +259,7 @@ jobs:
|
|||||||
extra-conf-options: '--with-debug-level=optimized --disable-precompiled-headers'
|
extra-conf-options: '--with-debug-level=optimized --disable-precompiled-headers'
|
||||||
configure-arguments: ${{ github.event.inputs.configure-arguments }}
|
configure-arguments: ${{ github.event.inputs.configure-arguments }}
|
||||||
make-arguments: ${{ github.event.inputs.make-arguments }}
|
make-arguments: ${{ github.event.inputs.make-arguments }}
|
||||||
|
dry-run: ${{ needs.prepare.outputs.dry-run == 'true' }}
|
||||||
if: needs.prepare.outputs.linux-x64-variants == 'true'
|
if: needs.prepare.outputs.linux-x64-variants == 'true'
|
||||||
|
|
||||||
build-linux-x64-static:
|
build-linux-x64-static:
|
||||||
@@ -238,6 +275,7 @@ jobs:
|
|||||||
gcc-major-version: '10'
|
gcc-major-version: '10'
|
||||||
configure-arguments: ${{ github.event.inputs.configure-arguments }}
|
configure-arguments: ${{ github.event.inputs.configure-arguments }}
|
||||||
make-arguments: ${{ github.event.inputs.make-arguments }}
|
make-arguments: ${{ github.event.inputs.make-arguments }}
|
||||||
|
dry-run: ${{ needs.prepare.outputs.dry-run == 'true' }}
|
||||||
static-suffix: "-static"
|
static-suffix: "-static"
|
||||||
if: needs.prepare.outputs.linux-x64 == 'true'
|
if: needs.prepare.outputs.linux-x64 == 'true'
|
||||||
|
|
||||||
@@ -254,6 +292,7 @@ jobs:
|
|||||||
gcc-major-version: '10'
|
gcc-major-version: '10'
|
||||||
configure-arguments: ${{ github.event.inputs.configure-arguments }}
|
configure-arguments: ${{ github.event.inputs.configure-arguments }}
|
||||||
make-arguments: ${{ github.event.inputs.make-arguments }}
|
make-arguments: ${{ github.event.inputs.make-arguments }}
|
||||||
|
dry-run: ${{ needs.prepare.outputs.dry-run == 'true' }}
|
||||||
# Upload static libs bundles separately to avoid interference with normal linux-x64 bundle.
|
# Upload static libs bundles separately to avoid interference with normal linux-x64 bundle.
|
||||||
# This bundle is not used by testing jobs, but downstreams use it to check that
|
# This bundle is not used by testing jobs, but downstreams use it to check that
|
||||||
# dependent projects, e.g. libgraal, builds fine.
|
# dependent projects, e.g. libgraal, builds fine.
|
||||||
@@ -268,6 +307,7 @@ jobs:
|
|||||||
gcc-major-version: '10'
|
gcc-major-version: '10'
|
||||||
configure-arguments: ${{ github.event.inputs.configure-arguments }}
|
configure-arguments: ${{ github.event.inputs.configure-arguments }}
|
||||||
make-arguments: ${{ github.event.inputs.make-arguments }}
|
make-arguments: ${{ github.event.inputs.make-arguments }}
|
||||||
|
dry-run: ${{ needs.prepare.outputs.dry-run == 'true' }}
|
||||||
if: needs.prepare.outputs.linux-cross-compile == 'true'
|
if: needs.prepare.outputs.linux-cross-compile == 'true'
|
||||||
|
|
||||||
build-alpine-linux-x64:
|
build-alpine-linux-x64:
|
||||||
@@ -278,6 +318,7 @@ jobs:
|
|||||||
platform: alpine-linux-x64
|
platform: alpine-linux-x64
|
||||||
configure-arguments: ${{ github.event.inputs.configure-arguments }}
|
configure-arguments: ${{ github.event.inputs.configure-arguments }}
|
||||||
make-arguments: ${{ github.event.inputs.make-arguments }}
|
make-arguments: ${{ github.event.inputs.make-arguments }}
|
||||||
|
dry-run: ${{ needs.prepare.outputs.dry-run == 'true' }}
|
||||||
if: needs.prepare.outputs.alpine-linux-x64 == 'true'
|
if: needs.prepare.outputs.alpine-linux-x64 == 'true'
|
||||||
|
|
||||||
build-macos-x64:
|
build-macos-x64:
|
||||||
@@ -290,6 +331,7 @@ jobs:
|
|||||||
xcode-toolset-version: '14.3.1'
|
xcode-toolset-version: '14.3.1'
|
||||||
configure-arguments: ${{ github.event.inputs.configure-arguments }}
|
configure-arguments: ${{ github.event.inputs.configure-arguments }}
|
||||||
make-arguments: ${{ github.event.inputs.make-arguments }}
|
make-arguments: ${{ github.event.inputs.make-arguments }}
|
||||||
|
dry-run: ${{ needs.prepare.outputs.dry-run == 'true' }}
|
||||||
if: needs.prepare.outputs.macos-x64 == 'true'
|
if: needs.prepare.outputs.macos-x64 == 'true'
|
||||||
|
|
||||||
build-macos-aarch64:
|
build-macos-aarch64:
|
||||||
@@ -302,6 +344,7 @@ jobs:
|
|||||||
xcode-toolset-version: '15.4'
|
xcode-toolset-version: '15.4'
|
||||||
configure-arguments: ${{ github.event.inputs.configure-arguments }}
|
configure-arguments: ${{ github.event.inputs.configure-arguments }}
|
||||||
make-arguments: ${{ github.event.inputs.make-arguments }}
|
make-arguments: ${{ github.event.inputs.make-arguments }}
|
||||||
|
dry-run: ${{ needs.prepare.outputs.dry-run == 'true' }}
|
||||||
if: needs.prepare.outputs.macos-aarch64 == 'true'
|
if: needs.prepare.outputs.macos-aarch64 == 'true'
|
||||||
|
|
||||||
build-windows-x64:
|
build-windows-x64:
|
||||||
@@ -310,10 +353,11 @@ jobs:
|
|||||||
uses: ./.github/workflows/build-windows.yml
|
uses: ./.github/workflows/build-windows.yml
|
||||||
with:
|
with:
|
||||||
platform: windows-x64
|
platform: windows-x64
|
||||||
msvc-toolset-version: '14.43'
|
msvc-toolset-version: '14.44'
|
||||||
msvc-toolset-architecture: 'x86.x64'
|
msvc-toolset-architecture: 'x86.x64'
|
||||||
configure-arguments: ${{ github.event.inputs.configure-arguments }}
|
configure-arguments: ${{ github.event.inputs.configure-arguments }}
|
||||||
make-arguments: ${{ github.event.inputs.make-arguments }}
|
make-arguments: ${{ github.event.inputs.make-arguments }}
|
||||||
|
dry-run: ${{ needs.prepare.outputs.dry-run == 'true' }}
|
||||||
if: needs.prepare.outputs.windows-x64 == 'true'
|
if: needs.prepare.outputs.windows-x64 == 'true'
|
||||||
|
|
||||||
build-windows-aarch64:
|
build-windows-aarch64:
|
||||||
@@ -322,12 +366,13 @@ jobs:
|
|||||||
uses: ./.github/workflows/build-windows.yml
|
uses: ./.github/workflows/build-windows.yml
|
||||||
with:
|
with:
|
||||||
platform: windows-aarch64
|
platform: windows-aarch64
|
||||||
msvc-toolset-version: '14.43'
|
msvc-toolset-version: '14.44'
|
||||||
msvc-toolset-architecture: 'arm64'
|
msvc-toolset-architecture: 'arm64'
|
||||||
make-target: 'hotspot'
|
make-target: 'hotspot'
|
||||||
extra-conf-options: '--openjdk-target=aarch64-unknown-cygwin'
|
extra-conf-options: '--openjdk-target=aarch64-unknown-cygwin'
|
||||||
configure-arguments: ${{ github.event.inputs.configure-arguments }}
|
configure-arguments: ${{ github.event.inputs.configure-arguments }}
|
||||||
make-arguments: ${{ github.event.inputs.make-arguments }}
|
make-arguments: ${{ github.event.inputs.make-arguments }}
|
||||||
|
dry-run: ${{ needs.prepare.outputs.dry-run == 'true' }}
|
||||||
if: needs.prepare.outputs.windows-aarch64 == 'true'
|
if: needs.prepare.outputs.windows-aarch64 == 'true'
|
||||||
|
|
||||||
build-docs:
|
build-docs:
|
||||||
@@ -344,6 +389,7 @@ jobs:
|
|||||||
gcc-major-version: '10'
|
gcc-major-version: '10'
|
||||||
configure-arguments: ${{ github.event.inputs.configure-arguments }}
|
configure-arguments: ${{ github.event.inputs.configure-arguments }}
|
||||||
make-arguments: ${{ github.event.inputs.make-arguments }}
|
make-arguments: ${{ github.event.inputs.make-arguments }}
|
||||||
|
dry-run: ${{ needs.prepare.outputs.dry-run == 'true' }}
|
||||||
if: needs.prepare.outputs.docs == 'true'
|
if: needs.prepare.outputs.docs == 'true'
|
||||||
|
|
||||||
###
|
###
|
||||||
@@ -353,17 +399,20 @@ jobs:
|
|||||||
test-linux-x64:
|
test-linux-x64:
|
||||||
name: linux-x64
|
name: linux-x64
|
||||||
needs:
|
needs:
|
||||||
|
- prepare
|
||||||
- build-linux-x64
|
- build-linux-x64
|
||||||
uses: ./.github/workflows/test.yml
|
uses: ./.github/workflows/test.yml
|
||||||
with:
|
with:
|
||||||
platform: linux-x64
|
platform: linux-x64
|
||||||
bootjdk-platform: linux-x64
|
bootjdk-platform: linux-x64
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-22.04
|
||||||
|
dry-run: ${{ needs.prepare.outputs.dry-run == 'true' }}
|
||||||
debug-suffix: -debug
|
debug-suffix: -debug
|
||||||
|
|
||||||
test-linux-x64-static:
|
test-linux-x64-static:
|
||||||
name: linux-x64-static
|
name: linux-x64-static
|
||||||
needs:
|
needs:
|
||||||
|
- prepare
|
||||||
- build-linux-x64
|
- build-linux-x64
|
||||||
- build-linux-x64-static
|
- build-linux-x64-static
|
||||||
uses: ./.github/workflows/test.yml
|
uses: ./.github/workflows/test.yml
|
||||||
@@ -371,27 +420,32 @@ jobs:
|
|||||||
platform: linux-x64
|
platform: linux-x64
|
||||||
bootjdk-platform: linux-x64
|
bootjdk-platform: linux-x64
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-22.04
|
||||||
|
dry-run: ${{ needs.prepare.outputs.dry-run == 'true' }}
|
||||||
static-suffix: "-static"
|
static-suffix: "-static"
|
||||||
|
|
||||||
test-macos-aarch64:
|
test-macos-aarch64:
|
||||||
name: macos-aarch64
|
name: macos-aarch64
|
||||||
needs:
|
needs:
|
||||||
|
- prepare
|
||||||
- build-macos-aarch64
|
- build-macos-aarch64
|
||||||
uses: ./.github/workflows/test.yml
|
uses: ./.github/workflows/test.yml
|
||||||
with:
|
with:
|
||||||
platform: macos-aarch64
|
platform: macos-aarch64
|
||||||
bootjdk-platform: macos-aarch64
|
bootjdk-platform: macos-aarch64
|
||||||
runs-on: macos-14
|
runs-on: macos-14
|
||||||
|
dry-run: ${{ needs.prepare.outputs.dry-run == 'true' }}
|
||||||
xcode-toolset-version: '15.4'
|
xcode-toolset-version: '15.4'
|
||||||
debug-suffix: -debug
|
debug-suffix: -debug
|
||||||
|
|
||||||
test-windows-x64:
|
test-windows-x64:
|
||||||
name: windows-x64
|
name: windows-x64
|
||||||
needs:
|
needs:
|
||||||
|
- prepare
|
||||||
- build-windows-x64
|
- build-windows-x64
|
||||||
uses: ./.github/workflows/test.yml
|
uses: ./.github/workflows/test.yml
|
||||||
with:
|
with:
|
||||||
platform: windows-x64
|
platform: windows-x64
|
||||||
bootjdk-platform: windows-x64
|
bootjdk-platform: windows-x64
|
||||||
runs-on: windows-2025
|
runs-on: windows-2025
|
||||||
|
dry-run: ${{ needs.prepare.outputs.dry-run == 'true' }}
|
||||||
debug-suffix: -debug
|
debug-suffix: -debug
|
||||||
|
|||||||
6
.github/workflows/test.yml
vendored
6
.github/workflows/test.yml
vendored
@@ -40,6 +40,10 @@ on:
|
|||||||
xcode-toolset-version:
|
xcode-toolset-version:
|
||||||
required: false
|
required: false
|
||||||
type: string
|
type: string
|
||||||
|
dry-run:
|
||||||
|
required: false
|
||||||
|
type: boolean
|
||||||
|
default: false
|
||||||
debug-suffix:
|
debug-suffix:
|
||||||
required: false
|
required: false
|
||||||
type: string
|
type: string
|
||||||
@@ -147,6 +151,7 @@ jobs:
|
|||||||
platform: ${{ inputs.platform }}
|
platform: ${{ inputs.platform }}
|
||||||
debug-suffix: ${{ matrix.debug-suffix }}
|
debug-suffix: ${{ matrix.debug-suffix }}
|
||||||
static-suffix: ${{ inputs.static-suffix }}
|
static-suffix: ${{ inputs.static-suffix }}
|
||||||
|
if: ${{ inputs.dry-run == false }}
|
||||||
|
|
||||||
- name: 'Install dependencies'
|
- name: 'Install dependencies'
|
||||||
run: |
|
run: |
|
||||||
@@ -199,6 +204,7 @@ jobs:
|
|||||||
&& bash ./.github/scripts/gen-test-summary.sh "$GITHUB_STEP_SUMMARY" "$GITHUB_OUTPUT"
|
&& bash ./.github/scripts/gen-test-summary.sh "$GITHUB_STEP_SUMMARY" "$GITHUB_OUTPUT"
|
||||||
env:
|
env:
|
||||||
PATH: ${{ steps.path.outputs.value }}
|
PATH: ${{ steps.path.outputs.value }}
|
||||||
|
if: ${{ inputs.dry-run == false }}
|
||||||
|
|
||||||
# This is a separate step, since if the markdown from a step gets bigger than
|
# This is a separate step, since if the markdown from a step gets bigger than
|
||||||
# 1024 kB it is skipped, but then the short summary above is still generated
|
# 1024 kB it is skipped, but then the short summary above is still generated
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
[general]
|
[general]
|
||||||
project=jdk
|
project=jdk
|
||||||
jbs=JDK
|
jbs=JDK
|
||||||
version=25
|
version=26
|
||||||
|
|
||||||
[checks]
|
[checks]
|
||||||
error=author,committer,reviewers,merge,issues,executable,symlink,message,hg-tag,whitespace,problemlists,copyright
|
error=author,committer,reviewers,merge,issues,executable,symlink,message,hg-tag,whitespace,problemlists,copyright
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
#
|
#
|
||||||
# Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved.
|
# Copyright (c) 2019, 2025, Oracle and/or its affiliates. All rights reserved.
|
||||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
#
|
#
|
||||||
# This code is free software; you can redistribute it and/or modify it
|
# This code is free software; you can redistribute it and/or modify it
|
||||||
@@ -52,12 +52,39 @@
|
|||||||
# include the SCM state that was used to build it, which can be found in ${JDK_N_INSTALL}/release,
|
# include the SCM state that was used to build it, which can be found in ${JDK_N_INSTALL}/release,
|
||||||
# in property "SOURCE".
|
# in property "SOURCE".
|
||||||
|
|
||||||
|
source_path="$(dirname ${0})"
|
||||||
|
this_script_dir="$(cd -- "${source_path}" > /dev/null && pwd)"
|
||||||
|
if test -z "${this_script_dir}"; then
|
||||||
|
echo "Error: Could not determine location of this script"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
symbols_dir="$(dirname $this_script_dir)/src/jdk.compiler/share/data/symbols"
|
||||||
|
if [ ! -d $symbols_dir ] ; then
|
||||||
|
echo "Cannot locate symbols directory: $symbols_dir" >&2
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
generator_dir="$(dirname $this_script_dir)/make/langtools/src/classes/build/tools/symbolgenerator"
|
||||||
|
|
||||||
if [ "$1x" = "x" ] ; then
|
if [ "$1x" = "x" ] ; then
|
||||||
echo "Must provide the target JDK as a parameter:" >&2
|
echo "Must provide the target JDK as a parameter:" >&2
|
||||||
echo "$0 <target-jdk>" >&2
|
echo "$0 <target-jdk>" >&2
|
||||||
exit 1
|
exit 1
|
||||||
fi;
|
fi;
|
||||||
|
|
||||||
|
if [ ! -d $1 ] ; then
|
||||||
|
echo "Target JDK argument is not a directory:" $1 >&2
|
||||||
|
exit 1
|
||||||
|
fi;
|
||||||
|
|
||||||
|
if [ ! -x $1/bin/java ] ; then
|
||||||
|
echo "Target JDK argument is not a valid JDK: $1" >&2
|
||||||
|
exit 1
|
||||||
|
fi;
|
||||||
|
|
||||||
|
cd $symbols_dir
|
||||||
|
|
||||||
if [ ! -f symbols ] ; then
|
if [ ! -f symbols ] ; then
|
||||||
echo "Must run inside the src/jdk.compiler/share/data/symbols directory" >&2
|
echo "Must run inside the src/jdk.compiler/share/data/symbols directory" >&2
|
||||||
exit 1
|
exit 1
|
||||||
@@ -72,5 +99,5 @@ $1/bin/java --add-exports jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED \
|
|||||||
--add-exports jdk.compiler/com.sun.tools.javac.jvm=ALL-UNNAMED \
|
--add-exports jdk.compiler/com.sun.tools.javac.jvm=ALL-UNNAMED \
|
||||||
--add-exports jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED \
|
--add-exports jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED \
|
||||||
--add-modules jdk.jdeps \
|
--add-modules jdk.jdeps \
|
||||||
../../../../../make/langtools/src/classes/build/tools/symbolgenerator/CreateSymbols.java \
|
$generator_dir/CreateSymbols.java \
|
||||||
build-description-incremental symbols include.list
|
build-description-incremental symbols include.list
|
||||||
@@ -125,7 +125,8 @@ if [ -d "$TOPLEVEL_DIR/.hg" ] ; then
|
|||||||
VCS_TYPE="hg4idea"
|
VCS_TYPE="hg4idea"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -d "$TOPLEVEL_DIR/.git" ] ; then
|
# Git worktrees use a '.git' file rather than directory, so test both.
|
||||||
|
if [ -d "$TOPLEVEL_DIR/.git" -o -f "$TOPLEVEL_DIR/.git" ] ; then
|
||||||
VCS_TYPE="Git"
|
VCS_TYPE="Git"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#! /bin/sh -f
|
#! /bin/sh -f
|
||||||
#
|
#
|
||||||
# Copyright (c) 2012, 2020, Oracle and/or its affiliates. All rights reserved.
|
# Copyright (c) 2012, 2025, Oracle and/or its affiliates. All rights reserved.
|
||||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
#
|
#
|
||||||
# This code is free software; you can redistribute it and/or modify it
|
# This code is free software; you can redistribute it and/or modify it
|
||||||
@@ -62,7 +62,7 @@ B=`basename "${script_directory}"`
|
|||||||
script_dir="`cd \"${D}\" 2>/dev/null && pwd || echo \"${D}\"`/${B}"
|
script_dir="`cd \"${D}\" 2>/dev/null && pwd || echo \"${D}\"`/${B}"
|
||||||
|
|
||||||
# set up a variable for the template directory
|
# set up a variable for the template directory
|
||||||
template_dir=${script_dir}/../data/license-templates
|
template_dir=${script_dir}/../make/data/license-templates
|
||||||
|
|
||||||
# Check existence of the template directory.
|
# Check existence of the template directory.
|
||||||
if [ ! -d ${template_dir} ] ; then
|
if [ ! -d ${template_dir} ] ; then
|
||||||
@@ -1,192 +0,0 @@
|
|||||||
#
|
|
||||||
# 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.
|
|
||||||
#
|
|
||||||
# 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.
|
|
||||||
#
|
|
||||||
|
|
||||||
src/bsd : jdk/src/bsd
|
|
||||||
src/demo : jdk/src/demo
|
|
||||||
src/java.activation : jaxws/src/java.activation
|
|
||||||
src/java.base : jdk/src/java.base
|
|
||||||
src/java.compiler : langtools/src/java.compiler
|
|
||||||
src/java.corba : corba/src/java.corba
|
|
||||||
src/java.datatransfer : jdk/src/java.datatransfer
|
|
||||||
src/java.desktop : jdk/src/java.desktop
|
|
||||||
src/java.instrument : jdk/src/java.instrument
|
|
||||||
src/java.logging : jdk/src/java.logging
|
|
||||||
src/java.management : jdk/src/java.management
|
|
||||||
src/java.management.rmi : jdk/src/java.management.rmi
|
|
||||||
src/java.naming : jdk/src/java.naming
|
|
||||||
src/java.prefs : jdk/src/java.prefs
|
|
||||||
src/java.rmi : jdk/src/java.rmi
|
|
||||||
src/java.scripting : jdk/src/java.scripting
|
|
||||||
src/java.se : jdk/src/java.se
|
|
||||||
src/java.security.jgss : jdk/src/java.security.jgss
|
|
||||||
src/java.security.sasl : jdk/src/java.security.sasl
|
|
||||||
src/java.se.ee : jdk/src/java.se.ee
|
|
||||||
src/java.smartcardio : jdk/src/java.smartcardio
|
|
||||||
src/java.sql : jdk/src/java.sql
|
|
||||||
src/java.sql.rowset : jdk/src/java.sql.rowset
|
|
||||||
src/java.transaction : jdk/src/java.transaction
|
|
||||||
src/java.xml : jaxp/src/java.xml
|
|
||||||
src/java.xml.bind : jaxws/src/java.xml.bind
|
|
||||||
src/java.xml.crypto : jdk/src/java.xml.crypto
|
|
||||||
src/java.xml.ws : jaxws/src/java.xml.ws
|
|
||||||
src/java.xml.ws.annotation : jaxws/src/java.xml.ws.annotation
|
|
||||||
src/jdk.accessibility : jdk/src/jdk.accessibility
|
|
||||||
src/jdk.aot : hotspot/src/jdk.aot
|
|
||||||
src/jdk.attach : jdk/src/jdk.attach
|
|
||||||
src/jdk.charsets : jdk/src/jdk.charsets
|
|
||||||
src/jdk.compiler : jdk/src/jdk.compiler langtools/src/jdk.compiler
|
|
||||||
src/jdk.crypto.cryptoki : jdk/src/jdk.crypto.cryptoki
|
|
||||||
src/jdk.crypto.ec : jdk/src/jdk.crypto.ec
|
|
||||||
src/jdk.crypto.mscapi : jdk/src/jdk.crypto.mscapi
|
|
||||||
src/jdk.dynalink : nashorn/src/jdk.dynalink
|
|
||||||
src/jdk.editpad : jdk/src/jdk.editpad
|
|
||||||
src/jdk.hotspot.agent : hotspot/src/jdk.hotspot.agent
|
|
||||||
src/jdk.httpserver : jdk/src/jdk.httpserver
|
|
||||||
src/jdk.incubator.httpclient : jdk/src/jdk.incubator.httpclient
|
|
||||||
src/jdk.internal.ed : jdk/src/jdk.internal.ed
|
|
||||||
src/jdk.internal.jvmstat : jdk/src/jdk.internal.jvmstat
|
|
||||||
src/jdk.internal.le : jdk/src/jdk.internal.le
|
|
||||||
src/jdk.internal.opt : jdk/src/jdk.internal.opt
|
|
||||||
src/jdk.internal.vm.ci : hotspot/src/jdk.internal.vm.ci
|
|
||||||
src/jdk.internal.vm.compiler : hotspot/src/jdk.internal.vm.compiler
|
|
||||||
src/jdk.jartool : jdk/src/jdk.jartool
|
|
||||||
src/jdk.javadoc : langtools/src/jdk.javadoc
|
|
||||||
src/jdk.jcmd : jdk/src/jdk.jcmd
|
|
||||||
src/jdk.jconsole : jdk/src/jdk.jconsole
|
|
||||||
src/jdk.jdeps : langtools/src/jdk.jdeps
|
|
||||||
src/jdk.jdi : jdk/src/jdk.jdi
|
|
||||||
src/jdk.jdwp.agent : jdk/src/jdk.jdwp.agent
|
|
||||||
src/jdk.jlink : jdk/src/jdk.jlink
|
|
||||||
src/jdk.jshell : langtools/src/jdk.jshell
|
|
||||||
src/jdk.jsobject : jdk/src/jdk.jsobject
|
|
||||||
src/jdk.jstatd : jdk/src/jdk.jstatd
|
|
||||||
src/jdk.localedata : jdk/src/jdk.localedata
|
|
||||||
src/jdk.management : jdk/src/jdk.management
|
|
||||||
src/jdk.management.agent : jdk/src/jdk.management.agent
|
|
||||||
src/jdk.naming.dns : jdk/src/jdk.naming.dns
|
|
||||||
src/jdk.naming.rmi : jdk/src/jdk.naming.rmi
|
|
||||||
src/jdk.net : jdk/src/jdk.net
|
|
||||||
src/jdk.pack : jdk/src/jdk.pack
|
|
||||||
src/jdk.scripting.nashorn : nashorn/src/jdk.scripting.nashorn
|
|
||||||
src/jdk.scripting.nashorn.shell : nashorn/src/jdk.scripting.nashorn.shell
|
|
||||||
src/jdk.sctp : jdk/src/jdk.sctp
|
|
||||||
src/jdk.security.auth : jdk/src/jdk.security.auth
|
|
||||||
src/jdk.security.jgss : jdk/src/jdk.security.jgss
|
|
||||||
src/jdk.unsupported : jdk/src/jdk.unsupported
|
|
||||||
src/jdk.xml.bind : jaxws/src/jdk.xml.bind
|
|
||||||
src/jdk.xml.dom : jaxp/src/jdk.xml.dom
|
|
||||||
src/jdk.xml.ws : jaxws/src/jdk.xml.ws
|
|
||||||
src/jdk.zipfs : jdk/src/jdk.zipfs
|
|
||||||
src/langtools/sample : langtools/src/sample
|
|
||||||
src/linux : jdk/src/linux
|
|
||||||
src/sample : jdk/src/sample
|
|
||||||
src/hotspot/share : hotspot/src/share/vm
|
|
||||||
src/hotspot/cpu/aarch64 : hotspot/src/cpu/aarch64/vm
|
|
||||||
src/hotspot/cpu/arm : hotspot/src/cpu/arm/vm
|
|
||||||
src/hotspot/cpu/ppc : hotspot/src/cpu/ppc/vm
|
|
||||||
src/hotspot/cpu/s390 : hotspot/src/cpu/s390/vm
|
|
||||||
src/hotspot/cpu/x86 : hotspot/src/cpu/x86/vm
|
|
||||||
src/hotspot/cpu/zero : hotspot/src/cpu/zero/vm
|
|
||||||
src/hotspot/os/aix : hotspot/src/os/aix/vm
|
|
||||||
src/hotspot/os/bsd : hotspot/src/os/bsd/vm
|
|
||||||
src/hotspot/os/linux : hotspot/src/os/linux/vm
|
|
||||||
src/hotspot/os/posix/dtrace : hotspot/src/os/posix/dtrace
|
|
||||||
src/hotspot/os/posix : hotspot/src/os/posix/vm
|
|
||||||
src/hotspot/os/windows : hotspot/src/os/windows/vm
|
|
||||||
src/hotspot/os_cpu/aix_ppc : hotspot/src/os_cpu/aix_ppc/vm
|
|
||||||
src/hotspot/os_cpu/bsd_x86 : hotspot/src/os_cpu/bsd_x86/vm
|
|
||||||
src/hotspot/os_cpu/bsd_zero : hotspot/src/os_cpu/bsd_zero/vm
|
|
||||||
src/hotspot/os_cpu/linux_aarch64 : hotspot/src/os_cpu/linux_aarch64/vm
|
|
||||||
src/hotspot/os_cpu/linux_arm : hotspot/src/os_cpu/linux_arm/vm
|
|
||||||
src/hotspot/os_cpu/linux_ppc : hotspot/src/os_cpu/linux_ppc/vm
|
|
||||||
src/hotspot/os_cpu/linux_s390 : hotspot/src/os_cpu/linux_s390/vm
|
|
||||||
src/hotspot/os_cpu/linux_x86 : hotspot/src/os_cpu/linux_x86/vm
|
|
||||||
src/hotspot/os_cpu/linux_zero : hotspot/src/os_cpu/linux_zero/vm
|
|
||||||
src/hotspot/os_cpu/windows_x86 : hotspot/src/os_cpu/windows_x86/vm
|
|
||||||
src/hotspot : hotspot/src
|
|
||||||
src/utils/IdealGraphVisualizer : hotspot/src/share/tools/IdealGraphVisualizer
|
|
||||||
src/utils/LogCompilation : hotspot/src/share/tools/LogCompilation
|
|
||||||
src/utils/hsdis : hotspot/src/share/tools/hsdis
|
|
||||||
src/utils/reorder : jdk/make/non-build-utils/reorder
|
|
||||||
src/utils/src/build : jdk/make/non-build-utils/src/build
|
|
||||||
make/BuildNashorn.gmk : nashorn/make/BuildNashorn.gmk
|
|
||||||
make/CompileDemos.gmk : jdk/make/CompileDemos.gmk
|
|
||||||
make/CompileInterimLangtools.gmk : langtools/make/CompileInterim.gmk
|
|
||||||
make/CompileModuleTools.gmk : jdk/make/CompileModuleTools.gmk
|
|
||||||
make/CompileToolsHotspot.gmk : hotspot/make/CompileTools.gmk
|
|
||||||
make/CompileToolsJdk.gmk : jdk/make/CompileTools.gmk
|
|
||||||
make/CopyInterimCLDRConverter.gmk : jdk/make/CopyInterimCLDRConverter.gmk
|
|
||||||
make/GenerateModuleSummary.gmk : jdk/make/GenerateModuleSummary.gmk
|
|
||||||
make/ModuleTools.gmk : jdk/make/ModuleTools.gmk
|
|
||||||
make/ToolsJdk.gmk : jdk/make/Tools.gmk
|
|
||||||
make/ToolsLangtools.gmk : langtools/make/Tools.gmk
|
|
||||||
make/UnpackSecurity.gmk : jdk/make/UnpackSecurity.gmk
|
|
||||||
make/autoconf : common/autoconf
|
|
||||||
make/conf : common/conf
|
|
||||||
make/copy : jdk/make/copy
|
|
||||||
make/copy/Copy-java.corba.gmk : corba/make/copy/Copy-java.corba.gmk
|
|
||||||
make/corba : corba/make
|
|
||||||
make/data : jdk/make/data
|
|
||||||
make/gendata : jdk/make/gendata
|
|
||||||
make/gendata/Gendata-jdk.compiler.gmk : langtools/make/gendata/Gendata-jdk.compiler.gmk
|
|
||||||
make/gensrc : jdk/make/gensrc
|
|
||||||
make/gensrc/Gensrc-java.corba.gmk : corba/make/gensrc/Gensrc-java.corba.gmk
|
|
||||||
make/gensrc/Gensrc-jdk.compiler.gmk : langtools/make/gensrc/Gensrc-jdk.compiler.gmk
|
|
||||||
make/gensrc/Gensrc-jdk.hotspot.agent.gmk : hotspot/make/gensrc/Gensrc-jdk.hotspot.agent.gmk
|
|
||||||
make/gensrc/Gensrc-jdk.internal.vm.compiler.gmk : hotspot/make/gensrc/Gensrc-jdk.internal.vm.compiler.gmk
|
|
||||||
make/gensrc/Gensrc-jdk.javadoc.gmk : langtools/make/gensrc/Gensrc-jdk.javadoc.gmk
|
|
||||||
make/gensrc/Gensrc-jdk.jdeps.gmk : langtools/make/gensrc/Gensrc-jdk.jdeps.gmk
|
|
||||||
make/gensrc/Gensrc-jdk.jshell.gmk : langtools/make/gensrc/Gensrc-jdk.jshell.gmk
|
|
||||||
make/gensrc/GensrcCommonLangtools.gmk : langtools/make/gensrc/GensrcCommon.gmk
|
|
||||||
make/hotspot : hotspot/make
|
|
||||||
make/jdk : jdk/make
|
|
||||||
make/langtools : langtools/make
|
|
||||||
make/launcher : jdk/make/launcher
|
|
||||||
make/lib : jdk/make/lib
|
|
||||||
make/lib/Lib-jdk.hotspot.agent.gmk : hotspot/make/lib/Lib-jdk.hotspot.agent.gmk
|
|
||||||
make/mapfiles : jdk/make/mapfiles
|
|
||||||
make/mapfiles/libjsig : hotspot/make/mapfiles/libjsig
|
|
||||||
make/mapfiles/libjvm_db : hotspot/make/mapfiles/libjvm_db
|
|
||||||
make/mapfiles/libjvm_dtrace : hotspot/make/mapfiles/libjvm_dtrace
|
|
||||||
make/mapfiles/libsaproc : hotspot/make/mapfiles/libsaproc
|
|
||||||
make/nashorn : nashorn/make
|
|
||||||
make/nb_native : common/nb_native
|
|
||||||
make/scripts/addNotices.sh : jdk/make/scripts/addNotices.sh
|
|
||||||
make/scripts/compare.sh : common/bin/compare.sh
|
|
||||||
make/scripts/compare_exceptions.sh.incl : common/bin/compare_exceptions.sh.incl
|
|
||||||
make/scripts/genExceptions.sh : jdk/make/scripts/genExceptions.sh
|
|
||||||
make/scripts/hide_important_warnings_from_javac.sh : common/bin/hide_important_warnings_from_javac.sh
|
|
||||||
make/scripts/logger.sh : common/bin/logger.sh
|
|
||||||
make/src/native/fixpath.c : common/src/fixpath.c
|
|
||||||
make/test/JtregNativeHotspot.gmk : hotspot/make/test/JtregNative.gmk
|
|
||||||
make/test/JtregNativeJdk.gmk : jdk/make/test/JtregNative.gmk
|
|
||||||
test/jdk : jdk/test
|
|
||||||
test/langtools : langtools/test
|
|
||||||
test/nashorn : nashorn/test
|
|
||||||
test/jaxp : jaxp/test
|
|
||||||
test/hotspot/gtest : hotspot/test/native
|
|
||||||
test/hotspot/jtreg : hotspot/test
|
|
||||||
bin : common/bin
|
|
||||||
bin/nashorn : nashorn/bin
|
|
||||||
doc : common/doc
|
|
||||||
doc/nashorn : nashorn/docs
|
|
||||||
@@ -1,237 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
#
|
|
||||||
# Copyright (c) 2014, 2017, 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.
|
|
||||||
#
|
|
||||||
# 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.
|
|
||||||
#
|
|
||||||
|
|
||||||
# Script for updating a patch file as per the shuffled/unshuffled source location.
|
|
||||||
|
|
||||||
usage() {
|
|
||||||
echo "Usage: $0 [-h|--help] [-v|--verbose] [-to9|-to10] [-r <repo>] <input_patch> <output_patch>"
|
|
||||||
echo "where:"
|
|
||||||
echo " -to9 create patches appropriate for a JDK 9 source tree"
|
|
||||||
echo " When going to 9, the output patches will be suffixed with the"
|
|
||||||
echo " repo name"
|
|
||||||
echo " -to10 create patches appropriate for a JDK 10 source tree"
|
|
||||||
echo " -r <repo> specify repo for source patch, set to 'top' for top repo"
|
|
||||||
echo " <input_patch> is the input patch file, that needs shuffling/unshuffling"
|
|
||||||
echo " <output_patch> is the updated patch file "
|
|
||||||
echo " "
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
|
|
||||||
SCRIPT_DIR=`dirname $0`
|
|
||||||
UNSHUFFLE_LIST=$SCRIPT_DIR"/unshuffle_list.txt"
|
|
||||||
|
|
||||||
if [ ! -f "$UNSHUFFLE_LIST" ] ; then
|
|
||||||
echo "FATAL: cannot find $UNSHUFFLE_LIST" >&2
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
vflag="false"
|
|
||||||
while [ $# -gt 0 ]
|
|
||||||
do
|
|
||||||
case $1 in
|
|
||||||
-h | --help )
|
|
||||||
usage
|
|
||||||
;;
|
|
||||||
|
|
||||||
-v | --verbose )
|
|
||||||
vflag="true"
|
|
||||||
;;
|
|
||||||
|
|
||||||
-r)
|
|
||||||
repo="$2"
|
|
||||||
shift
|
|
||||||
;;
|
|
||||||
|
|
||||||
-to9)
|
|
||||||
shuffle_to=9
|
|
||||||
;;
|
|
||||||
|
|
||||||
-to10)
|
|
||||||
shuffle_to=10
|
|
||||||
;;
|
|
||||||
|
|
||||||
-*) # bad option
|
|
||||||
usage
|
|
||||||
;;
|
|
||||||
|
|
||||||
* ) # non option
|
|
||||||
break
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
shift
|
|
||||||
done
|
|
||||||
|
|
||||||
# Make sure we have the right number of arguments
|
|
||||||
if [ ! $# -eq 2 ] ; then
|
|
||||||
echo "ERROR: Invalid number of arguments." >&2
|
|
||||||
usage
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Check the given repo
|
|
||||||
repos="top corba jaxp jaxws jdk langtools nashorn hotspot"
|
|
||||||
found="false"
|
|
||||||
if [ -n "$repo" ]; then
|
|
||||||
for r in $repos ; do
|
|
||||||
if [ $repo = "$r" ] ; then
|
|
||||||
found="true"
|
|
||||||
break;
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
if [ $found = "false" ] ; then
|
|
||||||
echo "ERROR: Unknown repo: $repo. Should be one of [$repos]." >&2
|
|
||||||
usage
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$shuffle_to" != "9" -a "$shuffle_to" != "10" ]; then
|
|
||||||
echo "ERROR: Must pick either -to9 or -to10"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
# When going to 10, a repo must be specified for the source patch
|
|
||||||
if [ "$shuffle_to" = "10" -a -z "$repo" ]; then
|
|
||||||
echo "ERROR: Must specify src repo for JDK 9 patch"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Check given input/output files
|
|
||||||
input="$1"
|
|
||||||
if [ "x$input" = "x-" ] ; then
|
|
||||||
input="/dev/stdin"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ ! -f $input -a "x$input" != "x/dev/stdin" ] ; then
|
|
||||||
echo "ERROR: Cannot find input patch file: $input" >&2
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
output="$2"
|
|
||||||
if [ "x$output" = "x-" ] ; then
|
|
||||||
output="/dev/stdout"
|
|
||||||
fi
|
|
||||||
base_output="$output"
|
|
||||||
|
|
||||||
if [ "$shuffle_to" = "10" ]; then
|
|
||||||
if [ -f $output -a "x$output" != "x/dev/stdout" ] ; then
|
|
||||||
echo "ERROR: Output patch already exists: $output" >&2
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
for r in $repos; do
|
|
||||||
if [ -f "$output.$r" ]; then
|
|
||||||
echo "ERROR: Output patch already exists: $output.$r" >&2
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
fi
|
|
||||||
|
|
||||||
verbose() {
|
|
||||||
if [ ${vflag} = "true" ] ; then
|
|
||||||
echo "$@" >&2
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
unshuffle() {
|
|
||||||
line=$@
|
|
||||||
verbose "Attempting to rewrite: \"$line\""
|
|
||||||
|
|
||||||
# Retrieve the file name
|
|
||||||
path=
|
|
||||||
if echo "$line" | egrep '^diff' > /dev/null ; then
|
|
||||||
if ! echo "$line" | egrep '\-\-git' > /dev/null ; then
|
|
||||||
echo "ERROR: Only git patches supported. Please use 'hg export --git ...'." >&2
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
path="`echo "$line" | sed -e s@'diff --git a/'@@ -e s@' b/.*$'@@`"
|
|
||||||
elif echo "$line" | egrep '^\-\-\-' > /dev/null ; then
|
|
||||||
path="`echo "$line" | sed -e s@'--- a/'@@`"
|
|
||||||
elif echo "$line" | egrep '^\+\+\+' > /dev/null ; then
|
|
||||||
path="`echo "$line" | sed s@'+++ b/'@@`"
|
|
||||||
fi
|
|
||||||
verbose "Extracted path: \"$path\""
|
|
||||||
|
|
||||||
# Find the most specific matches in the shuffle list
|
|
||||||
matches=
|
|
||||||
if [ -n "$repo" -a "$repo" != "top" ]; then
|
|
||||||
matchpath="$repo"/"$path"/x
|
|
||||||
else
|
|
||||||
matchpath="$path"/x
|
|
||||||
fi
|
|
||||||
while [ "$matchpath" != "" ] ; do
|
|
||||||
matchpath="`echo $matchpath | sed s@'\(.*\)/.*$'@'\1'@`"
|
|
||||||
|
|
||||||
if [ "$shuffle_to" = "10" ] ; then
|
|
||||||
pattern=": $matchpath$"
|
|
||||||
else
|
|
||||||
pattern="^$matchpath :"
|
|
||||||
fi
|
|
||||||
verbose "Attempting to find \"$matchpath\""
|
|
||||||
matches=`egrep "$pattern" "$UNSHUFFLE_LIST"`
|
|
||||||
if ! [ "x${matches}" = "x" ] ; then
|
|
||||||
verbose "Got matches: [$matches]"
|
|
||||||
break;
|
|
||||||
fi
|
|
||||||
|
|
||||||
if ! echo "$matchpath" | egrep '.*/.*' > /dev/null ; then
|
|
||||||
break;
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
# Rewrite the line, if we have a match
|
|
||||||
if ! [ "x${matches}" = "x" ] ; then
|
|
||||||
shuffled="${matches%% : *}"
|
|
||||||
unshuffled="${matches#* : }"
|
|
||||||
patch_suffix_9=""
|
|
||||||
for r in $repos; do
|
|
||||||
if [ "$unshuffled" != "${unshuffled#$r}" ]; then
|
|
||||||
unshuffled="${unshuffled#$r\/}"
|
|
||||||
patch_suffix_9=".$r"
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
verbose "shuffled: $shuffled"
|
|
||||||
verbose "unshuffled: $unshuffled"
|
|
||||||
verbose "patch_suffix_9: $patch_suffix_9"
|
|
||||||
if [ "$shuffle_to" = "10" ] ; then
|
|
||||||
newline="`echo "$line" | sed -e s@"$unshuffled"@"$shuffled"@g`"
|
|
||||||
else
|
|
||||||
newline="`echo "$line" | sed -e s@"$shuffled"@"$unshuffled"@g`"
|
|
||||||
output=$base_output$patch_suffix_9
|
|
||||||
verbose "Writing to $output"
|
|
||||||
fi
|
|
||||||
verbose "Rewriting to \"$newline\""
|
|
||||||
echo "$newline" >> $output
|
|
||||||
else
|
|
||||||
echo "WARNING: no match found for $path"
|
|
||||||
echo "$line" >> $output
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
while IFS= read -r line
|
|
||||||
do
|
|
||||||
if echo "$line" | egrep '^diff|^\-\-\-|^\+\+\+' > /dev/null ; then
|
|
||||||
unshuffle "$line"
|
|
||||||
else
|
|
||||||
printf "%s\n" "$line" >> $output
|
|
||||||
fi
|
|
||||||
done < "$input"
|
|
||||||
@@ -62,17 +62,22 @@ Help()
|
|||||||
echo "options:"
|
echo "options:"
|
||||||
echo "-c Specifies the company. Set to Oracle by default."
|
echo "-c Specifies the company. Set to Oracle by default."
|
||||||
echo "-y Specifies the copyright year. Set to current year by default."
|
echo "-y Specifies the copyright year. Set to current year by default."
|
||||||
|
echo "-b Specifies the base reference for change set lookup."
|
||||||
echo "-f Updates the copyright for all change sets in a given year,"
|
echo "-f Updates the copyright for all change sets in a given year,"
|
||||||
echo " as specified by -y."
|
echo " as specified by -y. Overrides -b flag."
|
||||||
echo "-h Print this help."
|
echo "-h Print this help."
|
||||||
echo
|
echo
|
||||||
}
|
}
|
||||||
|
|
||||||
full_year=false
|
full_year=false
|
||||||
|
base_reference=master
|
||||||
|
|
||||||
# Process options
|
# Process options
|
||||||
while getopts "c:fhy:" option; do
|
while getopts "b:c:fhy:" option; do
|
||||||
case $option in
|
case $option in
|
||||||
|
b) # supplied base reference
|
||||||
|
base_reference=${OPTARG}
|
||||||
|
;;
|
||||||
c) # supplied company year
|
c) # supplied company year
|
||||||
company=${OPTARG}
|
company=${OPTARG}
|
||||||
;;
|
;;
|
||||||
@@ -111,7 +116,7 @@ else
|
|||||||
if [ "$full_year" = "true" ]; then
|
if [ "$full_year" = "true" ]; then
|
||||||
vcs_list_changesets=(git log --no-merges --since="${year}-01-01T00:00:00Z" --until="${year}-12-31T23:59:59Z" --pretty=tformat:"%H")
|
vcs_list_changesets=(git log --no-merges --since="${year}-01-01T00:00:00Z" --until="${year}-12-31T23:59:59Z" --pretty=tformat:"%H")
|
||||||
else
|
else
|
||||||
vcs_list_changesets=(git log --no-merges 'master..HEAD' --since="${year}-01-01T00:00:00Z" --until="${year}-12-31T23:59:59Z" --pretty=tformat:"%H")
|
vcs_list_changesets=(git log --no-merges "${base_reference}..HEAD" --since="${year}-01-01T00:00:00Z" --until="${year}-12-31T23:59:59Z" --pretty=tformat:"%H")
|
||||||
fi
|
fi
|
||||||
vcs_changeset_message=(git log -1 --pretty=tformat:"%B") # followed by ${changeset}
|
vcs_changeset_message=(git log -1 --pretty=tformat:"%B") # followed by ${changeset}
|
||||||
vcs_changeset_files=(git diff-tree --no-commit-id --name-only -r) # followed by ${changeset}
|
vcs_changeset_files=(git diff-tree --no-commit-id --name-only -r) # followed by ${changeset}
|
||||||
111
bin/update_pch.sh
Normal file
111
bin/update_pch.sh
Normal file
@@ -0,0 +1,111 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
# Copyright (c) 2025, 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.
|
||||||
|
#
|
||||||
|
# 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.
|
||||||
|
|
||||||
|
# The output of this script may require some degree of human curation:
|
||||||
|
# - Redundant headers, e.g. both x.hpp, x.inline.hpp are included;
|
||||||
|
# - Headers relative to a non-default feature should be protected by an
|
||||||
|
# appropriate 'if' clause to make sure all variants can build without
|
||||||
|
# errors.
|
||||||
|
|
||||||
|
source_path="$(dirname ${0})"
|
||||||
|
this_script_dir="$(cd -- "${source_path}" > /dev/null && pwd)"
|
||||||
|
if test -z "${this_script_dir}"; then
|
||||||
|
echo "Error: Could not determine location of this script"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Work in top directory
|
||||||
|
cd $this_script_dir/..
|
||||||
|
|
||||||
|
# Time threshold for header compilation, if the time exceeds the
|
||||||
|
# threshold the header will be precompiled.
|
||||||
|
if [ -z "$MIN_MS" ]; then
|
||||||
|
MIN_MS=100000
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -z "$CLEAN" ]; then
|
||||||
|
CLEAN=true
|
||||||
|
elif [ "$CLEAN" != "true" ] && [ "$CLEAN" != "false" ]; then
|
||||||
|
echo "Expected either 'true' or 'false' for CLEAN"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# CBA_PATH should point to a valid ClangBuildAnalyzer executable.
|
||||||
|
# Build steps:
|
||||||
|
# git clone --depth 1 git@github.com:aras-p/ClangBuildAnalyzer.git
|
||||||
|
# cd ClangBuildAnalyzer
|
||||||
|
# make -f projects/make/Makefile
|
||||||
|
if [ -z "$CBA_PATH" ]; then
|
||||||
|
CBA_PATH="./ClangBuildAnalyzer/build/ClangBuildAnalyzer"
|
||||||
|
fi
|
||||||
|
|
||||||
|
set -eux
|
||||||
|
|
||||||
|
PRECOMPILED_HPP="src/hotspot/share/precompiled/precompiled.hpp"
|
||||||
|
CBA_CONFIG="ClangBuildAnalyzer.ini"
|
||||||
|
TIMESTAMP="$(date +%Y%m%d-%H%M)"
|
||||||
|
RUN_NAME="pch_update_$TIMESTAMP"
|
||||||
|
CBA_OUTPUT="cba_out_$TIMESTAMP"
|
||||||
|
|
||||||
|
if [ "$CLEAN" = "true" ]; then
|
||||||
|
trap 'rm -rf "build/'"$RUN_NAME"'" "$CBA_OUTPUT" "$CBA_CONFIG"' EXIT
|
||||||
|
fi
|
||||||
|
|
||||||
|
sh configure --with-toolchain-type=clang \
|
||||||
|
--with-conf-name="$RUN_NAME" \
|
||||||
|
--disable-precompiled-headers \
|
||||||
|
--with-extra-cxxflags="-ftime-trace" \
|
||||||
|
--with-extra-cflags="-ftime-trace"
|
||||||
|
|
||||||
|
make clean CONF_NAME="$RUN_NAME"
|
||||||
|
make hotspot CONF_NAME="$RUN_NAME"
|
||||||
|
"$CBA_PATH" --all "./build/$RUN_NAME/hotspot/variant-server/libjvm/objs" \
|
||||||
|
"$CBA_OUTPUT"
|
||||||
|
|
||||||
|
# Preserve license and comments on top
|
||||||
|
cat "$PRECOMPILED_HPP" | awk '/^#include/ {exit} {print}' > "$PRECOMPILED_HPP.tmp"
|
||||||
|
|
||||||
|
if [ ! -f "$CBA_CONFIG" ]; then
|
||||||
|
cat <<EOF > "$CBA_CONFIG"
|
||||||
|
[counts]
|
||||||
|
header=100
|
||||||
|
headerChain=0
|
||||||
|
template=0
|
||||||
|
function=0
|
||||||
|
fileCodegen=0
|
||||||
|
fileParse=0
|
||||||
|
|
||||||
|
[misc]
|
||||||
|
onlyRootHeaders=true
|
||||||
|
EOF
|
||||||
|
fi
|
||||||
|
|
||||||
|
"$CBA_PATH" --analyze "$CBA_OUTPUT" | \
|
||||||
|
grep " ms: " | \
|
||||||
|
# Keep the headers more expensive than ${1}ms
|
||||||
|
awk -v x="$MIN_MS" '$1 < x { exit } { print $3 }' | \
|
||||||
|
# Filter away non-hotspot headers
|
||||||
|
grep hotspot/share | \
|
||||||
|
awk -F "hotspot/share/" '{ printf "#include \"%s\"\n", $2 }' \
|
||||||
|
>> "$PRECOMPILED_HPP.tmp"
|
||||||
|
mv "$PRECOMPILED_HPP.tmp" "$PRECOMPILED_HPP"
|
||||||
|
|
||||||
|
java test/hotspot/jtreg/sources/SortIncludes.java --update "$PRECOMPILED_HPP"
|
||||||
@@ -1451,10 +1451,10 @@ of a cross-compiling toolchain and a sysroot environment which can
|
|||||||
easily be used together with the <code>--with-devkit</code> configure
|
easily be used together with the <code>--with-devkit</code> configure
|
||||||
option to cross compile the JDK. On Linux/x86_64, the following
|
option to cross compile the JDK. On Linux/x86_64, the following
|
||||||
command:</p>
|
command:</p>
|
||||||
<pre><code>bash configure --with-devkit=<devkit-path> --openjdk-target=ppc64-linux-gnu && make</code></pre>
|
<pre><code>bash configure --with-devkit=<devkit-path> --openjdk-target=ppc64le-linux-gnu && make</code></pre>
|
||||||
<p>will configure and build the JDK for Linux/ppc64 assuming that
|
<p>will configure and build the JDK for Linux/ppc64le assuming that
|
||||||
<code><devkit-path></code> points to a Linux/x86_64 to Linux/ppc64
|
<code><devkit-path></code> points to a Linux/x86_64 to
|
||||||
devkit.</p>
|
Linux/ppc64le devkit.</p>
|
||||||
<p>Devkits can be created from the <code>make/devkit</code> directory by
|
<p>Devkits can be created from the <code>make/devkit</code> directory by
|
||||||
executing:</p>
|
executing:</p>
|
||||||
<pre><code>make [ TARGETS="<TARGET_TRIPLET>+" ] [ BASE_OS=<OS> ] [ BASE_OS_VERSION=<VER> ]</code></pre>
|
<pre><code>make [ TARGETS="<TARGET_TRIPLET>+" ] [ BASE_OS=<OS> ] [ BASE_OS_VERSION=<VER> ]</code></pre>
|
||||||
@@ -1481,22 +1481,22 @@ following targets are known to work:</p>
|
|||||||
<td>arm-linux-gnueabihf</td>
|
<td>arm-linux-gnueabihf</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="even">
|
<tr class="even">
|
||||||
<td>ppc64-linux-gnu</td>
|
<td>ppc64le-linux-gnu</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="odd">
|
<tr class="odd">
|
||||||
<td>ppc64le-linux-gnu</td>
|
<td>riscv64-linux-gnu</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="even">
|
<tr class="even">
|
||||||
<td>s390x-linux-gnu</td>
|
<td>s390x-linux-gnu</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
<p><code>BASE_OS</code> must be one of "OEL6" for Oracle Enterprise
|
<p><code>BASE_OS</code> must be one of <code>OL</code> for Oracle
|
||||||
Linux 6 or "Fedora" (if not specified "OEL6" will be the default). If
|
Enterprise Linux or <code>Fedora</code>. If the base OS is
|
||||||
the base OS is "Fedora" the corresponding Fedora release can be
|
<code>Fedora</code> the corresponding Fedora release can be specified
|
||||||
specified with the help of the <code>BASE_OS_VERSION</code> option (with
|
with the help of the <code>BASE_OS_VERSION</code> option. If the build
|
||||||
"27" as default version). If the build is successful, the new devkits
|
is successful, the new devkits can be found in the
|
||||||
can be found in the <code>build/devkit/result</code> subdirectory:</p>
|
<code>build/devkit/result</code> subdirectory:</p>
|
||||||
<pre><code>cd make/devkit
|
<pre><code>cd make/devkit
|
||||||
make TARGETS="ppc64le-linux-gnu aarch64-linux-gnu" BASE_OS=Fedora BASE_OS_VERSION=21
|
make TARGETS="ppc64le-linux-gnu aarch64-linux-gnu" BASE_OS=Fedora BASE_OS_VERSION=21
|
||||||
ls -1 ../../build/devkit/result/
|
ls -1 ../../build/devkit/result/
|
||||||
|
|||||||
@@ -1258,11 +1258,11 @@ toolchain and a sysroot environment which can easily be used together with the
|
|||||||
following command:
|
following command:
|
||||||
|
|
||||||
```
|
```
|
||||||
bash configure --with-devkit=<devkit-path> --openjdk-target=ppc64-linux-gnu && make
|
bash configure --with-devkit=<devkit-path> --openjdk-target=ppc64le-linux-gnu && make
|
||||||
```
|
```
|
||||||
|
|
||||||
will configure and build the JDK for Linux/ppc64 assuming that `<devkit-path>`
|
will configure and build the JDK for Linux/ppc64le assuming that `<devkit-path>`
|
||||||
points to a Linux/x86_64 to Linux/ppc64 devkit.
|
points to a Linux/x86_64 to Linux/ppc64le devkit.
|
||||||
|
|
||||||
Devkits can be created from the `make/devkit` directory by executing:
|
Devkits can be created from the `make/devkit` directory by executing:
|
||||||
|
|
||||||
@@ -1281,16 +1281,14 @@ at least the following targets are known to work:
|
|||||||
| x86_64-linux-gnu |
|
| x86_64-linux-gnu |
|
||||||
| aarch64-linux-gnu |
|
| aarch64-linux-gnu |
|
||||||
| arm-linux-gnueabihf |
|
| arm-linux-gnueabihf |
|
||||||
| ppc64-linux-gnu |
|
|
||||||
| ppc64le-linux-gnu |
|
| ppc64le-linux-gnu |
|
||||||
|
| riscv64-linux-gnu |
|
||||||
| s390x-linux-gnu |
|
| s390x-linux-gnu |
|
||||||
|
|
||||||
`BASE_OS` must be one of "OEL6" for Oracle Enterprise Linux 6 or "Fedora" (if
|
`BASE_OS` must be one of `OL` for Oracle Enterprise Linux or `Fedora`. If the
|
||||||
not specified "OEL6" will be the default). If the base OS is "Fedora" the
|
base OS is `Fedora` the corresponding Fedora release can be specified with the
|
||||||
corresponding Fedora release can be specified with the help of the
|
help of the `BASE_OS_VERSION` option. If the build is successful, the new
|
||||||
`BASE_OS_VERSION` option (with "27" as default version). If the build is
|
devkits can be found in the `build/devkit/result` subdirectory:
|
||||||
successful, the new devkits can be found in the `build/devkit/result`
|
|
||||||
subdirectory:
|
|
||||||
|
|
||||||
```
|
```
|
||||||
cd make/devkit
|
cd make/devkit
|
||||||
|
|||||||
@@ -50,6 +50,9 @@ id="toc-factoring-and-class-design">Factoring and Class Design</a></li>
|
|||||||
<li><a href="#commenting" id="toc-commenting">Commenting</a></li>
|
<li><a href="#commenting" id="toc-commenting">Commenting</a></li>
|
||||||
<li><a href="#macros" id="toc-macros">Macros</a></li>
|
<li><a href="#macros" id="toc-macros">Macros</a></li>
|
||||||
<li><a href="#whitespace" id="toc-whitespace">Whitespace</a></li>
|
<li><a href="#whitespace" id="toc-whitespace">Whitespace</a></li>
|
||||||
|
<li><a href="#avoid-implicit-conversions-to-bool"
|
||||||
|
id="toc-avoid-implicit-conversions-to-bool">Avoid implicit conversions
|
||||||
|
to bool</a></li>
|
||||||
<li><a href="#miscellaneous"
|
<li><a href="#miscellaneous"
|
||||||
id="toc-miscellaneous">Miscellaneous</a></li>
|
id="toc-miscellaneous">Miscellaneous</a></li>
|
||||||
</ul></li>
|
</ul></li>
|
||||||
@@ -72,24 +75,77 @@ Standard Library</a></li>
|
|||||||
Deduction</a></li>
|
Deduction</a></li>
|
||||||
<li><a href="#expression-sfinae" id="toc-expression-sfinae">Expression
|
<li><a href="#expression-sfinae" id="toc-expression-sfinae">Expression
|
||||||
SFINAE</a></li>
|
SFINAE</a></li>
|
||||||
|
<li><a href="#trailing-return-type-syntax-for-functions"
|
||||||
|
id="toc-trailing-return-type-syntax-for-functions">Trailing return type
|
||||||
|
syntax for functions</a></li>
|
||||||
|
<li><a href="#non-type-template-parameter-values"
|
||||||
|
id="toc-non-type-template-parameter-values">Non-type template parameter
|
||||||
|
values</a></li>
|
||||||
<li><a href="#enum" id="toc-enum">enum</a></li>
|
<li><a href="#enum" id="toc-enum">enum</a></li>
|
||||||
<li><a href="#alignas" id="toc-alignas">alignas</a></li>
|
<li><a href="#alignas" id="toc-alignas">alignas</a></li>
|
||||||
<li><a href="#thread_local" id="toc-thread_local">thread_local</a></li>
|
<li><a href="#thread_local" id="toc-thread_local">thread_local</a></li>
|
||||||
<li><a href="#nullptr" id="toc-nullptr">nullptr</a></li>
|
<li><a href="#nullptr" id="toc-nullptr">nullptr</a></li>
|
||||||
<li><a href="#atomic" id="toc-atomic"><atomic></a></li>
|
<li><a href="#atomic" id="toc-atomic"><atomic></a></li>
|
||||||
|
<li><a href="#inline-variables" id="toc-inline-variables">Inline
|
||||||
|
Variables</a></li>
|
||||||
|
<li><a href="#initializing-variables-with-static-storage-duration"
|
||||||
|
id="toc-initializing-variables-with-static-storage-duration">Initializing
|
||||||
|
variables with static storage duration</a></li>
|
||||||
<li><a href="#uniform-initialization"
|
<li><a href="#uniform-initialization"
|
||||||
id="toc-uniform-initialization">Uniform Initialization</a></li>
|
id="toc-uniform-initialization">Uniform Initialization</a></li>
|
||||||
|
<li><a href="#mandatory-copy-elision"
|
||||||
|
id="toc-mandatory-copy-elision">Mandatory Copy Elision</a></li>
|
||||||
<li><a href="#local-function-objects"
|
<li><a href="#local-function-objects"
|
||||||
id="toc-local-function-objects">Local Function Objects</a></li>
|
id="toc-local-function-objects">Local Function Objects</a></li>
|
||||||
<li><a href="#inheriting-constructors"
|
<li><a href="#inheriting-constructors"
|
||||||
id="toc-inheriting-constructors">Inheriting constructors</a></li>
|
id="toc-inheriting-constructors">Inheriting constructors</a></li>
|
||||||
<li><a href="#attributes" id="toc-attributes">Attributes</a></li>
|
<li><a href="#attributes" id="toc-attributes">Attributes</a></li>
|
||||||
|
<li><a href="#noexcept" id="toc-noexcept">noexcept</a></li>
|
||||||
|
<li><a href="#enhanced-selection-statements"
|
||||||
|
id="toc-enhanced-selection-statements">Enhanced selection
|
||||||
|
statements</a></li>
|
||||||
|
<li><a href="#expression-evaluation-order"
|
||||||
|
id="toc-expression-evaluation-order">Expression Evaluation
|
||||||
|
Order</a></li>
|
||||||
|
<li><a href="#compatibility-with-c11"
|
||||||
|
id="toc-compatibility-with-c11">Compatibility with C11</a></li>
|
||||||
<li><a href="#additional-permitted-features"
|
<li><a href="#additional-permitted-features"
|
||||||
id="toc-additional-permitted-features">Additional Permitted
|
id="toc-additional-permitted-features">Additional Permitted
|
||||||
Features</a></li>
|
Features</a></li>
|
||||||
|
</ul></li>
|
||||||
<li><a href="#excluded-features" id="toc-excluded-features">Excluded
|
<li><a href="#excluded-features" id="toc-excluded-features">Excluded
|
||||||
|
Features</a>
|
||||||
|
<ul>
|
||||||
|
<li><a href="#structured-bindings"
|
||||||
|
id="toc-structured-bindings">Structured Bindings</a></li>
|
||||||
|
<li><a href="#file-system-library" id="toc-file-system-library">File
|
||||||
|
System Library</a></li>
|
||||||
|
<li><a href="#aggregate-extensions"
|
||||||
|
id="toc-aggregate-extensions">Aggregate Extensions</a></li>
|
||||||
|
<li><a href="#additional-excluded-features"
|
||||||
|
id="toc-additional-excluded-features">Additional Excluded
|
||||||
Features</a></li>
|
Features</a></li>
|
||||||
|
</ul></li>
|
||||||
<li><a href="#undecided-features" id="toc-undecided-features">Undecided
|
<li><a href="#undecided-features" id="toc-undecided-features">Undecided
|
||||||
|
Features</a>
|
||||||
|
<ul>
|
||||||
|
<li><a href="#stdoptional"
|
||||||
|
id="toc-stdoptional">std::optional<></a></li>
|
||||||
|
<li><a href="#stdbyte" id="toc-stdbyte">std::byte</a></li>
|
||||||
|
<li><a href="#string-views" id="toc-string-views">String Views</a></li>
|
||||||
|
<li><a href="#substring-and-subsequence-searching"
|
||||||
|
id="toc-substring-and-subsequence-searching">Substring and Subsequence
|
||||||
|
Searching</a></li>
|
||||||
|
<li><a href="#new-and-delete-with-over-aligned-data"
|
||||||
|
id="toc-new-and-delete-with-over-aligned-data"><code>new</code> and
|
||||||
|
<code>delete</code> with Over-Aligned Data</a></li>
|
||||||
|
<li><a href="#stdto_chars-and-stdfrom_chars"
|
||||||
|
id="toc-stdto_chars-and-stdfrom_chars"><code>std::to_chars()</code> and
|
||||||
|
<code>std::from_chars</code></a></li>
|
||||||
|
<li><a href="#stdlaunder"
|
||||||
|
id="toc-stdlaunder"><code>std::launder()</code></a></li>
|
||||||
|
<li><a href="#additional-undecided-features"
|
||||||
|
id="toc-additional-undecided-features">Additional Undecided
|
||||||
Features</a></li>
|
Features</a></li>
|
||||||
</ul></li>
|
</ul></li>
|
||||||
</ul>
|
</ul>
|
||||||
@@ -205,6 +261,16 @@ lines of code. Name what you must repeat.</p></li>
|
|||||||
attribute, the change should be done with a "setter" accessor matched to
|
attribute, the change should be done with a "setter" accessor matched to
|
||||||
the simple "getter".</p></li>
|
the simple "getter".</p></li>
|
||||||
</ul>
|
</ul>
|
||||||
|
<h4 id="conventions-for-lock-free-code">Conventions for Lock-free
|
||||||
|
Code</h4>
|
||||||
|
<p>Sometimes variables are accessed concurrently without appropriate
|
||||||
|
synchronization context, such as a held mutex or at a safepoint. In such
|
||||||
|
cases the variable should be declared <code>volatile</code> and it
|
||||||
|
should NOT be accessed as a normal C++ lvalue. Rather, access should be
|
||||||
|
performed via functions from <code>Atomic</code>, such as
|
||||||
|
<code>Atomic::load</code>, <code>Atomic::store</code>, etc.</p>
|
||||||
|
<p>This special formulation makes it more clear to maintainers that the
|
||||||
|
variable is accessed concurrently in a lock-free manner.</p>
|
||||||
<h3 id="source-files">Source Files</h3>
|
<h3 id="source-files">Source Files</h3>
|
||||||
<ul>
|
<ul>
|
||||||
<li><p>All source files must have a globally unique basename. The build
|
<li><p>All source files must have a globally unique basename. The build
|
||||||
@@ -404,22 +470,25 @@ adjust new lines horizontally to be consistent with that organization.
|
|||||||
(E.g., trailing backslashes on long macro definitions often
|
(E.g., trailing backslashes on long macro definitions often
|
||||||
align.)</p></li>
|
align.)</p></li>
|
||||||
</ul>
|
</ul>
|
||||||
<h3 id="miscellaneous">Miscellaneous</h3>
|
<h3 id="avoid-implicit-conversions-to-bool">Avoid implicit conversions
|
||||||
<ul>
|
to bool</h3>
|
||||||
<li><p>Use the <a href="https://en.cppreference.com/w/cpp/language/raii"
|
|
||||||
title="Resource Acquisition Is Initialization">Resource Acquisition Is
|
|
||||||
Initialization</a> (RAII) design pattern to manage bracketed critical
|
|
||||||
sections. See class <code>ResourceMark</code> for an example.</p></li>
|
|
||||||
<li><p>Avoid implicit conversions to <code>bool</code>.</p>
|
|
||||||
<ul>
|
<ul>
|
||||||
<li>Use <code>bool</code> for boolean values.</li>
|
<li>Use <code>bool</code> for boolean values.</li>
|
||||||
<li>Do not use ints or pointers as (implicit) booleans with
|
<li>Do not use ints or pointers as (implicit) booleans with
|
||||||
<code>&&</code>, <code>||</code>, <code>if</code>,
|
<code>&&</code>, <code>||</code>, <code>if</code>,
|
||||||
<code>while</code>. Instead, compare explicitly, i.e.
|
<code>while</code>. Instead, compare explicitly, i.e.
|
||||||
<code>if (x != 0)</code> or <code>if (ptr != nullptr)</code>, etc.</li>
|
<code>if (x != 0)</code> or <code>if (ptr != nullptr)</code>, etc.</li>
|
||||||
<li>Do not use declarations in <em>condition</em> forms, i.e. don't use
|
<li>Do not use non-boolean declarations in <em>condition</em> forms,
|
||||||
<code>if (T v = value) { ... }</code>.</li>
|
i.e. don't use <code>if (T v = value) { ... }</code>. But see <a
|
||||||
</ul></li>
|
href="#enhanced-selection-statements">Enhanced selection
|
||||||
|
statements</a>.</li>
|
||||||
|
</ul>
|
||||||
|
<h3 id="miscellaneous">Miscellaneous</h3>
|
||||||
|
<ul>
|
||||||
|
<li><p>Use the <a href="https://en.cppreference.com/w/cpp/language/raii"
|
||||||
|
title="Resource Acquisition Is Initialization">Resource Acquisition Is
|
||||||
|
Initialization</a> (RAII) design pattern to manage bracketed critical
|
||||||
|
sections. See class <code>ResourceMark</code> for an example.</p></li>
|
||||||
<li><p>Use functions from globalDefinitions.hpp and related files when
|
<li><p>Use functions from globalDefinitions.hpp and related files when
|
||||||
performing bitwise operations on integers. Do not code directly as C
|
performing bitwise operations on integers. Do not code directly as C
|
||||||
operators, unless they are extremely simple. (Examples:
|
operators, unless they are extremely simple. (Examples:
|
||||||
@@ -431,16 +500,16 @@ default case. It is ok to have an empty default with comment.</p></li>
|
|||||||
</ul>
|
</ul>
|
||||||
<h2 id="use-of-c-features">Use of C++ Features</h2>
|
<h2 id="use-of-c-features">Use of C++ Features</h2>
|
||||||
<p>HotSpot was originally written in a subset of the C++98/03 language.
|
<p>HotSpot was originally written in a subset of the C++98/03 language.
|
||||||
More recently, support for C++14 is provided, though again, HotSpot only
|
More recently, support for C++17 is provided, though again, HotSpot only
|
||||||
uses a subset. (Backports to JDK versions lacking support for more
|
uses a subset. (Backports to JDK versions lacking support for more
|
||||||
recent Standards must of course stick with the original C++98/03
|
recent Standards must of course stick with the original C++98/03
|
||||||
subset.)</p>
|
subset.)</p>
|
||||||
<p>This section describes that subset. Features from the C++98/03
|
<p>This section describes that subset. Features from the C++98/03
|
||||||
language may be used unless explicitly excluded here. Features from
|
language may be used unless explicitly excluded here. Features from
|
||||||
C++11 and C++14 may be explicitly permitted or explicitly excluded, and
|
C++11, C++14, and C++17 may be explicitly permitted or explicitly
|
||||||
discussed accordingly here. There is a third category, undecided
|
excluded, and discussed accordingly here. There is a third category,
|
||||||
features, about which HotSpot developers have not yet reached a
|
undecided features, about which HotSpot developers have not yet reached
|
||||||
consensus, or perhaps have not discussed at all. Use of these features
|
a consensus, or perhaps have not discussed at all. Use of these features
|
||||||
is also excluded.</p>
|
is also excluded.</p>
|
||||||
<p>(The use of some features may not be immediately obvious and may slip
|
<p>(The use of some features may not be immediately obvious and may slip
|
||||||
in anyway, since the compiler will accept them. The code review process
|
in anyway, since the compiler will accept them. The code review process
|
||||||
@@ -449,9 +518,9 @@ is the main defense against this.)</p>
|
|||||||
provide more extensive discussion or rationale for limitations. Features
|
provide more extensive discussion or rationale for limitations. Features
|
||||||
that don't have their own subsection are listed in omnibus feature
|
that don't have their own subsection are listed in omnibus feature
|
||||||
sections for permitted, excluded, and undecided features.</p>
|
sections for permitted, excluded, and undecided features.</p>
|
||||||
<p>Lists of new features for C++11 and C++14, along with links to their
|
<p>Lists of new features for C++11, C++14, and C++17, along with links
|
||||||
descriptions, can be found in the online documentation for some of the
|
to their descriptions, can be found in the online documentation for some
|
||||||
compilers and libraries. The C++14 Standard is the definitive
|
of the compilers and libraries. The C++17 Standard is the definitive
|
||||||
description.</p>
|
description.</p>
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="https://gcc.gnu.org/projects/cxx-status.html">C++ Standards
|
<li><a href="https://gcc.gnu.org/projects/cxx-status.html">C++ Standards
|
||||||
@@ -648,12 +717,42 @@ href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n1984.pdf">n1984</
|
|||||||
For local variables, this can be used to make the code clearer by
|
For local variables, this can be used to make the code clearer by
|
||||||
eliminating type information that is obvious or irrelevant. Excessive
|
eliminating type information that is obvious or irrelevant. Excessive
|
||||||
use can make code much harder to understand.</p></li>
|
use can make code much harder to understand.</p></li>
|
||||||
<li><p>Function return type deduction (<a
|
<li><p><code>auto</code> for non-type template parameters (<a
|
||||||
|
href="http://wg21.link/p0127r2">p0127r2</a>)<br> <code>auto</code> may
|
||||||
|
be used as a placeholder for the type of a non-type template parameter.
|
||||||
|
The type is deduced from the value provided in a template
|
||||||
|
instantiation.</p></li>
|
||||||
|
</ul>
|
||||||
|
<p><a name="function-return-type-deduction"></a> * Function return type
|
||||||
|
deduction (<a
|
||||||
href="https://isocpp.org/files/papers/N3638.html">n3638</a>)<br> Only
|
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>
|
use if the function body has a very small number of <code>return</code>
|
||||||
statements, and generally relatively little other code.</p></li>
|
statements, and generally relatively little other code.</p>
|
||||||
|
<ul>
|
||||||
|
<li>Class template argument deduction (<a
|
||||||
|
href="http://wg21.link/n3602">n3602</a>, <a
|
||||||
|
href="http://wg21.link/p0091r3">p0091r3</a>)<br> The template arguments
|
||||||
|
of a class template may be deduced from the arguments to a constructor.
|
||||||
|
This is similar to ordinary function argument deduction, though partial
|
||||||
|
deduction with only <em>some</em> template arguments explicitly provided
|
||||||
|
is not permitted for class template argument deduction. Deduction guides
|
||||||
|
may be used to provide additional control over the deduction. As with
|
||||||
|
<code>auto</code> variable declarations, excessive use can make code
|
||||||
|
harder to understand, because explicit type information is lacking. But
|
||||||
|
it can also remove the need to be explicit about types that are either
|
||||||
|
obvious, or that are very hard to write. For example, these allow the
|
||||||
|
addition of a scope-guard mechanism with nice syntax; something like
|
||||||
|
this</li>
|
||||||
|
</ul>
|
||||||
|
<pre><code> ScopeGuard guard{[&]{ ... cleanup code ... }};</code></pre>
|
||||||
|
<ul>
|
||||||
<li><p>Also see <a href="#lambdaexpressions">lambda
|
<li><p>Also see <a href="#lambdaexpressions">lambda
|
||||||
expressions</a>.</p></li>
|
expressions</a>.</p></li>
|
||||||
|
<li><p><code>decltype(auto)</code> should be avoided, whether for
|
||||||
|
variables, for non-type template parameters, or for function return
|
||||||
|
types. There are subtle and complex differences between this placeholder
|
||||||
|
type and <code>auto</code>. Any use would need very careful
|
||||||
|
explanation.</p></li>
|
||||||
</ul>
|
</ul>
|
||||||
<h3 id="expression-sfinae">Expression SFINAE</h3>
|
<h3 id="expression-sfinae">Expression SFINAE</h3>
|
||||||
<p><a href="https://en.cppreference.com/w/cpp/language/sfinae"
|
<p><a href="https://en.cppreference.com/w/cpp/language/sfinae"
|
||||||
@@ -678,6 +777,53 @@ class="uri">https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95468</a><br>
|
|||||||
<a
|
<a
|
||||||
href="https://developercommunity.visualstudio.com/content/problem/396562/sizeof-deduced-type-is-sometimes-not-a-constant-ex.html"
|
href="https://developercommunity.visualstudio.com/content/problem/396562/sizeof-deduced-type-is-sometimes-not-a-constant-ex.html"
|
||||||
class="uri">https://developercommunity.visualstudio.com/content/problem/396562/sizeof-deduced-type-is-sometimes-not-a-constant-ex.html</a></p>
|
class="uri">https://developercommunity.visualstudio.com/content/problem/396562/sizeof-deduced-type-is-sometimes-not-a-constant-ex.html</a></p>
|
||||||
|
<h3 id="trailing-return-type-syntax-for-functions">Trailing return type
|
||||||
|
syntax for functions</h3>
|
||||||
|
<p>A function's return type may be specified after the parameters and
|
||||||
|
qualifiers (<a
|
||||||
|
href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2541.htm">n2541</a>).
|
||||||
|
In such a declaration the normal return type is <code>auto</code> and
|
||||||
|
the return type is indicated by <code>-></code> followed by the type.
|
||||||
|
Although both use <code>auto</code> in the "normal" leading return type
|
||||||
|
position, this differs from <a
|
||||||
|
href="#function-return-type-deduction">function return type
|
||||||
|
deduction</a>, in that the return type is explicit rather than deduced,
|
||||||
|
but specified in a trailing position.</p>
|
||||||
|
<p>Use of trailing return types is permitted. However, the normal,
|
||||||
|
leading position for the return type is preferred. A trailing return
|
||||||
|
type should only be used where it provides some benefit. Such benefits
|
||||||
|
usually arise because a trailing return type is in a different scope
|
||||||
|
than a leading return type.</p>
|
||||||
|
<ul>
|
||||||
|
<li><p>If the function identifier is a nested name specifier, then the
|
||||||
|
trailing return type occurs in the nested scope. This may permit simpler
|
||||||
|
naming in the return type because of the different name lookup
|
||||||
|
context.</p></li>
|
||||||
|
<li><p>The trailing return type is in the scope of the parameters,
|
||||||
|
making their types accessible via <code>decltype</code>. For
|
||||||
|
example</p></li>
|
||||||
|
</ul>
|
||||||
|
<pre><code>template<typename T, typename U> auto add(T t, U u) -> decltype(t + u);</code></pre>
|
||||||
|
<p>rather than</p>
|
||||||
|
<pre><code>template<typename T, typename U> decltype((*(T*)0) + (*(U*)0)) add(T t, U u);</code></pre>
|
||||||
|
<ul>
|
||||||
|
<li>Complex calculated leading return types may obscure the normal
|
||||||
|
syntactic boundaries, making it more difficult for a reader to find the
|
||||||
|
function name and parameters. This is particularly common in cases where
|
||||||
|
the return type is being used for <a
|
||||||
|
href="https://en.cppreference.com/w/cpp/language/sfinae"
|
||||||
|
title="Substitution Failure Is Not An Error">SFINAE</a>. A trailing
|
||||||
|
return type may be preferable in such situations.</li>
|
||||||
|
</ul>
|
||||||
|
<h3 id="non-type-template-parameter-values">Non-type template parameter
|
||||||
|
values</h3>
|
||||||
|
<p>C++17 extended the arguments permitted for non-type template
|
||||||
|
parameters (<a href="http://wg21.link/n4268">n4268</a>). The kinds of
|
||||||
|
values (the parameter types) aren't changed. However, the values can now
|
||||||
|
be the result of arbitrary constant expressions (with a few restrictions
|
||||||
|
on the result), rather than a much more limited and restrictive set of
|
||||||
|
expressions. In particular, the argument for a pointer or reference type
|
||||||
|
parameter can now be the result of a constexpr function.</p>
|
||||||
<h3 id="enum">enum</h3>
|
<h3 id="enum">enum</h3>
|
||||||
<p>Where appropriate, <em>scoped-enums</em> should be used. (<a
|
<p>Where appropriate, <em>scoped-enums</em> should be used. (<a
|
||||||
href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2347.pdf">n2347</a>)</p>
|
href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2347.pdf">n2347</a>)</p>
|
||||||
@@ -791,6 +937,61 @@ differ from what the Java compilers implement.</p>
|
|||||||
"conservative" memory ordering, which may differ from (may be stronger
|
"conservative" memory ordering, which may differ from (may be stronger
|
||||||
than) sequentially consistent. There are algorithms in HotSpot that are
|
than) sequentially consistent. There are algorithms in HotSpot that are
|
||||||
believed to rely on that ordering.</p>
|
believed to rely on that ordering.</p>
|
||||||
|
<h3 id="inline-variables">Inline Variables</h3>
|
||||||
|
<p>Variables with static storage duration may be declared
|
||||||
|
<code>inline</code> (<a href="https://wg21.link/p0386r2">p0386r2</a>).
|
||||||
|
This has similar effects as for declaring a function inline: it can be
|
||||||
|
defined, identically, in multiple translation units, must be defined in
|
||||||
|
every translation unit in which it is <a
|
||||||
|
href="https://en.cppreference.com/w/cpp/language/definition"
|
||||||
|
title="One Definition Rule">ODR used</a>, and the behavior of the
|
||||||
|
program is as if there is exactly one variable.</p>
|
||||||
|
<p>Declaring a variable inline allows the complete definition to be in a
|
||||||
|
header file, rather than having a declaration in a header and the
|
||||||
|
definition in a .cpp file. The guidance on <a
|
||||||
|
href="#initializing-variables-with-static-storage-duration">initialization</a>
|
||||||
|
of such variables still applies. Inline variables with dynamic
|
||||||
|
initializations can make initialization order problems worse. The few
|
||||||
|
ordering constraints that exist for non-inline variables don't apply, as
|
||||||
|
there isn't a single program-designated translation unit containing the
|
||||||
|
definition.</p>
|
||||||
|
<p>A <code>constexpr</code> static data member is implicitly
|
||||||
|
<code>inline</code>. As a consequence, an <a
|
||||||
|
href="https://en.cppreference.com/w/cpp/language/definition"
|
||||||
|
title="One Definition Rule">ODR use</a> of such a variable doesn't
|
||||||
|
require a definition in some .cpp file. (This is a change from
|
||||||
|
pre-C++17. Beginning with C++17, such a definition is considered a
|
||||||
|
duplicate definition, and is deprecated.)</p>
|
||||||
|
<p>Declaring a <code>thread_local</code> variable <code>inline</code> is
|
||||||
|
forbidden for HotSpot code. <a href="#thread_local">The use of
|
||||||
|
<code>thread_local</code></a> is already heavily restricted.</p>
|
||||||
|
<h3
|
||||||
|
id="initializing-variables-with-static-storage-duration">Initializing
|
||||||
|
variables with static storage duration</h3>
|
||||||
|
<p>Variables with static storage duration and <em>dynamic
|
||||||
|
initialization</em> <a
|
||||||
|
href="https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n4296.pdf">C++14
|
||||||
|
3.6.2</a>). should be avoided, unless an implementation is permitted to
|
||||||
|
perform the initialization as a static initialization. The order in
|
||||||
|
which dynamic initializations occur is incompletely specified.
|
||||||
|
Initialization order problems can be difficult to deal with and lead to
|
||||||
|
surprises.</p>
|
||||||
|
<p>Variables with static storage duration and non-trivial destructors
|
||||||
|
should be avoided. HotSpot doesn't generally try to cleanup on exit, and
|
||||||
|
running destructors at exit can lead to problems.</p>
|
||||||
|
<p>Some of the approaches used in HotSpot to avoid dynamic
|
||||||
|
initialization include:</p>
|
||||||
|
<ul>
|
||||||
|
<li><p>Use the <code>Deferred<T></code> class template. Add a call
|
||||||
|
to its initialization function at an appropriate place during VM
|
||||||
|
initialization. The underlying object is never destroyed.</p></li>
|
||||||
|
<li><p>For objects of class type, use a variable whose value is a
|
||||||
|
pointer to the class, initialized to <code>nullptr</code>. Provide an
|
||||||
|
initialization function that sets the variable to a dynamically
|
||||||
|
allocated object. Add a call to that function at an appropriate place
|
||||||
|
during VM initialization. Such objects are usually never
|
||||||
|
destroyed.</p></li>
|
||||||
|
</ul>
|
||||||
<h3 id="uniform-initialization">Uniform Initialization</h3>
|
<h3 id="uniform-initialization">Uniform Initialization</h3>
|
||||||
<p>The use of <em>uniform initialization</em> (<a
|
<p>The use of <em>uniform initialization</em> (<a
|
||||||
href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2672.htm">n2672</a>),
|
href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2672.htm">n2672</a>),
|
||||||
@@ -815,6 +1016,45 @@ initialization</a></li>
|
|||||||
<p>Although related, the use of <code>std::initializer_list</code>
|
<p>Although related, the use of <code>std::initializer_list</code>
|
||||||
remains forbidden, as part of the avoidance of the C++ Standard Library
|
remains forbidden, as part of the avoidance of the C++ Standard Library
|
||||||
in HotSpot code.</p>
|
in HotSpot code.</p>
|
||||||
|
<h3 id="mandatory-copy-elision">Mandatory Copy Elision</h3>
|
||||||
|
<p><a href="https://en.wikipedia.org/wiki/Copy_elision">Copy elision</a>
|
||||||
|
(or <a
|
||||||
|
href="https://cn.cppreference.com/w/cpp/language/copy_elision.html">here</a>)
|
||||||
|
is a compiler optimization used to avoid potentially expensive copies in
|
||||||
|
certain situations. It is critical to making practical the performance
|
||||||
|
of return by value or pass by value. It is also unusual in not following
|
||||||
|
the as-if rule for optimizations - copy elision can be applied even if
|
||||||
|
doing so bypasses side-effects of copying/moving the object. The C++
|
||||||
|
standard explicitly permits this.</p>
|
||||||
|
<p>However, because it's an optional optimization, the relevant
|
||||||
|
copy/move constructor must be available and accessible, in case the
|
||||||
|
compiler chooses to not apply the optimization even in a situation where
|
||||||
|
permitted.</p>
|
||||||
|
<p>C++17 changed some cases of copy elision so that there is never a
|
||||||
|
copy/move in these cases (<a
|
||||||
|
href="http://wg21.link/p0135r1">p0135r1</a>). The interesting cases
|
||||||
|
involve a function that returns an unnamed temporary object, and
|
||||||
|
constructors. In such cases the object being initialized from the
|
||||||
|
temporary is always direct initialized, with no copy/move ever involved;
|
||||||
|
see <a href="https://en.wikipedia.org/wiki/Copy_elision#RVO"
|
||||||
|
title="Return Value Optimization">RVO</a> and more specifically <a
|
||||||
|
href="https://cn.cppreference.com/w/cpp/language/copy_elision.html"
|
||||||
|
title="Unnamed Return Value Optimization">URVO</a>.</p>
|
||||||
|
<p>Since this is now standard behavior it can't be avoided in the
|
||||||
|
covered situations. This could change the behavior of code that relied
|
||||||
|
on side effects by constructors, but that's both uncommon and was
|
||||||
|
already problematic because of the previous optional copy elision. But
|
||||||
|
HotSpot code can, and should, explicitly take advantage of this newly
|
||||||
|
required behavior where it makes sense to do so.</p>
|
||||||
|
<p>For example, it may be beneficial to delay construction of the result
|
||||||
|
of a function until the return statement, rather than having a local
|
||||||
|
variable that is modified into the desired state and then returned.
|
||||||
|
(Though <a href="https://en.wikipedia.org/wiki/Copy_elision#NRVO"
|
||||||
|
title="Named Return Value Optimization">NRVO</a> may apply in that
|
||||||
|
case.)</p>
|
||||||
|
<p>It is also now possible to define a factory function for a class that
|
||||||
|
is neither movable nor copyable, if it can be written in a way that
|
||||||
|
makes use of this feature.</p>
|
||||||
<h3 id="local-function-objects">Local Function Objects</h3>
|
<h3 id="local-function-objects">Local Function Objects</h3>
|
||||||
<ul>
|
<ul>
|
||||||
<li>Local function objects, including lambda expressions, may be
|
<li>Local function objects, including lambda expressions, may be
|
||||||
@@ -887,6 +1127,13 @@ href="https://en.wikipedia.org/wiki/Partial_application"
|
|||||||
title="Partial Application">partial application</a>. Again here, lambdas
|
title="Partial Application">partial application</a>. Again here, lambdas
|
||||||
are typically much simpler and less verbose than function object
|
are typically much simpler and less verbose than function object
|
||||||
classes.</p>
|
classes.</p>
|
||||||
|
<p>A lambda is a constexpr function if either the parameter declaration
|
||||||
|
clause is followed by <code>constexpr</code>, or it satisfies the
|
||||||
|
requirements for a constexpr function (<a
|
||||||
|
href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/p0170r1.pdf">p0170r1</a>).
|
||||||
|
Thus, using a lambda to package up some computation doesn't incur
|
||||||
|
unnecessary overhead or prevent use in a context required to be
|
||||||
|
compile-time evaluated (such as an array size).</p>
|
||||||
<p>Because of these benefits, lambda expressions are permitted in
|
<p>Because of these benefits, lambda expressions are permitted in
|
||||||
HotSpot code, with some restrictions and usage guidance. An anonymous
|
HotSpot code, with some restrictions and usage guidance. An anonymous
|
||||||
lambda is one which is passed directly as an argument. A named lambda is
|
lambda is one which is passed directly as an argument. A named lambda is
|
||||||
@@ -934,6 +1181,18 @@ making the captured value unaffected by modifications to the outer
|
|||||||
variable. But this only applies to captured auto variables, not member
|
variable. But this only applies to captured auto variables, not member
|
||||||
variables, and is inconsistent with referential transparency.</p></li>
|
variables, and is inconsistent with referential transparency.</p></li>
|
||||||
</ul></li>
|
</ul></li>
|
||||||
|
<li><p>By-value capture of <code>this</code> (using a capture list like
|
||||||
|
<code>[*this]</code> (<a
|
||||||
|
href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/p0018r3.html">p0018r3</a>))
|
||||||
|
is also not permitted. One of the motivating use-cases is when the
|
||||||
|
lifetime of the lambda exceeds the lifetime of the object for the
|
||||||
|
containing member function. That is, we have an upward lambda that is
|
||||||
|
capturing <code>this</code> of the enclosing method. But again, that
|
||||||
|
use-case doesn't apply if only downward lambdas are used. Another
|
||||||
|
use-case is when we simply want the lambda to be operating on a copy of
|
||||||
|
<code>this</code> for some reason. This is sufficiently uncommon that it
|
||||||
|
can be handled by manual copying, so readers don't need to understand
|
||||||
|
this rare syntax.</p></li>
|
||||||
<li><p>Non-capturing lambdas (with an empty capture list -
|
<li><p>Non-capturing lambdas (with an empty capture list -
|
||||||
<code>[]</code>) have limited utility. There are cases where no captures
|
<code>[]</code>) have limited utility. There are cases where no captures
|
||||||
are required (pure functions, for example), but if the function is small
|
are required (pure functions, for example), but if the function is small
|
||||||
@@ -943,14 +1202,15 @@ href="https://isocpp.org/files/papers/N3649.html">N3649</a>) are not
|
|||||||
permitted. Capture initializers inherently increase the complexity of
|
permitted. Capture initializers inherently increase the complexity of
|
||||||
the capture list, and provide little benefit over an additional in-scope
|
the capture list, and provide little benefit over an additional in-scope
|
||||||
local variable.</p></li>
|
local variable.</p></li>
|
||||||
</ul>
|
<li><p>The use of <code>mutable</code> lambda expressions is forbidden
|
||||||
<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
|
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
|
HotSpot. A lambda expression needs to be mutable in order to modify a
|
||||||
by-value captured value. But with only downward lambdas, such usage
|
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
|
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
|
object class in any such cases that arise, rather than requiring all
|
||||||
HotSpot developers to understand this relatively obscure feature.</p>
|
HotSpot developers to understand this relatively obscure
|
||||||
|
feature.</p></li>
|
||||||
|
</ul>
|
||||||
<p>While it is possible to directly invoke an anonymous lambda
|
<p>While it is possible to directly invoke an anonymous lambda
|
||||||
expression, that feature should not be used, as such a form can be
|
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>
|
confusing to readers. Instead, name the lambda and call it by name.</p>
|
||||||
@@ -1068,23 +1328,12 @@ href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2540.htm">n2540</
|
|||||||
<p>C++11 provides simple syntax allowing a class to inherit the
|
<p>C++11 provides simple syntax allowing a class to inherit the
|
||||||
constructors of a base class. Unfortunately there are a number of
|
constructors of a base class. Unfortunately there are a number of
|
||||||
problems with the original specification, and C++17 contains significant
|
problems with the original specification, and C++17 contains significant
|
||||||
revisions (<a
|
revisions (<a href="http:/wg21.link/p0136r1" title="p0136r1">p0136r1</a>
|
||||||
href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2015/p0136r1.html"
|
opens with a list of 8 Core Issues). Although those issues have been
|
||||||
title="p0136r1">p0136r1</a> opens with a list of 8 Core Issues). Since
|
addressed, the benefits from this feature are small compared to the
|
||||||
HotSpot doesn't support use of C++17, use of inherited constructors
|
complexity. Because of this, HotSpot code must not use inherited
|
||||||
could run into those problems. Such uses might also change behavior in a
|
constructors.</p>
|
||||||
future HotSpot update to use C++17 or later, potentially in subtle ways
|
<p><a href="http://wg21.link/p0195r0">p0195r0</a></p>
|
||||||
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="attributes">Attributes</h3>
|
<h3 id="attributes">Attributes</h3>
|
||||||
<p>The use of some attributes (<a
|
<p>The use of some attributes (<a
|
||||||
href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2761.pdf">n2761</a>)
|
href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2761.pdf">n2761</a>)
|
||||||
@@ -1100,9 +1349,17 @@ those cases HotSpot has a preferred location.</p>
|
|||||||
beginning of the function's declaration, rather than between the
|
beginning of the function's declaration, rather than between the
|
||||||
function name and the parameter list.</li>
|
function name and the parameter list.</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
<p><a href="http://wg21.link/p0068r0">p0068r0</a> is the initial
|
||||||
|
proposal for the attributes added by C++17.)</p>
|
||||||
<p>Only the following attributes are permitted:</p>
|
<p>Only the following attributes are permitted:</p>
|
||||||
<ul>
|
<ul>
|
||||||
<li><code>[[noreturn]]</code></li>
|
<li><code>[[noreturn]]</code></li>
|
||||||
|
<li><code>[[nodiscard]]</code> (<a
|
||||||
|
href="http://wg21.link/p0189r1">p0189r1</a>)</li>
|
||||||
|
<li><code>[[maybe_unused]]</code> (<a
|
||||||
|
href="http://wg21.link/p0212r1">p0212r1</a>)</li>
|
||||||
|
<li><code>[[fallthrough]]</code> (<a
|
||||||
|
href="http://wg21.link/p0188">p0188r1</a>)</li>
|
||||||
</ul>
|
</ul>
|
||||||
<p>The following attributes are expressly forbidden:</p>
|
<p>The following attributes are expressly forbidden:</p>
|
||||||
<ul>
|
<ul>
|
||||||
@@ -1110,6 +1367,138 @@ function name and the parameter list.</li>
|
|||||||
<code>memory_order_consume</code>.</li>
|
<code>memory_order_consume</code>.</li>
|
||||||
<li><code>[[deprecated]]</code> - Not relevant in HotSpot code.</li>
|
<li><code>[[deprecated]]</code> - Not relevant in HotSpot code.</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
<p>Direct use of non-standard (and presumably scoped) attributes in
|
||||||
|
shared code is also forbidden. Using such would depend on the C++17
|
||||||
|
feature that an attribute not recognized by the implementation is
|
||||||
|
ignored (<a href="http://wg21.link/p0283r2">p0283r2</a>). If such an
|
||||||
|
attribute is needed in shared code, the well-established technique of
|
||||||
|
providing an <code>ATTRIBUTE_XXX</code> macro with per-compiler
|
||||||
|
definitions (sometimes empty) should be used. Compilers may warn about
|
||||||
|
unrecognized attributes (whether by name or by location), in order to
|
||||||
|
report typos or misuse. Disabling such warnings globally would not be
|
||||||
|
desirable.</p>
|
||||||
|
<p>The use of <code>using</code> directives in attribute lists is also
|
||||||
|
forbidden. (<a href="http://wg21.link/p0028r0">p0028r0</a>) (<a
|
||||||
|
href="http://wg21.link/p0028r4">p0028r4</a>) We don't generally use
|
||||||
|
scoped attributes in attribute lists with other attributes. Rather, uses
|
||||||
|
of scoped attributes (which are implementation defined) are generally
|
||||||
|
hidden behind a portability macro that includes the surrounding
|
||||||
|
brackets.</p>
|
||||||
|
<h3 id="noexcept">noexcept</h3>
|
||||||
|
<p>Use of <code>noexcept</code> exception specifications (<a
|
||||||
|
href="http://wg21.link/n3050">n3050</a>) are permitted with restrictions
|
||||||
|
described below.</p>
|
||||||
|
<ul>
|
||||||
|
<li>Only the argument-less form of <code>noexcept</code> exception
|
||||||
|
specifications are permitted.</li>
|
||||||
|
<li>Allocation functions that may return <code>nullptr</code> to
|
||||||
|
indicate allocation failure must be declared <code>noexcept</code>.</li>
|
||||||
|
<li>All other uses of <code>noexcept</code> exception specifications are
|
||||||
|
forbidden.</li>
|
||||||
|
<li><code>noexcept</code> expressions are forbidden.</li>
|
||||||
|
<li>Dynamic exception specifications are forbidden.</li>
|
||||||
|
</ul>
|
||||||
|
<p>HotSpot is built with exceptions disabled, e.g. compile with
|
||||||
|
<code>-fno-exceptions</code> (gcc, clang) or no <code>/EH</code> option
|
||||||
|
(MSVC++). So why do we need to consider <code>noexcept</code> at all?
|
||||||
|
It's because <code>noexcept</code> exception specifications serve two
|
||||||
|
distinct purposes.</p>
|
||||||
|
<p>The first is to allow the compiler to avoid generating code or data
|
||||||
|
in support of exceptions being thrown by a function. But this is
|
||||||
|
unnecessary, because exceptions are disabled.</p>
|
||||||
|
<p>The second is to allow the compiler and library code to choose
|
||||||
|
different algorithms, depending on whether some function may throw
|
||||||
|
exceptions. This is only relevant to a certain set of functions.</p>
|
||||||
|
<ul>
|
||||||
|
<li><p>Some allocation functions (<code>operator new</code> and
|
||||||
|
<code>operator new[]</code>) return <code>nullptr</code> to indicate
|
||||||
|
allocation failure. If a <code>new</code> expression calls such an
|
||||||
|
allocation function, it must check for and handle that possibility.
|
||||||
|
Declaring such a function <code>noexcept</code> informs the compiler
|
||||||
|
that <code>nullptr</code> is a possible result. If an allocation
|
||||||
|
function is not declared <code>noexcept</code> then the compiler may
|
||||||
|
elide that checking and handling for a <code>new</code> expression
|
||||||
|
calling that function.</p></li>
|
||||||
|
<li><p>Certain Standard Library facilities (notably containers) provide
|
||||||
|
different guarantees for some operations (and may choose different
|
||||||
|
algorithms to implement those operations), depending on whether certain
|
||||||
|
functions (constructors, copy/move operations, swap) are nothrow or not.
|
||||||
|
They detect this using type traits that test whether a function is
|
||||||
|
declared <code>noexcept</code>. This can have a significant performance
|
||||||
|
impact if, for example, copying is chosen over a potentially throwing
|
||||||
|
move. But this isn't relevant, since HotSpot forbids the use of most
|
||||||
|
Standard Library facilities.</p></li>
|
||||||
|
</ul>
|
||||||
|
<p>HotSpot code can assume no exceptions will ever be thrown, even from
|
||||||
|
functions not declared <code>noexcept</code>. So HotSpot code doesn't
|
||||||
|
ever need to check, either with conditional exception specifications or
|
||||||
|
with <code>noexcept</code> expressions.</p>
|
||||||
|
<p>The exception specification is part of the type of a function (<a
|
||||||
|
href="http://wg21.link/p0012r1">p0012r1</a>. This likely has little
|
||||||
|
impact on HotSpot code, since the use of <code>noexcept</code> is
|
||||||
|
expected to be rare.</p>
|
||||||
|
<p>Dynamic exception specifications were deprecated in C++11. C++17
|
||||||
|
removed all but <code>throw()</code>, with that remaining a deprecated
|
||||||
|
equivalent to <code>noexcept</code>.</p>
|
||||||
|
<h3 id="enhanced-selection-statements">Enhanced selection
|
||||||
|
statements</h3>
|
||||||
|
<p>C++17 modified the <em>condition</em> part of <code>if</code> and
|
||||||
|
<code>switch</code> statements, permitting an <em>init-statement</em> to
|
||||||
|
be included (<a href="http://wg21.link/p0305r1">p0305r1</a>).</p>
|
||||||
|
<p>Use of this feature is permitted. (However, complex uses may
|
||||||
|
interfere with readability.) Limiting the scope of a variable involved
|
||||||
|
in the condition, while also making the value available to the
|
||||||
|
statement's body, can improve readability. The alternative method of
|
||||||
|
scope-limiting by introducing a nested scope isn't very popular and is
|
||||||
|
rarely used.</p>
|
||||||
|
<p>This new syntax is in addition to the <em>condition</em> being a
|
||||||
|
declaration with a <em>brace-or-equal-initializer</em>. For an
|
||||||
|
<code>if</code> statement this new sytax gains that benefit without
|
||||||
|
violating the long-standing guidance against using <a
|
||||||
|
href="#avoid-implicit-conversions-to-bool">implicit conversions to
|
||||||
|
<code>bool</code></a>, which still stands.</p>
|
||||||
|
<p>For example, uses of Unified Logging sometimes explicitly check
|
||||||
|
whether a <code>LogTarget</code> is enabled. Instead of</p>
|
||||||
|
<pre><code> LogTarget(...) lt;
|
||||||
|
if (lt.is_enabled()) {
|
||||||
|
LogStream log(lt);
|
||||||
|
... use log ...
|
||||||
|
}
|
||||||
|
... lt is accessible but probably not needed here ...</code></pre>
|
||||||
|
<p>using this feature one could write</p>
|
||||||
|
<pre><code> if (LogTarget(...) lt; lt.is_enabled()) {
|
||||||
|
LogStream log(lt);
|
||||||
|
... use log ...
|
||||||
|
}</code></pre>
|
||||||
|
<p>C++17 also added compile-time <code>if</code> statements (<a
|
||||||
|
href="http://wg21.link/p0292r2">p0292r2</a>). Use of
|
||||||
|
<code>if constexpr</code> is permitted. This feature can replace and
|
||||||
|
(sometimes vastly) simplify many uses of <a
|
||||||
|
href="https://en.cppreference.com/w/cpp/language/sfinae"
|
||||||
|
title="Substitution Failure Is Not An Error">SFINAE</a>. The same
|
||||||
|
declaration and initialization guidance for the <em>condition</em> part
|
||||||
|
apply here as for ordinary <code>if</code> statements.</p>
|
||||||
|
<h3 id="expression-evaluation-order">Expression Evaluation Order</h3>
|
||||||
|
<p>C++17 tightened up the evaluation order for some kinds of
|
||||||
|
subexpressions (<a href="http://wg21.link/p0138r2">p0138r2</a>). Note,
|
||||||
|
however, that the Alternate Evaluation Order for Function Calls
|
||||||
|
alternative in that paper was adopted, rather than the strict left to
|
||||||
|
right order of evaluation for function call arguments that was proposed
|
||||||
|
in the main body of the paper.</p>
|
||||||
|
<p>The primary purpose of this change seems to be to make certain kinds
|
||||||
|
of call chaining well defined. That's not a style widely used in
|
||||||
|
HotSpot. In general it is better to continue to avoid questions in this
|
||||||
|
area by isolating operations with side effects from other statements. In
|
||||||
|
particular, continue to avoid modifying a value in an expression where
|
||||||
|
it is also used.</p>
|
||||||
|
<h3 id="compatibility-with-c11">Compatibility with C11</h3>
|
||||||
|
<p>C++17 refers to C11 rather than C99. This means that C11 libraries
|
||||||
|
and functions may be used in HotSpot. There may be limitations because
|
||||||
|
of differing levels of compatibility among various compilers and
|
||||||
|
versions of those compilers.</p>
|
||||||
|
<p>Note that the C parts of the JDK have been built with C11 selected
|
||||||
|
for some time (<a
|
||||||
|
href="https://bugs.openjdk.org/browse/JDK-8292008">JDK-8292008</a>).</p>
|
||||||
<h3 id="additional-permitted-features">Additional Permitted
|
<h3 id="additional-permitted-features">Additional Permitted
|
||||||
Features</h3>
|
Features</h3>
|
||||||
<ul>
|
<ul>
|
||||||
@@ -1125,8 +1514,10 @@ href="https://isocpp.org/files/papers/n3778.html">n3778</a>)</p></li>
|
|||||||
href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2242.pdf">n2242</a>)
|
href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2242.pdf">n2242</a>)
|
||||||
(<a
|
(<a
|
||||||
href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2555.pdf">n2555</a>)</p></li>
|
href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2555.pdf">n2555</a>)</p></li>
|
||||||
<li><p>Static assertions (<a
|
<li><p>Static assertions (<a href="http://wg21.link/n1720">n1720</a>)
|
||||||
href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2004/n1720.html">n1720</a>)</p></li>
|
(<a href="http://wg21.link/n3928">n3928</a>)<br> Both the original
|
||||||
|
(C++11) two-argument form and the new (C++17) single-argument form are
|
||||||
|
permitted.</p></li>
|
||||||
<li><p><code>decltype</code> (<a
|
<li><p><code>decltype</code> (<a
|
||||||
href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2343.pdf">n2343</a>)
|
href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2343.pdf">n2343</a>)
|
||||||
(<a
|
(<a
|
||||||
@@ -1168,8 +1559,62 @@ href="http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2009/n2930.html">n2930<
|
|||||||
href="https://en.cppreference.com/w/cpp/language/range-for">range-for</a>)</p></li>
|
href="https://en.cppreference.com/w/cpp/language/range-for">range-for</a>)</p></li>
|
||||||
<li><p>Unrestricted Unions (<a
|
<li><p>Unrestricted Unions (<a
|
||||||
href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2544.pdf">n2544</a>)</p></li>
|
href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2544.pdf">n2544</a>)</p></li>
|
||||||
|
<li><p>Preprocessor Condition <code>__has_include</code> (<a
|
||||||
|
href="http://wg21.link/p0061r0">p0061r0</a>) (<a
|
||||||
|
href="http://wg21.link/p0061r1">p0061r1</a>)</p></li>
|
||||||
|
<li><p>Hexadecimal Floating-Point Literals (<a
|
||||||
|
href="http://wg21.link/p0245r1">p0245r1</a>)</p></li>
|
||||||
|
<li><p>Construction Rules for <code>enum class</code> Values (<a
|
||||||
|
href="http://wg21.link/p0138r2">p0138r2</a>)</p></li>
|
||||||
|
<li><p>Allow <code>typename</code> in template template parameter (<a
|
||||||
|
href="http://wg21.link/n4051">n4051</a>) — template template parameters
|
||||||
|
are barely used (if at all) in HotSpot, but there's no reason to
|
||||||
|
artificially disallow this syntactic regularization in any such
|
||||||
|
uses.</p></li>
|
||||||
</ul>
|
</ul>
|
||||||
<h3 id="excluded-features">Excluded Features</h3>
|
<h2 id="excluded-features">Excluded Features</h2>
|
||||||
|
<h3 id="structured-bindings">Structured Bindings</h3>
|
||||||
|
<p>The use of structured bindings <a
|
||||||
|
href="http://wg21.link/p0217r3">p0217r3</a> is forbidden. Preferred
|
||||||
|
approaches for handling functions with multiple return values
|
||||||
|
include</p>
|
||||||
|
<ul>
|
||||||
|
<li><p>Return a named class/struct intended for that purpose, with named
|
||||||
|
and typed members/accessors.</p></li>
|
||||||
|
<li><p>Return a value along with out parameters (usually pointers,
|
||||||
|
sometimes references).</p></li>
|
||||||
|
<li><p>Designate a sentinel "failure" value in the normal return value
|
||||||
|
type, with some out of band location for additional information. For
|
||||||
|
example, this is the model typically used with <code>errno</code>, where
|
||||||
|
a function returns a normal result, or -1 to indicate an error, with
|
||||||
|
additional error information in <code>errno</code>.</p></li>
|
||||||
|
</ul>
|
||||||
|
<p>There is a strong preference for names and explicit types, as opposed
|
||||||
|
to offsets and implicit types. For example, there are folks who strongly
|
||||||
|
dislike that some of the Standard Library functions return
|
||||||
|
<code>std::pair</code> because <code>first</code> and
|
||||||
|
<code>second</code> members don't carry any useful information.</p>
|
||||||
|
<h3 id="file-system-library">File System Library</h3>
|
||||||
|
<p>The use of the File System library is forbidden. HotSpot doesn't do
|
||||||
|
very much with files, and already has adequate mechanisms for its needs.
|
||||||
|
Rewriting in terms of this new library doesn't provide any obviously
|
||||||
|
significant benefits. Having a mix of the existing usage and uses of
|
||||||
|
this new library would be confusing.</p>
|
||||||
|
<p><a href="http://wg21.link/n4100">n4100</a> <a
|
||||||
|
href="http://wg21.link/p0218r0">p0218r0</a> <a
|
||||||
|
href="http://wg21.link/p0219r1">p0219r1</a> <a
|
||||||
|
href="http://wg21.link/p0317r1">p0317r1</a> <a
|
||||||
|
href="http://wg21.link/p0392r0">p0392r0</a> <a
|
||||||
|
href="http://wg21.link/p0430r2">p0430r2</a> <a
|
||||||
|
href="http://wg21.link/p0492r2">p0492r2</a> <a
|
||||||
|
href="http://wg21.link/p1164r1">p1164r1</a></p>
|
||||||
|
<h3 id="aggregate-extensions">Aggregate Extensions</h3>
|
||||||
|
<p>Aggregates with base classes are forbidden. C++17 allows aggregate
|
||||||
|
initialization for classes with base classes (<a
|
||||||
|
href="https://wg21.link/p0017r1">p0017r1</a>). HotSpot makes very little
|
||||||
|
use of aggregate classes, preferring explicit constructors even for very
|
||||||
|
simple classes.</p>
|
||||||
|
<h3 id="additional-excluded-features">Additional Excluded Features</h3>
|
||||||
<ul>
|
<ul>
|
||||||
<li><p>New string and character literals</p>
|
<li><p>New string and character literals</p>
|
||||||
<ul>
|
<ul>
|
||||||
@@ -1198,32 +1643,243 @@ Library names.</p></li>
|
|||||||
href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2179.html">n2179</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
|
— HotSpot does not permit the use of exceptions, so this feature isn't
|
||||||
useful.</p></li>
|
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 most operator overloading, preferring named functions. When
|
<li><p>Avoid most operator overloading, preferring named functions. When
|
||||||
operator overloading is used, ensure the semantics conform to the normal
|
operator overloading is used, ensure the semantics conform to the normal
|
||||||
expected behavior of the operation.</p></li>
|
expected behavior of the operation.</p></li>
|
||||||
<li><p>Avoid most implicit conversion constructors and (implicit or
|
<li><p>Avoid most implicit conversion constructors and (implicit or
|
||||||
explicit) conversion operators. (Note that conversion to
|
explicit) conversion operators. Conversion to <code>bool</code>
|
||||||
<code>bool</code> isn't needed in HotSpot code because of the "no
|
operators aren't needed because of the <a
|
||||||
implicit boolean" guideline.)</p></li>
|
href="#avoid-implicit-conversions-to-bool">no implicit boolean</a>
|
||||||
|
guideline.)</p></li>
|
||||||
<li><p>Avoid <code>goto</code> statements.</p></li>
|
<li><p>Avoid <code>goto</code> statements.</p></li>
|
||||||
|
<li><p>Attributes for namespaces and enumerators (<a
|
||||||
|
href="http://wg21.link/n4266">n4266</a> — The only applicable attribute
|
||||||
|
is <a href="#attributes"><code>[[deprecated]]</code></a>, which is
|
||||||
|
forbidden.</p></li>
|
||||||
|
<li><p>Variadic <code>using</code> declarations (<a
|
||||||
|
href="http://wg21.link/p0195r2">p0195r2</a>)</p></li>
|
||||||
|
<li><p><code>std::variant<></code> (<a
|
||||||
|
href="http://wg21.link/p0088r3">p0088r3</a>) — Even if more of the C++
|
||||||
|
Standard Library is permitted, this class will remain forbidded. Invalid
|
||||||
|
accesses are indicated by throwing exceptions.</p></li>
|
||||||
|
<li><p><code>std::any</code> (<a
|
||||||
|
href="http://wg21.link/p0220r1">p0220r1</a>) — Even if more of the C++
|
||||||
|
Standard Library is permitted, this class will remain forbidden. It may
|
||||||
|
require allocation, and always uses the standard allocator. It requires
|
||||||
|
<a href="https://en.wikipedia.org/wiki/Run-time_type_information"
|
||||||
|
title="Runtime Type Information">RTTI</a>.</p></li>
|
||||||
|
<li><p><code>std::as_const()</code> (<a
|
||||||
|
href="http://wg21.link/p0007r1">p0007r1</a>) — If sufficiently useful,
|
||||||
|
HotSpot could add such a function. It would likely be added to
|
||||||
|
globalDefinitions.hpp, where there are already some similar small
|
||||||
|
utilities.</p></li>
|
||||||
|
<li><p><code>std::clamp()</code> (<a
|
||||||
|
href="http://wg21.link/p002501">p002501</a>) — This function is already
|
||||||
|
provided in globalDefinitions.hpp.</p></li>
|
||||||
|
<li><p>Parallel STL Algorithms (<a
|
||||||
|
href="http://wg21.link/p0024r2">p0024r2</a>) — Even if more of the C++
|
||||||
|
Standard Library is permitted, these will remain forbidden. They are
|
||||||
|
built on the standard C++ threading mechanisms. HotSpot doesn't use
|
||||||
|
those mechanisms, instead providing and using its own.</p></li>
|
||||||
|
<li><p>Cache Line Sizes <a href="http://wg21.link/p0154r1">p0154r1</a> —
|
||||||
|
HotSpot has its own mechanisms for this, using values like
|
||||||
|
<code>DEFAULT_CACHE_LINE_SIZE</code>. The platform-specific
|
||||||
|
implementation of the HotSpot mechanisms might use these library
|
||||||
|
functions, but there is no reason to move away from the current
|
||||||
|
approach. Quoting from <a href="https://www.cppstd17.com"
|
||||||
|
title="C++17: The Complete Guide">JOSUTTIS</a>: "... if you know better,
|
||||||
|
use specific values, but using these values is better than any assumed
|
||||||
|
fixed size for code supporting multiple platforms."</p></li>
|
||||||
|
<li><p><code>register</code> storage class removal <a
|
||||||
|
href="http://wg21.link/p0001r1">p0001r1</a> — The <code>register</code>
|
||||||
|
storage class has been removed. <code>register</code> is still a
|
||||||
|
keyword, so still can't be used for normal purposes. Also, this doesn't
|
||||||
|
affect the use of <code>register</code> for gcc-style extended asm code;
|
||||||
|
that's a different syntactic element with a different meaning.</p></li>
|
||||||
|
<li><p>Value of <code>__cplusplus</code> — Testing whether
|
||||||
|
<code>__cplusplus</code> is defined or not is permitted, and indeed
|
||||||
|
required. But the value should not need to be examined. The value is
|
||||||
|
changed with each revision of the Standard. But we build HotSpot and
|
||||||
|
(most of) the rest of the JDK with a specifically selected version of
|
||||||
|
the Standard. The value of <code>__cplusplus</code> should be known and
|
||||||
|
unchanging until we change the project's build configuration again. So
|
||||||
|
examining the value shouldn't ever be necessary.</p></li>
|
||||||
|
<li><p>Removal of <code>++</code> for <code>bool</code> (<a
|
||||||
|
href="http://wg21.link/p0003r1">p0003r1</a>)</p></li>
|
||||||
|
<li><p>Removal of trigraphs (<a
|
||||||
|
href="http://wg21.link/n4086">n4086</a>)</p></li>
|
||||||
</ul>
|
</ul>
|
||||||
<h3 id="undecided-features">Undecided Features</h3>
|
<h2 id="undecided-features">Undecided Features</h2>
|
||||||
<p>This list is incomplete; it serves to explicitly call out some
|
<p>This list is incomplete; it serves to explicitly call out some
|
||||||
features that have not yet been discussed.</p>
|
features that have not yet been discussed.</p>
|
||||||
|
<p>Some features are undecided (so implicitly forbidden) because we
|
||||||
|
don't expect to use them at all. This might be reconsidered if someone
|
||||||
|
finds a good use case.</p>
|
||||||
|
<p>Some Standard Library features are undecided (so implicitly
|
||||||
|
forbidden) because, while this Style Guide forbids the use of such, they
|
||||||
|
may be sufficiently useful that we want to permit them anyway. Doing so
|
||||||
|
may require some idiomatic mechanism for addressing things like
|
||||||
|
<code>assert</code> incompatibility, incompatibility with HotSpot's
|
||||||
|
<code>FORBID_C_FUNCTION</code> mechanism, and the like.</p>
|
||||||
|
<h3 id="stdoptional">std::optional<></h3>
|
||||||
|
<p>It is undecided whether to permit the use of
|
||||||
|
<code>std::optional<></code> (<a
|
||||||
|
href="http://wg21.link/p0220r1">p0220r1</a>). It may be sufficiently
|
||||||
|
useful that it should be permitted despite the usual prohibition against
|
||||||
|
using Standard Library facilities. Use of the <code>value()</code>
|
||||||
|
member function must be forbidden, as it reports an invalid access by
|
||||||
|
throwing an exception.</p>
|
||||||
|
<h3 id="stdbyte">std::byte</h3>
|
||||||
|
<p>It is undecided whether to permit the use of the
|
||||||
|
<code>std::byte</code> type (<a
|
||||||
|
href="http://wg21.link/p0298r3">p0298r3</a>). It may be sufficiently
|
||||||
|
useful that it should be permitted despite the usual prohibition against
|
||||||
|
using Standard Library facilities.</p>
|
||||||
|
<p>It has been suggested that changing the HotSpot <code>address</code>
|
||||||
|
type to use <code>std::byte</code> has some benefits. That is,
|
||||||
|
replace</p>
|
||||||
|
<pre><code>typedef u_char* address;
|
||||||
|
typedef const u_char* const_address;</code></pre>
|
||||||
|
<pre><code>using address = std::byte*;
|
||||||
|
using const_address = const std::byte*;</code></pre>
|
||||||
|
<p>in globalDefinitions.hpp.</p>
|
||||||
|
<p>A specific benefit that was mentioned is that it might improve the
|
||||||
|
horrible way that gdb handles our current definition of the
|
||||||
|
<code>address</code> type.</p>
|
||||||
|
<pre><code>#include <cstddef>
|
||||||
|
|
||||||
|
typedef unsigned char* address;
|
||||||
|
typedef std::byte* address_b;
|
||||||
|
|
||||||
|
int main() {
|
||||||
|
|
||||||
|
char* mem;
|
||||||
|
|
||||||
|
address addr = (address)mem;
|
||||||
|
address_b addr_b = (address_b)mem;
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}</code></pre>
|
||||||
|
<pre><code>(gdb) p addr
|
||||||
|
$1 = (address) 0x7ffff7fe4fa0 <dl_main> "\363\017\036\372Uf\017\357\300H\211\345AWI\211\377AVAUATSH\201\354\210\002"
|
||||||
|
(gdb) p addr_b
|
||||||
|
$2 = (address_b) 0x7ffff7fe4fa0 <dl_main></code></pre>
|
||||||
|
<p>This needs to be explored. Some folks have said they will do so.</p>
|
||||||
|
<h3 id="string-views">String Views</h3>
|
||||||
|
<p>It is undecided whether to permit the use of
|
||||||
|
<code>std::string_view</code> (<a
|
||||||
|
href="http://wg21.link/p0220r1">p0220r1</a>).</p>
|
||||||
|
<p>HotSpot doesn't use <code>std::string</code>, but uses
|
||||||
|
<code>char*</code> strings a lot. Wrapping such in a
|
||||||
|
<code>std::string_view</code> to enable the use of various algorithms
|
||||||
|
could be useful. But since HotSpot also doesn't permit use of
|
||||||
|
<code><algorithm></code> and the like, that only gets the limited
|
||||||
|
set of algorithms provided by the view class directly.</p>
|
||||||
|
<p>There is also the issue of <code>NUL</code> termination; string views
|
||||||
|
are not necessarily <code>NUL</code> terminated. Moreover, if one goes
|
||||||
|
to the work of making one that is <code>NUL</code> terminated, that
|
||||||
|
terminator is included in the size.</p>
|
||||||
|
<p>There are other caveats. Permitting use of string views would require
|
||||||
|
discussion of those.</p>
|
||||||
|
<h3 id="substring-and-subsequence-searching">Substring and Subsequence
|
||||||
|
Searching</h3>
|
||||||
|
<p>In addition to simple substring searching, the Standard Library now
|
||||||
|
includes Boyer-Moore and Boyer-Moore-Horspool searchers, in case someone
|
||||||
|
wants to search really large texts. That seems an unlikely use-case for
|
||||||
|
HotSpot. See <a href="http://wg21.link/p0220r1">p0220r1</a>.</p>
|
||||||
|
<h3 id="new-and-delete-with-over-aligned-data"><code>new</code> and
|
||||||
|
<code>delete</code> with Over-Aligned Data</h3>
|
||||||
|
<p>It is undecided whether to permit the use of dynamic allocation of
|
||||||
|
overaligned types (<a href="http://wg21.link/n3396">n3396</a>).</p>
|
||||||
|
<p>HotSpot currently only has a couple of over-aligned types that are
|
||||||
|
dynamically allocated. These are handled manually, not going through
|
||||||
|
<code>new</code> expressions, as that couldn't work before C++17.</p>
|
||||||
|
<p>One of the ways an over-aligned type might arise is by aligning a
|
||||||
|
data member. This might be done to avoid destructive interference for
|
||||||
|
concurrent accesses. But HotSpot uses a different approach, using
|
||||||
|
explicit padding. Again, this is in part because <code>new</code> and
|
||||||
|
<code>delete</code> of overaligned types didn't work. But we might
|
||||||
|
prefer to continue this approach.</p>
|
||||||
|
<p>We would need to add <code>operator new</code> overloads to
|
||||||
|
<code>CHeapObj<></code> and possibly in other places in order to
|
||||||
|
support this. However, it has been suggested that implementing it
|
||||||
|
(efficiently) on top of NMT might be difficult. Note that
|
||||||
|
<code>posix_memalign</code> / <code>_aligned_malloc</code> don't help
|
||||||
|
here, because of NMT's use of malloc headers.</p>
|
||||||
|
<p>If we don't support it we may want to add <code>operator new</code>
|
||||||
|
overloads that are deleted, to prevent attempted uses.</p>
|
||||||
|
<p>Alignment usage in non-HotSpot parts of the OpenJDK:</p>
|
||||||
|
<ul>
|
||||||
|
<li><p><code>alignas</code> used once in harfbuzz, to align a
|
||||||
|
variable.</p></li>
|
||||||
|
<li><p>libpipewire has <code>#define SPA_ALIGNED</code> macro using gcc
|
||||||
|
<code>aligned</code> attribute, but doesn't use it.</p></li>
|
||||||
|
<li><p>libsleef has <code>#define ALIGNED</code> macro using gcc
|
||||||
|
<code>aligned</code> attribute. It is not used for class or member
|
||||||
|
declarations.</p></li>
|
||||||
|
</ul>
|
||||||
|
<h3 id="stdto_chars-and-stdfrom_chars"><code>std::to_chars()</code> and
|
||||||
|
<code>std::from_chars</code></h3>
|
||||||
|
<p>It is undecided whether to permit the use of
|
||||||
|
<code>std::to_chars()</code> and <code>std::from_chars()</code> (<a
|
||||||
|
href="http://wg21.link/p0067r5">p0067r5</a>).</p>
|
||||||
|
<p>These functions provide low-level conversions between character
|
||||||
|
sequences and numeric values. This seems like a good candidate for use
|
||||||
|
in HotSpot, potentially replacing various clumsy or less performant
|
||||||
|
alternatives. There is no memory allocation. Parsing failures are
|
||||||
|
indicated via error codes rather than exceptions. Various other nice for
|
||||||
|
HotSpot properties.</p>
|
||||||
|
<p>Note that the published C++17 Standard puts these in
|
||||||
|
<code><utility></code>, but a defect report moved them to
|
||||||
|
<code><charconv></code>. This also needs
|
||||||
|
<code><system_error></code>.</p>
|
||||||
|
<p>This would require upgrading the minimum gcc version to 11.1 for
|
||||||
|
floating point conversion support. The minimum Visual Studio version is
|
||||||
|
already sufficient. The minimum clang version requirement hasn't been
|
||||||
|
determined yet.</p>
|
||||||
|
<h3 id="stdlaunder"><code>std::launder()</code></h3>
|
||||||
|
<p>It is undecided whether to permit the use of
|
||||||
|
<code>std::launder()</code> (<a
|
||||||
|
href="http://wg21.link/p0137r1">p0137r1</a>).</p>
|
||||||
|
<p>Change to permitted if we discover a place where we need it. Or maybe
|
||||||
|
we should just permit it, but hope we don't need it.</p>
|
||||||
|
<p>Also, C++20 revised the relevant part of Object Lifetime in a way
|
||||||
|
that seems more permissive and with less need of laundering. We don't
|
||||||
|
know if implementations of prior versions take advantage of the
|
||||||
|
difference.</p>
|
||||||
|
<p>See Object Lifetime: C++17 6.8/8, C++20 6.7.3/8</p>
|
||||||
|
<h3 id="additional-undecided-features">Additional Undecided
|
||||||
|
Features</h3>
|
||||||
<ul>
|
<ul>
|
||||||
<li><p>Trailing return type syntax for functions (<a
|
<li><p>Trailing return type syntax for functions (<a
|
||||||
href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2541.htm">n2541</a>)</p></li>
|
href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2541.htm">n2541</a>)</p></li>
|
||||||
<li><p>Variable templates (<a
|
<li><p>Variable templates (<a
|
||||||
href="https://isocpp.org/files/papers/N3651.pdf">n3651</a>)</p></li>
|
href="https://isocpp.org/files/papers/N3651.pdf">n3651</a>, <a
|
||||||
|
href="http://wg21.link/p0127r2">p0127r2</a>)</p></li>
|
||||||
<li><p>Member initializers and aggregates (<a
|
<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>
|
href="http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3653.html">n3653</a>)</p></li>
|
||||||
<li><p>Rvalue references and move semantics</p></li>
|
<li><p>Rvalue references and move semantics</p></li>
|
||||||
|
<li><p>Shorthand for nested namespaces (<a
|
||||||
|
href="http://wg21.link/n4230">n4230</a>) — HotSpot makes very little use
|
||||||
|
of namespaces, so this seemingly innocuous feature probably isn't useful
|
||||||
|
to us.</p></li>
|
||||||
|
<li><p>Direct list initialization with <code>auto</code> (<a
|
||||||
|
href="http://wg21.link/n3681">n3681</a>) — This change fixed some issues
|
||||||
|
with direct list initialization and <code>auto</code>. But we don't use
|
||||||
|
that feature much, if at all. And perhaps shouldn't be using
|
||||||
|
it.</p></li>
|
||||||
|
<li><p>UTF-8 Character Literals (<a
|
||||||
|
href="http://wg21.link/n4267">n4267</a>) — Do we have a use-case for
|
||||||
|
this?</p></li>
|
||||||
|
<li><p>Fold Expressions (<a href="http://wg21.link/n4295">n4295</a>) —
|
||||||
|
Provides a simple way to apply operators to a parameter pack. HotSpot
|
||||||
|
doesn't use variadic templates very much. That makes it questionable
|
||||||
|
that developers should need to know about this feature. But if someone
|
||||||
|
does come up with a good use-case, it's likely that the alternatives are
|
||||||
|
significantly worse, because pack manipulation without this can be
|
||||||
|
complicated.</p></li>
|
||||||
|
<li><p><code>std::invoke<>()</code> (<a
|
||||||
|
href="http://wg21.link/n4169">n4169</a>)</p></li>
|
||||||
</ul>
|
</ul>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
@@ -135,6 +135,17 @@ lines of code. Name what you must repeat.
|
|||||||
change should be done with a "setter" accessor matched to the simple
|
change should be done with a "setter" accessor matched to the simple
|
||||||
"getter".
|
"getter".
|
||||||
|
|
||||||
|
#### Conventions for Lock-free Code
|
||||||
|
|
||||||
|
Sometimes variables are accessed concurrently without appropriate synchronization
|
||||||
|
context, such as a held mutex or at a safepoint. In such cases the variable should
|
||||||
|
be declared `volatile` and it should NOT be accessed as a normal C++ lvalue. Rather,
|
||||||
|
access should be performed via functions from `Atomic`, such as `Atomic::load`,
|
||||||
|
`Atomic::store`, etc.
|
||||||
|
|
||||||
|
This special formulation makes it more clear to maintainers that the variable is
|
||||||
|
accessed concurrently in a lock-free manner.
|
||||||
|
|
||||||
### Source Files
|
### Source Files
|
||||||
|
|
||||||
* All source files must have a globally unique basename. The build
|
* All source files must have a globally unique basename. The build
|
||||||
@@ -366,20 +377,22 @@ adjust new lines horizontally to be consistent with that
|
|||||||
organization. (E.g., trailing backslashes on long macro definitions
|
organization. (E.g., trailing backslashes on long macro definitions
|
||||||
often align.)
|
often align.)
|
||||||
|
|
||||||
|
### Avoid implicit conversions to bool
|
||||||
|
|
||||||
|
* Use `bool` for boolean values.
|
||||||
|
* Do not use ints or pointers as (implicit) booleans with `&&`, `||`,
|
||||||
|
`if`, `while`. Instead, compare explicitly, i.e. `if (x != 0)` or
|
||||||
|
`if (ptr != nullptr)`, etc.
|
||||||
|
* Do not use non-boolean declarations in _condition_ forms, i.e. don't use
|
||||||
|
`if (T v = value) { ... }`. But see
|
||||||
|
[Enhanced selection statements](#enhanced-selection-statements).
|
||||||
|
|
||||||
### Miscellaneous
|
### Miscellaneous
|
||||||
|
|
||||||
* Use the [Resource Acquisition Is Initialization][RAII] (RAII)
|
* Use the [Resource Acquisition Is Initialization][RAII] (RAII)
|
||||||
design pattern to manage bracketed critical
|
design pattern to manage bracketed critical
|
||||||
sections. See class `ResourceMark` for an example.
|
sections. See class `ResourceMark` for an example.
|
||||||
|
|
||||||
* Avoid implicit conversions to `bool`.
|
|
||||||
* Use `bool` for boolean values.
|
|
||||||
* Do not use ints or pointers as (implicit) booleans with `&&`, `||`,
|
|
||||||
`if`, `while`. Instead, compare explicitly, i.e. `if (x != 0)` or
|
|
||||||
`if (ptr != nullptr)`, etc.
|
|
||||||
* Do not use declarations in _condition_ forms, i.e. don't use
|
|
||||||
`if (T v = value) { ... }`.
|
|
||||||
|
|
||||||
* Use functions from globalDefinitions.hpp and related files when
|
* Use functions from globalDefinitions.hpp and related files when
|
||||||
performing bitwise
|
performing bitwise
|
||||||
operations on integers. Do not code directly as C operators, unless
|
operations on integers. Do not code directly as C operators, unless
|
||||||
@@ -391,18 +404,17 @@ they are extremely simple. (Examples: `align_up`, `is_power_of_2`,
|
|||||||
* Always enumerate all cases in a switch statement or provide a default
|
* Always enumerate all cases in a switch statement or provide a default
|
||||||
case. It is ok to have an empty default with comment.
|
case. It is ok to have an empty default with comment.
|
||||||
|
|
||||||
|
|
||||||
## Use of C++ Features
|
## Use of C++ Features
|
||||||
|
|
||||||
HotSpot was originally written in a subset of the C++98/03 language.
|
HotSpot was originally written in a subset of the C++98/03 language.
|
||||||
More recently, support for C++14 is provided, though again,
|
More recently, support for C++17 is provided, though again,
|
||||||
HotSpot only uses a subset. (Backports to JDK versions lacking
|
HotSpot only uses a subset. (Backports to JDK versions lacking
|
||||||
support for more recent Standards must of course stick with the
|
support for more recent Standards must of course stick with the
|
||||||
original C++98/03 subset.)
|
original C++98/03 subset.)
|
||||||
|
|
||||||
This section describes that subset. Features from the C++98/03
|
This section describes that subset. Features from the C++98/03
|
||||||
language may be used unless explicitly excluded here. Features from
|
language may be used unless explicitly excluded here. Features from
|
||||||
C++11 and C++14 may be explicitly permitted or explicitly excluded,
|
C++11, C++14, and C++17 may be explicitly permitted or explicitly excluded,
|
||||||
and discussed accordingly here. There is a third category, undecided
|
and discussed accordingly here. There is a third category, undecided
|
||||||
features, about which HotSpot developers have not yet reached a
|
features, about which HotSpot developers have not yet reached a
|
||||||
consensus, or perhaps have not discussed at all. Use of these
|
consensus, or perhaps have not discussed at all. Use of these
|
||||||
@@ -417,9 +429,9 @@ more extensive discussion or rationale for limitations. Features that
|
|||||||
don't have their own subsection are listed in omnibus feature sections
|
don't have their own subsection are listed in omnibus feature sections
|
||||||
for permitted, excluded, and undecided features.
|
for permitted, excluded, and undecided features.
|
||||||
|
|
||||||
Lists of new features for C++11 and C++14, along with links to their
|
Lists of new features for C++11, C++14, and C++17, along with links to their
|
||||||
descriptions, can be found in the online documentation for some of the
|
descriptions, can be found in the online documentation for some of the
|
||||||
compilers and libraries. The C++14 Standard is the definitive
|
compilers and libraries. The C++17 Standard is the definitive
|
||||||
description.
|
description.
|
||||||
|
|
||||||
* [C++ Standards Support in GCC](https://gcc.gnu.org/projects/cxx-status.html)
|
* [C++ Standards Support in GCC](https://gcc.gnu.org/projects/cxx-status.html)
|
||||||
@@ -624,13 +636,41 @@ For local variables, this can be used to make the code clearer by
|
|||||||
eliminating type information that is obvious or irrelevant. Excessive
|
eliminating type information that is obvious or irrelevant. Excessive
|
||||||
use can make code much harder to understand.
|
use can make code much harder to understand.
|
||||||
|
|
||||||
|
* `auto` for non-type template parameters
|
||||||
|
([p0127r2](http://wg21.link/p0127r2))<br>
|
||||||
|
`auto` may be used as a placeholder for the type of a non-type template
|
||||||
|
parameter. The type is deduced from the value provided in a template
|
||||||
|
instantiation.
|
||||||
|
|
||||||
|
<a name="function-return-type-deduction"></a>
|
||||||
* Function return type deduction
|
* Function return type deduction
|
||||||
([n3638](https://isocpp.org/files/papers/N3638.html))<br>
|
([n3638](https://isocpp.org/files/papers/N3638.html))<br>
|
||||||
Only use if the function body has a very small number of `return`
|
Only use if the function body has a very small number of `return`
|
||||||
statements, and generally relatively little other code.
|
statements, and generally relatively little other code.
|
||||||
|
|
||||||
|
* Class template argument deduction
|
||||||
|
([n3602](http://wg21.link/n3602), [p0091r3](http://wg21.link/p0091r3))<br>
|
||||||
|
The template arguments of a class template may be deduced from the arguments
|
||||||
|
to a constructor. This is similar to ordinary function argument deduction,
|
||||||
|
though partial deduction with only _some_ template arguments explicitly
|
||||||
|
provided is not permitted for class template argument deduction. Deduction
|
||||||
|
guides may be used to provide additional control over the deduction. As with
|
||||||
|
`auto` variable declarations, excessive use can make code harder to
|
||||||
|
understand, because explicit type information is lacking. But it can also
|
||||||
|
remove the need to be explicit about types that are either obvious, or that
|
||||||
|
are very hard to write. For example, these allow the addition of a scope-guard
|
||||||
|
mechanism with nice syntax; something like this
|
||||||
|
```
|
||||||
|
ScopeGuard guard{[&]{ ... cleanup code ... }};
|
||||||
|
```
|
||||||
|
|
||||||
* Also see [lambda expressions](#lambdaexpressions).
|
* Also see [lambda expressions](#lambdaexpressions).
|
||||||
|
|
||||||
|
* `decltype(auto)` should be avoided, whether for variables, for non-type
|
||||||
|
template parameters, or for function return types. There are subtle and
|
||||||
|
complex differences between this placeholder type and `auto`. Any use would
|
||||||
|
need very careful explanation.
|
||||||
|
|
||||||
### Expression SFINAE
|
### Expression SFINAE
|
||||||
|
|
||||||
[Substitution Failure Is Not An Error][SFINAE] (SFINAE)
|
[Substitution Failure Is Not An Error][SFINAE] (SFINAE)
|
||||||
@@ -652,6 +692,52 @@ Here are a few closely related example bugs:<br>
|
|||||||
<https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95468><br>
|
<https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95468><br>
|
||||||
<https://developercommunity.visualstudio.com/content/problem/396562/sizeof-deduced-type-is-sometimes-not-a-constant-ex.html>
|
<https://developercommunity.visualstudio.com/content/problem/396562/sizeof-deduced-type-is-sometimes-not-a-constant-ex.html>
|
||||||
|
|
||||||
|
### Trailing return type syntax for functions
|
||||||
|
|
||||||
|
A function's return type may be specified after the parameters and qualifiers
|
||||||
|
([n2541](http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2541.htm)).
|
||||||
|
In such a declaration the normal return type is `auto` and the return type is
|
||||||
|
indicated by `->` followed by the type. Although both use `auto` in the
|
||||||
|
"normal" leading return type position, this differs from
|
||||||
|
[function return type deduction](#function-return-type-deduction),
|
||||||
|
in that the return type is explicit rather than deduced, but specified in a
|
||||||
|
trailing position.
|
||||||
|
|
||||||
|
Use of trailing return types is permitted. However, the normal, leading
|
||||||
|
position for the return type is preferred. A trailing return type should only
|
||||||
|
be used where it provides some benefit. Such benefits usually arise because a
|
||||||
|
trailing return type is in a different scope than a leading return type.
|
||||||
|
|
||||||
|
* If the function identifier is a nested name specifier, then the trailing
|
||||||
|
return type occurs in the nested scope. This may permit simpler naming in the
|
||||||
|
return type because of the different name lookup context.
|
||||||
|
|
||||||
|
* The trailing return type is in the scope of the parameters, making their
|
||||||
|
types accessible via `decltype`. For example
|
||||||
|
```
|
||||||
|
template<typename T, typename U> auto add(T t, U u) -> decltype(t + u);
|
||||||
|
```
|
||||||
|
rather than
|
||||||
|
```
|
||||||
|
template<typename T, typename U> decltype((*(T*)0) + (*(U*)0)) add(T t, U u);
|
||||||
|
```
|
||||||
|
|
||||||
|
* Complex calculated leading return types may obscure the normal syntactic
|
||||||
|
boundaries, making it more difficult for a reader to find the function name and
|
||||||
|
parameters. This is particularly common in cases where the return type is
|
||||||
|
being used for [SFINAE]. A trailing return type may be preferable in such
|
||||||
|
situations.
|
||||||
|
|
||||||
|
### Non-type template parameter values
|
||||||
|
|
||||||
|
C++17 extended the arguments permitted for non-type template parameters
|
||||||
|
([n4268](http://wg21.link/n4268)). The kinds of values (the parameter types)
|
||||||
|
aren't changed. However, the values can now be the result of arbitrary
|
||||||
|
constant expressions (with a few restrictions on the result), rather than a
|
||||||
|
much more limited and restrictive set of expressions. In particular, the
|
||||||
|
argument for a pointer or reference type parameter can now be the result of a
|
||||||
|
constexpr function.
|
||||||
|
|
||||||
### enum
|
### enum
|
||||||
|
|
||||||
Where appropriate, _scoped-enums_ should be used.
|
Where appropriate, _scoped-enums_ should be used.
|
||||||
@@ -770,6 +856,58 @@ ordering, which may differ from (may be stronger than) sequentially
|
|||||||
consistent. There are algorithms in HotSpot that are believed to rely
|
consistent. There are algorithms in HotSpot that are believed to rely
|
||||||
on that ordering.
|
on that ordering.
|
||||||
|
|
||||||
|
### Inline Variables
|
||||||
|
|
||||||
|
Variables with static storage duration may be declared `inline`
|
||||||
|
([p0386r2](https://wg21.link/p0386r2)). This has similar effects as for
|
||||||
|
declaring a function inline: it can be defined, identically, in multiple
|
||||||
|
translation units, must be defined in every translation unit in which it is
|
||||||
|
[ODR used][ODR], and the behavior of the program is as if there is exactly one
|
||||||
|
variable.
|
||||||
|
|
||||||
|
Declaring a variable inline allows the complete definition to be in a header
|
||||||
|
file, rather than having a declaration in a header and the definition in a
|
||||||
|
.cpp file. The guidance on
|
||||||
|
[initialization](#initializing-variables-with-static-storage-duration) of such
|
||||||
|
variables still applies. Inline variables with dynamic initializations can
|
||||||
|
make initialization order problems worse. The few ordering constraints
|
||||||
|
that exist for non-inline variables don't apply, as there isn't a single
|
||||||
|
program-designated translation unit containing the definition.
|
||||||
|
|
||||||
|
A `constexpr` static data member is implicitly `inline`. As a consequence, an
|
||||||
|
[ODR use][ODR] of such a variable doesn't require a definition in some .cpp
|
||||||
|
file. (This is a change from pre-C++17. Beginning with C++17, such a
|
||||||
|
definition is considered a duplicate definition, and is deprecated.)
|
||||||
|
|
||||||
|
Declaring a `thread_local` variable `inline` is forbidden for HotSpot code.
|
||||||
|
[The use of `thread_local`](#thread_local) is already heavily restricted.
|
||||||
|
|
||||||
|
### Initializing variables with static storage duration
|
||||||
|
|
||||||
|
Variables with static storage duration and _dynamic initialization_
|
||||||
|
[C++14 3.6.2](https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2014/n4296.pdf)).
|
||||||
|
should be avoided, unless an implementation is permitted to perform the
|
||||||
|
initialization as a static initialization. The order in which dynamic
|
||||||
|
initializations occur is incompletely specified. Initialization order
|
||||||
|
problems can be difficult to deal with and lead to surprises.
|
||||||
|
|
||||||
|
Variables with static storage duration and non-trivial destructors should be
|
||||||
|
avoided. HotSpot doesn't generally try to cleanup on exit, and running
|
||||||
|
destructors at exit can lead to problems.
|
||||||
|
|
||||||
|
Some of the approaches used in HotSpot to avoid dynamic initialization
|
||||||
|
include:
|
||||||
|
|
||||||
|
* Use the `Deferred<T>` class template. Add a call to its initialization
|
||||||
|
function at an appropriate place during VM initialization. The underlying
|
||||||
|
object is never destroyed.
|
||||||
|
|
||||||
|
* For objects of class type, use a variable whose value is a pointer to the
|
||||||
|
class, initialized to `nullptr`. Provide an initialization function that sets
|
||||||
|
the variable to a dynamically allocated object. Add a call to that function at
|
||||||
|
an appropriate place during VM initialization. Such objects are usually never
|
||||||
|
destroyed.
|
||||||
|
|
||||||
### Uniform Initialization
|
### Uniform Initialization
|
||||||
|
|
||||||
The use of _uniform initialization_
|
The use of _uniform initialization_
|
||||||
@@ -787,6 +925,53 @@ Some relevant sections from cppreference.com:
|
|||||||
Although related, the use of `std::initializer_list` remains forbidden, as
|
Although related, the use of `std::initializer_list` remains forbidden, as
|
||||||
part of the avoidance of the C++ Standard Library in HotSpot code.
|
part of the avoidance of the C++ Standard Library in HotSpot code.
|
||||||
|
|
||||||
|
### Mandatory Copy Elision
|
||||||
|
|
||||||
|
[Copy elision](https://en.wikipedia.org/wiki/Copy_elision)
|
||||||
|
(or [here](https://cn.cppreference.com/w/cpp/language/copy_elision.html))
|
||||||
|
is a compiler optimization used to avoid potentially expensive copies in
|
||||||
|
certain situations. It is critical to making practical the performance of
|
||||||
|
return by value or pass by value. It is also unusual in not following the
|
||||||
|
as-if rule for optimizations - copy elision can be applied even if doing so
|
||||||
|
bypasses side-effects of copying/moving the object. The C++ standard
|
||||||
|
explicitly permits this.
|
||||||
|
|
||||||
|
However, because it's an optional optimization, the relevant copy/move
|
||||||
|
constructor must be available and accessible, in case the compiler chooses to
|
||||||
|
not apply the optimization even in a situation where permitted.
|
||||||
|
|
||||||
|
C++17 changed some cases of copy elision so that there is never a copy/move in
|
||||||
|
these cases ([p0135r1](http://wg21.link/p0135r1)). The interesting cases
|
||||||
|
involve a function that returns an unnamed temporary object, and constructors.
|
||||||
|
In such cases the object being initialized from the temporary is always direct
|
||||||
|
initialized, with no copy/move ever involved; see [RVO] and more specifically
|
||||||
|
[URVO].
|
||||||
|
|
||||||
|
Since this is now standard behavior it can't be avoided in the covered
|
||||||
|
situations. This could change the behavior of code that relied on side effects
|
||||||
|
by constructors, but that's both uncommon and was already problematic because
|
||||||
|
of the previous optional copy elision. But HotSpot code can, and should,
|
||||||
|
explicitly take advantage of this newly required behavior where it makes sense
|
||||||
|
to do so.
|
||||||
|
|
||||||
|
For example, it may be beneficial to delay construction of the result of a
|
||||||
|
function until the return statement, rather than having a local variable that
|
||||||
|
is modified into the desired state and then returned. (Though [NRVO] may apply
|
||||||
|
in that case.)
|
||||||
|
|
||||||
|
It is also now possible to define a factory function for a class that is
|
||||||
|
neither movable nor copyable, if it can be written in a way that makes use of
|
||||||
|
this feature.
|
||||||
|
|
||||||
|
[RVO]: https://en.wikipedia.org/wiki/Copy_elision#RVO
|
||||||
|
"Return Value Optimization"
|
||||||
|
|
||||||
|
[NRVO]: https://en.wikipedia.org/wiki/Copy_elision#NRVO
|
||||||
|
"Named Return Value Optimization"
|
||||||
|
|
||||||
|
[URVO]: https://cn.cppreference.com/w/cpp/language/copy_elision.html
|
||||||
|
"Unnamed Return Value Optimization"
|
||||||
|
|
||||||
### Local Function Objects
|
### Local Function Objects
|
||||||
|
|
||||||
* Local function objects, including lambda expressions, may be used.
|
* Local function objects, including lambda expressions, may be used.
|
||||||
@@ -855,6 +1040,12 @@ Another use for local functions is [partial application][PARTIALAPP]. Again
|
|||||||
here, lambdas are typically much simpler and less verbose than function
|
here, lambdas are typically much simpler and less verbose than function
|
||||||
object classes.
|
object classes.
|
||||||
|
|
||||||
|
A lambda is a constexpr function if either the parameter declaration clause is
|
||||||
|
followed by `constexpr`, or it satisfies the requirements for a constexpr
|
||||||
|
function ([p0170r1]). Thus, using a lambda to package up some computation
|
||||||
|
doesn't incur unnecessary overhead or prevent use in a context required to be
|
||||||
|
compile-time evaluated (such as an array size).
|
||||||
|
|
||||||
Because of these benefits, lambda expressions are permitted in HotSpot code,
|
Because of these benefits, lambda expressions are permitted in HotSpot code,
|
||||||
with some restrictions and usage guidance. An anonymous lambda is one which
|
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
|
is passed directly as an argument. A named lambda is the value of a
|
||||||
@@ -906,6 +1097,17 @@ the most part they don't apply to HotSpot code, given other usage restrictions.
|
|||||||
applies to captured auto variables, not member variables, and is
|
applies to captured auto variables, not member variables, and is
|
||||||
inconsistent with referential transparency.
|
inconsistent with referential transparency.
|
||||||
|
|
||||||
|
* By-value capture of `this` (using a capture list like `[*this]` ([p0018r3]))
|
||||||
|
is also not permitted. One of the motivating use-cases is when the lifetime of
|
||||||
|
the lambda exceeds the lifetime of the object for the containing member
|
||||||
|
function. That is, we have an upward lambda that is capturing `this` of the
|
||||||
|
enclosing method. But again, that use-case doesn't apply if only downward
|
||||||
|
lambdas are used.
|
||||||
|
Another use-case is when we simply want the lambda to be operating on a copy
|
||||||
|
of `this` for some reason. This is sufficiently uncommon that it can be
|
||||||
|
handled by manual copying, so readers don't need to understand this rare
|
||||||
|
syntax.
|
||||||
|
|
||||||
* Non-capturing lambdas (with an empty capture list - `[]`) have limited
|
* Non-capturing lambdas (with an empty capture list - `[]`) have limited
|
||||||
utility. There are cases where no captures are required (pure functions,
|
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
|
for example), but if the function is small and simple then that's obvious
|
||||||
@@ -915,7 +1117,7 @@ anyway.
|
|||||||
Capture initializers inherently increase the complexity of the capture list,
|
Capture initializers inherently increase the complexity of the capture list,
|
||||||
and provide little benefit over an additional in-scope local variable.
|
and provide little benefit over an additional in-scope local variable.
|
||||||
|
|
||||||
The use of `mutable` lambda expressions is forbidden because there don't
|
* 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
|
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.
|
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
|
But with only downward lambdas, such usage seems likely to be rare and
|
||||||
@@ -1062,21 +1264,12 @@ Do not use _inheriting constructors_
|
|||||||
C++11 provides simple syntax allowing a class to inherit the constructors of a
|
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
|
base class. Unfortunately there are a number of problems with the original
|
||||||
specification, and C++17 contains significant revisions ([p0136r1] opens with
|
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
|
a list of 8 Core Issues). Although those issues have been addressed, the
|
||||||
inherited constructors could run into those problems. Such uses might also
|
benefits from this feature are small compared to the complexity. Because of
|
||||||
change behavior in a future HotSpot update to use C++17 or later, potentially
|
this, HotSpot code must not use inherited constructors.
|
||||||
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]: http:/wg21.link/p0136r1 "p0136r1"
|
||||||
[p0136r1] semantics. This is enabled by default when using C++17 or later.
|
[p0195r0](http://wg21.link/p0195r0)
|
||||||
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"
|
|
||||||
|
|
||||||
### Attributes
|
### Attributes
|
||||||
|
|
||||||
@@ -1095,15 +1288,160 @@ preferred location.
|
|||||||
function's declaration, rather than between the function name and the parameter
|
function's declaration, rather than between the function name and the parameter
|
||||||
list.
|
list.
|
||||||
|
|
||||||
|
[p0068r0](http://wg21.link/p0068r0) is the initial proposal for the attributes
|
||||||
|
added by C++17.)
|
||||||
|
|
||||||
Only the following attributes are permitted:
|
Only the following attributes are permitted:
|
||||||
|
|
||||||
* `[[noreturn]]`
|
* `[[noreturn]]`
|
||||||
|
* `[[nodiscard]]` ([p0189r1](http://wg21.link/p0189r1))
|
||||||
|
* `[[maybe_unused]]` ([p0212r1](http://wg21.link/p0212r1))
|
||||||
|
* `[[fallthrough]]` ([p0188r1](http://wg21.link/p0188))
|
||||||
|
|
||||||
The following attributes are expressly forbidden:
|
The following attributes are expressly forbidden:
|
||||||
|
|
||||||
* `[[carries_dependency]]` - Related to `memory_order_consume`.
|
* `[[carries_dependency]]` - Related to `memory_order_consume`.
|
||||||
* `[[deprecated]]` - Not relevant in HotSpot code.
|
* `[[deprecated]]` - Not relevant in HotSpot code.
|
||||||
|
|
||||||
|
Direct use of non-standard (and presumably scoped) attributes in shared code
|
||||||
|
is also forbidden. Using such would depend on the C++17 feature that an
|
||||||
|
attribute not recognized by the implementation is ignored
|
||||||
|
([p0283r2](http://wg21.link/p0283r2)). If such an attribute is needed in
|
||||||
|
shared code, the well-established technique of providing an `ATTRIBUTE_XXX`
|
||||||
|
macro with per-compiler definitions (sometimes empty) should be
|
||||||
|
used. Compilers may warn about unrecognized attributes (whether by name or by
|
||||||
|
location), in order to report typos or misuse. Disabling such warnings
|
||||||
|
globally would not be desirable.
|
||||||
|
|
||||||
|
The use of `using` directives in attribute lists is also forbidden.
|
||||||
|
([p0028r0](http://wg21.link/p0028r0))
|
||||||
|
([p0028r4](http://wg21.link/p0028r4))
|
||||||
|
We don't generally use scoped attributes in attribute lists with other
|
||||||
|
attributes. Rather, uses of scoped attributes (which are implementation
|
||||||
|
defined) are generally hidden behind a portability macro that includes the
|
||||||
|
surrounding brackets.
|
||||||
|
|
||||||
|
### noexcept
|
||||||
|
|
||||||
|
Use of `noexcept` exception specifications
|
||||||
|
([n3050](http://wg21.link/n3050))
|
||||||
|
are permitted with restrictions described below.
|
||||||
|
|
||||||
|
* Only the argument-less form of `noexcept` exception specifications are
|
||||||
|
permitted.
|
||||||
|
* Allocation functions that may return `nullptr` to indicate allocation
|
||||||
|
failure must be declared `noexcept`.
|
||||||
|
* All other uses of `noexcept` exception specifications are forbidden.
|
||||||
|
* `noexcept` expressions are forbidden.
|
||||||
|
* Dynamic exception specifications are forbidden.
|
||||||
|
|
||||||
|
HotSpot is built with exceptions disabled, e.g. compile with `-fno-exceptions`
|
||||||
|
(gcc, clang) or no `/EH` option (MSVC++). So why do we need to consider
|
||||||
|
`noexcept` at all? It's because `noexcept` exception specifications serve two
|
||||||
|
distinct purposes.
|
||||||
|
|
||||||
|
The first is to allow the compiler to avoid generating code or data in support
|
||||||
|
of exceptions being thrown by a function. But this is unnecessary, because
|
||||||
|
exceptions are disabled.
|
||||||
|
|
||||||
|
The second is to allow the compiler and library code to choose different
|
||||||
|
algorithms, depending on whether some function may throw exceptions. This is
|
||||||
|
only relevant to a certain set of functions.
|
||||||
|
|
||||||
|
* Some allocation functions (`operator new` and `operator new[]`) return
|
||||||
|
`nullptr` to indicate allocation failure. If a `new` expression calls such an
|
||||||
|
allocation function, it must check for and handle that possibility. Declaring
|
||||||
|
such a function `noexcept` informs the compiler that `nullptr` is a possible
|
||||||
|
result. If an allocation function is not declared `noexcept` then the compiler
|
||||||
|
may elide that checking and handling for a `new` expression calling that
|
||||||
|
function.
|
||||||
|
|
||||||
|
* Certain Standard Library facilities (notably containers) provide different
|
||||||
|
guarantees for some operations (and may choose different algorithms to
|
||||||
|
implement those operations), depending on whether certain functions
|
||||||
|
(constructors, copy/move operations, swap) are nothrow or not. They detect
|
||||||
|
this using type traits that test whether a function is declared `noexcept`.
|
||||||
|
This can have a significant performance impact if, for example, copying is
|
||||||
|
chosen over a potentially throwing move. But this isn't relevant, since
|
||||||
|
HotSpot forbids the use of most Standard Library facilities.
|
||||||
|
|
||||||
|
HotSpot code can assume no exceptions will ever be thrown, even from functions
|
||||||
|
not declared `noexcept`. So HotSpot code doesn't ever need to check, either
|
||||||
|
with conditional exception specifications or with `noexcept` expressions.
|
||||||
|
|
||||||
|
The exception specification is part of the type of a function
|
||||||
|
([p0012r1](http://wg21.link/p0012r1). This likely has little impact on HotSpot
|
||||||
|
code, since the use of `noexcept` is expected to be rare.
|
||||||
|
|
||||||
|
Dynamic exception specifications were deprecated in C++11. C++17 removed all
|
||||||
|
but `throw()`, with that remaining a deprecated equivalent to `noexcept`.
|
||||||
|
|
||||||
|
### Enhanced selection statements
|
||||||
|
|
||||||
|
C++17 modified the _condition_ part of `if` and `switch` statements, permitting
|
||||||
|
an _init-statement_ to be included
|
||||||
|
([p0305r1](http://wg21.link/p0305r1)).
|
||||||
|
|
||||||
|
Use of this feature is permitted. (However, complex uses may interfere with
|
||||||
|
readability.) Limiting the scope of a variable involved in the condition,
|
||||||
|
while also making the value available to the statement's body, can improve
|
||||||
|
readability. The alternative method of scope-limiting by introducing a nested
|
||||||
|
scope isn't very popular and is rarely used.
|
||||||
|
|
||||||
|
This new syntax is in addition to the _condition_ being a declaration with a
|
||||||
|
_brace-or-equal-initializer_. For an `if` statement this new sytax gains that
|
||||||
|
benefit without violating the long-standing guidance against using
|
||||||
|
[implicit conversions to `bool`](#avoid-implicit-conversions-to-bool),
|
||||||
|
which still stands.
|
||||||
|
|
||||||
|
For example, uses of Unified Logging sometimes explicitly check whether a
|
||||||
|
`LogTarget` is enabled. Instead of
|
||||||
|
```
|
||||||
|
LogTarget(...) lt;
|
||||||
|
if (lt.is_enabled()) {
|
||||||
|
LogStream log(lt);
|
||||||
|
... use log ...
|
||||||
|
}
|
||||||
|
... lt is accessible but probably not needed here ...
|
||||||
|
```
|
||||||
|
using this feature one could write
|
||||||
|
```
|
||||||
|
if (LogTarget(...) lt; lt.is_enabled()) {
|
||||||
|
LogStream log(lt);
|
||||||
|
... use log ...
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
C++17 also added compile-time `if` statements
|
||||||
|
([p0292r2](http://wg21.link/p0292r2)). Use of `if constexpr` is
|
||||||
|
permitted. This feature can replace and (sometimes vastly) simplify many uses
|
||||||
|
of [SFINAE]. The same declaration and initialization guidance for the
|
||||||
|
_condition_ part apply here as for ordinary `if` statements.
|
||||||
|
|
||||||
|
### Expression Evaluation Order
|
||||||
|
|
||||||
|
C++17 tightened up the evaluation order for some kinds of subexpressions
|
||||||
|
([p0138r2](http://wg21.link/p0138r2)). Note, however, that the Alternate
|
||||||
|
Evaluation Order for Function Calls alternative in that paper was adopted,
|
||||||
|
rather than the strict left to right order of evaluation for function call
|
||||||
|
arguments that was proposed in the main body of the paper.
|
||||||
|
|
||||||
|
The primary purpose of this change seems to be to make certain kinds of call
|
||||||
|
chaining well defined. That's not a style widely used in HotSpot. In general
|
||||||
|
it is better to continue to avoid questions in this area by isolating
|
||||||
|
operations with side effects from other statements. In particular, continue to
|
||||||
|
avoid modifying a value in an expression where it is also used.
|
||||||
|
|
||||||
|
### Compatibility with C11
|
||||||
|
|
||||||
|
C++17 refers to C11 rather than C99. This means that C11 libraries and
|
||||||
|
functions may be used in HotSpot. There may be limitations because of
|
||||||
|
differing levels of compatibility among various compilers and versions of
|
||||||
|
those compilers.
|
||||||
|
|
||||||
|
Note that the C parts of the JDK have been built with C11 selected for some
|
||||||
|
time ([JDK-8292008](https://bugs.openjdk.org/browse/JDK-8292008)).
|
||||||
|
|
||||||
### Additional Permitted Features
|
### Additional Permitted Features
|
||||||
|
|
||||||
* `alignof`
|
* `alignof`
|
||||||
@@ -1121,7 +1459,10 @@ The following attributes are expressly forbidden:
|
|||||||
([n2555](http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2555.pdf))
|
([n2555](http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2555.pdf))
|
||||||
|
|
||||||
* Static assertions
|
* Static assertions
|
||||||
([n1720](http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2004/n1720.html))
|
([n1720](http://wg21.link/n1720))
|
||||||
|
([n3928](http://wg21.link/n3928))<br>
|
||||||
|
Both the original (C++11) two-argument form and the new (C++17)
|
||||||
|
single-argument form are permitted.
|
||||||
|
|
||||||
* `decltype`
|
* `decltype`
|
||||||
([n2343](http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2343.pdf))
|
([n2343](http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2343.pdf))
|
||||||
@@ -1168,7 +1509,72 @@ The following attributes are expressly forbidden:
|
|||||||
* Unrestricted Unions
|
* Unrestricted Unions
|
||||||
([n2544](http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2544.pdf))
|
([n2544](http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2544.pdf))
|
||||||
|
|
||||||
### Excluded Features
|
* Preprocessor Condition `__has_include`
|
||||||
|
([p0061r0](http://wg21.link/p0061r0))
|
||||||
|
([p0061r1](http://wg21.link/p0061r1))
|
||||||
|
|
||||||
|
* Hexadecimal Floating-Point Literals
|
||||||
|
([p0245r1](http://wg21.link/p0245r1))
|
||||||
|
|
||||||
|
* Construction Rules for `enum class` Values
|
||||||
|
([p0138r2](http://wg21.link/p0138r2))
|
||||||
|
|
||||||
|
* Allow `typename` in template template parameter
|
||||||
|
([n4051](http://wg21.link/n4051)) — template template parameters are
|
||||||
|
barely used (if at all) in HotSpot, but there's no reason to artificially
|
||||||
|
disallow this syntactic regularization in any such uses.
|
||||||
|
|
||||||
|
## Excluded Features
|
||||||
|
|
||||||
|
### Structured Bindings
|
||||||
|
|
||||||
|
The use of structured bindings [p0217r3](http://wg21.link/p0217r3) is
|
||||||
|
forbidden. Preferred approaches for handling functions with multiple return
|
||||||
|
values include
|
||||||
|
|
||||||
|
* Return a named class/struct intended for that purpose, with named and typed
|
||||||
|
members/accessors.
|
||||||
|
|
||||||
|
* Return a value along with out parameters (usually pointers, sometimes
|
||||||
|
references).
|
||||||
|
|
||||||
|
* Designate a sentinel "failure" value in the normal return value type, with
|
||||||
|
some out of band location for additional information. For example, this is
|
||||||
|
the model typically used with `errno`, where a function returns a normal
|
||||||
|
result, or -1 to indicate an error, with additional error information in
|
||||||
|
`errno`.
|
||||||
|
|
||||||
|
There is a strong preference for names and explicit types, as opposed to
|
||||||
|
offsets and implicit types. For example, there are folks who strongly dislike
|
||||||
|
that some of the Standard Library functions return `std::pair` because `first`
|
||||||
|
and `second` members don't carry any useful information.
|
||||||
|
|
||||||
|
### File System Library
|
||||||
|
|
||||||
|
The use of the File System library is forbidden. HotSpot doesn't do very much
|
||||||
|
with files, and already has adequate mechanisms for its needs. Rewriting in
|
||||||
|
terms of this new library doesn't provide any obviously significant
|
||||||
|
benefits. Having a mix of the existing usage and uses of this new library
|
||||||
|
would be confusing.
|
||||||
|
|
||||||
|
[n4100](http://wg21.link/n4100)
|
||||||
|
[p0218r0](http://wg21.link/p0218r0)
|
||||||
|
[p0219r1](http://wg21.link/p0219r1)
|
||||||
|
[p0317r1](http://wg21.link/p0317r1)
|
||||||
|
[p0392r0](http://wg21.link/p0392r0)
|
||||||
|
[p0430r2](http://wg21.link/p0430r2)
|
||||||
|
[p0492r2](http://wg21.link/p0492r2)
|
||||||
|
[p1164r1](http://wg21.link/p1164r1)
|
||||||
|
|
||||||
|
### Aggregate Extensions
|
||||||
|
|
||||||
|
Aggregates with base classes are forbidden. C++17 allows aggregate
|
||||||
|
initialization for classes with base classes
|
||||||
|
([p0017r1](https://wg21.link/p0017r1)). HotSpot makes very little use of
|
||||||
|
aggregate classes, preferring explicit constructors even for very simple
|
||||||
|
classes.
|
||||||
|
|
||||||
|
### Additional Excluded Features
|
||||||
|
|
||||||
* New string and character literals
|
* New string and character literals
|
||||||
* New character types
|
* New character types
|
||||||
@@ -1199,39 +1605,286 @@ namespace std;` to avoid needing to qualify Standard Library names.
|
|||||||
([n2179](http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2179.html)) —
|
([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.
|
HotSpot does not permit the use of exceptions, so this feature isn't useful.
|
||||||
|
|
||||||
* 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.
|
|
||||||
|
|
||||||
* Avoid most operator overloading, preferring named functions. When
|
* Avoid most operator overloading, preferring named functions. When
|
||||||
operator overloading is used, ensure the semantics conform to the
|
operator overloading is used, ensure the semantics conform to the
|
||||||
normal expected behavior of the operation.
|
normal expected behavior of the operation.
|
||||||
|
|
||||||
* Avoid most implicit conversion constructors and (implicit or explicit)
|
* Avoid most implicit conversion constructors and (implicit or explicit)
|
||||||
conversion operators. (Note that conversion to `bool` isn't needed
|
conversion operators. Conversion to `bool` operators aren't needed
|
||||||
in HotSpot code because of the "no implicit boolean" guideline.)
|
because of the
|
||||||
|
[no implicit boolean](#avoid-implicit-conversions-to-bool)
|
||||||
|
guideline.)
|
||||||
|
|
||||||
* Avoid `goto` statements.
|
* Avoid `goto` statements.
|
||||||
|
|
||||||
### Undecided Features
|
* Attributes for namespaces and enumerators
|
||||||
|
([n4266](http://wg21.link/n4266) —
|
||||||
|
The only applicable attribute is [`[[deprecated]]`](#attributes), which is
|
||||||
|
forbidden.
|
||||||
|
|
||||||
|
* Variadic `using` declarations
|
||||||
|
([p0195r2](http://wg21.link/p0195r2))
|
||||||
|
|
||||||
|
* `std::variant<>`
|
||||||
|
([p0088r3](http://wg21.link/p0088r3)) —
|
||||||
|
Even if more of the C++ Standard Library is permitted, this class will remain
|
||||||
|
forbidded. Invalid accesses are indicated by throwing exceptions.
|
||||||
|
|
||||||
|
* `std::any`
|
||||||
|
([p0220r1](http://wg21.link/p0220r1)) —
|
||||||
|
Even if more of the C++ Standard Library is permitted, this class will remain
|
||||||
|
forbidden. It may require allocation, and always uses the standard
|
||||||
|
allocator. It requires [RTTI].
|
||||||
|
|
||||||
|
* `std::as_const()`
|
||||||
|
([p0007r1](http://wg21.link/p0007r1)) —
|
||||||
|
If sufficiently useful, HotSpot could add such a function. It would likely be
|
||||||
|
added to globalDefinitions.hpp, where there are already some similar small
|
||||||
|
utilities.
|
||||||
|
|
||||||
|
* `std::clamp()`
|
||||||
|
([p002501](http://wg21.link/p002501)) —
|
||||||
|
This function is already provided in globalDefinitions.hpp.
|
||||||
|
|
||||||
|
* Parallel STL Algorithms
|
||||||
|
([p0024r2](http://wg21.link/p0024r2)) —
|
||||||
|
Even if more of the C++ Standard Library is permitted, these will remain
|
||||||
|
forbidden. They are built on the standard C++ threading mechanisms. HotSpot
|
||||||
|
doesn't use those mechanisms, instead providing and using its own.
|
||||||
|
|
||||||
|
* Cache Line Sizes
|
||||||
|
[p0154r1](http://wg21.link/p0154r1) —
|
||||||
|
HotSpot has its own mechanisms for this, using values like
|
||||||
|
`DEFAULT_CACHE_LINE_SIZE`. The platform-specific implementation of the HotSpot
|
||||||
|
mechanisms might use these library functions, but there is no reason to move
|
||||||
|
away from the current approach. Quoting from [JOSUTTIS]: "... if you know better,
|
||||||
|
use specific values, but using these values is better than any assumed fixed
|
||||||
|
size for code supporting multiple platforms."
|
||||||
|
|
||||||
|
* `register` storage class removal
|
||||||
|
[p0001r1](http://wg21.link/p0001r1) —
|
||||||
|
The `register` storage class has been removed. `register` is still a keyword,
|
||||||
|
so still can't be used for normal purposes. Also, this doesn't affect the use
|
||||||
|
of `register` for gcc-style extended asm code; that's a different syntactic
|
||||||
|
element with a different meaning.
|
||||||
|
|
||||||
|
* Value of `__cplusplus` —
|
||||||
|
Testing whether `__cplusplus` is defined or not is permitted, and indeed
|
||||||
|
required. But the value should not need to be examined. The value is changed
|
||||||
|
with each revision of the Standard. But we build HotSpot and (most of) the
|
||||||
|
rest of the JDK with a specifically selected version of the Standard. The
|
||||||
|
value of `__cplusplus` should be known and unchanging until we change the
|
||||||
|
project's build configuration again. So examining the value shouldn't ever be
|
||||||
|
necessary.
|
||||||
|
|
||||||
|
* Removal of `++` for `bool`
|
||||||
|
([p0003r1](http://wg21.link/p0003r1))
|
||||||
|
|
||||||
|
* Removal of trigraphs
|
||||||
|
([n4086](http://wg21.link/n4086))
|
||||||
|
|
||||||
|
## Undecided Features
|
||||||
|
|
||||||
This list is incomplete; it serves to explicitly call out some
|
This list is incomplete; it serves to explicitly call out some
|
||||||
features that have not yet been discussed.
|
features that have not yet been discussed.
|
||||||
|
|
||||||
|
Some features are undecided (so implicitly forbidden) because we don't expect
|
||||||
|
to use them at all. This might be reconsidered if someone finds a good use
|
||||||
|
case.
|
||||||
|
|
||||||
|
Some Standard Library features are undecided (so implicitly forbidden)
|
||||||
|
because, while this Style Guide forbids the use of such, they may be
|
||||||
|
sufficiently useful that we want to permit them anyway. Doing so may require
|
||||||
|
some idiomatic mechanism for addressing things like `assert` incompatibility,
|
||||||
|
incompatibility with HotSpot's `FORBID_C_FUNCTION` mechanism, and the like.
|
||||||
|
|
||||||
|
### std::optional<>
|
||||||
|
|
||||||
|
It is undecided whether to permit the use of `std::optional<>`
|
||||||
|
([p0220r1](http://wg21.link/p0220r1)). It may be sufficiently useful that it
|
||||||
|
should be permitted despite the usual prohibition against using Standard
|
||||||
|
Library facilities. Use of the `value()` member function must be forbidden, as
|
||||||
|
it reports an invalid access by throwing an exception.
|
||||||
|
|
||||||
|
### std::byte
|
||||||
|
|
||||||
|
It is undecided whether to permit the use of the `std::byte` type
|
||||||
|
([p0298r3](http://wg21.link/p0298r3)). It may be sufficiently useful that it
|
||||||
|
should be permitted despite the usual prohibition against using Standard
|
||||||
|
Library facilities.
|
||||||
|
|
||||||
|
It has been suggested that changing the HotSpot `address` type to use
|
||||||
|
`std::byte` has some benefits. That is, replace
|
||||||
|
```
|
||||||
|
typedef u_char* address;
|
||||||
|
typedef const u_char* const_address;
|
||||||
|
```
|
||||||
|
```
|
||||||
|
using address = std::byte*;
|
||||||
|
using const_address = const std::byte*;
|
||||||
|
```
|
||||||
|
in globalDefinitions.hpp.
|
||||||
|
|
||||||
|
A specific benefit that was mentioned is that it might improve the horrible
|
||||||
|
way that gdb handles our current definition of the `address` type.
|
||||||
|
```
|
||||||
|
#include <cstddef>
|
||||||
|
|
||||||
|
typedef unsigned char* address;
|
||||||
|
typedef std::byte* address_b;
|
||||||
|
|
||||||
|
int main() {
|
||||||
|
|
||||||
|
char* mem;
|
||||||
|
|
||||||
|
address addr = (address)mem;
|
||||||
|
address_b addr_b = (address_b)mem;
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
```
|
||||||
|
(gdb) p addr
|
||||||
|
$1 = (address) 0x7ffff7fe4fa0 <dl_main> "\363\017\036\372Uf\017\357\300H\211\345AWI\211\377AVAUATSH\201\354\210\002"
|
||||||
|
(gdb) p addr_b
|
||||||
|
$2 = (address_b) 0x7ffff7fe4fa0 <dl_main>
|
||||||
|
```
|
||||||
|
|
||||||
|
This needs to be explored. Some folks have said they will do so.
|
||||||
|
|
||||||
|
### String Views
|
||||||
|
|
||||||
|
It is undecided whether to permit the use of `std::string_view`
|
||||||
|
([p0220r1](http://wg21.link/p0220r1)).
|
||||||
|
|
||||||
|
HotSpot doesn't use `std::string`, but uses `char*` strings a lot. Wrapping
|
||||||
|
such in a `std::string_view` to enable the use of various algorithms could be
|
||||||
|
useful. But since HotSpot also doesn't permit use of `<algorithm>` and the
|
||||||
|
like, that only gets the limited set of algorithms provided by the view class
|
||||||
|
directly.
|
||||||
|
|
||||||
|
There is also the issue of `NUL` termination; string views are not necessarily
|
||||||
|
`NUL` terminated. Moreover, if one goes to the work of making one that is
|
||||||
|
`NUL` terminated, that terminator is included in the size.
|
||||||
|
|
||||||
|
There are other caveats. Permitting use of string views would require
|
||||||
|
discussion of those.
|
||||||
|
|
||||||
|
### Substring and Subsequence Searching
|
||||||
|
|
||||||
|
In addition to simple substring searching, the Standard Library now includes
|
||||||
|
Boyer-Moore and Boyer-Moore-Horspool searchers, in case someone wants to
|
||||||
|
search really large texts. That seems an unlikely use-case for HotSpot. See
|
||||||
|
[p0220r1](http://wg21.link/p0220r1).
|
||||||
|
|
||||||
|
### `new` and `delete` with Over-Aligned Data
|
||||||
|
|
||||||
|
It is undecided whether to permit the use of dynamic allocation of overaligned
|
||||||
|
types ([n3396](http://wg21.link/n3396)).
|
||||||
|
|
||||||
|
HotSpot currently only has a couple of over-aligned types that are dynamically
|
||||||
|
allocated. These are handled manually, not going through `new` expressions, as
|
||||||
|
that couldn't work before C++17.
|
||||||
|
|
||||||
|
One of the ways an over-aligned type might arise is by aligning a data member.
|
||||||
|
This might be done to avoid destructive interference for concurrent accesses.
|
||||||
|
But HotSpot uses a different approach, using explicit padding. Again, this is
|
||||||
|
in part because `new` and `delete` of overaligned types didn't work. But we
|
||||||
|
might prefer to continue this approach.
|
||||||
|
|
||||||
|
We would need to add `operator new` overloads to `CHeapObj<>` and possibly in
|
||||||
|
other places in order to support this. However, it has been suggested that
|
||||||
|
implementing it (efficiently) on top of NMT might be difficult. Note that
|
||||||
|
`posix_memalign` / `_aligned_malloc` don't help here, because of NMT's use of
|
||||||
|
malloc headers.
|
||||||
|
|
||||||
|
If we don't support it we may want to add `operator new` overloads that are
|
||||||
|
deleted, to prevent attempted uses.
|
||||||
|
|
||||||
|
Alignment usage in non-HotSpot parts of the OpenJDK:
|
||||||
|
|
||||||
|
* `alignas` used once in harfbuzz, to align a variable.
|
||||||
|
|
||||||
|
* libpipewire has `#define SPA_ALIGNED` macro using gcc `aligned` attribute,
|
||||||
|
but doesn't use it.
|
||||||
|
|
||||||
|
* libsleef has `#define ALIGNED` macro using gcc `aligned` attribute. It is
|
||||||
|
not used for class or member declarations.
|
||||||
|
|
||||||
|
### `std::to_chars()` and `std::from_chars`
|
||||||
|
|
||||||
|
It is undecided whether to permit the use of `std::to_chars()` and
|
||||||
|
`std::from_chars()` ([p0067r5](http://wg21.link/p0067r5)).
|
||||||
|
|
||||||
|
These functions provide low-level conversions between character sequences and
|
||||||
|
numeric values. This seems like a good candidate for use in HotSpot,
|
||||||
|
potentially replacing various clumsy or less performant alternatives. There is
|
||||||
|
no memory allocation. Parsing failures are indicated via error codes rather
|
||||||
|
than exceptions. Various other nice for HotSpot properties.
|
||||||
|
|
||||||
|
Note that the published C++17 Standard puts these in `<utility>`, but a defect
|
||||||
|
report moved them to `<charconv>`. This also needs `<system_error>`.
|
||||||
|
|
||||||
|
This would require upgrading the minimum gcc version to 11.1 for floating
|
||||||
|
point conversion support. The minimum Visual Studio version is already
|
||||||
|
sufficient. The minimum clang version requirement hasn't been determined yet.
|
||||||
|
|
||||||
|
### `std::launder()`
|
||||||
|
|
||||||
|
It is undecided whether to permit the use of `std::launder()`
|
||||||
|
([p0137r1](http://wg21.link/p0137r1)).
|
||||||
|
|
||||||
|
Change to permitted if we discover a place where we need it. Or maybe we
|
||||||
|
should just permit it, but hope we don't need it.
|
||||||
|
|
||||||
|
Also, C++20 revised the relevant part of Object Lifetime in a way that seems
|
||||||
|
more permissive and with less need of laundering. We don't know if
|
||||||
|
implementations of prior versions take advantage of the difference.
|
||||||
|
|
||||||
|
See Object Lifetime: C++17 6.8/8, C++20 6.7.3/8
|
||||||
|
|
||||||
|
### Additional Undecided Features
|
||||||
|
|
||||||
* 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))
|
([n2541](http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2008/n2541.htm))
|
||||||
|
|
||||||
* Variable templates
|
* Variable templates
|
||||||
([n3651](https://isocpp.org/files/papers/N3651.pdf))
|
([n3651](https://isocpp.org/files/papers/N3651.pdf),
|
||||||
|
[p0127r2](http://wg21.link/p0127r2))
|
||||||
|
|
||||||
* Member initializers and aggregates
|
* Member initializers and aggregates
|
||||||
([n3653](http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3653.html))
|
([n3653](http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3653.html))
|
||||||
|
|
||||||
* Rvalue references and move semantics
|
* Rvalue references and move semantics
|
||||||
|
|
||||||
|
* Shorthand for nested namespaces
|
||||||
|
([n4230](http://wg21.link/n4230)) —
|
||||||
|
HotSpot makes very little use of namespaces, so this seemingly innocuous
|
||||||
|
feature probably isn't useful to us.
|
||||||
|
|
||||||
|
* Direct list initialization with `auto`
|
||||||
|
([n3681](http://wg21.link/n3681)) —
|
||||||
|
This change fixed some issues with direct list initialization and `auto`. But
|
||||||
|
we don't use that feature much, if at all. And perhaps shouldn't be using it.
|
||||||
|
|
||||||
|
* UTF-8 Character Literals
|
||||||
|
([n4267](http://wg21.link/n4267)) —
|
||||||
|
Do we have a use-case for this?
|
||||||
|
|
||||||
|
* Fold Expressions
|
||||||
|
([n4295](http://wg21.link/n4295)) —
|
||||||
|
Provides a simple way to apply operators to a parameter pack. HotSpot doesn't
|
||||||
|
use variadic templates very much. That makes it questionable that developers
|
||||||
|
should need to know about this feature. But if someone does come up with a
|
||||||
|
good use-case, it's likely that the alternatives are significantly worse,
|
||||||
|
because pack manipulation without this can be complicated.
|
||||||
|
|
||||||
|
* `std::invoke<>()`
|
||||||
|
([n4169](http://wg21.link/n4169))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
[ADL]: https://en.cppreference.com/w/cpp/language/adl
|
[ADL]: https://en.cppreference.com/w/cpp/language/adl
|
||||||
"Argument Dependent Lookup"
|
"Argument Dependent Lookup"
|
||||||
|
|
||||||
@@ -1249,3 +1902,6 @@ features that have not yet been discussed.
|
|||||||
|
|
||||||
[PARTIALAPP]: https://en.wikipedia.org/wiki/Partial_application
|
[PARTIALAPP]: https://en.wikipedia.org/wiki/Partial_application
|
||||||
"Partial Application"
|
"Partial Application"
|
||||||
|
|
||||||
|
[JOSUTTIS]: https://www.cppstd17.com
|
||||||
|
"C++17: The Complete Guide"
|
||||||
|
|||||||
@@ -11,11 +11,8 @@
|
|||||||
div.columns{display: flex; gap: min(4vw, 1.5em);}
|
div.columns{display: flex; gap: min(4vw, 1.5em);}
|
||||||
div.column{flex: auto; overflow-x: auto;}
|
div.column{flex: auto; overflow-x: auto;}
|
||||||
div.hanging-indent{margin-left: 1.5em; text-indent: -1.5em;}
|
div.hanging-indent{margin-left: 1.5em; text-indent: -1.5em;}
|
||||||
/* The extra [class] is a hack that increases specificity enough to
|
ul.task-list{list-style: none;}
|
||||||
override a similar rule in reveal.js */
|
|
||||||
ul.task-list[class]{list-style: none;}
|
|
||||||
ul.task-list li input[type="checkbox"] {
|
ul.task-list li input[type="checkbox"] {
|
||||||
font-size: inherit;
|
|
||||||
width: 0.8em;
|
width: 0.8em;
|
||||||
margin: 0 0.8em 0.2em -1.6em;
|
margin: 0 0.8em 0.2em -1.6em;
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
|
|||||||
@@ -72,11 +72,9 @@ id="toc-notes-for-specific-tests">Notes for Specific Tests</a>
|
|||||||
<li><a href="#non-us-locale" id="toc-non-us-locale">Non-US
|
<li><a href="#non-us-locale" id="toc-non-us-locale">Non-US
|
||||||
locale</a></li>
|
locale</a></li>
|
||||||
<li><a href="#pkcs11-tests" id="toc-pkcs11-tests">PKCS11 Tests</a></li>
|
<li><a href="#pkcs11-tests" id="toc-pkcs11-tests">PKCS11 Tests</a></li>
|
||||||
</ul></li>
|
|
||||||
<li><a href="#testing-ahead-of-time-optimizations"
|
<li><a href="#testing-ahead-of-time-optimizations"
|
||||||
id="toc-testing-ahead-of-time-optimizations">### Testing Ahead-of-time
|
id="toc-testing-ahead-of-time-optimizations">Testing Ahead-of-time
|
||||||
Optimizations</a>
|
Optimizations</a></li>
|
||||||
<ul>
|
|
||||||
<li><a href="#testing-with-alternative-security-providers"
|
<li><a href="#testing-with-alternative-security-providers"
|
||||||
id="toc-testing-with-alternative-security-providers">Testing with
|
id="toc-testing-with-alternative-security-providers">Testing with
|
||||||
alternative security providers</a></li>
|
alternative security providers</a></li>
|
||||||
@@ -400,7 +398,8 @@ TEST_OPTS keywords.</p>
|
|||||||
<h4 id="jobs">JOBS</h4>
|
<h4 id="jobs">JOBS</h4>
|
||||||
<p>Currently only applies to JTReg.</p>
|
<p>Currently only applies to JTReg.</p>
|
||||||
<h4 id="timeout_factor">TIMEOUT_FACTOR</h4>
|
<h4 id="timeout_factor">TIMEOUT_FACTOR</h4>
|
||||||
<p>Currently only applies to JTReg.</p>
|
<p>Currently only applies to <a href="#timeout_factor-1">JTReg
|
||||||
|
-timeoutFactor</a>.</p>
|
||||||
<h4 id="java_options">JAVA_OPTIONS</h4>
|
<h4 id="java_options">JAVA_OPTIONS</h4>
|
||||||
<p>Applies to JTReg, GTest and Micro.</p>
|
<p>Applies to JTReg, GTest and Micro.</p>
|
||||||
<h4 id="vm_options">VM_OPTIONS</h4>
|
<h4 id="vm_options">VM_OPTIONS</h4>
|
||||||
@@ -435,6 +434,9 @@ the diff between the specified revision and the repository tip.</p>
|
|||||||
<p>The report is stored in
|
<p>The report is stored in
|
||||||
<code>build/$BUILD/test-results/jcov-output/diff_coverage_report</code>
|
<code>build/$BUILD/test-results/jcov-output/diff_coverage_report</code>
|
||||||
file.</p>
|
file.</p>
|
||||||
|
<h4 id="aot_jdk">AOT_JDK</h4>
|
||||||
|
<p>See <a href="#testing-ahead-of-time-optimizations">Testing
|
||||||
|
Ahead-of-time optimizations</a>.</p>
|
||||||
<h3 id="jtreg-keywords">JTReg keywords</h3>
|
<h3 id="jtreg-keywords">JTReg keywords</h3>
|
||||||
<h4 id="jobs-1">JOBS</h4>
|
<h4 id="jobs-1">JOBS</h4>
|
||||||
<p>The test concurrency (<code>-concurrency</code>).</p>
|
<p>The test concurrency (<code>-concurrency</code>).</p>
|
||||||
@@ -443,8 +445,12 @@ otherwise it defaults to JOBS, except for Hotspot, where the default is
|
|||||||
<em>number of CPU cores/2</em>, but never more than <em>memory size in
|
<em>number of CPU cores/2</em>, but never more than <em>memory size in
|
||||||
GB/2</em>.</p>
|
GB/2</em>.</p>
|
||||||
<h4 id="timeout_factor-1">TIMEOUT_FACTOR</h4>
|
<h4 id="timeout_factor-1">TIMEOUT_FACTOR</h4>
|
||||||
<p>The timeout factor (<code>-timeoutFactor</code>).</p>
|
<p>The <code>TIMEOUT_FACTOR</code> is forwarded to JTReg framework
|
||||||
<p>Defaults to 4.</p>
|
itself (<code>-timeoutFactor</code>). Also, some test cases that
|
||||||
|
programmatically wait a certain amount of time will apply this factor.
|
||||||
|
If we run in forced compilation mode (<code>-Xcomp</code>), the build
|
||||||
|
system will automatically adjust this factor to compensate for less
|
||||||
|
performance. Defaults to 1.</p>
|
||||||
<h4 id="failure_handler_timeout">FAILURE_HANDLER_TIMEOUT</h4>
|
<h4 id="failure_handler_timeout">FAILURE_HANDLER_TIMEOUT</h4>
|
||||||
<p>Sets the argument <code>-timeoutHandlerTimeout</code> for JTReg. The
|
<p>Sets the argument <code>-timeoutHandlerTimeout</code> for JTReg. The
|
||||||
default value is 0. This is only valid if the failure handler is
|
default value is 0. This is only valid if the failure handler is
|
||||||
@@ -457,6 +463,12 @@ class, named Virtual, is currently part of the JDK build in the
|
|||||||
<code>test/jtreg_test_thread_factory/</code> directory. This class gets
|
<code>test/jtreg_test_thread_factory/</code> directory. This class gets
|
||||||
compiled during the test image build. The implementation of the Virtual
|
compiled during the test image build. The implementation of the Virtual
|
||||||
class creates a new virtual thread for executing each test class.</p>
|
class creates a new virtual thread for executing each test class.</p>
|
||||||
|
<h4 id="jvmti_stress_agent">JVMTI_STRESS_AGENT</h4>
|
||||||
|
<p>Executes JTReg tests with JVM TI stress agent. The stress agent is
|
||||||
|
the part of test library and located in
|
||||||
|
<code>test/lib/jdk/test/lib/jvmti/libJvmtiStressAgent.cpp</code>. The
|
||||||
|
value of this argument is set as JVM TI agent options. This mode uses
|
||||||
|
ProblemList-jvmti-stress-agent.txt as an additional exclude list.</p>
|
||||||
<h4 id="test_mode">TEST_MODE</h4>
|
<h4 id="test_mode">TEST_MODE</h4>
|
||||||
<p>The test mode (<code>agentvm</code> or <code>othervm</code>).</p>
|
<p>The test mode (<code>agentvm</code> or <code>othervm</code>).</p>
|
||||||
<p>Defaults to <code>agentvm</code>.</p>
|
<p>Defaults to <code>agentvm</code>.</p>
|
||||||
@@ -556,6 +568,12 @@ each fork. Same as specifying <code>-wi <num></code>.</p>
|
|||||||
same values as <code>-rff</code>, i.e., <code>text</code>,
|
same values as <code>-rff</code>, i.e., <code>text</code>,
|
||||||
<code>csv</code>, <code>scsv</code>, <code>json</code>, or
|
<code>csv</code>, <code>scsv</code>, <code>json</code>, or
|
||||||
<code>latex</code>.</p>
|
<code>latex</code>.</p>
|
||||||
|
<h4 id="test_jdk">TEST_JDK</h4>
|
||||||
|
<p>The path to the JDK that will be used to run the benchmarks.</p>
|
||||||
|
<p>Defaults to <code>build/<CONF-NAME>/jdk</code>.</p>
|
||||||
|
<h4 id="benchmarks_jar">BENCHMARKS_JAR</h4>
|
||||||
|
<p>The path to the JAR containing the benchmarks.</p>
|
||||||
|
<p>Defaults to <code>test/micro/benchmarks.jar</code>.</p>
|
||||||
<h4 id="vm_options-2">VM_OPTIONS</h4>
|
<h4 id="vm_options-2">VM_OPTIONS</h4>
|
||||||
<p>Additional VM arguments to provide to forked off VMs. Same as
|
<p>Additional VM arguments to provide to forked off VMs. Same as
|
||||||
<code>-jvmArgs <args></code></p>
|
<code>-jvmArgs <args></code></p>
|
||||||
@@ -601,8 +619,8 @@ element of the appropriate <code>@Artifact</code> class. (See
|
|||||||
JTREG="JAVA_OPTIONS=-Djdk.test.lib.artifacts.nsslib-linux_aarch64=/path/to/NSS-libs"</code></pre>
|
JTREG="JAVA_OPTIONS=-Djdk.test.lib.artifacts.nsslib-linux_aarch64=/path/to/NSS-libs"</code></pre>
|
||||||
<p>For more notes about the PKCS11 tests, please refer to
|
<p>For more notes about the PKCS11 tests, please refer to
|
||||||
test/jdk/sun/security/pkcs11/README.</p>
|
test/jdk/sun/security/pkcs11/README.</p>
|
||||||
<h2 id="testing-ahead-of-time-optimizations">### Testing Ahead-of-time
|
<h3 id="testing-ahead-of-time-optimizations">Testing Ahead-of-time
|
||||||
Optimizations</h2>
|
Optimizations</h3>
|
||||||
<p>One way to improve test coverage of ahead-of-time (AOT) optimizations
|
<p>One way to improve test coverage of ahead-of-time (AOT) optimizations
|
||||||
in the JDK is to run existing jtreg test cases in a special "AOT_JDK"
|
in the JDK is to run existing jtreg test cases in a special "AOT_JDK"
|
||||||
mode. Example:</p>
|
mode. Example:</p>
|
||||||
|
|||||||
@@ -324,7 +324,7 @@ Currently only applies to JTReg.
|
|||||||
|
|
||||||
#### TIMEOUT_FACTOR
|
#### TIMEOUT_FACTOR
|
||||||
|
|
||||||
Currently only applies to JTReg.
|
Currently only applies to [JTReg -timeoutFactor](#timeout_factor-1).
|
||||||
|
|
||||||
#### JAVA_OPTIONS
|
#### JAVA_OPTIONS
|
||||||
|
|
||||||
@@ -367,6 +367,10 @@ between the specified revision and the repository tip.
|
|||||||
The report is stored in
|
The report is stored in
|
||||||
`build/$BUILD/test-results/jcov-output/diff_coverage_report` file.
|
`build/$BUILD/test-results/jcov-output/diff_coverage_report` file.
|
||||||
|
|
||||||
|
#### AOT_JDK
|
||||||
|
|
||||||
|
See [Testing Ahead-of-time optimizations](#testing-ahead-of-time-optimizations).
|
||||||
|
|
||||||
### JTReg keywords
|
### JTReg keywords
|
||||||
|
|
||||||
#### JOBS
|
#### JOBS
|
||||||
@@ -379,9 +383,11 @@ never more than *memory size in GB/2*.
|
|||||||
|
|
||||||
#### TIMEOUT_FACTOR
|
#### TIMEOUT_FACTOR
|
||||||
|
|
||||||
The timeout factor (`-timeoutFactor`).
|
The `TIMEOUT_FACTOR` is forwarded to JTReg framework itself
|
||||||
|
(`-timeoutFactor`). Also, some test cases that programmatically wait a
|
||||||
Defaults to 4.
|
certain amount of time will apply this factor. If we run in forced
|
||||||
|
compilation mode (`-Xcomp`), the build system will automatically
|
||||||
|
adjust this factor to compensate for less performance. Defaults to 1.
|
||||||
|
|
||||||
#### FAILURE_HANDLER_TIMEOUT
|
#### FAILURE_HANDLER_TIMEOUT
|
||||||
|
|
||||||
@@ -397,6 +403,13 @@ the `test/jtreg_test_thread_factory/` directory. This class gets compiled
|
|||||||
during the test image build. The implementation of the Virtual class creates a
|
during the test image build. The implementation of the Virtual class creates a
|
||||||
new virtual thread for executing each test class.
|
new virtual thread for executing each test class.
|
||||||
|
|
||||||
|
#### JVMTI_STRESS_AGENT
|
||||||
|
|
||||||
|
Executes JTReg tests with JVM TI stress agent. The stress agent is the part of
|
||||||
|
test library and located in `test/lib/jdk/test/lib/jvmti/libJvmtiStressAgent.cpp`.
|
||||||
|
The value of this argument is set as JVM TI agent options.
|
||||||
|
This mode uses ProblemList-jvmti-stress-agent.txt as an additional exclude list.
|
||||||
|
|
||||||
#### TEST_MODE
|
#### TEST_MODE
|
||||||
|
|
||||||
The test mode (`agentvm` or `othervm`).
|
The test mode (`agentvm` or `othervm`).
|
||||||
@@ -545,6 +558,18 @@ Amount of time to spend in each warmup iteration. Same as specifying `-w
|
|||||||
Specify to have the test run save a log of the values. Accepts the same values
|
Specify to have the test run save a log of the values. Accepts the same values
|
||||||
as `-rff`, i.e., `text`, `csv`, `scsv`, `json`, or `latex`.
|
as `-rff`, i.e., `text`, `csv`, `scsv`, `json`, or `latex`.
|
||||||
|
|
||||||
|
#### TEST_JDK
|
||||||
|
|
||||||
|
The path to the JDK that will be used to run the benchmarks.
|
||||||
|
|
||||||
|
Defaults to `build/<CONF-NAME>/jdk`.
|
||||||
|
|
||||||
|
#### BENCHMARKS_JAR
|
||||||
|
|
||||||
|
The path to the JAR containing the benchmarks.
|
||||||
|
|
||||||
|
Defaults to `test/micro/benchmarks.jar`.
|
||||||
|
|
||||||
#### VM_OPTIONS
|
#### VM_OPTIONS
|
||||||
|
|
||||||
Additional VM arguments to provide to forked off VMs. Same as `-jvmArgs <args>`
|
Additional VM arguments to provide to forked off VMs. Same as `-jvmArgs <args>`
|
||||||
@@ -612,7 +637,7 @@ For more notes about the PKCS11 tests, please refer to
|
|||||||
test/jdk/sun/security/pkcs11/README.
|
test/jdk/sun/security/pkcs11/README.
|
||||||
|
|
||||||
### Testing Ahead-of-time Optimizations
|
### Testing Ahead-of-time Optimizations
|
||||||
-------------------------------------------------------------------------------
|
|
||||||
One way to improve test coverage of ahead-of-time (AOT) optimizations in
|
One way to improve test coverage of ahead-of-time (AOT) optimizations in
|
||||||
the JDK is to run existing jtreg test cases in a special "AOT_JDK" mode.
|
the JDK is to run existing jtreg test cases in a special "AOT_JDK" mode.
|
||||||
Example:
|
Example:
|
||||||
|
|||||||
@@ -301,7 +301,7 @@ ifneq ($(filter product-bundles% legacy-bundles, $(MAKECMDGOALS)), )
|
|||||||
$(call LogWarn, Signing $(JDK_BUNDLE_NAME))
|
$(call LogWarn, Signing $(JDK_BUNDLE_NAME))
|
||||||
$(CODESIGN) -s "$(MACOSX_CODESIGN_IDENTITY)" \
|
$(CODESIGN) -s "$(MACOSX_CODESIGN_IDENTITY)" \
|
||||||
--timestamp --options runtime --deep --force \
|
--timestamp --options runtime --deep --force \
|
||||||
$(JDK_MACOSX_BUNDLE_DIR_SIGNED)/$(JDK_MACOSX_BUNDLE_TOP_DIR) $(LOG_DEBUG)
|
$(JDK_MACOSX_BUNDLE_DIR_SIGNED)/$(JDK_MACOSX_BUNDLE_TOP_SUBDIR) $(LOG_DEBUG)
|
||||||
$(TOUCH) $@
|
$(TOUCH) $@
|
||||||
|
|
||||||
$(eval $(call SetupBundleFile, BUILD_JDK_BUNDLE, \
|
$(eval $(call SetupBundleFile, BUILD_JDK_BUNDLE, \
|
||||||
@@ -330,7 +330,7 @@ ifneq ($(filter product-bundles% legacy-bundles, $(MAKECMDGOALS)), )
|
|||||||
$(call LogWarn, Signing $(JRE_BUNDLE_NAME))
|
$(call LogWarn, Signing $(JRE_BUNDLE_NAME))
|
||||||
$(CODESIGN) -s "$(MACOSX_CODESIGN_IDENTITY)" \
|
$(CODESIGN) -s "$(MACOSX_CODESIGN_IDENTITY)" \
|
||||||
--timestamp --options runtime --deep --force \
|
--timestamp --options runtime --deep --force \
|
||||||
$(JRE_MACOSX_BUNDLE_DIR_SIGNED)/$(JRE_MACOSX_BUNDLE_TOP_DIR) $(LOG_DEBUG)
|
$(JRE_MACOSX_BUNDLE_DIR_SIGNED)/$(JRE_MACOSX_BUNDLE_TOP_SUBDIR) $(LOG_DEBUG)
|
||||||
$(TOUCH) $@
|
$(TOUCH) $@
|
||||||
|
|
||||||
$(eval $(call SetupBundleFile, BUILD_JRE_BUNDLE, \
|
$(eval $(call SetupBundleFile, BUILD_JRE_BUNDLE, \
|
||||||
|
|||||||
@@ -85,7 +85,7 @@ CreateHkTargets = \
|
|||||||
################################################################################
|
################################################################################
|
||||||
# Include module specific build settings
|
# Include module specific build settings
|
||||||
|
|
||||||
THIS_SNIPPET := modules/$(MODULE)/Java.gmk
|
THIS_SNIPPET := $(call GetModuleSnippetName, Java)
|
||||||
|
|
||||||
ifneq ($(wildcard $(THIS_SNIPPET)), )
|
ifneq ($(wildcard $(THIS_SNIPPET)), )
|
||||||
include MakeSnippetStart.gmk
|
include MakeSnippetStart.gmk
|
||||||
@@ -115,6 +115,7 @@ $(eval $(call SetupJavaCompilation, $(MODULE), \
|
|||||||
EXCLUDE_FILES := $(EXCLUDE_FILES), \
|
EXCLUDE_FILES := $(EXCLUDE_FILES), \
|
||||||
EXCLUDE_PATTERNS := -files, \
|
EXCLUDE_PATTERNS := -files, \
|
||||||
KEEP_ALL_TRANSLATIONS := $(KEEP_ALL_TRANSLATIONS), \
|
KEEP_ALL_TRANSLATIONS := $(KEEP_ALL_TRANSLATIONS), \
|
||||||
|
TARGET_RELEASE := $(TARGET_RELEASE), \
|
||||||
JAVAC_FLAGS := \
|
JAVAC_FLAGS := \
|
||||||
$(DOCLINT) \
|
$(DOCLINT) \
|
||||||
$(JAVAC_FLAGS) \
|
$(JAVAC_FLAGS) \
|
||||||
|
|||||||
@@ -184,7 +184,7 @@ endif
|
|||||||
################################################################################
|
################################################################################
|
||||||
# Include module specific build settings
|
# Include module specific build settings
|
||||||
|
|
||||||
THIS_SNIPPET := modules/$(MODULE)/Jmod.gmk
|
THIS_SNIPPET := $(call GetModuleSnippetName, Jmod)
|
||||||
|
|
||||||
ifneq ($(wildcard $(THIS_SNIPPET)), )
|
ifneq ($(wildcard $(THIS_SNIPPET)), )
|
||||||
include MakeSnippetStart.gmk
|
include MakeSnippetStart.gmk
|
||||||
@@ -257,6 +257,7 @@ $(eval $(call SetupExecute, create_$(JMOD_FILE), \
|
|||||||
WARN := Creating $(INTERIM_MSG)$(JMOD_FILE), \
|
WARN := Creating $(INTERIM_MSG)$(JMOD_FILE), \
|
||||||
DEPS := $(DEPS), \
|
DEPS := $(DEPS), \
|
||||||
OUTPUT_FILE := $(JMODS_DIR)/$(JMOD_FILE), \
|
OUTPUT_FILE := $(JMODS_DIR)/$(JMOD_FILE), \
|
||||||
|
WORKING_DIR := $(WORKSPACE_ROOT), \
|
||||||
SUPPORT_DIR := $(JMODS_SUPPORT_DIR), \
|
SUPPORT_DIR := $(JMODS_SUPPORT_DIR), \
|
||||||
PRE_COMMAND := $(RM) $(JMODS_DIR)/$(JMOD_FILE) $(JMODS_SUPPORT_DIR)/$(JMOD_FILE), \
|
PRE_COMMAND := $(RM) $(JMODS_DIR)/$(JMOD_FILE) $(JMODS_SUPPORT_DIR)/$(JMOD_FILE), \
|
||||||
COMMAND := $(JMOD) $(JMOD_SMALL_FLAGS) create --module-version $(VERSION_SHORT) \
|
COMMAND := $(JMOD) $(JMOD_SMALL_FLAGS) create --module-version $(VERSION_SHORT) \
|
||||||
|
|||||||
@@ -236,8 +236,8 @@ define create_overview_file
|
|||||||
#
|
#
|
||||||
ifneq ($$($1_GROUPS), )
|
ifneq ($$($1_GROUPS), )
|
||||||
$1_OVERVIEW_TEXT += \
|
$1_OVERVIEW_TEXT += \
|
||||||
<p>This document is divided into \
|
<p>This document has \
|
||||||
$$(subst 2,two,$$(subst 3,three,$$(words $$($1_GROUPS)))) sections:</p> \
|
$$(subst 2,two,$$(subst 3,three,$$(words $$($1_GROUPS)))) major sections:</p> \
|
||||||
<blockquote><dl> \
|
<blockquote><dl> \
|
||||||
#
|
#
|
||||||
$1_OVERVIEW_TEXT += $$(foreach g, $$($1_GROUPS), \
|
$1_OVERVIEW_TEXT += $$(foreach g, $$($1_GROUPS), \
|
||||||
@@ -246,6 +246,9 @@ define create_overview_file
|
|||||||
)
|
)
|
||||||
$1_OVERVIEW_TEXT += \
|
$1_OVERVIEW_TEXT += \
|
||||||
</dl></blockquote> \
|
</dl></blockquote> \
|
||||||
|
<p><a href="../specs/index.html">Related documents</a> specify the Java \
|
||||||
|
programming language, the Java Virtual Machine, various protocols and file \
|
||||||
|
formats pertaining to the Java platform, and tools included in the JDK.</p> \
|
||||||
#
|
#
|
||||||
endif
|
endif
|
||||||
$1_OVERVIEW_TEXT += \
|
$1_OVERVIEW_TEXT += \
|
||||||
|
|||||||
@@ -270,6 +270,7 @@ endif
|
|||||||
# Since debug symbols are not included in the jmod files, they need to be copied
|
# Since debug symbols are not included in the jmod files, they need to be copied
|
||||||
# in manually after generating the images.
|
# in manually after generating the images.
|
||||||
|
|
||||||
|
# These variables are read by SetupCopyDebuginfo
|
||||||
ALL_JDK_MODULES := $(JDK_MODULES)
|
ALL_JDK_MODULES := $(JDK_MODULES)
|
||||||
ALL_JRE_MODULES := $(sort $(JRE_MODULES), $(foreach m, $(JRE_MODULES), \
|
ALL_JRE_MODULES := $(sort $(JRE_MODULES), $(foreach m, $(JRE_MODULES), \
|
||||||
$(call FindTransitiveDepsForModule, $m)))
|
$(call FindTransitiveDepsForModule, $m)))
|
||||||
|
|||||||
@@ -1014,7 +1014,7 @@ else
|
|||||||
else ifeq ($(EXTERNAL_BUILDJDK), false)
|
else ifeq ($(EXTERNAL_BUILDJDK), false)
|
||||||
# When not cross compiling, the BUILD_JDK is the interim jdk image, and
|
# When not cross compiling, the BUILD_JDK is the interim jdk image, and
|
||||||
# the javac launcher is needed.
|
# the javac launcher is needed.
|
||||||
jdk.compiler-gendata: jdk.compiler-launchers
|
jdk.compiler-gendata: jdk.compiler-launchers java.base-launchers
|
||||||
jdk.javadoc-gendata: jdk.compiler-launchers
|
jdk.javadoc-gendata: jdk.compiler-launchers
|
||||||
endif
|
endif
|
||||||
|
|
||||||
@@ -1407,7 +1407,7 @@ CLEAN_SUPPORT_DIRS += demos
|
|||||||
CLEAN_SUPPORT_DIR_TARGETS := $(addprefix clean-, $(CLEAN_SUPPORT_DIRS))
|
CLEAN_SUPPORT_DIR_TARGETS := $(addprefix clean-, $(CLEAN_SUPPORT_DIRS))
|
||||||
CLEAN_TESTS += hotspot-jtreg-native jdk-jtreg-native lib
|
CLEAN_TESTS += hotspot-jtreg-native jdk-jtreg-native lib
|
||||||
CLEAN_TEST_TARGETS += $(addprefix clean-test-, $(CLEAN_TESTS))
|
CLEAN_TEST_TARGETS += $(addprefix clean-test-, $(CLEAN_TESTS))
|
||||||
CLEAN_PHASES := gensrc java native include
|
CLEAN_PHASES += gensrc java native include
|
||||||
CLEAN_PHASE_TARGETS := $(addprefix clean-, $(CLEAN_PHASES))
|
CLEAN_PHASE_TARGETS := $(addprefix clean-, $(CLEAN_PHASES))
|
||||||
CLEAN_MODULE_TARGETS := $(addprefix clean-, $(ALL_MODULES))
|
CLEAN_MODULE_TARGETS := $(addprefix clean-, $(ALL_MODULES))
|
||||||
# Construct targets of the form clean-$module-$phase
|
# Construct targets of the form clean-$module-$phase
|
||||||
|
|||||||
@@ -149,7 +149,7 @@ endef
|
|||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
|
|
||||||
PHASE_MAKEDIRS := $(TOPDIR)/make
|
PHASE_MAKEDIRS += $(TOPDIR)/make
|
||||||
|
|
||||||
# Helper macro for DeclareRecipesForPhase
|
# Helper macro for DeclareRecipesForPhase
|
||||||
# Declare a recipe for calling the module and phase specific makefile.
|
# Declare a recipe for calling the module and phase specific makefile.
|
||||||
|
|||||||
@@ -34,18 +34,23 @@ include MakeFileStart.gmk
|
|||||||
################################################################################
|
################################################################################
|
||||||
|
|
||||||
include CopyFiles.gmk
|
include CopyFiles.gmk
|
||||||
|
include Modules.gmk
|
||||||
|
|
||||||
MODULE_SRC := $(TOPDIR)/src/$(MODULE)
|
MODULE_SRC := $(TOPDIR)/src/$(MODULE)
|
||||||
|
|
||||||
# Define the snippet for MakeSnippetStart/End
|
################################################################################
|
||||||
THIS_SNIPPET := modules/$(MODULE)/$(MAKEFILE_PREFIX).gmk
|
# Include module specific build settings
|
||||||
|
|
||||||
|
THIS_SNIPPET := $(call GetModuleSnippetName, $(MAKEFILE_PREFIX))
|
||||||
|
|
||||||
|
ifneq ($(wildcard $(THIS_SNIPPET)), )
|
||||||
include MakeSnippetStart.gmk
|
include MakeSnippetStart.gmk
|
||||||
|
|
||||||
# Include the file being wrapped.
|
# Include the file being wrapped.
|
||||||
include $(THIS_SNIPPET)
|
include $(THIS_SNIPPET)
|
||||||
|
|
||||||
include MakeSnippetEnd.gmk
|
include MakeSnippetEnd.gmk
|
||||||
|
endif
|
||||||
|
|
||||||
ifeq ($(MAKEFILE_PREFIX), Lib)
|
ifeq ($(MAKEFILE_PREFIX), Lib)
|
||||||
# We need to keep track of what libraries are generated/needed by this
|
# We need to keep track of what libraries are generated/needed by this
|
||||||
|
|||||||
@@ -204,8 +204,9 @@ $(eval $(call SetTestOpt,AOT_JDK,JTREG))
|
|||||||
|
|
||||||
$(eval $(call ParseKeywordVariable, JTREG, \
|
$(eval $(call ParseKeywordVariable, JTREG, \
|
||||||
SINGLE_KEYWORDS := JOBS TIMEOUT_FACTOR FAILURE_HANDLER_TIMEOUT \
|
SINGLE_KEYWORDS := JOBS TIMEOUT_FACTOR FAILURE_HANDLER_TIMEOUT \
|
||||||
TEST_MODE ASSERT VERBOSE RETAIN TEST_THREAD_FACTORY MAX_MEM RUN_PROBLEM_LISTS \
|
TEST_MODE ASSERT VERBOSE RETAIN TEST_THREAD_FACTORY JVMTI_STRESS_AGENT \
|
||||||
RETRY_COUNT REPEAT_COUNT MAX_OUTPUT REPORT AOT_JDK $(CUSTOM_JTREG_SINGLE_KEYWORDS), \
|
MAX_MEM RUN_PROBLEM_LISTS RETRY_COUNT REPEAT_COUNT MAX_OUTPUT REPORT \
|
||||||
|
AOT_JDK $(CUSTOM_JTREG_SINGLE_KEYWORDS), \
|
||||||
STRING_KEYWORDS := OPTIONS JAVA_OPTIONS VM_OPTIONS KEYWORDS \
|
STRING_KEYWORDS := OPTIONS JAVA_OPTIONS VM_OPTIONS KEYWORDS \
|
||||||
EXTRA_PROBLEM_LISTS LAUNCHER_OPTIONS \
|
EXTRA_PROBLEM_LISTS LAUNCHER_OPTIONS \
|
||||||
$(CUSTOM_JTREG_STRING_KEYWORDS), \
|
$(CUSTOM_JTREG_STRING_KEYWORDS), \
|
||||||
@@ -508,7 +509,7 @@ define SetupRunGtestTestBody
|
|||||||
$$(call LogWarn)
|
$$(call LogWarn)
|
||||||
$$(call LogWarn, Running test '$$($1_TEST)')
|
$$(call LogWarn, Running test '$$($1_TEST)')
|
||||||
$$(call MakeDir, $$($1_TEST_RESULTS_DIR) $$($1_TEST_SUPPORT_DIR))
|
$$(call MakeDir, $$($1_TEST_RESULTS_DIR) $$($1_TEST_SUPPORT_DIR))
|
||||||
$$(call ExecuteWithLog, $$($1_TEST_SUPPORT_DIR)/gtest, ( \
|
$$(call ExecuteWithLog, $$($1_TEST_SUPPORT_DIR)/gtest, \
|
||||||
$$(CD) $$($1_TEST_SUPPORT_DIR) && \
|
$$(CD) $$($1_TEST_SUPPORT_DIR) && \
|
||||||
$$(FIXPATH) $$(TEST_IMAGE_DIR)/hotspot/gtest/$$($1_VARIANT)/gtestLauncher \
|
$$(FIXPATH) $$(TEST_IMAGE_DIR)/hotspot/gtest/$$($1_VARIANT)/gtestLauncher \
|
||||||
-jdk $(JDK_UNDER_TEST) $$($1_GTEST_FILTER) \
|
-jdk $(JDK_UNDER_TEST) $$($1_GTEST_FILTER) \
|
||||||
@@ -519,7 +520,7 @@ define SetupRunGtestTestBody
|
|||||||
> >($(TEE) $$($1_TEST_RESULTS_DIR)/gtest.txt) \
|
> >($(TEE) $$($1_TEST_RESULTS_DIR)/gtest.txt) \
|
||||||
&& $$(ECHO) $$$$? > $$($1_EXITCODE) \
|
&& $$(ECHO) $$$$? > $$($1_EXITCODE) \
|
||||||
|| $$(ECHO) $$$$? > $$($1_EXITCODE) \
|
|| $$(ECHO) $$$$? > $$($1_EXITCODE) \
|
||||||
))
|
)
|
||||||
|
|
||||||
$1_RESULT_FILE := $$($1_TEST_RESULTS_DIR)/gtest.txt
|
$1_RESULT_FILE := $$($1_TEST_RESULTS_DIR)/gtest.txt
|
||||||
|
|
||||||
@@ -643,7 +644,7 @@ define SetupRunMicroTestBody
|
|||||||
$$(call LogWarn)
|
$$(call LogWarn)
|
||||||
$$(call LogWarn, Running test '$$($1_TEST)')
|
$$(call LogWarn, Running test '$$($1_TEST)')
|
||||||
$$(call MakeDir, $$($1_TEST_RESULTS_DIR) $$($1_TEST_SUPPORT_DIR))
|
$$(call MakeDir, $$($1_TEST_RESULTS_DIR) $$($1_TEST_SUPPORT_DIR))
|
||||||
$$(call ExecuteWithLog, $$($1_TEST_SUPPORT_DIR)/micro, ( \
|
$$(call ExecuteWithLog, $$($1_TEST_SUPPORT_DIR)/micro, \
|
||||||
$$(CD) $$(TEST_IMAGE_DIR) && \
|
$$(CD) $$(TEST_IMAGE_DIR) && \
|
||||||
$$(FIXPATH) $$($1_MICRO_TEST_JDK)/bin/java $$($1_MICRO_JAVA_OPTIONS) \
|
$$(FIXPATH) $$($1_MICRO_TEST_JDK)/bin/java $$($1_MICRO_JAVA_OPTIONS) \
|
||||||
-jar $$($1_MICRO_BENCHMARKS_JAR) \
|
-jar $$($1_MICRO_BENCHMARKS_JAR) \
|
||||||
@@ -654,7 +655,7 @@ define SetupRunMicroTestBody
|
|||||||
> >($(TEE) $$($1_TEST_RESULTS_DIR)/micro.txt) \
|
> >($(TEE) $$($1_TEST_RESULTS_DIR)/micro.txt) \
|
||||||
&& $$(ECHO) $$$$? > $$($1_EXITCODE) \
|
&& $$(ECHO) $$$$? > $$($1_EXITCODE) \
|
||||||
|| $$(ECHO) $$$$? > $$($1_EXITCODE) \
|
|| $$(ECHO) $$$$? > $$($1_EXITCODE) \
|
||||||
))
|
)
|
||||||
|
|
||||||
$1_RESULT_FILE := $$($1_TEST_RESULTS_DIR)/micro.txt
|
$1_RESULT_FILE := $$($1_TEST_RESULTS_DIR)/micro.txt
|
||||||
|
|
||||||
@@ -757,34 +758,34 @@ define SetupAOTBody
|
|||||||
ifeq ($$($1_TRAINING), onestep)
|
ifeq ($$($1_TRAINING), onestep)
|
||||||
|
|
||||||
$$(call LogWarn, AOT: Create AOT cache $$($1_AOT_JDK_CACHE) in one step with flags: $$($1_VM_OPTIONS)) \
|
$$(call LogWarn, AOT: Create AOT cache $$($1_AOT_JDK_CACHE) in one step with flags: $$($1_VM_OPTIONS)) \
|
||||||
$$(call ExecuteWithLog, $$($1_AOT_JDK_OUTPUT_DIR), ( \
|
$$(call ExecuteWithLog, $$($1_AOT_JDK_OUTPUT_DIR), \
|
||||||
cd $$($1_AOT_JDK_OUTPUT_DIR); \
|
cd $$($1_AOT_JDK_OUTPUT_DIR); \
|
||||||
$(JAR) --extract --file $(TEST_IMAGE_DIR)/setup_aot/TestSetupAOT.jar; \
|
$(JAR) --extract --file $(TEST_IMAGE_DIR)/setup_aot/TestSetupAOT.jar; \
|
||||||
$$(FIXPATH) $(JDK_UNDER_TEST)/bin/java $$($1_VM_OPTIONS) \
|
$$(FIXPATH) $(JDK_UNDER_TEST)/bin/java $$($1_VM_OPTIONS) \
|
||||||
-Xlog:class+load,aot,aot+class=debug:file=$$($1_AOT_JDK_CACHE).log -Xlog:cds*=error -Xlog:aot*=error \
|
-Xlog:class+load$$(COMMA)aot$$(COMMA)aot+class=debug:file=$$($1_AOT_JDK_CACHE).log -Xlog:cds*=error -Xlog:aot*=error \
|
||||||
-XX:AOTMode=record -XX:AOTCacheOutput=$$($1_AOT_JDK_CACHE) \
|
-XX:AOTMode=record -XX:AOTCacheOutput=$$($1_AOT_JDK_CACHE) \
|
||||||
TestSetupAOT $$($1_AOT_JDK_OUTPUT_DIR) > $$($1_AOT_JDK_LOG) \
|
TestSetupAOT $$($1_AOT_JDK_OUTPUT_DIR) > $$($1_AOT_JDK_LOG) \
|
||||||
))
|
)
|
||||||
|
|
||||||
else
|
else
|
||||||
|
|
||||||
$$(call LogWarn, AOT: Create cache configuration) \
|
$$(call LogWarn, AOT: Create cache configuration) \
|
||||||
$$(call ExecuteWithLog, $$($1_AOT_JDK_OUTPUT_DIR), ( \
|
$$(call ExecuteWithLog, $$($1_AOT_JDK_OUTPUT_DIR), \
|
||||||
cd $$($1_AOT_JDK_OUTPUT_DIR); \
|
cd $$($1_AOT_JDK_OUTPUT_DIR); \
|
||||||
$(JAR) --extract --file $(TEST_IMAGE_DIR)/setup_aot/TestSetupAOT.jar; \
|
$(JAR) --extract --file $(TEST_IMAGE_DIR)/setup_aot/TestSetupAOT.jar; \
|
||||||
$$(FIXPATH) $(JDK_UNDER_TEST)/bin/java $$($1_VM_OPTIONS) \
|
$$(FIXPATH) $(JDK_UNDER_TEST)/bin/java $$($1_VM_OPTIONS) \
|
||||||
-Xlog:class+load,aot,aot+class=debug:file=$$($1_AOT_JDK_CONF).log -Xlog:cds*=error -Xlog:aot*=error \
|
-Xlog:class+load$$(COMMA)aot$$(COMMA)aot+class=debug:file=$$($1_AOT_JDK_CONF).log -Xlog:cds*=error -Xlog:aot*=error \
|
||||||
-XX:AOTMode=record -XX:AOTConfiguration=$$($1_AOT_JDK_CONF) \
|
-XX:AOTMode=record -XX:AOTConfiguration=$$($1_AOT_JDK_CONF) \
|
||||||
TestSetupAOT $$($1_AOT_JDK_OUTPUT_DIR) > $$($1_AOT_JDK_LOG) \
|
TestSetupAOT $$($1_AOT_JDK_OUTPUT_DIR) > $$($1_AOT_JDK_LOG) \
|
||||||
))
|
)
|
||||||
|
|
||||||
$$(call LogWarn, AOT: Generate AOT cache $$($1_AOT_JDK_CACHE) with flags: $$($1_VM_OPTIONS))
|
$$(call LogWarn, AOT: Generate AOT cache $$($1_AOT_JDK_CACHE) with flags: $$($1_VM_OPTIONS))
|
||||||
$$(call ExecuteWithLog, $$($1_AOT_JDK_OUTPUT_DIR), ( \
|
$$(call ExecuteWithLog, $$($1_AOT_JDK_OUTPUT_DIR), \
|
||||||
$$(FIXPATH) $(JDK_UNDER_TEST)/bin/java \
|
$$(FIXPATH) $(JDK_UNDER_TEST)/bin/java \
|
||||||
$$($1_VM_OPTIONS) -Xlog:aot,aot+class=debug:file=$$($1_AOT_JDK_CACHE).log -Xlog:cds*=error -Xlog:aot*=error \
|
$$($1_VM_OPTIONS) -Xlog:aot$$(COMMA)aot+class=debug:file=$$($1_AOT_JDK_CACHE).log -Xlog:cds*=error -Xlog:aot*=error \
|
||||||
-XX:ExtraSharedClassListFile=$(JDK_UNDER_TEST)/lib/classlist \
|
-XX:ExtraSharedClassListFile=$(JDK_UNDER_TEST)/lib/classlist \
|
||||||
-XX:AOTMode=create -XX:AOTConfiguration=$$($1_AOT_JDK_CONF) -XX:AOTCache=$$($1_AOT_JDK_CACHE) \
|
-XX:AOTMode=create -XX:AOTConfiguration=$$($1_AOT_JDK_CONF) -XX:AOTCache=$$($1_AOT_JDK_CACHE) \
|
||||||
))
|
)
|
||||||
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
@@ -876,6 +877,15 @@ define SetupRunJtregTestBody
|
|||||||
))
|
))
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifneq ($$(JTREG_JVMTI_STRESS_AGENT), )
|
||||||
|
AGENT := $$(LIBRARY_PREFIX)JvmtiStressAgent$$(SHARED_LIBRARY_SUFFIX)=$$(JTREG_JVMTI_STRESS_AGENT)
|
||||||
|
$1_JTREG_BASIC_OPTIONS += -javaoption:'-agentpath:$(TEST_IMAGE_DIR)/hotspot/jtreg/native/$$(AGENT)'
|
||||||
|
$1_JTREG_BASIC_OPTIONS += $$(addprefix $$(JTREG_PROBLEM_LIST_PREFIX), $$(wildcard \
|
||||||
|
$$(addprefix $$($1_TEST_ROOT)/, ProblemList-jvmti-stress-agent.txt) \
|
||||||
|
))
|
||||||
|
endif
|
||||||
|
|
||||||
|
|
||||||
ifneq ($$(JTREG_LAUNCHER_OPTIONS), )
|
ifneq ($$(JTREG_LAUNCHER_OPTIONS), )
|
||||||
$1_JTREG_LAUNCHER_OPTIONS += $$(JTREG_LAUNCHER_OPTIONS)
|
$1_JTREG_LAUNCHER_OPTIONS += $$(JTREG_LAUNCHER_OPTIONS)
|
||||||
endif
|
endif
|
||||||
@@ -936,7 +946,8 @@ define SetupRunJtregTestBody
|
|||||||
JTREG_ALL_OPTIONS := $$(JTREG_JAVA_OPTIONS) $$(JTREG_VM_OPTIONS)
|
JTREG_ALL_OPTIONS := $$(JTREG_JAVA_OPTIONS) $$(JTREG_VM_OPTIONS)
|
||||||
|
|
||||||
JTREG_AUTO_PROBLEM_LISTS :=
|
JTREG_AUTO_PROBLEM_LISTS :=
|
||||||
JTREG_AUTO_TIMEOUT_FACTOR := 4
|
# Please reach consensus before changing this. It was not easy changing it to a `1`.
|
||||||
|
JTREG_AUTO_TIMEOUT_FACTOR := 1
|
||||||
|
|
||||||
ifneq ($$(findstring -Xcomp, $$(JTREG_ALL_OPTIONS)), )
|
ifneq ($$(findstring -Xcomp, $$(JTREG_ALL_OPTIONS)), )
|
||||||
JTREG_AUTO_PROBLEM_LISTS += ProblemList-Xcomp.txt
|
JTREG_AUTO_PROBLEM_LISTS += ProblemList-Xcomp.txt
|
||||||
@@ -1074,9 +1085,9 @@ define SetupRunJtregTestBody
|
|||||||
$$(call LogWarn, Running test '$$($1_TEST)')
|
$$(call LogWarn, Running test '$$($1_TEST)')
|
||||||
$$(call MakeDir, $$($1_TEST_RESULTS_DIR) $$($1_TEST_SUPPORT_DIR) \
|
$$(call MakeDir, $$($1_TEST_RESULTS_DIR) $$($1_TEST_SUPPORT_DIR) \
|
||||||
$$($1_TEST_TMP_DIR))
|
$$($1_TEST_TMP_DIR))
|
||||||
$$(call ExecuteWithLog, $$($1_TEST_SUPPORT_DIR)/jtreg, ( \
|
$$(call ExecuteWithLog, $$($1_TEST_SUPPORT_DIR)/jtreg, \
|
||||||
$$(COV_ENVIRONMENT) $$($1_COMMAND_LINE) \
|
$$(COV_ENVIRONMENT) $$($1_COMMAND_LINE) \
|
||||||
))
|
)
|
||||||
|
|
||||||
$1_RESULT_FILE := $$($1_TEST_RESULTS_DIR)/text/stats.txt
|
$1_RESULT_FILE := $$($1_TEST_RESULTS_DIR)/text/stats.txt
|
||||||
|
|
||||||
@@ -1193,12 +1204,12 @@ define SetupRunSpecialTestBody
|
|||||||
$$(call LogWarn)
|
$$(call LogWarn)
|
||||||
$$(call LogWarn, Running test '$$($1_TEST)')
|
$$(call LogWarn, Running test '$$($1_TEST)')
|
||||||
$$(call MakeDir, $$($1_TEST_RESULTS_DIR) $$($1_TEST_SUPPORT_DIR))
|
$$(call MakeDir, $$($1_TEST_RESULTS_DIR) $$($1_TEST_SUPPORT_DIR))
|
||||||
$$(call ExecuteWithLog, $$($1_TEST_SUPPORT_DIR)/test-execution, ( \
|
$$(call ExecuteWithLog, $$($1_TEST_SUPPORT_DIR)/test-execution, \
|
||||||
$$($1_TEST_COMMAND_LINE) \
|
$$($1_TEST_COMMAND_LINE) \
|
||||||
> >($(TEE) $$($1_TEST_RESULTS_DIR)/test-output.txt) \
|
> >($(TEE) $$($1_TEST_RESULTS_DIR)/test-output.txt) \
|
||||||
&& $$(ECHO) $$$$? > $$($1_EXITCODE) \
|
&& $$(ECHO) $$$$? > $$($1_EXITCODE) \
|
||||||
|| $$(ECHO) $$$$? > $$($1_EXITCODE) \
|
|| $$(ECHO) $$$$? > $$($1_EXITCODE) \
|
||||||
))
|
)
|
||||||
|
|
||||||
# We can not parse the various "special" tests.
|
# We can not parse the various "special" tests.
|
||||||
parse-test-$1: run-test-$1
|
parse-test-$1: run-test-$1
|
||||||
@@ -1243,7 +1254,7 @@ UseSpecialTestHandler = \
|
|||||||
# Now process each test to run and setup a proper make rule
|
# Now process each test to run and setup a proper make rule
|
||||||
$(foreach test, $(TESTS_TO_RUN), \
|
$(foreach test, $(TESTS_TO_RUN), \
|
||||||
$(eval TEST_ID := $(shell $(ECHO) $(strip $(test)) | \
|
$(eval TEST_ID := $(shell $(ECHO) $(strip $(test)) | \
|
||||||
$(TR) -cs '[a-z][A-Z][0-9]\n' '[_*1000]')) \
|
$(TR) -cs '[a-z][A-Z][0-9]\n' '_')) \
|
||||||
$(eval ALL_TEST_IDS += $(TEST_ID)) \
|
$(eval ALL_TEST_IDS += $(TEST_ID)) \
|
||||||
$(if $(call UseCustomTestHandler, $(test)), \
|
$(if $(call UseCustomTestHandler, $(test)), \
|
||||||
$(eval $(call SetupRunCustomTest, $(TEST_ID), \
|
$(eval $(call SetupRunCustomTest, $(TEST_ID), \
|
||||||
@@ -1323,9 +1334,9 @@ run-test-report: post-run-test
|
|||||||
TEST TOTAL PASS FAIL ERROR SKIP " "
|
TEST TOTAL PASS FAIL ERROR SKIP " "
|
||||||
$(foreach test, $(TESTS_TO_RUN), \
|
$(foreach test, $(TESTS_TO_RUN), \
|
||||||
$(eval TEST_ID := $(shell $(ECHO) $(strip $(test)) | \
|
$(eval TEST_ID := $(shell $(ECHO) $(strip $(test)) | \
|
||||||
$(TR) -cs '[a-z][A-Z][0-9]\n' '[_*1000]')) \
|
$(TR) -cs '[a-z][A-Z][0-9]\n' '_')) \
|
||||||
$(ECHO) >> $(TEST_LAST_IDS) $(TEST_ID) $(NEWLINE) \
|
$(ECHO) >> $(TEST_LAST_IDS) $(TEST_ID) $(NEWLINE) \
|
||||||
$(eval NAME_PATTERN := $(shell $(ECHO) $(test) | $(TR) -c '\n' '[_*1000]')) \
|
$(eval NAME_PATTERN := $(shell $(ECHO) $(test) | $(TR) -c '\n' '_')) \
|
||||||
$(if $(filter __________________________________________________%, $(NAME_PATTERN)), \
|
$(if $(filter __________________________________________________%, $(NAME_PATTERN)), \
|
||||||
$(eval TEST_NAME := ) \
|
$(eval TEST_NAME := ) \
|
||||||
$(PRINTF) >> $(TEST_SUMMARY) "%2s %-49s\n" " " "$(test)" $(NEWLINE) \
|
$(PRINTF) >> $(TEST_SUMMARY) "%2s %-49s\n" " " "$(test)" $(NEWLINE) \
|
||||||
|
|||||||
@@ -176,3 +176,19 @@ ULIMIT := ulimit
|
|||||||
ifeq ($(OPENJDK_BUILD_OS), windows)
|
ifeq ($(OPENJDK_BUILD_OS), windows)
|
||||||
PATHTOOL := cygpath
|
PATHTOOL := cygpath
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
# These settings are needed to run testing with jvmti agent
|
||||||
|
ifeq ($(OPENJDK_BUILD_OS), linux)
|
||||||
|
LIBRARY_PREFIX := lib
|
||||||
|
SHARED_LIBRARY_SUFFIX := .so
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifeq ($(OPENJDK_BUILD_OS), windows)
|
||||||
|
LIBRARY_PREFIX :=
|
||||||
|
SHARED_LIBRARY_SUFFIX := .dll
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifeq ($(OPENJDK_BUILD_OS), macosx)
|
||||||
|
LIBRARY_PREFIX := lib
|
||||||
|
SHARED_LIBRARY_SUFFIX := .dylib
|
||||||
|
endif
|
||||||
|
|||||||
@@ -111,7 +111,7 @@ else ifeq ($(call isTargetOs, aix), true)
|
|||||||
INFO := Generating export list for $(notdir $(lib)), \
|
INFO := Generating export list for $(notdir $(lib)), \
|
||||||
DEPS := $(lib), \
|
DEPS := $(lib), \
|
||||||
OUTPUT_FILE := $(lib).exp, \
|
OUTPUT_FILE := $(lib).exp, \
|
||||||
COMMAND := ( $(AR) $(ARFLAGS) -w $(lib) | $(GREP) -v '^\.' | $(AWK) '{print $$1}' | $(SORT) -u > $(lib).exp ), \
|
COMMAND := $(AR) $(ARFLAGS) -w $(lib) | $(GREP) -v '^\.' | $(AWK) '{print $$1}' | $(SORT) -u > $(lib).exp, \
|
||||||
)) \
|
)) \
|
||||||
$(eval STATIC_LIB_EXPORT_FILES += $(lib).exp) \
|
$(eval STATIC_LIB_EXPORT_FILES += $(lib).exp) \
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -78,6 +78,9 @@ TOOL_GENERATECACERTS = $(JAVA_SMALL) -cp $(BUILDTOOLS_OUTPUTDIR)/jdk_tools_class
|
|||||||
TOOL_GENERATEEXTRAPROPERTIES = $(JAVA_SMALL) -cp $(BUILDTOOLS_OUTPUTDIR)/jdk_tools_classes \
|
TOOL_GENERATEEXTRAPROPERTIES = $(JAVA_SMALL) -cp $(BUILDTOOLS_OUTPUTDIR)/jdk_tools_classes \
|
||||||
build.tools.generateextraproperties.GenerateExtraProperties
|
build.tools.generateextraproperties.GenerateExtraProperties
|
||||||
|
|
||||||
|
TOOL_GENERATECASEFOLDING = $(JAVA_SMALL) -cp $(BUILDTOOLS_OUTPUTDIR)/jdk_tools_classes \
|
||||||
|
build.tools.generatecharacter.CaseFolding
|
||||||
|
|
||||||
TOOL_MAKEZIPREPRODUCIBLE = $(JAVA_SMALL) -cp $(BUILDTOOLS_OUTPUTDIR)/jdk_tools_classes \
|
TOOL_MAKEZIPREPRODUCIBLE = $(JAVA_SMALL) -cp $(BUILDTOOLS_OUTPUTDIR)/jdk_tools_classes \
|
||||||
build.tools.makezipreproducible.MakeZipReproducible
|
build.tools.makezipreproducible.MakeZipReproducible
|
||||||
|
|
||||||
@@ -127,6 +130,9 @@ TOOL_PUBLICSUFFIXLIST = $(JAVA_SMALL) -cp $(BUILDTOOLS_OUTPUTDIR)/jdk_tools_clas
|
|||||||
TOOL_FIXUPPANDOC = $(JAVA_SMALL) -cp $(BUILDTOOLS_OUTPUTDIR)/jdk_tools_classes \
|
TOOL_FIXUPPANDOC = $(JAVA_SMALL) -cp $(BUILDTOOLS_OUTPUTDIR)/jdk_tools_classes \
|
||||||
build.tools.fixuppandoc.Main
|
build.tools.fixuppandoc.Main
|
||||||
|
|
||||||
|
TOOL_VARHANDLEGUARDMETHODGENERATOR = $(JAVA_SMALL) -cp $(BUILDTOOLS_OUTPUTDIR)/jdk_tools_classes \
|
||||||
|
build.tools.methodhandle.VarHandleGuardMethodGenerator
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
|
|
||||||
# Executable javascript filter for man page generation using pandoc.
|
# Executable javascript filter for man page generation using pandoc.
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ $(eval $(call SetupJavaCompilation, BUILD_TOOLS_LANGTOOLS, \
|
|||||||
COMPILER := bootjdk, \
|
COMPILER := bootjdk, \
|
||||||
TARGET_RELEASE := $(TARGET_RELEASE_BOOTJDK), \
|
TARGET_RELEASE := $(TARGET_RELEASE_BOOTJDK), \
|
||||||
SRC := $(TOPDIR)/make/langtools/tools, \
|
SRC := $(TOPDIR)/make/langtools/tools, \
|
||||||
INCLUDES := compileproperties propertiesparser, \
|
INCLUDES := compileproperties flagsgenerator propertiesparser, \
|
||||||
COPY := .properties, \
|
COPY := .properties, \
|
||||||
BIN := $(BUILDTOOLS_OUTPUTDIR)/langtools_tools_classes, \
|
BIN := $(BUILDTOOLS_OUTPUTDIR)/langtools_tools_classes, \
|
||||||
))
|
))
|
||||||
|
|||||||
@@ -81,8 +81,8 @@ SLEEF_CMAKE_FILE := toolchains/$(OPENJDK_TARGET_CPU)-$(SLEEF_TOOLCHAIN_TYPE).cma
|
|||||||
$(eval $(call SetupExecute, sleef_native_config, \
|
$(eval $(call SetupExecute, sleef_native_config, \
|
||||||
INFO := Configuring native sleef build, \
|
INFO := Configuring native sleef build, \
|
||||||
OUTPUT_DIR := $(SLEEF_NATIVE_BUILD_DIR), \
|
OUTPUT_DIR := $(SLEEF_NATIVE_BUILD_DIR), \
|
||||||
COMMAND := cd $(SLEEF_SOURCE_DIR) && $(CMAKE) -S . -B \
|
WORKING_DIR := $(SLEEF_SOURCE_DIR), \
|
||||||
$(SLEEF_NATIVE_BUILD_DIR), \
|
COMMAND := $(CMAKE) -S . -B $(SLEEF_NATIVE_BUILD_DIR), \
|
||||||
))
|
))
|
||||||
|
|
||||||
TARGETS := $(sleef_native_config)
|
TARGETS := $(sleef_native_config)
|
||||||
@@ -91,8 +91,8 @@ $(eval $(call SetupExecute, sleef_native_build, \
|
|||||||
INFO := Building native sleef, \
|
INFO := Building native sleef, \
|
||||||
DEPS := $(sleef_native_config), \
|
DEPS := $(sleef_native_config), \
|
||||||
OUTPUT_DIR := $(SLEEF_NATIVE_BUILD_DIR), \
|
OUTPUT_DIR := $(SLEEF_NATIVE_BUILD_DIR), \
|
||||||
COMMAND := cd $(SLEEF_SOURCE_DIR) && $(CMAKE) --build \
|
WORKING_DIR := $(SLEEF_SOURCE_DIR), \
|
||||||
$(SLEEF_NATIVE_BUILD_DIR) -j, \
|
COMMAND := $(CMAKE) --build $(SLEEF_NATIVE_BUILD_DIR) -j, \
|
||||||
))
|
))
|
||||||
|
|
||||||
TARGETS := $(sleef_native_build)
|
TARGETS := $(sleef_native_build)
|
||||||
@@ -101,8 +101,8 @@ $(eval $(call SetupExecute, sleef_cross_config, \
|
|||||||
INFO := Configuring cross-compiling sleef build, \
|
INFO := Configuring cross-compiling sleef build, \
|
||||||
DEPS := $(sleef_native_build), \
|
DEPS := $(sleef_native_build), \
|
||||||
OUTPUT_DIR := $(SLEEF_CROSS_BUILD_DIR), \
|
OUTPUT_DIR := $(SLEEF_CROSS_BUILD_DIR), \
|
||||||
COMMAND := cd $(SLEEF_SOURCE_DIR) && $(CMAKE) -S . -B \
|
WORKING_DIR := $(SLEEF_SOURCE_DIR), \
|
||||||
$(SLEEF_CROSS_BUILD_DIR) \
|
COMMAND := $(CMAKE) -S . -B $(SLEEF_CROSS_BUILD_DIR) \
|
||||||
-DCMAKE_C_COMPILER=$(CC) \
|
-DCMAKE_C_COMPILER=$(CC) \
|
||||||
-DCMAKE_TOOLCHAIN_FILE=$(SLEEF_CMAKE_FILE) \
|
-DCMAKE_TOOLCHAIN_FILE=$(SLEEF_CMAKE_FILE) \
|
||||||
-DNATIVE_BUILD_DIR=$(SLEEF_NATIVE_BUILD_DIR) \
|
-DNATIVE_BUILD_DIR=$(SLEEF_NATIVE_BUILD_DIR) \
|
||||||
@@ -116,8 +116,8 @@ $(eval $(call SetupExecute, sleef_cross_build, \
|
|||||||
INFO := Building cross-compiling sleef, \
|
INFO := Building cross-compiling sleef, \
|
||||||
DEPS := $(sleef_cross_config), \
|
DEPS := $(sleef_cross_config), \
|
||||||
OUTPUT_DIR := $(SLEEF_NATIVE_BUILD_DIR), \
|
OUTPUT_DIR := $(SLEEF_NATIVE_BUILD_DIR), \
|
||||||
COMMAND := cd $(SLEEF_SOURCE_DIR) && $(CMAKE) --build \
|
WORKING_DIR := $(SLEEF_SOURCE_DIR), \
|
||||||
$(SLEEF_CROSS_BUILD_DIR) -j, \
|
COMMAND := $(CMAKE) --build $(SLEEF_CROSS_BUILD_DIR) -j, \
|
||||||
))
|
))
|
||||||
|
|
||||||
TARGETS := $(sleef_cross_build)
|
TARGETS := $(sleef_cross_build)
|
||||||
|
|||||||
@@ -210,17 +210,8 @@ AC_DEFUN([BASIC_SETUP_XCODE_SYSROOT],
|
|||||||
if test $? -ne 0; then
|
if test $? -ne 0; then
|
||||||
AC_MSG_ERROR([The xcodebuild tool in the devkit reports an error: $XCODEBUILD_OUTPUT])
|
AC_MSG_ERROR([The xcodebuild tool in the devkit reports an error: $XCODEBUILD_OUTPUT])
|
||||||
fi
|
fi
|
||||||
elif test "x$TOOLCHAIN_PATH" != x; then
|
|
||||||
UTIL_LOOKUP_PROGS(XCODEBUILD, xcodebuild, $TOOLCHAIN_PATH)
|
|
||||||
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
|
|
||||||
else
|
else
|
||||||
UTIL_LOOKUP_PROGS(XCODEBUILD, xcodebuild)
|
UTIL_LOOKUP_TOOLCHAIN_PROGS(XCODEBUILD, xcodebuild)
|
||||||
if test "x$XCODEBUILD" != x; then
|
if test "x$XCODEBUILD" != x; then
|
||||||
XCODEBUILD_OUTPUT=`"$XCODEBUILD" -version 2>&1`
|
XCODEBUILD_OUTPUT=`"$XCODEBUILD" -version 2>&1`
|
||||||
if test $? -ne 0; then
|
if test $? -ne 0; then
|
||||||
@@ -348,21 +339,11 @@ AC_DEFUN_ONCE([BASIC_SETUP_DEVKIT],
|
|||||||
|
|
||||||
# You can force the sysroot if the sysroot encoded into the compiler tools
|
# You can force the sysroot if the sysroot encoded into the compiler tools
|
||||||
# is not correct.
|
# is not correct.
|
||||||
AC_ARG_WITH(sys-root, [AS_HELP_STRING([--with-sys-root],
|
|
||||||
[alias for --with-sysroot for backwards compatibility])],
|
|
||||||
[SYSROOT=$with_sys_root]
|
|
||||||
)
|
|
||||||
|
|
||||||
AC_ARG_WITH(sysroot, [AS_HELP_STRING([--with-sysroot],
|
AC_ARG_WITH(sysroot, [AS_HELP_STRING([--with-sysroot],
|
||||||
[use this directory as sysroot])],
|
[use this directory as sysroot])],
|
||||||
[SYSROOT=$with_sysroot]
|
[SYSROOT=$with_sysroot]
|
||||||
)
|
)
|
||||||
|
|
||||||
AC_ARG_WITH([tools-dir], [AS_HELP_STRING([--with-tools-dir],
|
|
||||||
[alias for --with-toolchain-path for backwards compatibility])],
|
|
||||||
[UTIL_PREPEND_TO_PATH([TOOLCHAIN_PATH],$with_tools_dir)]
|
|
||||||
)
|
|
||||||
|
|
||||||
AC_ARG_WITH([toolchain-path], [AS_HELP_STRING([--with-toolchain-path],
|
AC_ARG_WITH([toolchain-path], [AS_HELP_STRING([--with-toolchain-path],
|
||||||
[prepend these directories when searching for toolchain binaries (compilers etc)])],
|
[prepend these directories when searching for toolchain binaries (compilers etc)])],
|
||||||
[UTIL_PREPEND_TO_PATH([TOOLCHAIN_PATH],$with_toolchain_path)]
|
[UTIL_PREPEND_TO_PATH([TOOLCHAIN_PATH],$with_toolchain_path)]
|
||||||
@@ -371,6 +352,9 @@ AC_DEFUN_ONCE([BASIC_SETUP_DEVKIT],
|
|||||||
AC_ARG_WITH([xcode-path], [AS_HELP_STRING([--with-xcode-path],
|
AC_ARG_WITH([xcode-path], [AS_HELP_STRING([--with-xcode-path],
|
||||||
[set up toolchain on Mac OS using a path to an Xcode installation])])
|
[set up toolchain on Mac OS using a path to an Xcode installation])])
|
||||||
|
|
||||||
|
UTIL_DEPRECATED_ARG_WITH(sys-root)
|
||||||
|
UTIL_DEPRECATED_ARG_WITH(tools-dir)
|
||||||
|
|
||||||
if test "x$with_xcode_path" != x; then
|
if test "x$with_xcode_path" != x; then
|
||||||
if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
|
if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
|
||||||
UTIL_PREPEND_TO_PATH([TOOLCHAIN_PATH],
|
UTIL_PREPEND_TO_PATH([TOOLCHAIN_PATH],
|
||||||
|
|||||||
@@ -207,29 +207,14 @@ AC_DEFUN([BASIC_CHECK_GNU_MAKE],
|
|||||||
UTIL_SETUP_TOOL(MAKE,
|
UTIL_SETUP_TOOL(MAKE,
|
||||||
[
|
[
|
||||||
# Try our hardest to locate a correct version of GNU make
|
# Try our hardest to locate a correct version of GNU make
|
||||||
UTIL_LOOKUP_PROGS(CHECK_GMAKE, gmake)
|
UTIL_LOOKUP_TOOLCHAIN_PROGS(CHECK_GMAKE, gmake)
|
||||||
BASIC_CHECK_MAKE_VERSION("$CHECK_GMAKE", [gmake in PATH])
|
BASIC_CHECK_MAKE_VERSION("$CHECK_GMAKE", [gmake in PATH])
|
||||||
|
|
||||||
if test "x$FOUND_MAKE" = x; then
|
if test "x$FOUND_MAKE" = x; then
|
||||||
UTIL_LOOKUP_PROGS(CHECK_MAKE, make)
|
UTIL_LOOKUP_TOOLCHAIN_PROGS(CHECK_MAKE, make)
|
||||||
BASIC_CHECK_MAKE_VERSION("$CHECK_MAKE", [make in PATH])
|
BASIC_CHECK_MAKE_VERSION("$CHECK_MAKE", [make in PATH])
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test "x$FOUND_MAKE" = x; then
|
|
||||||
if test "x$TOOLCHAIN_PATH" != x; then
|
|
||||||
# We have a toolchain path, check that as well before giving up.
|
|
||||||
OLD_PATH=$PATH
|
|
||||||
PATH=$TOOLCHAIN_PATH:$PATH
|
|
||||||
UTIL_LOOKUP_PROGS(CHECK_TOOLSDIR_GMAKE, gmake)
|
|
||||||
BASIC_CHECK_MAKE_VERSION("$CHECK_TOOLSDIR_GMAKE", [gmake in tools-dir])
|
|
||||||
if test "x$FOUND_MAKE" = x; then
|
|
||||||
UTIL_LOOKUP_PROGS(CHECK_TOOLSDIR_MAKE, make)
|
|
||||||
BASIC_CHECK_MAKE_VERSION("$CHECK_TOOLSDIR_MAKE", [make in tools-dir])
|
|
||||||
fi
|
|
||||||
PATH=$OLD_PATH
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test "x$FOUND_MAKE" = x; then
|
if test "x$FOUND_MAKE" = x; then
|
||||||
AC_MSG_ERROR([Cannot find GNU make $MAKE_REQUIRED_VERSION or newer! Please put it in the path, or add e.g. MAKE=/opt/gmake3.81/make as argument to configure.])
|
AC_MSG_ERROR([Cannot find GNU make $MAKE_REQUIRED_VERSION or newer! Please put it in the path, or add e.g. MAKE=/opt/gmake3.81/make as argument to configure.])
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -395,11 +395,9 @@ AC_DEFUN_ONCE([BOOTJDK_SETUP_BOOT_JDK],
|
|||||||
|
|
||||||
# When compiling code to be executed by the Boot JDK, force compatibility with the
|
# When compiling code to be executed by the Boot JDK, force compatibility with the
|
||||||
# oldest supported bootjdk.
|
# oldest supported bootjdk.
|
||||||
OLDEST_BOOT_JDK=`$ECHO $DEFAULT_ACCEPTABLE_BOOT_VERSIONS \
|
OLDEST_BOOT_JDK_VERSION=`$ECHO $DEFAULT_ACCEPTABLE_BOOT_VERSIONS \
|
||||||
| $TR " " "\n" | $SORT -n | $HEAD -n1`
|
| $TR " " "\n" | $SORT -n | $HEAD -n1`
|
||||||
# -Xlint:-options is added to avoid "warning: [options] system modules path not set in conjunction with -source"
|
AC_SUBST(OLDEST_BOOT_JDK_VERSION)
|
||||||
BOOT_JDK_SOURCETARGET="-source $OLDEST_BOOT_JDK -target $OLDEST_BOOT_JDK -Xlint:-options"
|
|
||||||
AC_SUBST(BOOT_JDK_SOURCETARGET)
|
|
||||||
|
|
||||||
# Check if the boot jdk is 32 or 64 bit
|
# Check if the boot jdk is 32 or 64 bit
|
||||||
if $JAVA -version 2>&1 | $GREP -q "64-Bit"; then
|
if $JAVA -version 2>&1 | $GREP -q "64-Bit"; then
|
||||||
|
|||||||
@@ -162,12 +162,7 @@ AC_DEFUN([BPERF_SETUP_CCACHE],
|
|||||||
# Check if ccache is available
|
# Check if ccache is available
|
||||||
CCACHE_AVAILABLE=true
|
CCACHE_AVAILABLE=true
|
||||||
|
|
||||||
OLD_PATH="$PATH"
|
UTIL_LOOKUP_TOOLCHAIN_PROGS(CCACHE, ccache)
|
||||||
if test "x$TOOLCHAIN_PATH" != x; then
|
|
||||||
PATH=$TOOLCHAIN_PATH:$PATH
|
|
||||||
fi
|
|
||||||
UTIL_LOOKUP_PROGS(CCACHE, ccache)
|
|
||||||
PATH="$OLD_PATH"
|
|
||||||
|
|
||||||
AC_MSG_CHECKING([if ccache is available])
|
AC_MSG_CHECKING([if ccache is available])
|
||||||
if test "x$TOOLCHAIN_TYPE" != "xgcc" && test "x$TOOLCHAIN_TYPE" != "xclang"; then
|
if test "x$TOOLCHAIN_TYPE" != "xgcc" && test "x$TOOLCHAIN_TYPE" != "xclang"; then
|
||||||
|
|||||||
@@ -110,4 +110,4 @@ $MV $OUTPUTDIR/compare.log $OUTPUTDIR/compare.log.old 2> /dev/null
|
|||||||
|
|
||||||
export SCRIPT_DIR="$( cd "$( dirname "$0" )" > /dev/null && pwd )"
|
export SCRIPT_DIR="$( cd "$( dirname "$0" )" > /dev/null && pwd )"
|
||||||
|
|
||||||
$BASH $TOPDIR/make/scripts/logger.sh $OUTPUTDIR/compare.log $BASH "$REAL_COMPARE_SCRIPT" "$@"
|
$BASH $TOPDIR/make/scripts/compare-logger.sh $OUTPUTDIR/compare.log $BASH "$REAL_COMPARE_SCRIPT" "$@"
|
||||||
|
|||||||
4
make/autoconf/configure
vendored
4
make/autoconf/configure
vendored
@@ -1,6 +1,6 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
#
|
#
|
||||||
# Copyright (c) 2012, 2023, Oracle and/or its affiliates. All rights reserved.
|
# Copyright (c) 2012, 2025, Oracle and/or its affiliates. All rights reserved.
|
||||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
#
|
#
|
||||||
# This code is free software; you can redistribute it and/or modify it
|
# This code is free software; you can redistribute it and/or modify it
|
||||||
@@ -366,7 +366,7 @@ EOT
|
|||||||
|
|
||||||
# Print additional help, e.g. a list of toolchains and JVM features.
|
# Print additional help, e.g. a list of toolchains and JVM features.
|
||||||
# This must be done by the autoconf script.
|
# This must be done by the autoconf script.
|
||||||
( CONFIGURE_PRINT_ADDITIONAL_HELP=true . $generated_script PRINTF=printf )
|
( CONFIGURE_PRINT_ADDITIONAL_HELP=true . $generated_script PRINTF=printf ECHO=echo )
|
||||||
|
|
||||||
cat <<EOT
|
cat <<EOT
|
||||||
|
|
||||||
|
|||||||
@@ -221,6 +221,9 @@ JDKOPT_SETUP_UNDEFINED_BEHAVIOR_SANITIZER
|
|||||||
# LeakSanitizer
|
# LeakSanitizer
|
||||||
JDKOPT_SETUP_LEAK_SANITIZER
|
JDKOPT_SETUP_LEAK_SANITIZER
|
||||||
|
|
||||||
|
# Setup static analyzer
|
||||||
|
JDKOPT_SETUP_STATIC_ANALYZER
|
||||||
|
|
||||||
# Fallback linker
|
# Fallback linker
|
||||||
# This needs to go before 'LIB_DETERMINE_DEPENDENCIES'
|
# This needs to go before 'LIB_DETERMINE_DEPENDENCIES'
|
||||||
JDKOPT_SETUP_FALLBACK_LINKER
|
JDKOPT_SETUP_FALLBACK_LINKER
|
||||||
|
|||||||
@@ -597,11 +597,11 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_HELPER],
|
|||||||
|
|
||||||
# CXXFLAGS C++ language level for all of JDK, including Hotspot.
|
# CXXFLAGS C++ language level for all of JDK, including Hotspot.
|
||||||
if test "x$TOOLCHAIN_TYPE" = xgcc || test "x$TOOLCHAIN_TYPE" = xclang; then
|
if test "x$TOOLCHAIN_TYPE" = xgcc || test "x$TOOLCHAIN_TYPE" = xclang; then
|
||||||
LANGSTD_CXXFLAGS="-std=c++14"
|
LANGSTD_CXXFLAGS="-std=c++17"
|
||||||
elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
|
elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
|
||||||
LANGSTD_CXXFLAGS="-std:c++14"
|
LANGSTD_CXXFLAGS="-std:c++17"
|
||||||
else
|
else
|
||||||
AC_MSG_ERROR([Cannot enable C++14 for this toolchain])
|
AC_MSG_ERROR([Cannot enable C++17 for this toolchain])
|
||||||
fi
|
fi
|
||||||
TOOLCHAIN_CFLAGS_JDK_CXXONLY="$TOOLCHAIN_CFLAGS_JDK_CXXONLY $LANGSTD_CXXFLAGS"
|
TOOLCHAIN_CFLAGS_JDK_CXXONLY="$TOOLCHAIN_CFLAGS_JDK_CXXONLY $LANGSTD_CXXFLAGS"
|
||||||
TOOLCHAIN_CFLAGS_JVM="$TOOLCHAIN_CFLAGS_JVM $LANGSTD_CXXFLAGS"
|
TOOLCHAIN_CFLAGS_JVM="$TOOLCHAIN_CFLAGS_JVM $LANGSTD_CXXFLAGS"
|
||||||
@@ -736,8 +736,15 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_CPU_DEP],
|
|||||||
$1_CFLAGS_CPU_JVM="${$1_CFLAGS_CPU_JVM} -mminimal-toc"
|
$1_CFLAGS_CPU_JVM="${$1_CFLAGS_CPU_JVM} -mminimal-toc"
|
||||||
elif test "x$FLAGS_CPU" = xppc64le; then
|
elif test "x$FLAGS_CPU" = xppc64le; then
|
||||||
# Little endian machine uses ELFv2 ABI.
|
# Little endian machine uses ELFv2 ABI.
|
||||||
# Use Power8, this is the first CPU to support PPC64 LE with ELFv2 ABI.
|
# Use Power8 for target cpu, this is the first CPU to support PPC64 LE with ELFv2 ABI.
|
||||||
$1_CFLAGS_CPU="-mcpu=power8 -mtune=power10"
|
# Use Power10 for tuning target, this is supported by gcc >= 10
|
||||||
|
POWER_TUNE_VERSION="-mtune=power10"
|
||||||
|
FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [${POWER_TUNE_VERSION}],
|
||||||
|
IF_FALSE: [
|
||||||
|
POWER_TUNE_VERSION="-mtune=power8"
|
||||||
|
]
|
||||||
|
)
|
||||||
|
$1_CFLAGS_CPU="-mcpu=power8 ${POWER_TUNE_VERSION}"
|
||||||
$1_CFLAGS_CPU_JVM="${$1_CFLAGS_CPU_JVM} -DABI_ELFv2"
|
$1_CFLAGS_CPU_JVM="${$1_CFLAGS_CPU_JVM} -DABI_ELFv2"
|
||||||
fi
|
fi
|
||||||
elif test "x$FLAGS_CPU" = xs390x; then
|
elif test "x$FLAGS_CPU" = xs390x; then
|
||||||
@@ -933,7 +940,7 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_CPU_DEP],
|
|||||||
# ACLE and this flag are required to build the aarch64 SVE related functions in
|
# ACLE and this flag are required to build the aarch64 SVE related functions in
|
||||||
# libvectormath. Apple Silicon does not support SVE; use macOS as a proxy for
|
# libvectormath. Apple Silicon does not support SVE; use macOS as a proxy for
|
||||||
# that check.
|
# that check.
|
||||||
if test "x$OPENJDK_TARGET_CPU" = "xaarch64" && test "x$OPENJDK_TARGET_CPU" = "xlinux"; then
|
if test "x$OPENJDK_TARGET_CPU" = "xaarch64" && test "x$OPENJDK_TARGET_OS" = "xlinux"; then
|
||||||
if test "x$TOOLCHAIN_TYPE" = xgcc || test "x$TOOLCHAIN_TYPE" = xclang; then
|
if test "x$TOOLCHAIN_TYPE" = xgcc || test "x$TOOLCHAIN_TYPE" = xclang; then
|
||||||
AC_LANG_PUSH(C)
|
AC_LANG_PUSH(C)
|
||||||
OLD_CFLAGS="$CFLAGS"
|
OLD_CFLAGS="$CFLAGS"
|
||||||
@@ -947,6 +954,17 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_CPU_DEP],
|
|||||||
[
|
[
|
||||||
AC_MSG_RESULT([yes])
|
AC_MSG_RESULT([yes])
|
||||||
$2SVE_CFLAGS="-march=armv8-a+sve"
|
$2SVE_CFLAGS="-march=armv8-a+sve"
|
||||||
|
# Switching the initialization mode with gcc from 'pattern' to 'zero'
|
||||||
|
# avoids the use of unsupported `__builtin_clear_padding` for variable
|
||||||
|
# length aggregates
|
||||||
|
if test "x$DEBUG_LEVEL" != xrelease && test "x$TOOLCHAIN_TYPE" = xgcc ; then
|
||||||
|
INIT_ZERO_FLAG="-ftrivial-auto-var-init=zero"
|
||||||
|
FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [$INIT_ZERO_FLAG],
|
||||||
|
IF_TRUE: [
|
||||||
|
$2SVE_CFLAGS="${$2SVE_CFLAGS} $INIT_ZERO_FLAG"
|
||||||
|
]
|
||||||
|
)
|
||||||
|
fi
|
||||||
],
|
],
|
||||||
[
|
[
|
||||||
AC_MSG_RESULT([no])
|
AC_MSG_RESULT([no])
|
||||||
|
|||||||
@@ -74,7 +74,7 @@ AC_DEFUN([FLAGS_SETUP_LDFLAGS_HELPER],
|
|||||||
# Clang needs the lld linker to work correctly
|
# Clang needs the lld linker to work correctly
|
||||||
BASIC_LDFLAGS="-fuse-ld=lld -Wl,--exclude-libs,ALL"
|
BASIC_LDFLAGS="-fuse-ld=lld -Wl,--exclude-libs,ALL"
|
||||||
if test "x$CXX_IS_USER_SUPPLIED" = xfalse && test "x$CC_IS_USER_SUPPLIED" = xfalse; then
|
if test "x$CXX_IS_USER_SUPPLIED" = xfalse && test "x$CC_IS_USER_SUPPLIED" = xfalse; then
|
||||||
UTIL_REQUIRE_PROGS(LLD, lld, $TOOLCHAIN_PATH:$PATH)
|
UTIL_REQUIRE_TOOLCHAIN_PROGS(LLD, lld)
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
if test "x$OPENJDK_TARGET_OS" = xaix; then
|
if test "x$OPENJDK_TARGET_OS" = xaix; then
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
# Copyright (c) 2011, 2024, Oracle and/or its affiliates. All rights reserved.
|
# Copyright (c) 2011, 2025, Oracle and/or its affiliates. All rights reserved.
|
||||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
#
|
#
|
||||||
# This code is free software; you can redistribute it and/or modify it
|
# This code is free software; you can redistribute it and/or modify it
|
||||||
@@ -115,8 +115,12 @@ AC_DEFUN([FLAGS_SETUP_ASFLAGS],
|
|||||||
# Force preprocessor to run, just to make sure
|
# Force preprocessor to run, just to make sure
|
||||||
BASIC_ASFLAGS="-x assembler-with-cpp"
|
BASIC_ASFLAGS="-x assembler-with-cpp"
|
||||||
elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
|
elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
|
||||||
|
if test "x$OPENJDK_TARGET_CPU" = xaarch64; then
|
||||||
|
BASIC_ASFLAGS="-nologo"
|
||||||
|
else
|
||||||
BASIC_ASFLAGS="-nologo -c"
|
BASIC_ASFLAGS="-nologo -c"
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
AC_SUBST(BASIC_ASFLAGS)
|
AC_SUBST(BASIC_ASFLAGS)
|
||||||
|
|
||||||
if test "x$OPENJDK_TARGET_OS" = xmacosx; then
|
if test "x$OPENJDK_TARGET_OS" = xmacosx; then
|
||||||
|
|||||||
@@ -320,12 +320,16 @@ AC_DEFUN([FLAGS_SETUP_TOOLCHAIN_CONTROL],
|
|||||||
[
|
[
|
||||||
if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
|
if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
|
||||||
CC_OUT_OPTION=-Fo
|
CC_OUT_OPTION=-Fo
|
||||||
|
if test "x$OPENJDK_TARGET_CPU" != xaarch64; then
|
||||||
|
AS_NON_ASM_EXTENSION_OPTION=-Ta
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
# The option used to specify the target .o,.a or .so file.
|
# The option used to specify the target .o,.a or .so file.
|
||||||
# When compiling, how to specify the to be created object file.
|
# When compiling, how to specify the to be created object file.
|
||||||
CC_OUT_OPTION='-o$(SPACE)'
|
CC_OUT_OPTION='-o$(SPACE)'
|
||||||
fi
|
fi
|
||||||
AC_SUBST(CC_OUT_OPTION)
|
AC_SUBST(CC_OUT_OPTION)
|
||||||
|
AC_SUBST(AS_NON_ASM_EXTENSION_OPTION)
|
||||||
|
|
||||||
# Generate make dependency files
|
# Generate make dependency files
|
||||||
if test "x$TOOLCHAIN_TYPE" = xgcc; then
|
if test "x$TOOLCHAIN_TYPE" = xgcc; then
|
||||||
|
|||||||
@@ -479,6 +479,31 @@ AC_DEFUN_ONCE([JDKOPT_SETUP_ADDRESS_SANITIZER],
|
|||||||
AC_SUBST(ASAN_ENABLED)
|
AC_SUBST(ASAN_ENABLED)
|
||||||
])
|
])
|
||||||
|
|
||||||
|
################################################################################
|
||||||
|
#
|
||||||
|
# Static analyzer
|
||||||
|
#
|
||||||
|
AC_DEFUN_ONCE([JDKOPT_SETUP_STATIC_ANALYZER],
|
||||||
|
[
|
||||||
|
UTIL_ARG_ENABLE(NAME: static-analyzer, DEFAULT: false, RESULT: STATIC_ANALYZER_ENABLED,
|
||||||
|
DESC: [enable the GCC static analyzer],
|
||||||
|
CHECK_AVAILABLE: [
|
||||||
|
AC_MSG_CHECKING([if static analyzer is available])
|
||||||
|
if test "x$TOOLCHAIN_TYPE" = "xgcc"; then
|
||||||
|
AC_MSG_RESULT([yes])
|
||||||
|
else
|
||||||
|
AC_MSG_RESULT([no])
|
||||||
|
AVAILABLE=false
|
||||||
|
fi
|
||||||
|
],
|
||||||
|
IF_ENABLED: [
|
||||||
|
STATIC_ANALYZER_CFLAGS="-fanalyzer -Wno-analyzer-fd-leak"
|
||||||
|
CFLAGS_JDKLIB="$CFLAGS_JDKLIB $STATIC_ANALYZER_CFLAGS"
|
||||||
|
CFLAGS_JDKEXE="$CFLAGS_JDKEXE $STATIC_ANALYZER_CFLAGS"
|
||||||
|
])
|
||||||
|
AC_SUBST(STATIC_ANALYZER_ENABLED)
|
||||||
|
])
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
#
|
#
|
||||||
# LeakSanitizer
|
# LeakSanitizer
|
||||||
|
|||||||
@@ -513,6 +513,10 @@ AC_DEFUN([JVM_FEATURES_VERIFY],
|
|||||||
[
|
[
|
||||||
variant=$1
|
variant=$1
|
||||||
|
|
||||||
|
if JVM_FEATURES_IS_ACTIVE(jfr) && ! JVM_FEATURES_IS_ACTIVE(services); then
|
||||||
|
AC_MSG_ERROR([Specified JVM feature 'jfr' requires feature 'services' for variant '$variant'])
|
||||||
|
fi
|
||||||
|
|
||||||
if JVM_FEATURES_IS_ACTIVE(jvmci) && ! (JVM_FEATURES_IS_ACTIVE(compiler1) || \
|
if JVM_FEATURES_IS_ACTIVE(jvmci) && ! (JVM_FEATURES_IS_ACTIVE(compiler1) || \
|
||||||
JVM_FEATURES_IS_ACTIVE(compiler2)); then
|
JVM_FEATURES_IS_ACTIVE(compiler2)); then
|
||||||
AC_MSG_ERROR([Specified JVM feature 'jvmci' requires feature 'compiler2' or 'compiler1' for variant '$variant'])
|
AC_MSG_ERROR([Specified JVM feature 'jvmci' requires feature 'compiler2' or 'compiler1' for variant '$variant'])
|
||||||
|
|||||||
@@ -28,7 +28,7 @@
|
|||||||
################################################################################
|
################################################################################
|
||||||
|
|
||||||
# Minimum supported versions
|
# Minimum supported versions
|
||||||
JTREG_MINIMUM_VERSION=7.5.1
|
JTREG_MINIMUM_VERSION=7.5.2
|
||||||
GTEST_MINIMUM_VERSION=1.14.0
|
GTEST_MINIMUM_VERSION=1.14.0
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
|
|||||||
@@ -393,9 +393,8 @@ EXTERNAL_BUILDJDK := @EXTERNAL_BUILDJDK@
|
|||||||
# Whether the boot jdk jar supports --date=TIMESTAMP
|
# Whether the boot jdk jar supports --date=TIMESTAMP
|
||||||
BOOT_JDK_JAR_SUPPORTS_DATE := @BOOT_JDK_JAR_SUPPORTS_DATE@
|
BOOT_JDK_JAR_SUPPORTS_DATE := @BOOT_JDK_JAR_SUPPORTS_DATE@
|
||||||
|
|
||||||
# When compiling Java source to be run by the boot jdk
|
# The oldest supported boot jdk version
|
||||||
# use these extra flags, eg -source 6 -target 6
|
OLDEST_BOOT_JDK_VERSION := @OLDEST_BOOT_JDK_VERSION@
|
||||||
BOOT_JDK_SOURCETARGET := @BOOT_JDK_SOURCETARGET@
|
|
||||||
|
|
||||||
# Information about the build system
|
# Information about the build system
|
||||||
NUM_CORES := @NUM_CORES@
|
NUM_CORES := @NUM_CORES@
|
||||||
@@ -493,6 +492,7 @@ CXX_VERSION_NUMBER := @CXX_VERSION_NUMBER@
|
|||||||
HOTSPOT_TOOLCHAIN_TYPE := @HOTSPOT_TOOLCHAIN_TYPE@
|
HOTSPOT_TOOLCHAIN_TYPE := @HOTSPOT_TOOLCHAIN_TYPE@
|
||||||
|
|
||||||
CC_OUT_OPTION := @CC_OUT_OPTION@
|
CC_OUT_OPTION := @CC_OUT_OPTION@
|
||||||
|
AS_NON_ASM_EXTENSION_OPTION := @AS_NON_ASM_EXTENSION_OPTION@
|
||||||
|
|
||||||
# Flags used for overriding the default opt setting for a C/C++ source file.
|
# Flags used for overriding the default opt setting for a C/C++ source file.
|
||||||
C_O_FLAG_HIGHEST_JVM := @C_O_FLAG_HIGHEST_JVM@
|
C_O_FLAG_HIGHEST_JVM := @C_O_FLAG_HIGHEST_JVM@
|
||||||
@@ -898,12 +898,14 @@ JDK_MACOSX_BUNDLE_DIR = $(IMAGES_OUTPUTDIR)/$(JDK_MACOSX_BUNDLE_SUBDIR)
|
|||||||
JRE_MACOSX_BUNDLE_DIR = $(IMAGES_OUTPUTDIR)/$(JRE_MACOSX_BUNDLE_SUBDIR)
|
JRE_MACOSX_BUNDLE_DIR = $(IMAGES_OUTPUTDIR)/$(JRE_MACOSX_BUNDLE_SUBDIR)
|
||||||
JDK_MACOSX_BUNDLE_DIR_SIGNED = $(IMAGES_OUTPUTDIR)/$(JDK_MACOSX_BUNDLE_SUBDIR_SIGNED)
|
JDK_MACOSX_BUNDLE_DIR_SIGNED = $(IMAGES_OUTPUTDIR)/$(JDK_MACOSX_BUNDLE_SUBDIR_SIGNED)
|
||||||
JRE_MACOSX_BUNDLE_DIR_SIGNED = $(IMAGES_OUTPUTDIR)/$(JRE_MACOSX_BUNDLE_SUBDIR_SIGNED)
|
JRE_MACOSX_BUNDLE_DIR_SIGNED = $(IMAGES_OUTPUTDIR)/$(JRE_MACOSX_BUNDLE_SUBDIR_SIGNED)
|
||||||
JDK_MACOSX_BUNDLE_TOP_DIR = jdk-$(VERSION_NUMBER).jdk
|
JDK_MACOSX_BUNDLE_TOP_SUBDIR = jdk-$(VERSION_NUMBER).jdk
|
||||||
JRE_MACOSX_BUNDLE_TOP_DIR = jre-$(VERSION_NUMBER).jre
|
JRE_MACOSX_BUNDLE_TOP_SUBDIR = jre-$(VERSION_NUMBER).jre
|
||||||
JDK_MACOSX_CONTENTS_SUBDIR = $(JDK_MACOSX_BUNDLE_TOP_DIR)/Contents
|
JDK_MACOSX_CONTENTS_SUBDIR = $(JDK_MACOSX_BUNDLE_TOP_SUBDIR)/Contents
|
||||||
JRE_MACOSX_CONTENTS_SUBDIR = $(JRE_MACOSX_BUNDLE_TOP_DIR)/Contents
|
JRE_MACOSX_CONTENTS_SUBDIR = $(JRE_MACOSX_BUNDLE_TOP_SUBDIR)/Contents
|
||||||
JDK_MACOSX_CONTENTS_DIR = $(JDK_MACOSX_BUNDLE_DIR)/$(JDK_MACOSX_CONTENTS_SUBDIR)
|
JDK_MACOSX_CONTENTS_DIR = $(JDK_MACOSX_BUNDLE_DIR)/$(JDK_MACOSX_CONTENTS_SUBDIR)
|
||||||
JRE_MACOSX_CONTENTS_DIR = $(JRE_MACOSX_BUNDLE_DIR)/$(JRE_MACOSX_CONTENTS_SUBDIR)
|
JRE_MACOSX_CONTENTS_DIR = $(JRE_MACOSX_BUNDLE_DIR)/$(JRE_MACOSX_CONTENTS_SUBDIR)
|
||||||
|
JDK_MACOSX_BUNDLE_TOP_DIR = $(JDK_MACOSX_BUNDLE_DIR)/$(JDK_MACOSX_BUNDLE_TOP_SUBDIR)
|
||||||
|
JRE_MACOSX_BUNDLE_TOP_DIR = $(JRE_MACOSX_BUNDLE_DIR)/$(JRE_MACOSX_BUNDLE_TOP_SUBDIR)
|
||||||
|
|
||||||
# Bundle names
|
# Bundle names
|
||||||
ifneq ($(VERSION_BUILD), )
|
ifneq ($(VERSION_BUILD), )
|
||||||
|
|||||||
@@ -276,9 +276,6 @@ AC_DEFUN_ONCE([TOOLCHAIN_PRE_DETECTION],
|
|||||||
ORG_CFLAGS="$CFLAGS"
|
ORG_CFLAGS="$CFLAGS"
|
||||||
ORG_CXXFLAGS="$CXXFLAGS"
|
ORG_CXXFLAGS="$CXXFLAGS"
|
||||||
|
|
||||||
# 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$OPENJDK_BUILD_OS" = "xmacosx"; then
|
||||||
if test "x$XCODEBUILD" != x; then
|
if test "x$XCODEBUILD" != x; then
|
||||||
XCODE_VERSION_OUTPUT=`"$XCODEBUILD" -version 2> /dev/null | $HEAD -n 1`
|
XCODE_VERSION_OUTPUT=`"$XCODEBUILD" -version 2> /dev/null | $HEAD -n 1`
|
||||||
@@ -300,9 +297,10 @@ AC_DEFUN_ONCE([TOOLCHAIN_PRE_DETECTION],
|
|||||||
fi
|
fi
|
||||||
AC_SUBST(TOOLCHAIN_VERSION)
|
AC_SUBST(TOOLCHAIN_VERSION)
|
||||||
|
|
||||||
# Finally prepend TOOLCHAIN_PATH to the PATH, to allow --with-tools-dir to
|
# For the microsoft toolchain the toolchain path needs to be added to the
|
||||||
# override all other locations.
|
# normal path, or the compiler will not work in some situations in later
|
||||||
if test "x$TOOLCHAIN_PATH" != x; then
|
# configure checks.
|
||||||
|
if test "x$TOOLCHAIN_TYPE" = "xmicrosoft" && test "x$TOOLCHAIN_PATH" != x; then
|
||||||
export PATH=$TOOLCHAIN_PATH:$PATH
|
export PATH=$TOOLCHAIN_PATH:$PATH
|
||||||
fi
|
fi
|
||||||
])
|
])
|
||||||
@@ -310,13 +308,6 @@ AC_DEFUN_ONCE([TOOLCHAIN_PRE_DETECTION],
|
|||||||
# Restore path, etc
|
# Restore path, etc
|
||||||
AC_DEFUN_ONCE([TOOLCHAIN_POST_DETECTION],
|
AC_DEFUN_ONCE([TOOLCHAIN_POST_DETECTION],
|
||||||
[
|
[
|
||||||
# Restore old path, except for the microsoft toolchain, which requires the
|
|
||||||
# toolchain path to remain in place. Otherwise the compiler will not work in
|
|
||||||
# some situations in later configure checks.
|
|
||||||
if test "x$TOOLCHAIN_TYPE" != "xmicrosoft"; then
|
|
||||||
PATH="$OLD_PATH"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Restore the flags to the user specified values.
|
# Restore the flags to the user specified values.
|
||||||
# This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
|
# This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
|
||||||
CFLAGS="$ORG_CFLAGS"
|
CFLAGS="$ORG_CFLAGS"
|
||||||
@@ -655,8 +646,11 @@ AC_DEFUN_ONCE([TOOLCHAIN_DETECT_TOOLCHAIN_CORE],
|
|||||||
if test "x$TOOLCHAIN_TYPE" != xmicrosoft; then
|
if test "x$TOOLCHAIN_TYPE" != xmicrosoft; then
|
||||||
AS="$CC -c"
|
AS="$CC -c"
|
||||||
else
|
else
|
||||||
if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
|
if test "x$OPENJDK_TARGET_CPU" = "xaarch64"; then
|
||||||
# On 64 bit windows, the assembler is "ml64.exe"
|
# On Windows aarch64, the assembler is "armasm64.exe"
|
||||||
|
UTIL_LOOKUP_TOOLCHAIN_PROGS(AS, armasm64)
|
||||||
|
elif test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
|
||||||
|
# On Windows x64, the assembler is "ml64.exe"
|
||||||
UTIL_LOOKUP_TOOLCHAIN_PROGS(AS, ml64)
|
UTIL_LOOKUP_TOOLCHAIN_PROGS(AS, ml64)
|
||||||
else
|
else
|
||||||
# otherwise, the assembler is "ml.exe"
|
# otherwise, the assembler is "ml.exe"
|
||||||
|
|||||||
@@ -458,17 +458,18 @@ AC_DEFUN([UTIL_LOOKUP_PROGS],
|
|||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
# Call UTIL_SETUP_TOOL with AC_CHECK_TOOLS to locate the tool. This will look
|
# Call UTIL_SETUP_TOOL with AC_CHECK_TOOLS to locate the tool. This will look
|
||||||
# first for cross-compilation tools.
|
# first for tools using the cross-compilation prefix, and then for tools without
|
||||||
|
# this prefix. For each of these name variants, it will look first in the
|
||||||
|
# toolchain path, and then in the normal path.
|
||||||
# $1: variable to set
|
# $1: variable to set
|
||||||
# $2: executable name (or list of names) to look for
|
# $2: executable name (or list of names) to look for
|
||||||
# $3: [path]
|
|
||||||
AC_DEFUN([UTIL_LOOKUP_TOOLCHAIN_PROGS],
|
AC_DEFUN([UTIL_LOOKUP_TOOLCHAIN_PROGS],
|
||||||
[
|
[
|
||||||
if test "x$ac_tool_prefix" = x; then
|
if test "x$ac_tool_prefix" = x; then
|
||||||
UTIL_LOOKUP_PROGS($1, $2, $3)
|
UTIL_LOOKUP_PROGS($1, $2, [$TOOLCHAIN_PATH:$PATH])
|
||||||
else
|
else
|
||||||
prefixed_names=$(for name in $2; do echo ${ac_tool_prefix}${name} $name; done)
|
prefixed_names=$(for name in $2; do echo ${ac_tool_prefix}${name} $name; done)
|
||||||
UTIL_LOOKUP_PROGS($1, $prefixed_names, $3)
|
UTIL_LOOKUP_PROGS($1, $prefixed_names, [$TOOLCHAIN_PATH:$PATH])
|
||||||
fi
|
fi
|
||||||
])
|
])
|
||||||
|
|
||||||
@@ -497,10 +498,9 @@ AC_DEFUN([UTIL_REQUIRE_PROGS],
|
|||||||
# Like UTIL_LOOKUP_PROGS but fails if no tool was found.
|
# Like UTIL_LOOKUP_PROGS but fails if no tool was found.
|
||||||
# $1: variable to set
|
# $1: variable to set
|
||||||
# $2: executable name (or list of names) to look for
|
# $2: executable name (or list of names) to look for
|
||||||
# $3: [path]
|
|
||||||
AC_DEFUN([UTIL_REQUIRE_TOOLCHAIN_PROGS],
|
AC_DEFUN([UTIL_REQUIRE_TOOLCHAIN_PROGS],
|
||||||
[
|
[
|
||||||
UTIL_LOOKUP_TOOLCHAIN_PROGS($1, $2, $3)
|
UTIL_LOOKUP_TOOLCHAIN_PROGS($1, $2)
|
||||||
UTIL_CHECK_NONEMPTY($1)
|
UTIL_CHECK_NONEMPTY($1)
|
||||||
])
|
])
|
||||||
|
|
||||||
|
|||||||
@@ -45,6 +45,9 @@ ifeq ($(INCLUDE), true)
|
|||||||
# e.g. a simple sed replacement on the input file. If the operations are
|
# e.g. a simple sed replacement on the input file. If the operations are
|
||||||
# unrelated to the main COMMAND, this is not a suitable solution.
|
# unrelated to the main COMMAND, this is not a suitable solution.
|
||||||
#
|
#
|
||||||
|
# Before execution, the current working directory is changed to SUPPORT_DIR.
|
||||||
|
# This can be overridden with WORKING_DIR.
|
||||||
|
#
|
||||||
# If your command outputs a variety of files, or if it's really a single file
|
# If your command outputs a variety of files, or if it's really a single file
|
||||||
# but you don't really care about the output from the perspective, you can just
|
# but you don't really care about the output from the perspective, you can just
|
||||||
# supply an OUTPUT_DIR. You are supposed to make sure the command creates files
|
# supply an OUTPUT_DIR. You are supposed to make sure the command creates files
|
||||||
@@ -75,9 +78,12 @@ ifeq ($(INCLUDE), true)
|
|||||||
# OUTPUT_DIR : The directory that will contain the result from the command
|
# OUTPUT_DIR : The directory that will contain the result from the command
|
||||||
# OUTPUT_FILE : Use this if the command results in a single output file
|
# OUTPUT_FILE : Use this if the command results in a single output file
|
||||||
# SUPPORT_DIR : Where to store generated support files
|
# SUPPORT_DIR : Where to store generated support files
|
||||||
|
# WORKING_DIR : Directory to cd to before executing the command
|
||||||
# INFO : Message to display at LOG=info level when running command (optional)
|
# INFO : Message to display at LOG=info level when running command (optional)
|
||||||
# WARN : Message to display at LOG=warn level when running command (optional)
|
# WARN : Message to display at LOG=warn level when running command (optional)
|
||||||
# DEPS : Dependencies for the execution to take place
|
# DEPS : Dependencies for the execution to take place
|
||||||
|
# DRYRUN : Set to true to perform everything but executing the command \
|
||||||
|
# (defaults to false, primarily intended for debugging)
|
||||||
#
|
#
|
||||||
|
|
||||||
# Setup make rules for copying files, with an option to do more complex
|
# Setup make rules for copying files, with an option to do more complex
|
||||||
@@ -133,6 +139,10 @@ define SetupExecuteBody
|
|||||||
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifeq ($$($1_WORKING_DIR), )
|
||||||
|
$1_WORKING_DIR := $$($1_SUPPORT_DIR)
|
||||||
|
endif
|
||||||
|
|
||||||
ifeq ($$($1_INFO)$$($1_WARN), )
|
ifeq ($$($1_INFO)$$($1_WARN), )
|
||||||
# If neither info nor warn is provided, add basic info text.
|
# If neither info nor warn is provided, add basic info text.
|
||||||
$1_INFO := Running commands for $1
|
$1_INFO := Running commands for $1
|
||||||
@@ -147,14 +157,19 @@ define SetupExecuteBody
|
|||||||
ifneq ($$($1_INFO), )
|
ifneq ($$($1_INFO), )
|
||||||
$$(call LogInfo, $$($1_INFO))
|
$$(call LogInfo, $$($1_INFO))
|
||||||
endif
|
endif
|
||||||
$$(call MakeDir, $$($1_SUPPORT_DIR) $$($1_OUTPUT_DIR))
|
$$(call MakeDir, $$(call EncodeSpace, $$($1_WORKING_DIR)) $$(call EncodeSpace, $$($1_SUPPORT_DIR)) $$(call EncodeSpace, $$($1_OUTPUT_DIR)))
|
||||||
$$(call ExecuteWithLog, $$($1_BASE)_pre, \
|
$$(call ExecuteWithLog, $$($1_BASE)_pre, \
|
||||||
$$($1_PRE_COMMAND))
|
cd $$($1_WORKING_DIR) && $$($1_PRE_COMMAND))
|
||||||
$$(TOUCH) $$@
|
$$(TOUCH) $$@
|
||||||
|
|
||||||
$$($1_EXEC_RESULT): $$($1_PRE_MARKER)
|
$$($1_EXEC_RESULT): $$($1_PRE_MARKER)
|
||||||
|
ifneq ($$($1_DRYRUN), true)
|
||||||
$$(call ExecuteWithLog, $$($1_BASE)_exec, \
|
$$(call ExecuteWithLog, $$($1_BASE)_exec, \
|
||||||
$$($1_COMMAND))
|
cd $$($1_WORKING_DIR) && $$($1_COMMAND))
|
||||||
|
else
|
||||||
|
$$(call LogWarn, DRYRUN enabled for $1, not actually running command)
|
||||||
|
$$(TOUCH) $$@
|
||||||
|
endif
|
||||||
ifeq ($$($1_EXEC_RESULT), $$($1_EXEC_MARKER))
|
ifeq ($$($1_EXEC_RESULT), $$($1_EXEC_MARKER))
|
||||||
$$(TOUCH) $$@
|
$$(TOUCH) $$@
|
||||||
endif
|
endif
|
||||||
@@ -168,9 +183,14 @@ define SetupExecuteBody
|
|||||||
ifneq ($$($1_INFO), )
|
ifneq ($$($1_INFO), )
|
||||||
$$(call LogInfo, $$($1_INFO))
|
$$(call LogInfo, $$($1_INFO))
|
||||||
endif
|
endif
|
||||||
$$(call MakeDir, $$(call EncodeSpace, $$($1_SUPPORT_DIR)) $$(call EncodeSpace, $$($1_OUTPUT_DIR)))
|
$$(call MakeDir, $$(call EncodeSpace, $$($1_WORKING_DIR)) $$(call EncodeSpace, $$($1_SUPPORT_DIR)) $$(call EncodeSpace, $$($1_OUTPUT_DIR)))
|
||||||
|
ifneq ($$($1_DRYRUN), true)
|
||||||
$$(call ExecuteWithLog, $$($1_BASE)_exec, \
|
$$(call ExecuteWithLog, $$($1_BASE)_exec, \
|
||||||
$$($1_COMMAND))
|
cd $$($1_WORKING_DIR) && $$($1_COMMAND))
|
||||||
|
else
|
||||||
|
$$(call LogWarn, DRYRUN enabled for $1, not actually running command)
|
||||||
|
$$(TOUCH) $$@
|
||||||
|
endif
|
||||||
ifeq ($$($1_EXEC_RESULT), $$($1_EXEC_MARKER))
|
ifeq ($$($1_EXEC_RESULT), $$($1_EXEC_MARKER))
|
||||||
$$(TOUCH) $$@
|
$$(TOUCH) $$@
|
||||||
endif
|
endif
|
||||||
@@ -182,7 +202,7 @@ define SetupExecuteBody
|
|||||||
|
|
||||||
$$($1_FINAL_RESULT): $$($1_EXEC_RESULT)
|
$$($1_FINAL_RESULT): $$($1_EXEC_RESULT)
|
||||||
$$(call ExecuteWithLog, $$($1_BASE)_post, \
|
$$(call ExecuteWithLog, $$($1_BASE)_post, \
|
||||||
$$($1_POST_COMMAND))
|
cd $$($1_WORKING_DIR) && $$($1_POST_COMMAND))
|
||||||
$$(TOUCH) $$@
|
$$(TOUCH) $$@
|
||||||
|
|
||||||
$1 += $$($1_FINAL_RESULT)
|
$1 += $$($1_FINAL_RESULT)
|
||||||
|
|||||||
@@ -38,10 +38,15 @@ include JarArchive.gmk
|
|||||||
###
|
###
|
||||||
|
|
||||||
# Create classes that can run on the bootjdk
|
# Create classes that can run on the bootjdk
|
||||||
TARGET_RELEASE_BOOTJDK := $(BOOT_JDK_SOURCETARGET)
|
# -Xlint:-options is added to avoid the warning
|
||||||
|
# "system modules path not set in conjunction with -source"
|
||||||
|
TARGET_RELEASE_BOOTJDK := -source $(OLDEST_BOOT_JDK_VERSION) \
|
||||||
|
-target $(OLDEST_BOOT_JDK_VERSION) -Xlint:-options
|
||||||
|
|
||||||
# Create classes that can be used in (or be a part of) the new jdk we're building
|
# Create classes that can be used in (or be a part of) the new jdk we're
|
||||||
TARGET_RELEASE_NEWJDK := -source $(JDK_SOURCE_TARGET_VERSION) -target $(JDK_SOURCE_TARGET_VERSION)
|
# building
|
||||||
|
TARGET_RELEASE_NEWJDK := -source $(JDK_SOURCE_TARGET_VERSION) \
|
||||||
|
-target $(JDK_SOURCE_TARGET_VERSION)
|
||||||
|
|
||||||
# Create classes that can be used in JDK 8, for legacy support
|
# Create classes that can be used in JDK 8, for legacy support
|
||||||
TARGET_RELEASE_JDK8 := --release 8
|
TARGET_RELEASE_JDK8 := --release 8
|
||||||
@@ -178,6 +183,10 @@ define SetupJavaCompilationBody
|
|||||||
|
|
||||||
$1_SAFE_NAME := $$(strip $$(subst /,_, $1))
|
$1_SAFE_NAME := $$(strip $$(subst /,_, $1))
|
||||||
|
|
||||||
|
ifeq ($$($1_LOG_ACTION), )
|
||||||
|
$1_LOG_ACTION := Compiling
|
||||||
|
endif
|
||||||
|
|
||||||
ifeq ($$($1_SMALL_JAVA), )
|
ifeq ($$($1_SMALL_JAVA), )
|
||||||
# If unspecified, default to true
|
# If unspecified, default to true
|
||||||
$1_SMALL_JAVA := true
|
$1_SMALL_JAVA := true
|
||||||
@@ -472,7 +481,7 @@ define SetupJavaCompilationBody
|
|||||||
# list of files.
|
# list of files.
|
||||||
$$($1_FILELIST): $$($1_SRCS) $$($1_VARDEPS_FILE)
|
$$($1_FILELIST): $$($1_SRCS) $$($1_VARDEPS_FILE)
|
||||||
$$(call MakeDir, $$(@D))
|
$$(call MakeDir, $$(@D))
|
||||||
$$(call LogWarn, Compiling up to $$(words $$($1_SRCS)) files for $1)
|
$$(call LogWarn, $$($1_LOG_ACTION) up to $$(words $$($1_SRCS)) files for $1)
|
||||||
$$(eval $$(call ListPathsSafely, $1_SRCS, $$($1_FILELIST)))
|
$$(eval $$(call ListPathsSafely, $1_SRCS, $$($1_FILELIST)))
|
||||||
|
|
||||||
# Create a $$($1_MODFILELIST) file with significant modified dependencies
|
# Create a $$($1_MODFILELIST) file with significant modified dependencies
|
||||||
|
|||||||
@@ -284,6 +284,12 @@ else
|
|||||||
LogCmdlines =
|
LogCmdlines =
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
# Check if the command line contains redirection, that is <, > or >>,
|
||||||
|
# and if so, return a value that is interpreted as true in a make $(if)
|
||||||
|
# construct.
|
||||||
|
is_redirect = \
|
||||||
|
$(if $(filter < > >>, $1), true)
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
# ExecuteWithLog will run a command and log the output appropriately. This is
|
# ExecuteWithLog will run a command and log the output appropriately. This is
|
||||||
# meant to be used by commands that do "real" work, like a compilation.
|
# meant to be used by commands that do "real" work, like a compilation.
|
||||||
@@ -291,21 +297,23 @@ endif
|
|||||||
# of the build in case of failure. The command line itself is stored in a file,
|
# of the build in case of failure. The command line itself is stored in a file,
|
||||||
# and also logged to stdout if the LOG=cmdlines option has been given.
|
# and also logged to stdout if the LOG=cmdlines option has been given.
|
||||||
#
|
#
|
||||||
# NOTE: If the command redirects stdout, the caller needs to wrap it in a
|
|
||||||
# subshell (by adding parentheses around it), otherwise the redirect to the
|
|
||||||
# subshell tee process will create a race condition where the target file may
|
|
||||||
# not be fully written when the make recipe is done.
|
|
||||||
#
|
|
||||||
# Param 1 - The path to base the name of the log file / command line file on
|
# Param 1 - The path to base the name of the log file / command line file on
|
||||||
# Param 2 - The command to run
|
# Param 2 - The command to run
|
||||||
ExecuteWithLog = \
|
ExecuteWithLog = \
|
||||||
$(call LogCmdlines, Executing: [$(strip $2)]) \
|
$(call LogCmdlines, Executing: \
|
||||||
|
[$(if $(call is_redirect, $2),$(LEFT_PAREN) )$(strip $2)$(if $(call \
|
||||||
|
is_redirect, $2), $(RIGHT_PAREN))]) \
|
||||||
$(call MakeDir, $(dir $(strip $1)) $(MAKESUPPORT_OUTPUTDIR)/failure-logs) \
|
$(call MakeDir, $(dir $(strip $1)) $(MAKESUPPORT_OUTPUTDIR)/failure-logs) \
|
||||||
$(call WriteFile, $2, $(strip $1).cmdline) \
|
$(call WriteFile, $2, $(strip $1).cmdline) \
|
||||||
( $(RM) $(strip $1).log && $(strip $2) > >($(TEE) -a $(strip $1).log) 2> >($(TEE) -a $(strip $1).log >&2) || \
|
( $(RM) $(strip $1).log && \
|
||||||
|
$(if $(call is_redirect, $2),$(LEFT_PAREN) )$(strip $2)$(if $(call \
|
||||||
|
is_redirect, $2), $(RIGHT_PAREN)) \
|
||||||
|
> >($(TEE) -a $(strip $1).log) 2> >($(TEE) -a $(strip $1).log >&2) || \
|
||||||
( exitcode=$(DOLLAR)? && \
|
( exitcode=$(DOLLAR)? && \
|
||||||
$(CP) $(strip $1).log $(MAKESUPPORT_OUTPUTDIR)/failure-logs/$(subst /,_,$(patsubst $(OUTPUTDIR)/%,%,$(strip $1))).log && \
|
$(CP) $(strip $1).log $(MAKESUPPORT_OUTPUTDIR)/failure-logs/$(subst \
|
||||||
$(CP) $(strip $1).cmdline $(MAKESUPPORT_OUTPUTDIR)/failure-logs/$(subst /,_,$(patsubst $(OUTPUTDIR)/%,%,$(strip $1))).cmdline && \
|
/,_,$(patsubst $(OUTPUTDIR)/%,%,$(strip $1))).log && \
|
||||||
|
$(CP) $(strip $1).cmdline $(MAKESUPPORT_OUTPUTDIR)/failure-logs/$(subst \
|
||||||
|
/,_,$(patsubst $(OUTPUTDIR)/%,%,$(strip $1))).cmdline && \
|
||||||
exit $(DOLLAR)exitcode ) )
|
exit $(DOLLAR)exitcode ) )
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
|
|||||||
@@ -27,11 +27,16 @@
|
|||||||
# MakeIncludeEnd.gmk should be included last of all in all include files
|
# MakeIncludeEnd.gmk should be included last of all in all include files
|
||||||
################################################################################
|
################################################################################
|
||||||
|
|
||||||
|
ifneq ($(INCLUDE_GUARD_$(THIS_INCLUDE)), true)
|
||||||
|
# This was the first time this file was included. Prevent future inclusion.
|
||||||
|
INCLUDE_GUARD_$(THIS_INCLUDE) := true
|
||||||
|
|
||||||
# Hook to include the corresponding custom file, if present.
|
# Hook to include the corresponding custom file, if present.
|
||||||
ifneq ($(NO_CUSTOM_EXTENSIONS), true)
|
ifneq ($(NO_CUSTOM_EXTENSIONS), true)
|
||||||
CUSTOM_POST_NAME := $(subst .gmk,-post.gmk, $(THIS_INCLUDE))
|
CUSTOM_POST_NAME := $(subst .gmk,-post.gmk, $(THIS_INCLUDE))
|
||||||
$(eval $(call IncludeCustomExtension, $(CUSTOM_POST_NAME)))
|
$(eval $(call IncludeCustomExtension, $(CUSTOM_POST_NAME)))
|
||||||
endif
|
endif
|
||||||
|
endif
|
||||||
|
|
||||||
# Pop our helper name off the stack
|
# Pop our helper name off the stack
|
||||||
INCLUDE_STACK := $(wordlist 2, $(words $(INCLUDE_STACK)), $(INCLUDE_STACK))
|
INCLUDE_STACK := $(wordlist 2, $(words $(INCLUDE_STACK)), $(INCLUDE_STACK))
|
||||||
|
|||||||
@@ -70,7 +70,6 @@ INCLUDE_STACK := $(THIS_INCLUDE) $(INCLUDE_STACK)
|
|||||||
|
|
||||||
# Setup an automatic include guard
|
# Setup an automatic include guard
|
||||||
ifneq ($(INCLUDE_GUARD_$(THIS_INCLUDE)), true)
|
ifneq ($(INCLUDE_GUARD_$(THIS_INCLUDE)), true)
|
||||||
INCLUDE_GUARD_$(THIS_INCLUDE) := true
|
|
||||||
INCLUDE := true
|
INCLUDE := true
|
||||||
|
|
||||||
# Hook to include the corresponding custom file, if present.
|
# Hook to include the corresponding custom file, if present.
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ include $(TOPDIR)/make/conf/module-loader-map.conf
|
|||||||
|
|
||||||
# Append platform-specific and upgradeable modules
|
# Append platform-specific and upgradeable modules
|
||||||
PLATFORM_MODULES += $(PLATFORM_MODULES_$(OPENJDK_TARGET_OS)) \
|
PLATFORM_MODULES += $(PLATFORM_MODULES_$(OPENJDK_TARGET_OS)) \
|
||||||
$(UPGRADEABLE_PLATFORM_MODULES)
|
$(UPGRADEABLE_PLATFORM_MODULES) $(CUSTOM_UPGRADEABLE_PLATFORM_MODULES)
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
# Setup module sets for docs
|
# Setup module sets for docs
|
||||||
@@ -216,7 +216,7 @@ endif
|
|||||||
# Find dependencies ("requires") for a given module.
|
# Find dependencies ("requires") for a given module.
|
||||||
# Param 1: Module to find dependencies for.
|
# Param 1: Module to find dependencies for.
|
||||||
FindDepsForModule = \
|
FindDepsForModule = \
|
||||||
$(DEPS_$(strip $1))
|
$(filter-out $(IMPORT_MODULES), $(DEPS_$(strip $1)))
|
||||||
|
|
||||||
# Find dependencies ("requires") transitively in 3 levels for a given module.
|
# Find dependencies ("requires") transitively in 3 levels for a given module.
|
||||||
# Param 1: Module to find dependencies for.
|
# Param 1: Module to find dependencies for.
|
||||||
@@ -254,7 +254,8 @@ FindTransitiveIndirectDepsForModules = \
|
|||||||
# Upgradeable modules are those that are either defined as upgradeable or that
|
# Upgradeable modules are those that are either defined as upgradeable or that
|
||||||
# require an upradeable module.
|
# require an upradeable module.
|
||||||
FindAllUpgradeableModules = \
|
FindAllUpgradeableModules = \
|
||||||
$(sort $(filter-out $(MODULES_FILTER), $(UPGRADEABLE_PLATFORM_MODULES)))
|
$(sort $(filter-out $(MODULES_FILTER), \
|
||||||
|
$(UPGRADEABLE_PLATFORM_MODULES) $(CUSTOM_UPGRADEABLE_PLATFORM_MODULES)))
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
|
|
||||||
@@ -316,6 +317,19 @@ define ReadImportMetaData
|
|||||||
$$(eval $$(call ReadSingleImportMetaData, $$m)))
|
$$(eval $$(call ReadSingleImportMetaData, $$m)))
|
||||||
endef
|
endef
|
||||||
|
|
||||||
|
################################################################################
|
||||||
|
# Get a full snippet path for the current module and a given base name.
|
||||||
|
#
|
||||||
|
# Param 1 - The base name of the snippet file to include
|
||||||
|
GetModuleSnippetName = \
|
||||||
|
$(if $(CUSTOM_MODULE_MAKE_ROOT), \
|
||||||
|
$(if $(wildcard $(CUSTOM_MODULE_MAKE_ROOT)/$(MODULE)/$(strip $1).gmk), \
|
||||||
|
$(CUSTOM_MODULE_MAKE_ROOT)/$(MODULE)/$(strip $1).gmk, \
|
||||||
|
$(wildcard modules/$(MODULE)/$(strip $1).gmk) \
|
||||||
|
), \
|
||||||
|
$(wildcard modules/$(MODULE)/$(strip $1).gmk) \
|
||||||
|
)
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
|
|
||||||
endif # include guard
|
endif # include guard
|
||||||
|
|||||||
@@ -109,7 +109,7 @@ define ProcessMarkdown
|
|||||||
$$(call LogInfo, Post-processing markdown file $2)
|
$$(call LogInfo, Post-processing markdown file $2)
|
||||||
$$(call MakeDir, $$(SUPPORT_OUTPUTDIR)/markdown $$($1_$2_TARGET_DIR))
|
$$(call MakeDir, $$(SUPPORT_OUTPUTDIR)/markdown $$($1_$2_TARGET_DIR))
|
||||||
$$(call ExecuteWithLog, $$(SUPPORT_OUTPUTDIR)/markdown/$$($1_$2_MARKER)_post, \
|
$$(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
|
endif
|
||||||
|
|
||||||
$1 += $$($1_$2_OUTPUT_FILE)
|
$1 += $$($1_$2_OUTPUT_FILE)
|
||||||
|
|||||||
@@ -55,6 +55,42 @@ uppercase = \
|
|||||||
$(uppercase_result) \
|
$(uppercase_result) \
|
||||||
)
|
)
|
||||||
|
|
||||||
|
lowercase_table := A,a B,b C,c D,d E,e F,f G,g H,h I,i J,j K,k L,l M,m N,n O,o \
|
||||||
|
P,p Q,q R,r S,s T,t U,u V,v W,w X,x Y,y Z,z
|
||||||
|
|
||||||
|
lowercase_internal = \
|
||||||
|
$(if $(strip $1), $$(subst $(firstword $1), $(call lowercase_internal, \
|
||||||
|
$(wordlist 2, $(words $1), $1), $2)), $2)
|
||||||
|
|
||||||
|
# Convert a string to lower case. Works only on a-z.
|
||||||
|
# $1 - The string to convert
|
||||||
|
lowercase = \
|
||||||
|
$(strip \
|
||||||
|
$(eval lowercase_result := $(call lowercase_internal, $(lowercase_table), $1)) \
|
||||||
|
$(lowercase_result) \
|
||||||
|
)
|
||||||
|
|
||||||
|
lowercase_letters := a b c d e f g h i j k l m n o p q r s t u v w x y z
|
||||||
|
uppercase_letters := A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
|
||||||
|
|
||||||
|
titlecase_internal = \
|
||||||
|
$(strip $(or \
|
||||||
|
$(strip $(foreach l, $(lowercase_letters) $(uppercase_letters), \
|
||||||
|
$(if $(filter $l%, $1), \
|
||||||
|
$(call uppercase, $l)$(call lowercase, $(patsubst $l%,%,$1))))), \
|
||||||
|
$1))
|
||||||
|
|
||||||
|
# Convert a string to Title Case. Works only on a-z.
|
||||||
|
# $1 - The string to convert
|
||||||
|
titlecase = \
|
||||||
|
$(strip $(foreach w, $1, $(call titlecase_internal, $w)))
|
||||||
|
|
||||||
|
# Returns the first character of a string. Works only on a-z.
|
||||||
|
# $1 - The string to extract the first character from
|
||||||
|
firstchar = \
|
||||||
|
$(strip $(foreach l, $(lowercase_letters) $(uppercase_letters), \
|
||||||
|
$(if $(filter $l%, $(firstword $1)), $l)))
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
# Creates a sequence of increasing numbers (inclusive).
|
# Creates a sequence of increasing numbers (inclusive).
|
||||||
# Param 1 - starting number
|
# Param 1 - starting number
|
||||||
|
|||||||
228
make/common/modules/GensrcStreamPreProcessing.gmk
Normal file
228
make/common/modules/GensrcStreamPreProcessing.gmk
Normal file
@@ -0,0 +1,228 @@
|
|||||||
|
#
|
||||||
|
# Copyright (c) 2025, 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 MakeIncludeStart.gmk
|
||||||
|
ifeq ($(INCLUDE), true)
|
||||||
|
|
||||||
|
################################################################################
|
||||||
|
# This file defines macros that sets up rules for running the spp.Spp build tool
|
||||||
|
################################################################################
|
||||||
|
|
||||||
|
include Execute.gmk
|
||||||
|
include $(TOPDIR)/make/ToolsJdk.gmk
|
||||||
|
|
||||||
|
NON_BYTE_NUMBER_TYPES := char short int long float double
|
||||||
|
NUMBER_TYPES := byte $(NON_BYTE_NUMBER_TYPES)
|
||||||
|
PRIMITIVE_TYPES := boolean $(NUMBER_TYPES)
|
||||||
|
|
||||||
|
################################################################################
|
||||||
|
# The Conv function converts a type given as first argument (as a normal Java
|
||||||
|
# native type name), into one of several corresponding strings, depending on
|
||||||
|
# the aspect given in the second argument
|
||||||
|
#
|
||||||
|
# The implementation dispatches the call to one of several Conv_<aspect> macros.
|
||||||
|
#
|
||||||
|
# arg $1: the type to convert
|
||||||
|
# arg $2: the aspect to convert for
|
||||||
|
# arg $3: byte order (only needed for certain aspects)
|
||||||
|
#
|
||||||
|
Conv = \
|
||||||
|
$(strip $(call Conv_$(strip $2),$(strip $1),$(strip $3)))
|
||||||
|
|
||||||
|
################################################################################
|
||||||
|
# Conv_<aspect> implementations
|
||||||
|
|
||||||
|
# Return a single letter representing the type (lowercase first letter)
|
||||||
|
Conv_x = \
|
||||||
|
$(call firstchar, $1)
|
||||||
|
|
||||||
|
# Return capitalized type name
|
||||||
|
Conv_Type = \
|
||||||
|
$(call titlecase, $1)
|
||||||
|
|
||||||
|
# Return the full descriptive name of the type, e.g. int -> integer
|
||||||
|
Conv_fulltype = \
|
||||||
|
$(if $(filter char, $1), \
|
||||||
|
character, \
|
||||||
|
$(if $(filter int, $1), \
|
||||||
|
integer, \
|
||||||
|
$1 \
|
||||||
|
) \
|
||||||
|
)
|
||||||
|
|
||||||
|
# Return the capitalized full descriptive name of the type, e.g. int -> Integer
|
||||||
|
Conv_Fulltype = \
|
||||||
|
$(call titlecase, $(call Conv_fulltype, $1))
|
||||||
|
|
||||||
|
# Return log2 bits per value (0-3)
|
||||||
|
Conv_LBPV = \
|
||||||
|
$(if $(filter byte, $1), \
|
||||||
|
0, \
|
||||||
|
$(if $(filter char short, $1), \
|
||||||
|
1, \
|
||||||
|
$(if $(filter int float, $1), \
|
||||||
|
2, \
|
||||||
|
$(if $(filter long double, $1), \
|
||||||
|
3))))
|
||||||
|
|
||||||
|
# Return float or int category
|
||||||
|
Conv_category = \
|
||||||
|
$(if $(filter float double, $1), \
|
||||||
|
floatingPointType, \
|
||||||
|
integralType \
|
||||||
|
)
|
||||||
|
|
||||||
|
# Return stream information for char
|
||||||
|
Conv_streams = \
|
||||||
|
$(if $(filter char, $1), streamableType)
|
||||||
|
|
||||||
|
# Return stream type information for char
|
||||||
|
Conv_streamtype = \
|
||||||
|
$(if $(filter char, $1), int)
|
||||||
|
|
||||||
|
# Return capitalized stream type information for char
|
||||||
|
Conv_Streamtype = \
|
||||||
|
$(if $(filter char, $1), Int)
|
||||||
|
|
||||||
|
# Return article to use for type in English text
|
||||||
|
Conv_a = \
|
||||||
|
$(if $(filter int, $1), an, a)
|
||||||
|
|
||||||
|
# Return capitalized article to use for type in English text
|
||||||
|
Conv_A = \
|
||||||
|
$(if $(filter int, $1), An, A)
|
||||||
|
|
||||||
|
# Return integer type with same size as the type
|
||||||
|
Conv_memtype = \
|
||||||
|
$(if $(filter float, $1), int, $(if $(filter double, $1), long, $1))
|
||||||
|
|
||||||
|
# Return capitalized integer type with same size as the type
|
||||||
|
Conv_Memtype = \
|
||||||
|
$(call titlecase, $(call Conv, $1, memtype))
|
||||||
|
|
||||||
|
# Return capitalized full descriptive name for integer type with same size as the type
|
||||||
|
Conv_FullMemtype = \
|
||||||
|
$(call Conv, $(call Conv, $1, memtype), Fulltype)
|
||||||
|
|
||||||
|
# Return Type or Memtype depending on byte order
|
||||||
|
# arg $2: BYTE_ORDER
|
||||||
|
Conv_Swaptype = \
|
||||||
|
$(if $(filter U, $2), \
|
||||||
|
$(call Conv, $1, Type), \
|
||||||
|
$(call Conv, $1, Memtype))
|
||||||
|
|
||||||
|
# Return fromBits method name for floating types, depending on byte order
|
||||||
|
# arg $2: BYTE_ORDER
|
||||||
|
Conv_fromBits = \
|
||||||
|
$(if $(filter float double, $1), \
|
||||||
|
$(if $(filter U, $2), , \
|
||||||
|
$(call Conv, $1, Type).$(call Conv, $1, memtype)BitsTo$(call Conv, $1, Type)))
|
||||||
|
|
||||||
|
# Return toBits method name for floating types, depending on byte order
|
||||||
|
# arg $2: BYTE_ORDER
|
||||||
|
Conv_toBits = \
|
||||||
|
$(if $(filter float double, $1), \
|
||||||
|
$(if $(filter U, $2), , \
|
||||||
|
$(call Conv, $1, Type).$1ToRaw$(call Conv, $(call Conv, $1, memtype), Type)Bits))
|
||||||
|
|
||||||
|
# Return swap method name, depending on byte order
|
||||||
|
# arg $2: BYTE_ORDER
|
||||||
|
Conv_swap = \
|
||||||
|
$(if $(filter S, $2), Bits.swap)
|
||||||
|
|
||||||
|
# Return word describing the number of bytes required by type
|
||||||
|
Conv_nbytes = \
|
||||||
|
$(if $(filter 0, $(call Conv, $1, LBPV)), one, \
|
||||||
|
$(if $(filter 1, $(call Conv, $1, LBPV)), two, \
|
||||||
|
$(if $(filter 2, $(call Conv, $1, LBPV)), four, \
|
||||||
|
$(if $(filter 3, $(call Conv, $1, LBPV)), eight))))
|
||||||
|
|
||||||
|
# Return word describing the number of bytes required by type, minus one
|
||||||
|
Conv_nbytesButOne = \
|
||||||
|
$(if $(filter 0, $(call Conv, $1, LBPV)), zero, \
|
||||||
|
$(if $(filter 1, $(call Conv, $1, LBPV)), one, \
|
||||||
|
$(if $(filter 2, $(call Conv, $1, LBPV)), three, \
|
||||||
|
$(if $(filter 3, $(call Conv, $1, LBPV)), seven))))
|
||||||
|
|
||||||
|
################################################################################
|
||||||
|
# Setup make rules that runs the spp.Spp build tool on an input file.
|
||||||
|
#
|
||||||
|
# Parameter 1 is the name of the rule. This name is used as variable prefix,
|
||||||
|
# and the targets generated are listed in a variable by that name.
|
||||||
|
#
|
||||||
|
# Remaining parameters are named arguments. These include:
|
||||||
|
# BEGIN_END Set to true to exclude everything outside #begin/#end (default: false)
|
||||||
|
# SUBST_EMPTY_LINES Set to false to not generate empty lines for removed lines (default: true)
|
||||||
|
# SOURCE_FILE The input file to process (required)
|
||||||
|
# OUTPUT_FILE The output file (required)
|
||||||
|
# INFO Override default message to print (optional)
|
||||||
|
# KEYS One or more keys to control the generation (optional)
|
||||||
|
# REPLACEMENTS one or more text replacement patterns, using the syntax:
|
||||||
|
# VAR=VALUE [VAR=VALUE] ...
|
||||||
|
#
|
||||||
|
SetupStreamPreProcessing = $(NamedParamsMacroTemplate)
|
||||||
|
define SetupStreamPreProcessingBody
|
||||||
|
# Verify arguments
|
||||||
|
ifeq ($$($1_SOURCE_FILE), )
|
||||||
|
$$(error Must specify SOURCE_FILE (in $1))
|
||||||
|
endif
|
||||||
|
ifeq ($$($1_OUTPUT_FILE), )
|
||||||
|
$$(error Must specify OUTPUT_FILE (in $1))
|
||||||
|
endif
|
||||||
|
|
||||||
|
$1_COMMAND_LINE :=
|
||||||
|
ifeq ($$($1_BEGIN_END), true)
|
||||||
|
$1_COMMAND_LINE += -be
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifeq ($$($1_SUBST_EMPTY_LINES), false)
|
||||||
|
$1_COMMAND_LINE += -nel
|
||||||
|
endif
|
||||||
|
|
||||||
|
$1_COMMAND_LINE += $$(foreach k, $$($1_KEYS), -K$$k)
|
||||||
|
$1_COMMAND_LINE += $$(subst $$$$(SPACE), ,$$(foreach d, $$($1_REPLACEMENTS), -D$$d))
|
||||||
|
|
||||||
|
$1_COMMAND_LINE += -i$$($1_SOURCE_FILE) -o$$($1_OUTPUT_FILE).tmp
|
||||||
|
|
||||||
|
ifeq ($$($1_INFO), )
|
||||||
|
$1_INFO := Preprocessing $$(notdir $$($1_SOURCE_FILE)) for $(MODULE)
|
||||||
|
endif
|
||||||
|
|
||||||
|
$$(eval $$(call SetupExecute, RUN_SPP_$1, \
|
||||||
|
INFO := $$($1_INFO), \
|
||||||
|
DEPS := $$($1_SOURCE_FILE) $$(BUILD_TOOLS_JDK), \
|
||||||
|
OUTPUT_FILE := $$($1_OUTPUT_FILE), \
|
||||||
|
COMMAND := $$(TOOL_SPP) $$($1_COMMAND_LINE), \
|
||||||
|
PRE_COMMAND := $$(RM) $$($1_OUTPUT_FILE).tmp $$($1_OUTPUT_FILE), \
|
||||||
|
POST_COMMAND := $$(MV) $$($1_OUTPUT_FILE).tmp $$($1_OUTPUT_FILE), \
|
||||||
|
))
|
||||||
|
|
||||||
|
$1 += $$(RUN_SPP_$1)
|
||||||
|
endef
|
||||||
|
|
||||||
|
################################################################################
|
||||||
|
|
||||||
|
endif # include guard
|
||||||
|
include MakeIncludeEnd.gmk
|
||||||
@@ -236,7 +236,7 @@ define CreateCompiledNativeFileBody
|
|||||||
# For assembler calls just create empty dependency lists
|
# For assembler calls just create empty dependency lists
|
||||||
$$(call ExecuteWithLog, $$@, $$(call MakeCommandRelative, \
|
$$(call ExecuteWithLog, $$@, $$(call MakeCommandRelative, \
|
||||||
$$($1_COMPILER) $$($1_FLAGS) \
|
$$($1_COMPILER) $$($1_FLAGS) \
|
||||||
$(CC_OUT_OPTION)$$($1_OBJ) -Ta $$($1_SRC_FILE))) \
|
$(CC_OUT_OPTION)$$($1_OBJ) $(AS_NON_ASM_EXTENSION_OPTION) $$($1_SRC_FILE))) \
|
||||||
| $(TR) -d '\r' | $(GREP) -v -e "Assembling:" || test "$$$$?" = "1" ; \
|
| $(TR) -d '\r' | $(GREP) -v -e "Assembling:" || test "$$$$?" = "1" ; \
|
||||||
$(ECHO) > $$($1_DEPS_FILE) ; \
|
$(ECHO) > $$($1_DEPS_FILE) ; \
|
||||||
$(ECHO) > $$($1_DEPS_TARGETS_FILE)
|
$(ECHO) > $$($1_DEPS_TARGETS_FILE)
|
||||||
|
|||||||
@@ -113,9 +113,10 @@ define CreateDynamicLibraryOrExecutableMicrosoft
|
|||||||
$$(CHMOD) +x $$($1_TARGET)
|
$$(CHMOD) +x $$($1_TARGET)
|
||||||
endif
|
endif
|
||||||
ifneq ($$($1_MANIFEST), )
|
ifneq ($$($1_MANIFEST), )
|
||||||
|
$$(call ExecuteWithLog, $$($1_OBJECT_DIR)/$$($1_SAFE_NAME)_run_mt, \
|
||||||
$$($1_MT) -nologo -manifest $$($1_MANIFEST) \
|
$$($1_MT) -nologo -manifest $$($1_MANIFEST) \
|
||||||
-identity:"$$($1_NAME).exe, version=$$($1_MANIFEST_VERSION)" \
|
-identity:"$$($1_NAME).exe$$(COMMA) version=$$($1_MANIFEST_VERSION)" \
|
||||||
-outputresource:$$@;#1
|
'-outputresource:$$($1_TARGET);$$(HASH)1')
|
||||||
endif
|
endif
|
||||||
ifneq ($(SIGNING_HOOK), )
|
ifneq ($(SIGNING_HOOK), )
|
||||||
$$(call ExecuteWithLog, $$($1_OBJECT_DIR)/$$($1_SAFE_NAME)_call_signing_hook, \
|
$$(call ExecuteWithLog, $$($1_OBJECT_DIR)/$$($1_SAFE_NAME)_call_signing_hook, \
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
# Copyright (c) 2014, 2023, Oracle and/or its affiliates. All rights reserved.
|
# Copyright (c) 2014, 2025, Oracle and/or its affiliates. All rights reserved.
|
||||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
#
|
#
|
||||||
# This code is free software; you can redistribute it and/or modify it
|
# This code is free software; you can redistribute it and/or modify it
|
||||||
@@ -51,7 +51,6 @@ DOCS_MODULES= \
|
|||||||
jdk.jdwp.agent \
|
jdk.jdwp.agent \
|
||||||
jdk.jfr \
|
jdk.jfr \
|
||||||
jdk.jlink \
|
jdk.jlink \
|
||||||
jdk.jsobject \
|
|
||||||
jdk.jshell \
|
jdk.jshell \
|
||||||
jdk.jstatd \
|
jdk.jstatd \
|
||||||
jdk.localedata \
|
jdk.localedata \
|
||||||
|
|||||||
@@ -26,7 +26,7 @@
|
|||||||
# Versions and download locations for dependencies used by GitHub Actions (GHA)
|
# Versions and download locations for dependencies used by GitHub Actions (GHA)
|
||||||
|
|
||||||
GTEST_VERSION=1.14.0
|
GTEST_VERSION=1.14.0
|
||||||
JTREG_VERSION=7.5.1+1
|
JTREG_VERSION=7.5.2+1
|
||||||
|
|
||||||
LINUX_X64_BOOT_JDK_EXT=tar.gz
|
LINUX_X64_BOOT_JDK_EXT=tar.gz
|
||||||
LINUX_X64_BOOT_JDK_URL=https://download.java.net/java/GA/jdk24/1f9ff9062db4449d8ca828c504ffae90/36/GPL/openjdk-24_linux-x64_bin.tar.gz
|
LINUX_X64_BOOT_JDK_URL=https://download.java.net/java/GA/jdk24/1f9ff9062db4449d8ca828c504ffae90/36/GPL/openjdk-24_linux-x64_bin.tar.gz
|
||||||
|
|||||||
@@ -1174,9 +1174,9 @@ var getJibProfilesDependencies = function (input, common) {
|
|||||||
jtreg: {
|
jtreg: {
|
||||||
server: "jpg",
|
server: "jpg",
|
||||||
product: "jtreg",
|
product: "jtreg",
|
||||||
version: "7.5.1",
|
version: "7.5.2",
|
||||||
build_number: "1",
|
build_number: "1",
|
||||||
file: "bundles/jtreg-7.5.1+1.zip",
|
file: "bundles/jtreg-7.5.2+1.zip",
|
||||||
environment_name: "JT_HOME",
|
environment_name: "JT_HOME",
|
||||||
environment_path: input.get("jtreg", "home_path") + "/bin",
|
environment_path: input.get("jtreg", "home_path") + "/bin",
|
||||||
configure_args: "--with-jtreg=" + input.get("jtreg", "home_path"),
|
configure_args: "--with-jtreg=" + input.get("jtreg", "home_path"),
|
||||||
@@ -1192,8 +1192,8 @@ var getJibProfilesDependencies = function (input, common) {
|
|||||||
server: "jpg",
|
server: "jpg",
|
||||||
product: "jcov",
|
product: "jcov",
|
||||||
version: "3.0",
|
version: "3.0",
|
||||||
build_number: "1",
|
build_number: "3",
|
||||||
file: "bundles/jcov-3.0+1.zip",
|
file: "bundles/jcov-3.0+3.zip",
|
||||||
environment_name: "JCOV_HOME",
|
environment_name: "JCOV_HOME",
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@@ -62,7 +62,6 @@ UPGRADEABLE_PLATFORM_MODULES= \
|
|||||||
java.compiler \
|
java.compiler \
|
||||||
jdk.graal.compiler \
|
jdk.graal.compiler \
|
||||||
jdk.graal.compiler.management \
|
jdk.graal.compiler.management \
|
||||||
jdk.jsobject \
|
|
||||||
#
|
#
|
||||||
|
|
||||||
PLATFORM_MODULES= \
|
PLATFORM_MODULES= \
|
||||||
|
|||||||
@@ -26,17 +26,17 @@
|
|||||||
# Default version, product, and vendor information to use,
|
# Default version, product, and vendor information to use,
|
||||||
# unless overridden by configure
|
# unless overridden by configure
|
||||||
|
|
||||||
DEFAULT_VERSION_FEATURE=25
|
DEFAULT_VERSION_FEATURE=26
|
||||||
DEFAULT_VERSION_INTERIM=0
|
DEFAULT_VERSION_INTERIM=0
|
||||||
DEFAULT_VERSION_UPDATE=0
|
DEFAULT_VERSION_UPDATE=0
|
||||||
DEFAULT_VERSION_PATCH=0
|
DEFAULT_VERSION_PATCH=0
|
||||||
DEFAULT_VERSION_EXTRA1=0
|
DEFAULT_VERSION_EXTRA1=0
|
||||||
DEFAULT_VERSION_EXTRA2=0
|
DEFAULT_VERSION_EXTRA2=0
|
||||||
DEFAULT_VERSION_EXTRA3=0
|
DEFAULT_VERSION_EXTRA3=0
|
||||||
DEFAULT_VERSION_DATE=2025-09-16
|
DEFAULT_VERSION_DATE=2026-03-17
|
||||||
DEFAULT_VERSION_CLASSFILE_MAJOR=69 # "`$EXPR $DEFAULT_VERSION_FEATURE + 44`"
|
DEFAULT_VERSION_CLASSFILE_MAJOR=70 # "`$EXPR $DEFAULT_VERSION_FEATURE + 44`"
|
||||||
DEFAULT_VERSION_CLASSFILE_MINOR=0
|
DEFAULT_VERSION_CLASSFILE_MINOR=0
|
||||||
DEFAULT_VERSION_DOCS_API_SINCE=11
|
DEFAULT_VERSION_DOCS_API_SINCE=11
|
||||||
DEFAULT_ACCEPTABLE_BOOT_VERSIONS="24 25"
|
DEFAULT_ACCEPTABLE_BOOT_VERSIONS="24 25 26"
|
||||||
DEFAULT_JDK_SOURCE_TARGET_VERSION=25
|
DEFAULT_JDK_SOURCE_TARGET_VERSION=26
|
||||||
DEFAULT_PROMOTED_VERSION_PRE=ea
|
DEFAULT_PROMOTED_VERSION_PRE=ea
|
||||||
|
|||||||
@@ -67,6 +67,8 @@ ATTRIBUTE_DEFAULT_VISIBILITY ATTRIBUTE_USED const char* CDECL __asan_default_opt
|
|||||||
#endif
|
#endif
|
||||||
"print_suppressions=0,"
|
"print_suppressions=0,"
|
||||||
"handle_segv=0,"
|
"handle_segv=0,"
|
||||||
|
// A lot of libjsig related tests fail because of the link order check; so better avoid it
|
||||||
|
"verify_asan_link_order=0,"
|
||||||
// See https://github.com/google/sanitizers/issues/1322. Hopefully this is resolved
|
// See https://github.com/google/sanitizers/issues/1322. Hopefully this is resolved
|
||||||
// at some point and we can remove this option.
|
// at some point and we can remove this option.
|
||||||
"intercept_tls_get_addr=0";
|
"intercept_tls_get_addr=0";
|
||||||
|
|||||||
@@ -62,5 +62,8 @@
|
|||||||
// thread so it is easier to track down. You can override these options by setting the environment
|
// thread so it is easier to track down. You can override these options by setting the environment
|
||||||
// variable UBSAN_OPTIONS.
|
// variable UBSAN_OPTIONS.
|
||||||
ATTRIBUTE_DEFAULT_VISIBILITY ATTRIBUTE_USED const char* __ubsan_default_options() {
|
ATTRIBUTE_DEFAULT_VISIBILITY ATTRIBUTE_USED const char* __ubsan_default_options() {
|
||||||
return "halt_on_error=1,print_stacktrace=1" _LLVM_SYMBOLIZER(LLVM_SYMBOLIZER);
|
return "halt_on_error=1,"
|
||||||
|
"handle_segv=0,"
|
||||||
|
"handle_sigbus=0,"
|
||||||
|
"print_stacktrace=1" _LLVM_SYMBOLIZER(LLVM_SYMBOLIZER);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -39,7 +39,7 @@
|
|||||||
#
|
#
|
||||||
# make TARGETS="aarch64-linux-gnu" BASE_OS=Fedora
|
# make TARGETS="aarch64-linux-gnu" BASE_OS=Fedora
|
||||||
# or
|
# or
|
||||||
# make TARGETS="arm-linux-gnueabihf ppc64-linux-gnu" BASE_OS=Fedora BASE_OS_VERSION=17
|
# make TARGETS="arm-linux-gnueabihf ppc64le-linux-gnu" BASE_OS=Fedora BASE_OS_VERSION=17
|
||||||
#
|
#
|
||||||
# to build several devkits for a specific OS version at once.
|
# to build several devkits for a specific OS version at once.
|
||||||
# You can find the final results under ../../build/devkit/result/<host>-to-<target>
|
# You can find the final results under ../../build/devkit/result/<host>-to-<target>
|
||||||
@@ -50,7 +50,7 @@
|
|||||||
# makefile again for cross compilation. Ex:
|
# makefile again for cross compilation. Ex:
|
||||||
#
|
#
|
||||||
# PATH=$PWD/../../build/devkit/result/x86_64-linux-gnu-to-x86_64-linux-gnu/bin:$PATH \
|
# PATH=$PWD/../../build/devkit/result/x86_64-linux-gnu-to-x86_64-linux-gnu/bin:$PATH \
|
||||||
# make TARGETS="arm-linux-gnueabihf,ppc64-linux-gnu" BASE_OS=Fedora
|
# make TARGETS="arm-linux-gnueabihf ppc64le-linux-gnu" BASE_OS=Fedora
|
||||||
#
|
#
|
||||||
# This is the makefile which iterates over all host and target platforms.
|
# This is the makefile which iterates over all host and target platforms.
|
||||||
#
|
#
|
||||||
|
|||||||
@@ -69,15 +69,26 @@ else ifeq ($(BASE_OS), Fedora)
|
|||||||
ifeq ($(BASE_OS_VERSION), )
|
ifeq ($(BASE_OS_VERSION), )
|
||||||
BASE_OS_VERSION := $(DEFAULT_OS_VERSION)
|
BASE_OS_VERSION := $(DEFAULT_OS_VERSION)
|
||||||
endif
|
endif
|
||||||
|
ifeq ($(filter aarch64 armhfp ppc64le riscv64 s390x x86_64, $(ARCH)), )
|
||||||
|
$(error Only "aarch64 armhfp ppc64le riscv64 s390x x86_64" architectures are supported for Fedora, but "$(ARCH)" was requested)
|
||||||
|
endif
|
||||||
ifeq ($(ARCH), riscv64)
|
ifeq ($(ARCH), riscv64)
|
||||||
|
ifeq ($(filter 38 39 40 41, $(BASE_OS_VERSION)), )
|
||||||
|
$(error Only Fedora 38-41 are supported for "$(ARCH)", but Fedora $(BASE_OS_VERSION) was requested)
|
||||||
|
endif
|
||||||
BASE_URL := http://fedora.riscv.rocks/repos-dist/f$(BASE_OS_VERSION)/latest/$(ARCH)/Packages/
|
BASE_URL := http://fedora.riscv.rocks/repos-dist/f$(BASE_OS_VERSION)/latest/$(ARCH)/Packages/
|
||||||
else
|
else
|
||||||
LATEST_ARCHIVED_OS_VERSION := 35
|
LATEST_ARCHIVED_OS_VERSION := 36
|
||||||
ifeq ($(filter x86_64 armhfp, $(ARCH)), )
|
ifeq ($(filter aarch64 armhfp x86_64, $(ARCH)), )
|
||||||
FEDORA_TYPE := fedora-secondary
|
FEDORA_TYPE := fedora-secondary
|
||||||
else
|
else
|
||||||
FEDORA_TYPE := fedora/linux
|
FEDORA_TYPE := fedora/linux
|
||||||
endif
|
endif
|
||||||
|
ifeq ($(ARCH), armhfp)
|
||||||
|
ifneq ($(BASE_OS_VERSION), 36)
|
||||||
|
$(error Fedora 36 is the last release supporting "armhfp", but $(BASE_OS) was requested)
|
||||||
|
endif
|
||||||
|
endif
|
||||||
NOT_ARCHIVED := $(shell [ $(BASE_OS_VERSION) -gt $(LATEST_ARCHIVED_OS_VERSION) ] && echo true)
|
NOT_ARCHIVED := $(shell [ $(BASE_OS_VERSION) -gt $(LATEST_ARCHIVED_OS_VERSION) ] && echo true)
|
||||||
ifeq ($(NOT_ARCHIVED),true)
|
ifeq ($(NOT_ARCHIVED),true)
|
||||||
BASE_URL := https://dl.fedoraproject.org/pub/$(FEDORA_TYPE)/releases/$(BASE_OS_VERSION)/Everything/$(ARCH)/os/Packages/
|
BASE_URL := https://dl.fedoraproject.org/pub/$(FEDORA_TYPE)/releases/$(BASE_OS_VERSION)/Everything/$(ARCH)/os/Packages/
|
||||||
@@ -464,7 +475,7 @@ ifeq ($(ARCH), armhfp)
|
|||||||
$(BUILDDIR)/$(gcc_ver)/Makefile : CONFIG += --with-float=hard
|
$(BUILDDIR)/$(gcc_ver)/Makefile : CONFIG += --with-float=hard
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifneq ($(filter riscv64 ppc64 ppc64le s390x, $(ARCH)), )
|
ifneq ($(filter riscv64 ppc64le s390x, $(ARCH)), )
|
||||||
# We only support 64-bit on these platforms anyway
|
# We only support 64-bit on these platforms anyway
|
||||||
CONFIG += --disable-multilib
|
CONFIG += --disable-multilib
|
||||||
endif
|
endif
|
||||||
|
|||||||
@@ -64,6 +64,30 @@ IS_WSL=`echo $UNAME_RELEASE | grep Microsoft`
|
|||||||
IS_MSYS=`echo $UNAME_OS | grep -i Msys`
|
IS_MSYS=`echo $UNAME_OS | grep -i Msys`
|
||||||
MSYS2_ARG_CONV_EXCL="*" # make "cmd.exe /c" work for msys2
|
MSYS2_ARG_CONV_EXCL="*" # make "cmd.exe /c" work for msys2
|
||||||
CMD_EXE="cmd.exe /c"
|
CMD_EXE="cmd.exe /c"
|
||||||
|
|
||||||
|
# Detect host architecture to determine devkit platform support
|
||||||
|
# Note: The devkit always includes x86, x64, and aarch64 libraries and tools
|
||||||
|
# The difference is in toolchain capabilities:
|
||||||
|
# - On x64|AMD64 hosts: aarch64 tools are cross-compilation tools (Hostx64/arm64)
|
||||||
|
# - On aarch64|ARMv8 hosts: aarch64 tools are native tools (Hostarm64/arm64)
|
||||||
|
HOST_ARCH=`echo $PROCESSOR_IDENTIFIER`
|
||||||
|
case $HOST_ARCH in
|
||||||
|
AMD64)
|
||||||
|
echo "Running on x64 host - generating devkit with native x86/x64 tools and cross-compiled aarch64 tools."
|
||||||
|
echo "For native aarch64 compilation tools, run this script on a Windows/aarch64 machine."
|
||||||
|
SUPPORTED_PLATFORMS="x86, x64 (native) and aarch64 (cross-compiled)"
|
||||||
|
;;
|
||||||
|
ARMv8)
|
||||||
|
echo "Running on aarch64 host - generating devkit with native tools for all platforms (x86, x64, aarch64)."
|
||||||
|
SUPPORTED_PLATFORMS="x86, x64, and aarch64 (all native)"
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "Unknown host architecture: $HOST_ARCH"
|
||||||
|
echo "Proceeding with devkit generation - toolchain capabilities may vary."
|
||||||
|
SUPPORTED_PLATFORMS="x86, x64, and aarch64"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
if test "x$IS_CYGWIN" != "x"; then
|
if test "x$IS_CYGWIN" != "x"; then
|
||||||
BUILD_ENV="cygwin"
|
BUILD_ENV="cygwin"
|
||||||
elif test "x$IS_MSYS" != "x"; then
|
elif test "x$IS_MSYS" != "x"; then
|
||||||
@@ -139,6 +163,7 @@ DEVKIT_ROOT="${BUILD_DIR}/VS${VS_VERSION}-${VS_VERSION_SP}-devkit"
|
|||||||
DEVKIT_BUNDLE="${DEVKIT_ROOT}.tar.gz"
|
DEVKIT_BUNDLE="${DEVKIT_ROOT}.tar.gz"
|
||||||
|
|
||||||
echo "Creating devkit in $DEVKIT_ROOT"
|
echo "Creating devkit in $DEVKIT_ROOT"
|
||||||
|
echo "Platform support: $SUPPORTED_PLATFORMS"
|
||||||
|
|
||||||
MSVCR_DLL=${MSVC_CRT_DIR}/vcruntime${VS_DLL_VERSION}.dll
|
MSVCR_DLL=${MSVC_CRT_DIR}/vcruntime${VS_DLL_VERSION}.dll
|
||||||
VCRUNTIME_1_DLL=${MSVC_CRT_DIR}/vcruntime${VS_DLL_VERSION}_1.dll
|
VCRUNTIME_1_DLL=${MSVC_CRT_DIR}/vcruntime${VS_DLL_VERSION}_1.dll
|
||||||
@@ -156,7 +181,11 @@ REDIST_SUBDIR="VC/Redist/MSVC/$REDIST_VERSION"
|
|||||||
echo "Copying VC..."
|
echo "Copying VC..."
|
||||||
rm -rf $DEVKIT_ROOT/VC
|
rm -rf $DEVKIT_ROOT/VC
|
||||||
mkdir -p $DEVKIT_ROOT/VC/bin
|
mkdir -p $DEVKIT_ROOT/VC/bin
|
||||||
|
if [ -d "$VS_INSTALL_DIR/${VC_SUBDIR}/bin/Hostarm64/arm64" ]; then
|
||||||
|
cp -r "$VS_INSTALL_DIR/${VC_SUBDIR}/bin/Hostarm64/arm64" $DEVKIT_ROOT/VC/bin/
|
||||||
|
else
|
||||||
cp -r "$VS_INSTALL_DIR/${VC_SUBDIR}/bin/Hostx64/arm64" $DEVKIT_ROOT/VC/bin/
|
cp -r "$VS_INSTALL_DIR/${VC_SUBDIR}/bin/Hostx64/arm64" $DEVKIT_ROOT/VC/bin/
|
||||||
|
fi
|
||||||
cp -r "$VS_INSTALL_DIR/${VC_SUBDIR}/bin/Hostx64/x64" $DEVKIT_ROOT/VC/bin/
|
cp -r "$VS_INSTALL_DIR/${VC_SUBDIR}/bin/Hostx64/x64" $DEVKIT_ROOT/VC/bin/
|
||||||
cp -r "$VS_INSTALL_DIR/${VC_SUBDIR}/bin/Hostx86/x86" $DEVKIT_ROOT/VC/bin/
|
cp -r "$VS_INSTALL_DIR/${VC_SUBDIR}/bin/Hostx86/x86" $DEVKIT_ROOT/VC/bin/
|
||||||
mkdir -p $DEVKIT_ROOT/VC/lib
|
mkdir -p $DEVKIT_ROOT/VC/lib
|
||||||
|
|||||||
@@ -47,8 +47,9 @@ ifeq ($(call check-jvm-feature, dtrace), true)
|
|||||||
$(call LogInfo, Generating dtrace header file $(@F))
|
$(call LogInfo, Generating dtrace header file $(@F))
|
||||||
$(call MakeDir, $(@D) $(DTRACE_SUPPORT_DIR))
|
$(call MakeDir, $(@D) $(DTRACE_SUPPORT_DIR))
|
||||||
$(call ExecuteWithLog, $(DTRACE_SUPPORT_DIR)/$(@F).d, \
|
$(call ExecuteWithLog, $(DTRACE_SUPPORT_DIR)/$(@F).d, \
|
||||||
($(CPP) $(DTRACE_CPP_FLAGS) $(SYSROOT_CFLAGS) $< > $(DTRACE_SUPPORT_DIR)/$(@F).d))
|
$(CPP) $(DTRACE_CPP_FLAGS) $(SYSROOT_CFLAGS) $< > $(DTRACE_SUPPORT_DIR)/$(@F).d)
|
||||||
$(call ExecuteWithLog, $@, $(DTRACE) $(DTRACE_FLAGS) -h -o $@ -s $(DTRACE_SUPPORT_DIR)/$(@F).d)
|
$(call ExecuteWithLog, $@, \
|
||||||
|
$(DTRACE) $(DTRACE_FLAGS) -h -o $@ -s $(DTRACE_SUPPORT_DIR)/$(@F).d)
|
||||||
|
|
||||||
# Process all .d files in DTRACE_SOURCE_DIR. They are:
|
# Process all .d files in DTRACE_SOURCE_DIR. They are:
|
||||||
# hotspot_jni.d hotspot.d hs_private.d
|
# hotspot_jni.d hotspot.d hs_private.d
|
||||||
|
|||||||
@@ -62,13 +62,13 @@ $(eval $(call SetupJdkLibrary, BUILD_GTEST_LIBGTEST, \
|
|||||||
DISABLED_WARNINGS_gcc := format-nonliteral maybe-uninitialized undef \
|
DISABLED_WARNINGS_gcc := format-nonliteral maybe-uninitialized undef \
|
||||||
unused-result zero-as-null-pointer-constant, \
|
unused-result zero-as-null-pointer-constant, \
|
||||||
DISABLED_WARNINGS_clang := format-nonliteral undef unused-result, \
|
DISABLED_WARNINGS_clang := format-nonliteral undef unused-result, \
|
||||||
|
DISABLED_WARNINGS_microsoft := 4530, \
|
||||||
DEFAULT_CFLAGS := false, \
|
DEFAULT_CFLAGS := false, \
|
||||||
CFLAGS := $(JVM_CFLAGS) \
|
CFLAGS := $(JVM_CFLAGS) \
|
||||||
-I$(GTEST_FRAMEWORK_SRC)/googletest \
|
-I$(GTEST_FRAMEWORK_SRC)/googletest \
|
||||||
-I$(GTEST_FRAMEWORK_SRC)/googletest/include \
|
-I$(GTEST_FRAMEWORK_SRC)/googletest/include \
|
||||||
-I$(GTEST_FRAMEWORK_SRC)/googlemock \
|
-I$(GTEST_FRAMEWORK_SRC)/googlemock \
|
||||||
-I$(GTEST_FRAMEWORK_SRC)/googlemock/include, \
|
-I$(GTEST_FRAMEWORK_SRC)/googlemock/include, \
|
||||||
CFLAGS_windows := -EHsc, \
|
|
||||||
CFLAGS_macosx := -DGTEST_OS_MAC=1, \
|
CFLAGS_macosx := -DGTEST_OS_MAC=1, \
|
||||||
OPTIMIZATION := $(JVM_OPTIMIZATION), \
|
OPTIMIZATION := $(JVM_OPTIMIZATION), \
|
||||||
COPY_DEBUG_SYMBOLS := $(GTEST_COPY_DEBUG_SYMBOLS), \
|
COPY_DEBUG_SYMBOLS := $(GTEST_COPY_DEBUG_SYMBOLS), \
|
||||||
@@ -98,7 +98,6 @@ $(eval $(call SetupJdkLibrary, BUILD_GTEST_LIBJVM, \
|
|||||||
-I$(GTEST_FRAMEWORK_SRC)/googletest/include \
|
-I$(GTEST_FRAMEWORK_SRC)/googletest/include \
|
||||||
-I$(GTEST_FRAMEWORK_SRC)/googlemock/include \
|
-I$(GTEST_FRAMEWORK_SRC)/googlemock/include \
|
||||||
$(addprefix -I, $(GTEST_TEST_SRC)), \
|
$(addprefix -I, $(GTEST_TEST_SRC)), \
|
||||||
CFLAGS_windows := -EHsc, \
|
|
||||||
CFLAGS_macosx := -DGTEST_OS_MAC=1, \
|
CFLAGS_macosx := -DGTEST_OS_MAC=1, \
|
||||||
DISABLED_WARNINGS_gcc := $(DISABLED_WARNINGS_gcc) \
|
DISABLED_WARNINGS_gcc := $(DISABLED_WARNINGS_gcc) \
|
||||||
undef stringop-overflow, \
|
undef stringop-overflow, \
|
||||||
@@ -110,7 +109,7 @@ $(eval $(call SetupJdkLibrary, BUILD_GTEST_LIBJVM, \
|
|||||||
self-assign-overloaded, \
|
self-assign-overloaded, \
|
||||||
DISABLED_WARNINGS_clang_test_g1ServiceThread.cpp := delete-abstract-non-virtual-dtor, \
|
DISABLED_WARNINGS_clang_test_g1ServiceThread.cpp := delete-abstract-non-virtual-dtor, \
|
||||||
DISABLED_WARNINGS_clang_test_logDecorations.cpp := missing-field-initializers, \
|
DISABLED_WARNINGS_clang_test_logDecorations.cpp := missing-field-initializers, \
|
||||||
DISABLED_WARNINGS_microsoft := $(DISABLED_WARNINGS_microsoft), \
|
DISABLED_WARNINGS_microsoft := $(DISABLED_WARNINGS_microsoft) 4530, \
|
||||||
LD_SET_ORIGIN := false, \
|
LD_SET_ORIGIN := false, \
|
||||||
DEFAULT_LDFLAGS := false, \
|
DEFAULT_LDFLAGS := false, \
|
||||||
LDFLAGS := $(JVM_LDFLAGS), \
|
LDFLAGS := $(JVM_LDFLAGS), \
|
||||||
|
|||||||
@@ -97,11 +97,13 @@ CFLAGS_VM_VERSION := \
|
|||||||
|
|
||||||
DISABLED_WARNINGS_gcc := array-bounds comment delete-non-virtual-dtor \
|
DISABLED_WARNINGS_gcc := array-bounds comment delete-non-virtual-dtor \
|
||||||
empty-body format-zero-length implicit-fallthrough int-in-bool-context \
|
empty-body format-zero-length implicit-fallthrough int-in-bool-context \
|
||||||
|
invalid-offsetof \
|
||||||
maybe-uninitialized missing-field-initializers \
|
maybe-uninitialized missing-field-initializers \
|
||||||
shift-negative-value unknown-pragmas unused-but-set-variable \
|
shift-negative-value unknown-pragmas unused-but-set-variable \
|
||||||
unused-local-typedefs unused-variable
|
unused-local-typedefs unused-variable
|
||||||
|
|
||||||
DISABLED_WARNINGS_clang := delete-non-abstract-non-virtual-dtor missing-braces \
|
DISABLED_WARNINGS_clang := delete-non-abstract-non-virtual-dtor \
|
||||||
|
invalid-offsetof missing-braces \
|
||||||
sometimes-uninitialized unknown-pragmas unused-but-set-variable \
|
sometimes-uninitialized unknown-pragmas unused-but-set-variable \
|
||||||
unused-function unused-local-typedef unused-private-field unused-variable
|
unused-function unused-local-typedef unused-private-field unused-variable
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
// Configure cpptools IntelliSense
|
// Configure cpptools IntelliSense
|
||||||
"C_Cpp.intelliSenseCachePath": "{{OUTPUTDIR}}/.vscode",
|
"C_Cpp.intelliSenseCachePath": "{{OUTPUTDIR}}/.vscode",
|
||||||
"C_Cpp.default.compileCommands": "{{OUTPUTDIR}}/compile_commands.json",
|
"C_Cpp.default.compileCommands": "{{OUTPUTDIR}}/compile_commands.json",
|
||||||
"C_Cpp.default.cppStandard": "c++14",
|
"C_Cpp.default.cppStandard": "c++17",
|
||||||
"C_Cpp.default.compilerPath": "{{COMPILER}}",
|
"C_Cpp.default.compilerPath": "{{COMPILER}}",
|
||||||
|
|
||||||
// Configure ccls
|
// Configure ccls
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
// Configure cpptools IntelliSense
|
// Configure cpptools IntelliSense
|
||||||
"C_Cpp.intelliSenseCachePath": "{{OUTPUTDIR}}/.vscode",
|
"C_Cpp.intelliSenseCachePath": "{{OUTPUTDIR}}/.vscode",
|
||||||
"C_Cpp.default.compileCommands": "{{OUTPUTDIR}}/compile_commands.json",
|
"C_Cpp.default.compileCommands": "{{OUTPUTDIR}}/compile_commands.json",
|
||||||
"C_Cpp.default.cppStandard": "c++14",
|
"C_Cpp.default.cppStandard": "c++17",
|
||||||
"C_Cpp.default.compilerPath": "{{COMPILER}}",
|
"C_Cpp.default.compilerPath": "{{COMPILER}}",
|
||||||
|
|
||||||
// Configure clangd
|
// Configure clangd
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
// Configure cpptools IntelliSense
|
// Configure cpptools IntelliSense
|
||||||
"C_Cpp.intelliSenseCachePath": "{{OUTPUTDIR}}/.vscode",
|
"C_Cpp.intelliSenseCachePath": "{{OUTPUTDIR}}/.vscode",
|
||||||
"C_Cpp.default.compileCommands": "{{OUTPUTDIR}}/compile_commands.json",
|
"C_Cpp.default.compileCommands": "{{OUTPUTDIR}}/compile_commands.json",
|
||||||
"C_Cpp.default.cppStandard": "c++14",
|
"C_Cpp.default.cppStandard": "c++17",
|
||||||
"C_Cpp.default.compilerPath": "{{COMPILER}}",
|
"C_Cpp.default.compilerPath": "{{COMPILER}}",
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
// Configure cpptools IntelliSense
|
// Configure cpptools IntelliSense
|
||||||
"C_Cpp.intelliSenseCachePath": "{{OUTPUTDIR}}/.vscode",
|
"C_Cpp.intelliSenseCachePath": "{{OUTPUTDIR}}/.vscode",
|
||||||
"C_Cpp.default.compileCommands": "{{OUTPUTDIR}}/compile_commands.json",
|
"C_Cpp.default.compileCommands": "{{OUTPUTDIR}}/compile_commands.json",
|
||||||
"C_Cpp.default.cppStandard": "c++14",
|
"C_Cpp.default.cppStandard": "c++17",
|
||||||
"C_Cpp.default.compilerPath": "{{COMPILER}}",
|
"C_Cpp.default.compilerPath": "{{COMPILER}}",
|
||||||
|
|
||||||
// Configure RTags
|
// Configure RTags
|
||||||
|
|||||||
@@ -12,12 +12,17 @@
|
|||||||
],
|
],
|
||||||
"extensions": {
|
"extensions": {
|
||||||
"recommendations": [
|
"recommendations": [
|
||||||
|
"oracle.oracle-java",
|
||||||
// {{INDEXER_EXTENSIONS}}
|
// {{INDEXER_EXTENSIONS}}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"settings": {
|
"settings": {
|
||||||
// {{INDEXER_SETTINGS}}
|
// {{INDEXER_SETTINGS}}
|
||||||
|
|
||||||
|
// Java extension
|
||||||
|
"jdk.project.jdkhome": "{{OUTPUTDIR}}/jdk",
|
||||||
|
"jdk.java.onSave.organizeImports": false, // prevents unnecessary changes
|
||||||
|
|
||||||
// Additional conventions
|
// Additional conventions
|
||||||
"files.associations": {
|
"files.associations": {
|
||||||
"*.gmk": "makefile"
|
"*.gmk": "makefile"
|
||||||
|
|||||||
@@ -79,6 +79,7 @@ class Bundle {
|
|||||||
"NumberElements/nan",
|
"NumberElements/nan",
|
||||||
"NumberElements/currencyDecimal",
|
"NumberElements/currencyDecimal",
|
||||||
"NumberElements/currencyGroup",
|
"NumberElements/currencyGroup",
|
||||||
|
"NumberElements/lenientMinusSigns",
|
||||||
};
|
};
|
||||||
|
|
||||||
private static final String[] TIME_PATTERN_KEYS = {
|
private static final String[] TIME_PATTERN_KEYS = {
|
||||||
@@ -542,10 +543,10 @@ class Bundle {
|
|||||||
if (pattern != null) {
|
if (pattern != null) {
|
||||||
// Perform date-time format pattern conversion which is
|
// Perform date-time format pattern conversion which is
|
||||||
// applicable to both SimpleDateFormat and j.t.f.DateTimeFormatter.
|
// applicable to both SimpleDateFormat and j.t.f.DateTimeFormatter.
|
||||||
String transPattern = translateDateFormatLetters(calendarType, pattern, this::convertDateTimePatternLetter);
|
String transPattern = translateDateFormatLetters(calendarType, key, pattern, this::convertDateTimePatternLetter);
|
||||||
dateTimePatterns.add(i, transPattern);
|
dateTimePatterns.add(i, transPattern);
|
||||||
// Additionally, perform SDF specific date-time format pattern conversion
|
// Additionally, perform SDF specific date-time format pattern conversion
|
||||||
sdfPatterns.add(i, translateDateFormatLetters(calendarType, transPattern, this::convertSDFLetter));
|
sdfPatterns.add(i, translateDateFormatLetters(calendarType, key, transPattern, this::convertSDFLetter));
|
||||||
} else {
|
} else {
|
||||||
dateTimePatterns.add(i, null);
|
dateTimePatterns.add(i, null);
|
||||||
sdfPatterns.add(i, null);
|
sdfPatterns.add(i, null);
|
||||||
@@ -568,7 +569,7 @@ class Bundle {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private String translateDateFormatLetters(CalendarType calendarType, String cldrFormat, ConvertDateTimeLetters converter) {
|
private String translateDateFormatLetters(CalendarType calendarType, String patternKey, String cldrFormat, ConvertDateTimeLetters converter) {
|
||||||
String pattern = cldrFormat;
|
String pattern = cldrFormat;
|
||||||
int length = pattern.length();
|
int length = pattern.length();
|
||||||
boolean inQuote = false;
|
boolean inQuote = false;
|
||||||
@@ -587,7 +588,7 @@ class Bundle {
|
|||||||
if (nextc == '\'') {
|
if (nextc == '\'') {
|
||||||
i++;
|
i++;
|
||||||
if (count != 0) {
|
if (count != 0) {
|
||||||
converter.convert(calendarType, lastLetter, count, jrePattern);
|
converter.convert(calendarType, patternKey, lastLetter, count, jrePattern);
|
||||||
lastLetter = 0;
|
lastLetter = 0;
|
||||||
count = 0;
|
count = 0;
|
||||||
}
|
}
|
||||||
@@ -597,7 +598,7 @@ class Bundle {
|
|||||||
}
|
}
|
||||||
if (!inQuote) {
|
if (!inQuote) {
|
||||||
if (count != 0) {
|
if (count != 0) {
|
||||||
converter.convert(calendarType, lastLetter, count, jrePattern);
|
converter.convert(calendarType, patternKey, lastLetter, count, jrePattern);
|
||||||
lastLetter = 0;
|
lastLetter = 0;
|
||||||
count = 0;
|
count = 0;
|
||||||
}
|
}
|
||||||
@@ -614,7 +615,7 @@ class Bundle {
|
|||||||
}
|
}
|
||||||
if (!(c >= 'a' && c <= 'z' || c >= 'A' && c <= 'Z')) {
|
if (!(c >= 'a' && c <= 'z' || c >= 'A' && c <= 'Z')) {
|
||||||
if (count != 0) {
|
if (count != 0) {
|
||||||
converter.convert(calendarType, lastLetter, count, jrePattern);
|
converter.convert(calendarType, patternKey, lastLetter, count, jrePattern);
|
||||||
lastLetter = 0;
|
lastLetter = 0;
|
||||||
count = 0;
|
count = 0;
|
||||||
}
|
}
|
||||||
@@ -627,7 +628,7 @@ class Bundle {
|
|||||||
count++;
|
count++;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
converter.convert(calendarType, lastLetter, count, jrePattern);
|
converter.convert(calendarType, patternKey, lastLetter, count, jrePattern);
|
||||||
lastLetter = c;
|
lastLetter = c;
|
||||||
count = 1;
|
count = 1;
|
||||||
}
|
}
|
||||||
@@ -637,7 +638,7 @@ class Bundle {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (count != 0) {
|
if (count != 0) {
|
||||||
converter.convert(calendarType, lastLetter, count, jrePattern);
|
converter.convert(calendarType, patternKey, lastLetter, count, jrePattern);
|
||||||
}
|
}
|
||||||
if (cldrFormat.contentEquals(jrePattern)) {
|
if (cldrFormat.contentEquals(jrePattern)) {
|
||||||
return cldrFormat;
|
return cldrFormat;
|
||||||
@@ -661,7 +662,7 @@ class Bundle {
|
|||||||
* on the support given by the SimpleDateFormat and the j.t.f.DateTimeFormatter
|
* on the support given by the SimpleDateFormat and the j.t.f.DateTimeFormatter
|
||||||
* for date-time formatting.
|
* for date-time formatting.
|
||||||
*/
|
*/
|
||||||
private void convertDateTimePatternLetter(CalendarType calendarType, char cldrLetter, int count, StringBuilder sb) {
|
private void convertDateTimePatternLetter(CalendarType calendarType, String patternKey, char cldrLetter, int count, StringBuilder sb) {
|
||||||
switch (cldrLetter) {
|
switch (cldrLetter) {
|
||||||
case 'u':
|
case 'u':
|
||||||
case 'U':
|
case 'U':
|
||||||
@@ -683,7 +684,7 @@ class Bundle {
|
|||||||
* Perform a conversion of CLDR date-time format pattern letter which is
|
* Perform a conversion of CLDR date-time format pattern letter which is
|
||||||
* specific to the SimpleDateFormat.
|
* specific to the SimpleDateFormat.
|
||||||
*/
|
*/
|
||||||
private void convertSDFLetter(CalendarType calendarType, char cldrLetter, int count, StringBuilder sb) {
|
private void convertSDFLetter(CalendarType calendarType, String patternKey, char cldrLetter, int count, StringBuilder sb) {
|
||||||
switch (cldrLetter) {
|
switch (cldrLetter) {
|
||||||
case 'G':
|
case 'G':
|
||||||
if (calendarType != CalendarType.GREGORIAN) {
|
if (calendarType != CalendarType.GREGORIAN) {
|
||||||
@@ -722,6 +723,17 @@ class Bundle {
|
|||||||
appendN('z', count, sb);
|
appendN('z', count, sb);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case 'y':
|
||||||
|
// If the style is FULL/LONG for a Japanese Calendar, make the
|
||||||
|
// count == 4 for Gan-nen
|
||||||
|
if (calendarType == CalendarType.JAPANESE &&
|
||||||
|
(patternKey.contains("full-") ||
|
||||||
|
patternKey.contains("long-"))) {
|
||||||
|
count = 4;
|
||||||
|
}
|
||||||
|
appendN(cldrLetter, count, sb);
|
||||||
|
break;
|
||||||
|
|
||||||
case 'Z':
|
case 'Z':
|
||||||
if (count == 4 || count == 5) {
|
if (count == 4 || count == 5) {
|
||||||
sb.append("XXX");
|
sb.append("XXX");
|
||||||
@@ -767,6 +779,7 @@ class Bundle {
|
|||||||
.collect(Collectors.toMap(
|
.collect(Collectors.toMap(
|
||||||
e -> calendarPrefix + e.getKey(),
|
e -> calendarPrefix + e.getKey(),
|
||||||
e -> translateDateFormatLetters(calendarType,
|
e -> translateDateFormatLetters(calendarType,
|
||||||
|
e.getKey(),
|
||||||
(String)e.getValue(),
|
(String)e.getValue(),
|
||||||
this::convertDateTimePatternLetter)
|
this::convertDateTimePatternLetter)
|
||||||
))
|
))
|
||||||
@@ -775,7 +788,7 @@ class Bundle {
|
|||||||
|
|
||||||
@FunctionalInterface
|
@FunctionalInterface
|
||||||
private interface ConvertDateTimeLetters {
|
private interface ConvertDateTimeLetters {
|
||||||
void convert(CalendarType calendarType, char cldrLetter, int count, StringBuilder sb);
|
void convert(CalendarType calendarType, String patternKey, char cldrLetter, int count, StringBuilder sb);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -844,6 +844,26 @@ class LDMLParseHandler extends AbstractLDMLHandler<Object> {
|
|||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
// Lenient parsing
|
||||||
|
case "parseLenients":
|
||||||
|
if ("lenient".equals(attributes.getValue("level"))) {
|
||||||
|
pushKeyContainer(qName, attributes, attributes.getValue("scope"));
|
||||||
|
} else {
|
||||||
|
pushIgnoredContainer(qName);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case "parseLenient":
|
||||||
|
// Use only the lenient minus sign for now
|
||||||
|
if (currentContainer instanceof KeyContainer kc
|
||||||
|
&& kc.getKey().equals("number")
|
||||||
|
&& attributes.getValue("sample").equals("-")) {
|
||||||
|
pushStringEntry(qName, attributes, currentNumberingSystem + "NumberElements/lenientMinusSigns");
|
||||||
|
} else {
|
||||||
|
pushIgnoredContainer(qName);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
// treat anything else as a container
|
// treat anything else as a container
|
||||||
pushContainer(qName, attributes);
|
pushContainer(qName, attributes);
|
||||||
@@ -1150,6 +1170,14 @@ class LDMLParseHandler extends AbstractLDMLHandler<Object> {
|
|||||||
currentStyle = "";
|
currentStyle = "";
|
||||||
putIfEntry();
|
putIfEntry();
|
||||||
break;
|
break;
|
||||||
|
case "parseLenient":
|
||||||
|
if (currentContainer instanceof StringEntry se) {
|
||||||
|
// Convert to a simple concatenation of lenient minuses
|
||||||
|
// e.g. "[\--﹣ ‐‑ ‒ – −⁻₋ ➖]" -> "--﹣‐‑‒–−⁻₋➖" for the root locale
|
||||||
|
put(se.getKey(), se.getValue().replaceAll("[\\[\\]\\\\ ]", ""));
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
putIfEntry();
|
putIfEntry();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,73 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) 2025, 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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package build.tools.generatecharacter;
|
||||||
|
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.nio.file.Files;
|
||||||
|
import java.nio.file.Paths;
|
||||||
|
import java.nio.file.StandardOpenOption;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
import java.util.stream.Stream;
|
||||||
|
|
||||||
|
public class CaseFolding {
|
||||||
|
|
||||||
|
public static void main(String[] args) throws Throwable {
|
||||||
|
if (args.length != 3) {
|
||||||
|
System.err.println("Usage: java CaseFolding TemplateFile CaseFolding.txt CaseFolding.java");
|
||||||
|
System.exit(1);
|
||||||
|
}
|
||||||
|
var templateFile = Paths.get(args[0]);
|
||||||
|
var caseFoldingTxt = Paths.get(args[1]);
|
||||||
|
var genSrcFile = Paths.get(args[2]);
|
||||||
|
var supportedTypes = "^.*; [CTS]; .*$";
|
||||||
|
var caseFoldingEntries = Files.lines(caseFoldingTxt)
|
||||||
|
.filter(line -> !line.startsWith("#") && line.matches(supportedTypes))
|
||||||
|
.map(line -> {
|
||||||
|
String[] cols = line.split("; ");
|
||||||
|
return new String[] {cols[0], cols[1], cols[2]};
|
||||||
|
})
|
||||||
|
.filter(cols -> {
|
||||||
|
// the folding case doesn't map back to the original char.
|
||||||
|
var cp1 = Integer.parseInt(cols[0], 16);
|
||||||
|
var cp2 = Integer.parseInt(cols[2], 16);
|
||||||
|
return Character.toUpperCase(cp2) != cp1 && Character.toLowerCase(cp2) != cp1;
|
||||||
|
})
|
||||||
|
.map(cols -> String.format(" entry(0x%s, 0x%s)", cols[0], cols[2]))
|
||||||
|
.collect(Collectors.joining(",\n", "", ""));
|
||||||
|
|
||||||
|
// hack, hack, hack! the logic does not pick 0131. just add manually to support 'I's.
|
||||||
|
// 0049; T; 0131; # LATIN CAPITAL LETTER I
|
||||||
|
final String T_0x0131_0x49 = String.format(" entry(0x%04x, 0x%04x),\n", 0x0131, 0x49);
|
||||||
|
|
||||||
|
// Generate .java file
|
||||||
|
Files.write(
|
||||||
|
genSrcFile,
|
||||||
|
Files.lines(templateFile)
|
||||||
|
.map(line -> line.contains("%%%Entries") ? T_0x0131_0x49 + caseFoldingEntries : line)
|
||||||
|
.collect(Collectors.toList()),
|
||||||
|
StandardOpenOption.CREATE, StandardOpenOption.TRUNCATE_EXISTING);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,325 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) 2025, 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.
|
||||||
|
*/
|
||||||
|
|
||||||
|
package build.tools.methodhandle;
|
||||||
|
|
||||||
|
import java.io.PrintWriter;
|
||||||
|
import java.lang.classfile.TypeKind;
|
||||||
|
import java.lang.invoke.MethodType;
|
||||||
|
import java.lang.invoke.VarHandle;
|
||||||
|
import java.lang.reflect.Method;
|
||||||
|
import java.nio.charset.StandardCharsets;
|
||||||
|
import java.nio.file.Files;
|
||||||
|
import java.nio.file.Path;
|
||||||
|
import java.nio.file.StandardOpenOption;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Collections;
|
||||||
|
import java.util.LinkedHashMap;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
import java.util.stream.Stream;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A helper program to generate the VarHandleGuards class with a set of
|
||||||
|
* static guard methods each of which corresponds to a particular shape and
|
||||||
|
* performs a type check of the symbolic type descriptor with the VarHandle
|
||||||
|
* type descriptor before linking/invoking to the underlying operation as
|
||||||
|
* characterized by the operation member name on the VarForm of the
|
||||||
|
* VarHandle.
|
||||||
|
* <p>
|
||||||
|
* The generated class essentially encapsulates pre-compiled LambdaForms,
|
||||||
|
* one for each method, for the most common set of method signatures.
|
||||||
|
* This reduces static initialization costs, footprint costs, and circular
|
||||||
|
* dependencies that may arise if a class is generated per LambdaForm.
|
||||||
|
* <p>
|
||||||
|
* A maximum of L*T*S methods will be generated where L is the number of
|
||||||
|
* access modes kinds (or unique operation signatures) and T is the number
|
||||||
|
* of variable types and S is the number of shapes (such as instance field,
|
||||||
|
* static field, or array access).
|
||||||
|
* If there are 4 unique operation signatures, 5 basic types (Object, int,
|
||||||
|
* long, float, double), and 3 shapes then a maximum of 60 methods will be
|
||||||
|
* generated. However, the number is likely to be less since there may
|
||||||
|
* be duplicate signatures.
|
||||||
|
* <p>
|
||||||
|
* Each method is annotated with @LambdaForm.Compiled to inform the runtime
|
||||||
|
* that such methods should be treated as if a method of a class that is the
|
||||||
|
* result of compiling a LambdaForm. Annotation of such methods is
|
||||||
|
* important for correct evaluation of certain assertions and method return
|
||||||
|
* type profiling in HotSpot.
|
||||||
|
*
|
||||||
|
* @see java.lang.invoke.GenerateJLIClassesHelper
|
||||||
|
*/
|
||||||
|
public final class VarHandleGuardMethodGenerator {
|
||||||
|
|
||||||
|
static final String CLASS_HEADER = """
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2014, 2025, 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.
|
||||||
|
*/
|
||||||
|
package java.lang.invoke;
|
||||||
|
|
||||||
|
import jdk.internal.vm.annotation.AOTSafeClassInitializer;
|
||||||
|
import jdk.internal.vm.annotation.ForceInline;
|
||||||
|
import jdk.internal.vm.annotation.Hidden;
|
||||||
|
|
||||||
|
// This file is generated by build.tools.methodhandle.VarHandleGuardMethodGenerator.
|
||||||
|
// Do not edit!
|
||||||
|
@AOTSafeClassInitializer
|
||||||
|
final class VarHandleGuards {
|
||||||
|
""";
|
||||||
|
|
||||||
|
static final String GUARD_METHOD_SIG_TEMPLATE = "<RETURN> <NAME>_<SIGNATURE>(<PARAMS>)";
|
||||||
|
|
||||||
|
static final String GUARD_METHOD_TEMPLATE =
|
||||||
|
"""
|
||||||
|
@ForceInline
|
||||||
|
@LambdaForm.Compiled
|
||||||
|
@Hidden
|
||||||
|
static final <METHOD> throws Throwable {
|
||||||
|
boolean direct = handle.checkAccessModeThenIsDirect(ad);
|
||||||
|
if (direct && handle.vform.methodType_table[ad.type] == ad.symbolicMethodTypeErased) {
|
||||||
|
<RESULT_ERASED>MethodHandle.linkToStatic(<LINK_TO_STATIC_ARGS>);<RETURN_ERASED>
|
||||||
|
} else {
|
||||||
|
MethodHandle mh = handle.getMethodHandle(ad.mode);
|
||||||
|
<RETURN>mh.asType(ad.symbolicMethodTypeInvoker).invokeBasic(<LINK_TO_INVOKER_ARGS>);
|
||||||
|
}
|
||||||
|
}""";
|
||||||
|
|
||||||
|
static final String GUARD_METHOD_TEMPLATE_V =
|
||||||
|
"""
|
||||||
|
@ForceInline
|
||||||
|
@LambdaForm.Compiled
|
||||||
|
@Hidden
|
||||||
|
static final <METHOD> throws Throwable {
|
||||||
|
boolean direct = handle.checkAccessModeThenIsDirect(ad);
|
||||||
|
if (direct && handle.vform.methodType_table[ad.type] == ad.symbolicMethodTypeErased) {
|
||||||
|
MethodHandle.linkToStatic(<LINK_TO_STATIC_ARGS>);
|
||||||
|
} else if (direct && handle.vform.getMethodType_V(ad.type) == ad.symbolicMethodTypeErased) {
|
||||||
|
MethodHandle.linkToStatic(<LINK_TO_STATIC_ARGS>);
|
||||||
|
} else {
|
||||||
|
MethodHandle mh = handle.getMethodHandle(ad.mode);
|
||||||
|
mh.asType(ad.symbolicMethodTypeInvoker).invokeBasic(<LINK_TO_INVOKER_ARGS>);
|
||||||
|
}
|
||||||
|
}""";
|
||||||
|
|
||||||
|
// A template for deriving the operations
|
||||||
|
// could be supported by annotating VarHandle directly with the
|
||||||
|
// operation kind and shape
|
||||||
|
interface VarHandleTemplate {
|
||||||
|
Object get();
|
||||||
|
|
||||||
|
void set(Object value);
|
||||||
|
|
||||||
|
boolean compareAndSet(Object actualValue, Object expectedValue);
|
||||||
|
|
||||||
|
Object compareAndExchange(Object actualValue, Object expectedValue);
|
||||||
|
|
||||||
|
Object getAndUpdate(Object value);
|
||||||
|
}
|
||||||
|
|
||||||
|
record HandleType(Class<?> receiver, Class<?>... intermediates) {
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void main(String... args) throws Throwable {
|
||||||
|
if (args.length != 1) {
|
||||||
|
System.err.println("Usage: java VarHandleGuardMethodGenerator VarHandleGuards.java");
|
||||||
|
System.exit(1);
|
||||||
|
}
|
||||||
|
|
||||||
|
Path outputFile = Path.of(args[0]);
|
||||||
|
|
||||||
|
try (PrintWriter pw = new PrintWriter(Files.newBufferedWriter(
|
||||||
|
outputFile,
|
||||||
|
StandardCharsets.UTF_8,
|
||||||
|
StandardOpenOption.CREATE,
|
||||||
|
StandardOpenOption.TRUNCATE_EXISTING))) {
|
||||||
|
print(pw);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public static void print(PrintWriter pw) {
|
||||||
|
pw.println(CLASS_HEADER);
|
||||||
|
|
||||||
|
// Declare the stream of shapes
|
||||||
|
List<HandleType> hts = List.of(
|
||||||
|
// Object->T
|
||||||
|
new HandleType(Object.class),
|
||||||
|
|
||||||
|
// <static>->T
|
||||||
|
new HandleType(null),
|
||||||
|
|
||||||
|
// Array[index]->T
|
||||||
|
new HandleType(Object.class, int.class),
|
||||||
|
|
||||||
|
// MS[base]->T
|
||||||
|
new HandleType(Object.class, long.class),
|
||||||
|
|
||||||
|
// MS[base][offset]->T
|
||||||
|
new HandleType(Object.class, long.class, long.class)
|
||||||
|
);
|
||||||
|
|
||||||
|
// The 5 JVM calling convention types
|
||||||
|
List<Class<?>> basicTypes = List.of(Object.class, int.class, long.class, float.class, double.class);
|
||||||
|
|
||||||
|
Stream.of(VarHandleTemplate.class.getMethods()).<MethodType>
|
||||||
|
mapMulti((m, sink) -> {
|
||||||
|
for (var ht : hts) {
|
||||||
|
for (var bt : basicTypes) {
|
||||||
|
sink.accept(generateMethodType(m, ht.receiver, bt, ht.intermediates));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}).
|
||||||
|
distinct().
|
||||||
|
map(VarHandleGuardMethodGenerator::generateMethod).
|
||||||
|
forEach(pw::println);
|
||||||
|
|
||||||
|
pw.println("}");
|
||||||
|
}
|
||||||
|
|
||||||
|
static MethodType generateMethodType(Method m, Class<?> receiver, Class<?> value, Class<?>... intermediates) {
|
||||||
|
Class<?> returnType = m.getReturnType() == Object.class
|
||||||
|
? value : m.getReturnType();
|
||||||
|
|
||||||
|
List<Class<?>> params = new ArrayList<>();
|
||||||
|
if (receiver != null)
|
||||||
|
params.add(receiver);
|
||||||
|
Collections.addAll(params, intermediates);
|
||||||
|
for (var p : m.getParameters()) {
|
||||||
|
params.add(value);
|
||||||
|
}
|
||||||
|
return MethodType.methodType(returnType, params);
|
||||||
|
}
|
||||||
|
|
||||||
|
static String generateMethod(MethodType mt) {
|
||||||
|
Class<?> returnType = mt.returnType();
|
||||||
|
|
||||||
|
var params = new LinkedHashMap<String, String>();
|
||||||
|
params.put("handle", className(VarHandle.class));
|
||||||
|
for (int i = 0; i < mt.parameterCount(); i++) {
|
||||||
|
params.put("arg" + i, className(mt.parameterType(i)));
|
||||||
|
}
|
||||||
|
params.put("ad", "VarHandle.AccessDescriptor");
|
||||||
|
|
||||||
|
// Generate method signature line
|
||||||
|
String RETURN = className(returnType);
|
||||||
|
String NAME = "guard";
|
||||||
|
String SIGNATURE = getSignature(mt);
|
||||||
|
String PARAMS = params.entrySet().stream().
|
||||||
|
map(e -> e.getValue() + " " + e.getKey()).
|
||||||
|
collect(Collectors.joining(", "));
|
||||||
|
String METHOD = GUARD_METHOD_SIG_TEMPLATE.
|
||||||
|
replace("<RETURN>", RETURN).
|
||||||
|
replace("<NAME>", NAME).
|
||||||
|
replace("<SIGNATURE>", SIGNATURE).
|
||||||
|
replace("<PARAMS>", PARAMS);
|
||||||
|
|
||||||
|
// Generate method
|
||||||
|
params.remove("ad");
|
||||||
|
|
||||||
|
List<String> LINK_TO_STATIC_ARGS = new ArrayList<>(params.keySet());
|
||||||
|
LINK_TO_STATIC_ARGS.add("handle.vform.getMemberName(ad.mode)");
|
||||||
|
|
||||||
|
List<String> LINK_TO_INVOKER_ARGS = new ArrayList<>(params.keySet());
|
||||||
|
LINK_TO_INVOKER_ARGS.set(0, LINK_TO_INVOKER_ARGS.get(0) + ".asDirect()");
|
||||||
|
|
||||||
|
RETURN = returnType == void.class
|
||||||
|
? ""
|
||||||
|
: returnType == Object.class
|
||||||
|
? "return "
|
||||||
|
: "return (" + returnType.getName() + ") ";
|
||||||
|
|
||||||
|
String RESULT_ERASED = returnType == void.class
|
||||||
|
? ""
|
||||||
|
: returnType != Object.class
|
||||||
|
? "return (" + returnType.getName() + ") "
|
||||||
|
: "Object r = ";
|
||||||
|
|
||||||
|
String RETURN_ERASED = returnType != Object.class
|
||||||
|
? ""
|
||||||
|
: "\n return ad.returnType.cast(r);";
|
||||||
|
|
||||||
|
String template = returnType == void.class
|
||||||
|
? GUARD_METHOD_TEMPLATE_V
|
||||||
|
: GUARD_METHOD_TEMPLATE;
|
||||||
|
return template.
|
||||||
|
replace("<METHOD>", METHOD).
|
||||||
|
replace("<NAME>", NAME).
|
||||||
|
replaceAll("<RETURN>", RETURN).
|
||||||
|
replace("<RESULT_ERASED>", RESULT_ERASED).
|
||||||
|
replace("<RETURN_ERASED>", RETURN_ERASED).
|
||||||
|
replaceAll("<LINK_TO_STATIC_ARGS>", String.join(", ", LINK_TO_STATIC_ARGS)).
|
||||||
|
replace("<LINK_TO_INVOKER_ARGS>", String.join(", ", LINK_TO_INVOKER_ARGS))
|
||||||
|
.indent(4);
|
||||||
|
}
|
||||||
|
|
||||||
|
static String className(Class<?> c) {
|
||||||
|
String n = c.getCanonicalName();
|
||||||
|
if (n == null)
|
||||||
|
throw new IllegalArgumentException("Not representable in source code: " + c);
|
||||||
|
if (!c.isPrimitive() && c.getPackageName().equals("java.lang")) {
|
||||||
|
n = n.substring("java.lang.".length());
|
||||||
|
} else if (c.getPackageName().equals("java.lang.invoke")) {
|
||||||
|
n = n.substring("java.lang.invoke.".length());
|
||||||
|
}
|
||||||
|
return n;
|
||||||
|
}
|
||||||
|
|
||||||
|
static String getSignature(MethodType m) {
|
||||||
|
StringBuilder sb = new StringBuilder(m.parameterCount() + 1);
|
||||||
|
|
||||||
|
for (int i = 0; i < m.parameterCount(); i++) {
|
||||||
|
Class<?> pt = m.parameterType(i);
|
||||||
|
sb.append(getCharType(pt));
|
||||||
|
}
|
||||||
|
|
||||||
|
sb.append('_').append(getCharType(m.returnType()));
|
||||||
|
|
||||||
|
return sb.toString();
|
||||||
|
}
|
||||||
|
|
||||||
|
static char getCharType(Class<?> pt) {
|
||||||
|
return TypeKind.from(pt).upperBound().descriptorString().charAt(0);
|
||||||
|
}
|
||||||
|
}
|
||||||
161
make/langtools/tools/flagsgenerator/FlagsGenerator.java
Normal file
161
make/langtools/tools/flagsgenerator/FlagsGenerator.java
Normal file
@@ -0,0 +1,161 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) 2025, 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.
|
||||||
|
*/
|
||||||
|
package flagsgenerator;
|
||||||
|
|
||||||
|
import com.sun.source.tree.CompilationUnitTree;
|
||||||
|
import com.sun.source.util.JavacTask;
|
||||||
|
import com.sun.source.util.TreePath;
|
||||||
|
import com.sun.source.util.Trees;
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.io.PrintWriter;
|
||||||
|
import java.nio.file.Files;
|
||||||
|
import java.nio.file.Paths;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.EnumMap;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.HashSet;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Locale;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.Map.Entry;
|
||||||
|
import java.util.Set;
|
||||||
|
import java.util.TreeMap;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
import javax.lang.model.element.AnnotationMirror;
|
||||||
|
import javax.lang.model.element.TypeElement;
|
||||||
|
import javax.lang.model.element.VariableElement;
|
||||||
|
import javax.lang.model.util.ElementFilter;
|
||||||
|
import javax.tools.ToolProvider;
|
||||||
|
|
||||||
|
public class FlagsGenerator {
|
||||||
|
public static void main(String... args) throws IOException {
|
||||||
|
var compiler = ToolProvider.getSystemJavaCompiler();
|
||||||
|
|
||||||
|
try (var fm = compiler.getStandardFileManager(null, null, null)) {
|
||||||
|
JavacTask task = (JavacTask) compiler.getTask(null, null, d -> {}, null, null, fm.getJavaFileObjects(args[0]));
|
||||||
|
Trees trees = Trees.instance(task);
|
||||||
|
CompilationUnitTree cut = task.parse().iterator().next();
|
||||||
|
|
||||||
|
task.analyze();
|
||||||
|
|
||||||
|
TypeElement clazz = (TypeElement) trees.getElement(new TreePath(new TreePath(cut), cut.getTypeDecls().get(0)));
|
||||||
|
Map<Integer, List<String>> flag2Names = new TreeMap<>();
|
||||||
|
Map<FlagTarget, Map<Integer, List<String>>> target2FlagBit2Fields = new EnumMap<>(FlagTarget.class);
|
||||||
|
Map<String, String> customToString = new HashMap<>();
|
||||||
|
Set<String> noToString = new HashSet<>();
|
||||||
|
|
||||||
|
for (VariableElement field : ElementFilter.fieldsIn(clazz.getEnclosedElements())) {
|
||||||
|
String flagName = field.getSimpleName().toString();
|
||||||
|
for (AnnotationMirror am : field.getAnnotationMirrors()) {
|
||||||
|
switch (am.getAnnotationType().toString()) {
|
||||||
|
case "com.sun.tools.javac.code.Flags.Use" -> {
|
||||||
|
long flagValue = ((Number) field.getConstantValue()).longValue();
|
||||||
|
int flagBit = 63 - Long.numberOfLeadingZeros(flagValue);
|
||||||
|
|
||||||
|
flag2Names.computeIfAbsent(flagBit, _ -> new ArrayList<>())
|
||||||
|
.add(flagName);
|
||||||
|
|
||||||
|
List<?> originalTargets = (List<?>) valueOfValueAttribute(am);
|
||||||
|
originalTargets.stream()
|
||||||
|
.map(value -> FlagTarget.valueOf(value.toString()))
|
||||||
|
.forEach(target -> target2FlagBit2Fields.computeIfAbsent(target, _ -> new HashMap<>())
|
||||||
|
.computeIfAbsent(flagBit, _ -> new ArrayList<>())
|
||||||
|
.add(flagName));
|
||||||
|
}
|
||||||
|
case "com.sun.tools.javac.code.Flags.CustomToStringValue" -> {
|
||||||
|
customToString.put(flagName, (String) valueOfValueAttribute(am));
|
||||||
|
}
|
||||||
|
case "com.sun.tools.javac.code.Flags.NoToStringValue" -> {
|
||||||
|
noToString.add(flagName);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//verify there are no flag overlaps:
|
||||||
|
for (Entry<FlagTarget, Map<Integer, List<String>>> targetAndFlag : target2FlagBit2Fields.entrySet()) {
|
||||||
|
for (Entry<Integer, List<String>> flagAndFields : targetAndFlag.getValue().entrySet()) {
|
||||||
|
if (flagAndFields.getValue().size() > 1) {
|
||||||
|
throw new AssertionError("duplicate flag for target: " + targetAndFlag.getKey() +
|
||||||
|
", flag: " + flagAndFields.getKey() +
|
||||||
|
", flags fields: " + flagAndFields.getValue());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
try (PrintWriter out = new PrintWriter(Files.newBufferedWriter(Paths.get(args[1])))) {
|
||||||
|
out.println("""
|
||||||
|
package com.sun.tools.javac.code;
|
||||||
|
|
||||||
|
public enum FlagsEnum {
|
||||||
|
""");
|
||||||
|
for (Entry<Integer, List<String>> e : flag2Names.entrySet()) {
|
||||||
|
String constantName = e.getValue().stream().collect(Collectors.joining("_OR_"));
|
||||||
|
String toString = e.getValue()
|
||||||
|
.stream()
|
||||||
|
.filter(n -> !noToString.contains(n))
|
||||||
|
.map(n -> customToString.getOrDefault(n, n.toLowerCase(Locale.US)))
|
||||||
|
.collect(Collectors.joining(" or "));
|
||||||
|
out.println(" " + constantName + "(1L<<" + e.getKey() + ", \"" + toString + "\"),");
|
||||||
|
}
|
||||||
|
out.println("""
|
||||||
|
;
|
||||||
|
|
||||||
|
private final long value;
|
||||||
|
private final String toString;
|
||||||
|
private FlagsEnum(long value, String toString) {
|
||||||
|
this.value = value;
|
||||||
|
this.toString = toString;
|
||||||
|
}
|
||||||
|
public long value() {
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
public String toString() {
|
||||||
|
return toString;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
""");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private static Object valueOfValueAttribute(AnnotationMirror am) {
|
||||||
|
return am.getElementValues()
|
||||||
|
.values()
|
||||||
|
.iterator()
|
||||||
|
.next()
|
||||||
|
.getValue();
|
||||||
|
}
|
||||||
|
|
||||||
|
private enum FlagTarget {
|
||||||
|
BLOCK,
|
||||||
|
CLASS,
|
||||||
|
METHOD,
|
||||||
|
MODULE,
|
||||||
|
PACKAGE,
|
||||||
|
TYPE_VAR,
|
||||||
|
VARIABLE;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2015, 2025, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@@ -47,6 +47,7 @@ import java.util.ArrayList;
|
|||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Locale;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Map.Entry;
|
import java.util.Map.Entry;
|
||||||
import java.util.Properties;
|
import java.util.Properties;
|
||||||
@@ -93,7 +94,9 @@ public class ClassGenerator {
|
|||||||
FACTORY_FIELD_LINT("factory.decl.field.lint"),
|
FACTORY_FIELD_LINT("factory.decl.field.lint"),
|
||||||
WILDCARDS_EXTENDS("wildcards.extends"),
|
WILDCARDS_EXTENDS("wildcards.extends"),
|
||||||
SUPPRESS_WARNINGS("suppress.warnings"),
|
SUPPRESS_WARNINGS("suppress.warnings"),
|
||||||
LINT_CATEGORY("lint.category");
|
LINT_CATEGORY("lint.category"),
|
||||||
|
DIAGNOSTIC_FLAGS_EMPTY("diagnostic.flags.empty"),
|
||||||
|
DIAGNOSTIC_FLAGS_NON_EMPTY("diagnostic.flags.non-empty");
|
||||||
|
|
||||||
/** stub key (as it appears in the property file) */
|
/** stub key (as it appears in the property file) */
|
||||||
String key;
|
String key;
|
||||||
@@ -259,17 +262,30 @@ public class ClassGenerator {
|
|||||||
.map(MessageLine::lintCategory)
|
.map(MessageLine::lintCategory)
|
||||||
.findFirst().orElse(null);
|
.findFirst().orElse(null);
|
||||||
//System.out.println("category for " + key + " = " + lintCategory);
|
//System.out.println("category for " + key + " = " + lintCategory);
|
||||||
|
String diagnosticFlags = lines.stream()
|
||||||
|
.filter(MessageLine::isDiagnosticFlags)
|
||||||
|
.map(MessageLine::diagnosticFlags)
|
||||||
|
.flatMap(Stream::of)
|
||||||
|
.map(s -> s.replace('-', '_'))
|
||||||
|
.map(s -> s.toUpperCase(Locale.ROOT))
|
||||||
|
.collect(Collectors.joining(", "));
|
||||||
String factoryName = factoryName(key);
|
String factoryName = factoryName(key);
|
||||||
if (msgInfo.getTypes().isEmpty()) {
|
if (msgInfo.getTypes().isEmpty()) {
|
||||||
//generate field
|
//generate field
|
||||||
String factoryField;
|
String factoryField;
|
||||||
if (lintCategory == null) {
|
if (lintCategory == null) {
|
||||||
factoryField = StubKind.FACTORY_FIELD.format(k.keyClazz, factoryName,
|
factoryField = StubKind.FACTORY_FIELD.format(k.keyClazz, factoryName,
|
||||||
|
diagnosticFlags.isEmpty() ?
|
||||||
|
StubKind.DIAGNOSTIC_FLAGS_EMPTY.format() :
|
||||||
|
StubKind.DIAGNOSTIC_FLAGS_NON_EMPTY.format(diagnosticFlags),
|
||||||
"\"" + keyParts[0] + "\"",
|
"\"" + keyParts[0] + "\"",
|
||||||
"\"" + Stream.of(keyParts).skip(2).collect(Collectors.joining(".")) + "\"",
|
"\"" + Stream.of(keyParts).skip(2).collect(Collectors.joining(".")) + "\"",
|
||||||
javadoc);
|
javadoc);
|
||||||
} else {
|
} else {
|
||||||
factoryField = StubKind.FACTORY_FIELD_LINT.format(k.keyClazz, factoryName,
|
factoryField = StubKind.FACTORY_FIELD_LINT.format(k.keyClazz, factoryName,
|
||||||
|
diagnosticFlags.isEmpty() ?
|
||||||
|
StubKind.DIAGNOSTIC_FLAGS_EMPTY.format() :
|
||||||
|
StubKind.DIAGNOSTIC_FLAGS_NON_EMPTY.format(diagnosticFlags),
|
||||||
StubKind.LINT_CATEGORY.format("\"" + lintCategory + "\""),
|
StubKind.LINT_CATEGORY.format("\"" + lintCategory + "\""),
|
||||||
"\"" + keyParts[0] + "\"",
|
"\"" + keyParts[0] + "\"",
|
||||||
"\"" + Stream.of(keyParts).skip(2).collect(Collectors.joining(".")) + "\"",
|
"\"" + Stream.of(keyParts).skip(2).collect(Collectors.joining(".")) + "\"",
|
||||||
@@ -287,11 +303,17 @@ public class ClassGenerator {
|
|||||||
String methodBody;
|
String methodBody;
|
||||||
if (lintCategory == null) {
|
if (lintCategory == null) {
|
||||||
methodBody = StubKind.FACTORY_METHOD_BODY.format(k.keyClazz,
|
methodBody = StubKind.FACTORY_METHOD_BODY.format(k.keyClazz,
|
||||||
|
diagnosticFlags.isEmpty() ?
|
||||||
|
StubKind.DIAGNOSTIC_FLAGS_EMPTY.format() :
|
||||||
|
StubKind.DIAGNOSTIC_FLAGS_NON_EMPTY.format(diagnosticFlags),
|
||||||
"\"" + keyParts[0] + "\"",
|
"\"" + keyParts[0] + "\"",
|
||||||
"\"" + Stream.of(keyParts).skip(2).collect(Collectors.joining(".")) + "\"",
|
"\"" + Stream.of(keyParts).skip(2).collect(Collectors.joining(".")) + "\"",
|
||||||
argNames.stream().collect(Collectors.joining(", ")));
|
argNames.stream().collect(Collectors.joining(", ")));
|
||||||
} else {
|
} else {
|
||||||
methodBody = StubKind.FACTORY_METHOD_BODY_LINT.format(k.keyClazz,
|
methodBody = StubKind.FACTORY_METHOD_BODY_LINT.format(k.keyClazz,
|
||||||
|
diagnosticFlags.isEmpty() ?
|
||||||
|
StubKind.DIAGNOSTIC_FLAGS_EMPTY.format() :
|
||||||
|
StubKind.DIAGNOSTIC_FLAGS_NON_EMPTY.format(diagnosticFlags),
|
||||||
StubKind.LINT_CATEGORY.format("\"" + lintCategory + "\""),
|
StubKind.LINT_CATEGORY.format("\"" + lintCategory + "\""),
|
||||||
"\"" + keyParts[0] + "\"",
|
"\"" + keyParts[0] + "\"",
|
||||||
"\"" + Stream.of(keyParts).skip(2).collect(Collectors.joining(".")) + "\"",
|
"\"" + Stream.of(keyParts).skip(2).collect(Collectors.joining(".")) + "\"",
|
||||||
|
|||||||
@@ -32,7 +32,8 @@ import java.util.List;
|
|||||||
* A message within the message file.
|
* A message within the message file.
|
||||||
* A message is a series of lines containing a "name=value" property,
|
* A message is a series of lines containing a "name=value" property,
|
||||||
* optionally preceded by a comment describing the use of placeholders
|
* optionally preceded by a comment describing the use of placeholders
|
||||||
* such as {0}, {1}, etc within the property value.
|
* such as {0}, {1}, etc within the property value, a lint category,
|
||||||
|
* and/or a list of diagnostic flags.
|
||||||
*/
|
*/
|
||||||
public final class Message {
|
public final class Message {
|
||||||
final MessageLine firstLine;
|
final MessageLine firstLine;
|
||||||
@@ -49,7 +50,7 @@ public final class Message {
|
|||||||
public MessageInfo getMessageInfo() {
|
public MessageInfo getMessageInfo() {
|
||||||
if (messageInfo == null) {
|
if (messageInfo == null) {
|
||||||
MessageLine l = firstLine.prev;
|
MessageLine l = firstLine.prev;
|
||||||
if (l != null && l.isLint()) {
|
while (l != null && (l.isLint() || l.isDiagnosticFlags())) {
|
||||||
l = l.prev;
|
l = l.prev;
|
||||||
}
|
}
|
||||||
if (l != null && l.isInfo())
|
if (l != null && l.isInfo())
|
||||||
@@ -74,7 +75,7 @@ public final class Message {
|
|||||||
while (l.text.isEmpty())
|
while (l.text.isEmpty())
|
||||||
l = l.next;
|
l = l.next;
|
||||||
} else {
|
} else {
|
||||||
if (l.prev != null && (l.prev.isInfo() || l.prev.isLint()))
|
while (l.prev != null && (l.prev.isInfo() || l.prev.isLint() || l.prev.isDiagnosticFlags()))
|
||||||
l = l.prev;
|
l = l.prev;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2014, 2025, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@@ -25,6 +25,7 @@
|
|||||||
|
|
||||||
package propertiesparser.parser;
|
package propertiesparser.parser;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
import java.util.regex.Matcher;
|
import java.util.regex.Matcher;
|
||||||
import java.util.regex.Pattern;
|
import java.util.regex.Pattern;
|
||||||
|
|
||||||
@@ -39,6 +40,7 @@ public class MessageLine {
|
|||||||
static final Pattern infoPattern = Pattern.compile(String.format("# ([0-9]+: %s, )*[0-9]+: %s",
|
static final Pattern infoPattern = Pattern.compile(String.format("# ([0-9]+: %s, )*[0-9]+: %s",
|
||||||
typePattern.pattern(), typePattern.pattern()));
|
typePattern.pattern(), typePattern.pattern()));
|
||||||
static final Pattern lintPattern = Pattern.compile("# lint: ([a-z\\-]+)");
|
static final Pattern lintPattern = Pattern.compile("# lint: ([a-z\\-]+)");
|
||||||
|
static final Pattern diagnosticFlagsPattern = Pattern.compile("# flags: ([a-z\\-]+(, ([a-z\\-]+))*)");
|
||||||
|
|
||||||
public String text;
|
public String text;
|
||||||
MessageLine prev;
|
MessageLine prev;
|
||||||
@@ -69,6 +71,19 @@ public class MessageLine {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean isDiagnosticFlags() {
|
||||||
|
return diagnosticFlagsPattern.matcher(text).matches();
|
||||||
|
}
|
||||||
|
|
||||||
|
public String[] diagnosticFlags() {
|
||||||
|
Matcher matcher = diagnosticFlagsPattern.matcher(text);
|
||||||
|
if (matcher.matches()) {
|
||||||
|
return matcher.group(1).split(", ", -1);
|
||||||
|
} else {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
boolean hasContinuation() {
|
boolean hasContinuation() {
|
||||||
return (next != null) && text.endsWith("\\");
|
return (next != null) && text.endsWith("\\");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2014, 2024, Oracle and/or its affiliates. All rights reserved.
|
* Copyright (c) 2014, 2025, Oracle and/or its affiliates. All rights reserved.
|
||||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
*
|
*
|
||||||
* This code is free software; you can redistribute it and/or modify it
|
* This code is free software; you can redistribute it and/or modify it
|
||||||
@@ -76,7 +76,7 @@ public interface MessageType {
|
|||||||
ANNOTATION("annotation", "Compound", "com.sun.tools.javac.code.Attribute"),
|
ANNOTATION("annotation", "Compound", "com.sun.tools.javac.code.Attribute"),
|
||||||
BOOLEAN("boolean", "boolean", null),
|
BOOLEAN("boolean", "boolean", null),
|
||||||
COLLECTION("collection", "Collection", "java.util"),
|
COLLECTION("collection", "Collection", "java.util"),
|
||||||
FLAG("flag", "Flag", "com.sun.tools.javac.code.Flags"),
|
FLAG("flag", "FlagsEnum", "com.sun.tools.javac.code"),
|
||||||
FRAGMENT("fragment", "Fragment", null),
|
FRAGMENT("fragment", "Fragment", null),
|
||||||
DIAGNOSTIC("diagnostic", "JCDiagnostic", "com.sun.tools.javac.util"),
|
DIAGNOSTIC("diagnostic", "JCDiagnostic", "com.sun.tools.javac.util"),
|
||||||
MODIFIER("modifier", "Modifier", "javax.lang.model.element"),
|
MODIFIER("modifier", "Modifier", "javax.lang.model.element"),
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
#
|
#
|
||||||
# Copyright (c) 2015, 2024, Oracle and/or its affiliates. All rights reserved.
|
# Copyright (c) 2015, 2025, Oracle and/or its affiliates. All rights reserved.
|
||||||
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||||
#
|
#
|
||||||
# This code is free software; you can redistribute it and/or modify it
|
# This code is free software; you can redistribute it and/or modify it
|
||||||
@@ -27,6 +27,7 @@ toplevel.decl=\
|
|||||||
package {0};\n\
|
package {0};\n\
|
||||||
\n\
|
\n\
|
||||||
{1}\n\
|
{1}\n\
|
||||||
|
import com.sun.tools.javac.util.JCDiagnostic.DiagnosticFlag;\n\
|
||||||
import com.sun.tools.javac.util.JCDiagnostic.Error;\n\
|
import com.sun.tools.javac.util.JCDiagnostic.Error;\n\
|
||||||
import com.sun.tools.javac.util.JCDiagnostic.Warning;\n\
|
import com.sun.tools.javac.util.JCDiagnostic.Warning;\n\
|
||||||
import com.sun.tools.javac.util.JCDiagnostic.LintWarning;\n\
|
import com.sun.tools.javac.util.JCDiagnostic.LintWarning;\n\
|
||||||
@@ -34,6 +35,10 @@ toplevel.decl=\
|
|||||||
import com.sun.tools.javac.util.JCDiagnostic.Fragment;\n\
|
import com.sun.tools.javac.util.JCDiagnostic.Fragment;\n\
|
||||||
import com.sun.tools.javac.code.Lint.LintCategory;\n\
|
import com.sun.tools.javac.code.Lint.LintCategory;\n\
|
||||||
\n\
|
\n\
|
||||||
|
import java.util.EnumSet;\n\
|
||||||
|
\n\
|
||||||
|
import static com.sun.tools.javac.util.JCDiagnostic.DiagnosticFlag.*;\n\
|
||||||
|
\n\
|
||||||
public class {2} '{'\n\
|
public class {2} '{'\n\
|
||||||
{3}\n\
|
{3}\n\
|
||||||
'}'\n
|
'}'\n
|
||||||
@@ -58,22 +63,22 @@ factory.decl.method.arg=\
|
|||||||
arg{0}
|
arg{0}
|
||||||
|
|
||||||
factory.decl.method.body=\
|
factory.decl.method.body=\
|
||||||
return new {0}({1}, {2}, {3});
|
return new {0}({1}, {2}, {3}, {4});
|
||||||
|
|
||||||
factory.decl.method.body.lint=\
|
factory.decl.method.body.lint=\
|
||||||
return new {0}({1}, {2}, {3}, {4});
|
return new {0}({1}, {2}, {3}, {4}, {5});
|
||||||
|
|
||||||
factory.decl.field=\
|
factory.decl.field=\
|
||||||
/**\n\
|
/**\n\
|
||||||
' '* {4}\n\
|
' '* {4}\n\
|
||||||
' '*/\n\
|
' '*/\n\
|
||||||
public static final {0} {1} = new {0}({2}, {3});
|
public static final {0} {1} = new {0}({2}, {3}, {4});
|
||||||
|
|
||||||
factory.decl.field.lint=\
|
factory.decl.field.lint=\
|
||||||
/**\n\
|
/**\n\
|
||||||
' '* {5}\n\
|
' '* {5}\n\
|
||||||
' '*/\n\
|
' '*/\n\
|
||||||
public static final {0} {1} = new {0}({2}, {3}, {4});
|
public static final {0} {1} = new {0}({2}, {3}, {4}, {5});
|
||||||
|
|
||||||
wildcards.extends=\
|
wildcards.extends=\
|
||||||
{0}<? extends {1}>
|
{0}<? extends {1}>
|
||||||
@@ -84,3 +89,9 @@ suppress.warnings=\
|
|||||||
lint.category=\
|
lint.category=\
|
||||||
LintCategory.get({0}).get()
|
LintCategory.get({0}).get()
|
||||||
|
|
||||||
|
diagnostic.flags.empty=\
|
||||||
|
EnumSet.noneOf(DiagnosticFlag.class)
|
||||||
|
|
||||||
|
diagnostic.flags.non-empty=\
|
||||||
|
EnumSet.of({0})
|
||||||
|
|
||||||
|
|||||||
@@ -26,6 +26,8 @@
|
|||||||
################################################################################
|
################################################################################
|
||||||
|
|
||||||
include GensrcCommon.gmk
|
include GensrcCommon.gmk
|
||||||
|
include GensrcProperties.gmk
|
||||||
|
include GensrcStreamPreProcessing.gmk
|
||||||
|
|
||||||
include gensrc/GensrcBuffer.gmk
|
include gensrc/GensrcBuffer.gmk
|
||||||
include gensrc/GensrcCharacterData.gmk
|
include gensrc/GensrcCharacterData.gmk
|
||||||
@@ -46,6 +48,8 @@ CLDR_GEN_DONE := $(GENSRC_DIR)/_cldr-gensrc.marker
|
|||||||
TZ_DATA_DIR := $(MODULE_SRC)/share/data/tzdata
|
TZ_DATA_DIR := $(MODULE_SRC)/share/data/tzdata
|
||||||
ZONENAME_TEMPLATE := $(MODULE_SRC)/share/classes/java/time/format/ZoneName.java.template
|
ZONENAME_TEMPLATE := $(MODULE_SRC)/share/classes/java/time/format/ZoneName.java.template
|
||||||
|
|
||||||
|
# The `-utf8` option is used even for US English, as some names
|
||||||
|
# may contain non-ASCII characters, such as “Türkiye”.
|
||||||
$(CLDR_GEN_DONE): $(wildcard $(CLDR_DATA_DIR)/dtd/*.dtd) \
|
$(CLDR_GEN_DONE): $(wildcard $(CLDR_DATA_DIR)/dtd/*.dtd) \
|
||||||
$(wildcard $(CLDR_DATA_DIR)/main/en*.xml) \
|
$(wildcard $(CLDR_DATA_DIR)/main/en*.xml) \
|
||||||
$(wildcard $(CLDR_DATA_DIR)/supplemental/*.xml) \
|
$(wildcard $(CLDR_DATA_DIR)/supplemental/*.xml) \
|
||||||
@@ -61,15 +65,14 @@ $(CLDR_GEN_DONE): $(wildcard $(CLDR_DATA_DIR)/dtd/*.dtd) \
|
|||||||
-basemodule \
|
-basemodule \
|
||||||
-year $(COPYRIGHT_YEAR) \
|
-year $(COPYRIGHT_YEAR) \
|
||||||
-zntempfile $(ZONENAME_TEMPLATE) \
|
-zntempfile $(ZONENAME_TEMPLATE) \
|
||||||
-tzdatadir $(TZ_DATA_DIR))
|
-tzdatadir $(TZ_DATA_DIR) \
|
||||||
|
-utf8)
|
||||||
$(TOUCH) $@
|
$(TOUCH) $@
|
||||||
|
|
||||||
TARGETS += $(CLDR_GEN_DONE)
|
TARGETS += $(CLDR_GEN_DONE)
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
|
|
||||||
include GensrcProperties.gmk
|
|
||||||
|
|
||||||
$(eval $(call SetupCompileProperties, LIST_RESOURCE_BUNDLE, \
|
$(eval $(call SetupCompileProperties, LIST_RESOURCE_BUNDLE, \
|
||||||
SRC_DIRS := $(MODULE_SRC)/share/classes/sun/launcher/resources, \
|
SRC_DIRS := $(MODULE_SRC)/share/classes/sun/launcher/resources, \
|
||||||
CLASS := ListResourceBundle, \
|
CLASS := ListResourceBundle, \
|
||||||
|
|||||||
@@ -28,363 +28,222 @@ ifeq ($(INCLUDE), true)
|
|||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
|
|
||||||
GENSRC_BUFFER :=
|
BUFFER_INPUT_DIR := $(MODULE_SRC)/share/classes/java/nio
|
||||||
|
BUFFER_OUTPUT_DIR := $(SUPPORT_OUTPUTDIR)/gensrc/java.base/java/nio
|
||||||
|
|
||||||
GENSRC_BUFFER_DST := $(SUPPORT_OUTPUTDIR)/gensrc/java.base/java/nio
|
################################################################################
|
||||||
|
# Helper method to setup generation of bin snippets.
|
||||||
GENSRC_BUFFER_SRC := $(MODULE_SRC)/share/classes/java/nio
|
# Will add the generated snippet file name to $1_BIN_SNIPPET_FILES.
|
||||||
|
|
||||||
###
|
|
||||||
|
|
||||||
$(GENSRC_BUFFER_DST)/_the.buffer.dir:
|
|
||||||
$(call LogInfo, Generating buffer classes)
|
|
||||||
$(call MakeDir, $(@D))
|
|
||||||
$(TOUCH) $@
|
|
||||||
|
|
||||||
define fixRw
|
|
||||||
$1_RW := $2
|
|
||||||
$1_rwkey := rw
|
|
||||||
ifeq (R, $2)
|
|
||||||
$1_rwkey := ro
|
|
||||||
endif
|
|
||||||
endef
|
|
||||||
|
|
||||||
define typesAndBits
|
|
||||||
# param 1 target
|
|
||||||
# param 2 type
|
|
||||||
# param 3 BO
|
|
||||||
$1_a := a
|
|
||||||
$1_A := A
|
|
||||||
|
|
||||||
$1_type := $2
|
|
||||||
|
|
||||||
ifeq ($2, byte)
|
|
||||||
$1_x := b
|
|
||||||
$1_Type := Byte
|
|
||||||
$1_fulltype := byte
|
|
||||||
$1_Fulltype := Byte
|
|
||||||
$1_category := integralType
|
|
||||||
$1_LBPV := 0
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($2, char)
|
|
||||||
$1_x := c
|
|
||||||
$1_Type := Char
|
|
||||||
$1_fulltype := character
|
|
||||||
$1_Fulltype := Character
|
|
||||||
$1_category := integralType
|
|
||||||
$1_streams := streamableType
|
|
||||||
$1_streamtype := int
|
|
||||||
$1_Streamtype := Int
|
|
||||||
$1_LBPV := 1
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($2, short)
|
|
||||||
$1_x := s
|
|
||||||
$1_Type := Short
|
|
||||||
$1_fulltype := short
|
|
||||||
$1_Fulltype := Short
|
|
||||||
$1_category := integralType
|
|
||||||
$1_LBPV := 1
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($2, int)
|
|
||||||
$1_a := an
|
|
||||||
$1_A := An
|
|
||||||
$1_x := i
|
|
||||||
$1_Type := Int
|
|
||||||
$1_fulltype := integer
|
|
||||||
$1_Fulltype := Integer
|
|
||||||
$1_category := integralType
|
|
||||||
$1_LBPV := 2
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($2, long)
|
|
||||||
$1_x := l
|
|
||||||
$1_Type := Long
|
|
||||||
$1_fulltype := long
|
|
||||||
$1_Fulltype := Long
|
|
||||||
$1_category := integralType
|
|
||||||
$1_LBPV := 3
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($2, float)
|
|
||||||
$1_x := f
|
|
||||||
$1_Type := Float
|
|
||||||
$1_fulltype := float
|
|
||||||
$1_Fulltype := Float
|
|
||||||
$1_category := floatingPointType
|
|
||||||
$1_LBPV := 2
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($2, double)
|
|
||||||
$1_x := d
|
|
||||||
$1_Type := Double
|
|
||||||
$1_fulltype := double
|
|
||||||
$1_Fulltype := Double
|
|
||||||
$1_category := floatingPointType
|
|
||||||
$1_LBPV := 3
|
|
||||||
endif
|
|
||||||
|
|
||||||
$1_Swaptype := $$($1_Type)
|
|
||||||
$1_memtype := $2
|
|
||||||
$1_Memtype := $$($1_Type)
|
|
||||||
|
|
||||||
ifeq ($2, float)
|
|
||||||
$1_memtype := int
|
|
||||||
$1_Memtype := Int
|
|
||||||
ifneq ($3, U)
|
|
||||||
$1_Swaptype := Int
|
|
||||||
$1_fromBits := Float.intBitsToFloat
|
|
||||||
$1_toBits := Float.floatToRawIntBits
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($2, double)
|
|
||||||
$1_memtype := long
|
|
||||||
$1_Memtype := Long
|
|
||||||
ifneq ($3, U)
|
|
||||||
$1_Swaptype := Long
|
|
||||||
$1_fromBits := Double.longBitsToDouble
|
|
||||||
$1_toBits := Double.doubleToRawLongBits
|
|
||||||
endif
|
|
||||||
endif
|
|
||||||
|
|
||||||
ifeq ($3, S)
|
|
||||||
$1_swap := Bits.swap
|
|
||||||
endif
|
|
||||||
endef
|
|
||||||
|
|
||||||
define genBinOps
|
|
||||||
# param 1 target
|
|
||||||
# param 2 type
|
|
||||||
# param 3 BO
|
|
||||||
# param 4 RW
|
|
||||||
# param 5 nbytes
|
|
||||||
# param 6 nbytesButOne
|
|
||||||
$(call typesAndBits,$1,$2,$3)
|
|
||||||
$(call fixRw,$1,$4)
|
|
||||||
$1_nbytes := $5
|
|
||||||
$1_nbytesButOne := $6
|
|
||||||
$1_CMD := $(TOOL_SPP) \
|
|
||||||
-Dtype=$$($1_type) \
|
|
||||||
-DType=$$($1_Type) \
|
|
||||||
-Dfulltype=$$($1_fulltype) \
|
|
||||||
-Dmemtype=$$($1_memtype) \
|
|
||||||
-DMemtype=$$($1_Memtype) \
|
|
||||||
-DfromBits=$$($1_fromBits) \
|
|
||||||
-DtoBits=$$($1_toBits) \
|
|
||||||
-DLG_BYTES_PER_VALUE=$$($1_LBPV) \
|
|
||||||
-DBYTES_PER_VALUE="(1 << $$($1_LBPV))" \
|
|
||||||
-Dnbytes=$$($1_nbytes) \
|
|
||||||
-DnbytesButOne=$$($1_nbytesButOne) \
|
|
||||||
-DRW=$$($1_RW) \
|
|
||||||
-K$$($1_rwkey) \
|
|
||||||
-Da=$$($1_a) \
|
|
||||||
-be
|
|
||||||
endef
|
|
||||||
|
|
||||||
define SetupGenBuffer
|
|
||||||
# param 1 is for output file
|
|
||||||
# param 2 is template dependency
|
|
||||||
# param 3-9 are named args.
|
|
||||||
# type :=
|
|
||||||
# BIN :=
|
|
||||||
# RW := Mutability (R)ead-only (W)ritable
|
|
||||||
# BO := (U)nswapped/(S)wapped/(L)ittle/(B)ig
|
|
||||||
#
|
#
|
||||||
$(if $3,$1_$(strip $3))
|
# arg $1: $1 as passed into SetupGenBuffer
|
||||||
$(if $4,$1_$(strip $4))
|
# arg $2: type for this bin snippet
|
||||||
$(if $5,$1_$(strip $5))
|
define SetupGenBufferBinSnippets
|
||||||
$(if $6,$1_$(strip $6))
|
$1_$2_TMP := $$(BUFFER_OUTPUT_DIR)/$1.java.bin-snippet.$2
|
||||||
$(if $7,$1_$(strip $7))
|
|
||||||
$(if $8,$1_$(strip $8))
|
|
||||||
$(if $9,$1_$(strip $9))
|
|
||||||
$(if $(10),$1_$(strip $(10)))
|
|
||||||
$(if $(11),$1_$(strip $(11)))
|
|
||||||
$(if $(12),$1_$(strip $(12)))
|
|
||||||
$(if $(13),$1_$(strip $(13)))
|
|
||||||
$(if $(14),$1_$(strip $(14)))
|
|
||||||
$(foreach i,3 4 5 6 7 8 9 10 11 12 13 14 15,$(if $($i),$1_$(strip $($i)))$(NEWLINE))
|
|
||||||
$(call LogSetupMacroEntry,SetupGenBuffer($1),$2,$3,$4,$5,$6,$7,$8,$9,$(10),$(11),$(12),$(13),$(14),$(15))
|
|
||||||
$(if $(16),$(error Internal makefile error: Too many arguments to SetupGenBuffer, please update GensrcBuffer.gmk))
|
|
||||||
|
|
||||||
$(call fixRw,$1,$$($1_RW))
|
$1_$2_LBPV := $$(call Conv, $2, LBPV)
|
||||||
$(call typesAndBits,$1,$$($1_type),$$($1_BO))
|
ifeq ($$($1_READ_ONLY), true)
|
||||||
|
$1_$2_RW_KEYS := ro
|
||||||
$1_DST := $(GENSRC_BUFFER_DST)/$1.java
|
$1_$2_RW_REPLACEMENT := R
|
||||||
$1_SRC := $(GENSRC_BUFFER_SRC)/$(strip $2).java.template
|
|
||||||
$1_SRC_BIN := $(GENSRC_BUFFER_SRC)/$(strip $2)-bin.java.template
|
|
||||||
|
|
||||||
$1_DEP := $$($1_SRC)
|
|
||||||
ifneq ($$($1_BIN), 1)
|
|
||||||
$1_DEP := $$($1_SRC)
|
|
||||||
$1_OUT := $$($1_DST)
|
|
||||||
else
|
else
|
||||||
$1_DEP += $$($1_SRC) $$($1_SRC_BIN)
|
$1_$2_RW_KEYS := rw
|
||||||
$1_OUT := $(GENSRC_BUFFER_DST)/$1.binop.0.java
|
$1_$2_RW_REPLACEMENT :=
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($$($1_BIN), 1)
|
$$(eval $$(call SetupStreamPreProcessing, GEN_BUFFER_BIN_$1_$2, \
|
||||||
$(call genBinOps,$1_char,char,$$($1_BO),$$($1_RW),two,one)
|
SOURCE_FILE := $$(BUFFER_INPUT_DIR)/$$($1_TEMPLATE)-bin.java.template, \
|
||||||
$(call genBinOps,$1_short,short,$$($1_BO),$$($1_RW),two,one)
|
OUTPUT_FILE := $$($1_$2_TMP), \
|
||||||
$(call genBinOps,$1_int,int,$$($1_BO),$$($1_RW),four,three)
|
INFO := Generating buffer class bin snippets for $1 ($2), \
|
||||||
$(call genBinOps,$1_long,long,$$($1_BO),$$($1_RW),eight,seven)
|
BEGIN_END := true, \
|
||||||
$(call genBinOps,$1_float,float,$$($1_BO),$$($1_RW),four,three)
|
KEYS := \
|
||||||
$(call genBinOps,$1_double,double,$$($1_BO),$$($1_RW),eight,seven)
|
$$($1_$2_RW_KEYS), \
|
||||||
endif
|
REPLACEMENTS := \
|
||||||
|
type=$2 \
|
||||||
$$($1_DST): $$($1_DEP) $(GENSRC_BUFFER_DST)/_the.buffer.dir
|
RW=$$($1_$2_RW_REPLACEMENT) \
|
||||||
$(RM) $$($1_OUT).tmp
|
LG_BYTES_PER_VALUE=$$($1_$2_LBPV) \
|
||||||
$(TOOL_SPP) -i$$($1_SRC) -o$$($1_OUT).tmp \
|
BYTES_PER_VALUE="(1$$$$(SPACE)<<$$$$(SPACE)$$($1_$2_LBPV))" \
|
||||||
-K$$($1_type) \
|
a=$$(call Conv, $2, a) \
|
||||||
-K$$($1_category) \
|
fulltype=$$(call Conv, $2, fulltype) \
|
||||||
-K$$($1_streams) \
|
memtype=$$(call Conv, $2, memtype) \
|
||||||
-Dtype=$$($1_type) \
|
Memtype=$$(call Conv, $2, Memtype) \
|
||||||
-DType=$$($1_Type) \
|
nbytes=$$(call Conv, $2, nbytes) \
|
||||||
-Dfulltype=$$($1_fulltype) \
|
nbytesButOne=$$(call Conv, $2, nbytesButOne) \
|
||||||
-DFulltype=$$($1_Fulltype) \
|
Type=$$(call Conv, $2, Type) \
|
||||||
-Dstreamtype=$$($1_streamtype) \
|
fromBits=$$(call Conv, $2, fromBits, $$($1_BYTE_ORDER)) \
|
||||||
-DStreamtype=$$($1_Streamtype) \
|
toBits=$$(call Conv, $2, toBits, $$($1_BYTE_ORDER)), \
|
||||||
-Dx=$$($1_x) \
|
))
|
||||||
-Dmemtype=$$($1_memtype) \
|
TARGETS += $$(GEN_BUFFER_$1_$2)
|
||||||
-DMemtype=$$($1_Memtype) \
|
|
||||||
-DSwaptype=$$($1_Swaptype) \
|
|
||||||
-DfromBits=$$($1_fromBits) \
|
|
||||||
-DtoBits=$$($1_toBits) \
|
|
||||||
-DLG_BYTES_PER_VALUE=$$($1_LBPV) \
|
|
||||||
-DBYTES_PER_VALUE="(1 << $$($1_LBPV))" \
|
|
||||||
-DBO=$$($1_BO) \
|
|
||||||
-Dswap=$$($1_swap) \
|
|
||||||
-DRW=$$($1_RW) \
|
|
||||||
-K$$($1_rwkey) \
|
|
||||||
-Da=$$($1_a) \
|
|
||||||
-DA=$$($1_A) \
|
|
||||||
-Kbo$$($1_BO)
|
|
||||||
$(MV) $$($1_OUT).tmp $$($1_OUT)
|
|
||||||
# Do the extra bin thing
|
|
||||||
ifeq ($$($1_BIN), 1)
|
|
||||||
$(SED) -e '/#BIN/,$$$$d' < $$($1_OUT) > $$($1_DST).tmp
|
|
||||||
$(RM) $$($1_OUT)
|
|
||||||
$$($1_char_CMD) -i$$($1_SRC_BIN) -o$$($1_DST).tmp
|
|
||||||
$$($1_short_CMD) -i$$($1_SRC_BIN) -o$$($1_DST).tmp
|
|
||||||
$$($1_int_CMD) -i$$($1_SRC_BIN) -o$$($1_DST).tmp
|
|
||||||
$$($1_long_CMD) -i$$($1_SRC_BIN) -o$$($1_DST).tmp
|
|
||||||
$$($1_float_CMD) -i$$($1_SRC_BIN) -o$$($1_DST).tmp
|
|
||||||
$$($1_double_CMD) -i$$($1_SRC_BIN) -o$$($1_DST).tmp
|
|
||||||
$(ECHO) "}" >> $$($1_DST).tmp
|
|
||||||
mv $$($1_DST).tmp $$($1_DST)
|
|
||||||
endif
|
|
||||||
|
|
||||||
GENSRC_BUFFER += $$($1_DST)
|
|
||||||
|
|
||||||
|
$1_BIN_SNIPPET_FILES += $$($1_$2_TMP)
|
||||||
endef
|
endef
|
||||||
|
|
||||||
###
|
################################################################################
|
||||||
|
# Setup make rules that creates a generated buffer class java source file,
|
||||||
X_BUF := X-Buffer
|
# according to specifications provided.
|
||||||
|
|
||||||
$(eval $(call SetupGenBuffer,ByteBuffer, $(X_BUF), type := byte, BIN := 1))
|
|
||||||
$(eval $(call SetupGenBuffer,CharBuffer, $(X_BUF), type := char))
|
|
||||||
$(eval $(call SetupGenBuffer,ShortBuffer, $(X_BUF), type := short))
|
|
||||||
$(eval $(call SetupGenBuffer,IntBuffer, $(X_BUF), type := int))
|
|
||||||
$(eval $(call SetupGenBuffer,LongBuffer, $(X_BUF), type := long))
|
|
||||||
$(eval $(call SetupGenBuffer,FloatBuffer, $(X_BUF), type := float))
|
|
||||||
$(eval $(call SetupGenBuffer,DoubleBuffer,$(X_BUF), type := double))
|
|
||||||
|
|
||||||
# Buffers whose contents are heap-allocated
|
|
||||||
#
|
#
|
||||||
HEAP_X_BUF := Heap-X-Buffer
|
# Parameter 1 is the name of the rule. This name is used as variable prefix,
|
||||||
|
# and the targets generated are listed in a variable by that name. The output
|
||||||
$(eval $(call SetupGenBuffer,HeapByteBuffer, $(HEAP_X_BUF), type := byte))
|
# file name is also based on this.
|
||||||
$(eval $(call SetupGenBuffer,HeapByteBufferR, $(HEAP_X_BUF), type := byte, RW := R))
|
|
||||||
$(eval $(call SetupGenBuffer,HeapCharBuffer, $(HEAP_X_BUF), type := char))
|
|
||||||
$(eval $(call SetupGenBuffer,HeapCharBufferR, $(HEAP_X_BUF), type := char, RW := R))
|
|
||||||
$(eval $(call SetupGenBuffer,HeapShortBuffer, $(HEAP_X_BUF), type := short))
|
|
||||||
$(eval $(call SetupGenBuffer,HeapShortBufferR, $(HEAP_X_BUF), type := short, RW := R))
|
|
||||||
$(eval $(call SetupGenBuffer,HeapIntBuffer, $(HEAP_X_BUF), type := int))
|
|
||||||
$(eval $(call SetupGenBuffer,HeapIntBufferR, $(HEAP_X_BUF), type := int, RW := R))
|
|
||||||
$(eval $(call SetupGenBuffer,HeapLongBuffer, $(HEAP_X_BUF), type := long))
|
|
||||||
$(eval $(call SetupGenBuffer,HeapLongBufferR, $(HEAP_X_BUF), type := long, RW := R))
|
|
||||||
$(eval $(call SetupGenBuffer,HeapFloatBuffer, $(HEAP_X_BUF), type := float))
|
|
||||||
$(eval $(call SetupGenBuffer,HeapFloatBufferR, $(HEAP_X_BUF), type := float, RW := R))
|
|
||||||
$(eval $(call SetupGenBuffer,HeapDoubleBuffer, $(HEAP_X_BUF), type := double))
|
|
||||||
$(eval $(call SetupGenBuffer,HeapDoubleBufferR,$(HEAP_X_BUF), type := double, RW := R))
|
|
||||||
|
|
||||||
# Direct byte buffer
|
|
||||||
#
|
#
|
||||||
DIRECT_X_BUF := Direct-X-Buffer
|
# Remaining parameters are named arguments. These include:
|
||||||
|
# TYPE The native type
|
||||||
$(eval $(call SetupGenBuffer,DirectByteBuffer, $(DIRECT_X_BUF), type := byte, BIN := 1))
|
# TEMPLATE The base file name of the template to use
|
||||||
$(eval $(call SetupGenBuffer,DirectByteBufferR,$(DIRECT_X_BUF), type := byte, BIN := 1, RW := R))
|
# BYTE_ORDER (U)nswapped/(S)wapped/(L)ittle/(B)ig
|
||||||
|
# READ_ONLY Set to true to generate read-only buffers (default: false)
|
||||||
# Unswapped views of direct byte buffers
|
# GENERATE_BIN Set to true to generate bin snippets (default: false)
|
||||||
#
|
#
|
||||||
$(eval $(call SetupGenBuffer,DirectCharBufferU, $(DIRECT_X_BUF), type := char, BO := U))
|
SetupGenBuffer = $(NamedParamsMacroTemplate)
|
||||||
$(eval $(call SetupGenBuffer,DirectCharBufferRU, $(DIRECT_X_BUF), type := char, RW := R, BO := U))
|
define SetupGenBufferBody
|
||||||
$(eval $(call SetupGenBuffer,DirectShortBufferU, $(DIRECT_X_BUF), type := short, BO := U))
|
$1_OUTPUT := $$(BUFFER_OUTPUT_DIR)/$1.java
|
||||||
$(eval $(call SetupGenBuffer,DirectShortBufferRU, $(DIRECT_X_BUF), type := short, RW := R, BO := U))
|
ifeq ($$($1_GENERATE_BIN), true)
|
||||||
$(eval $(call SetupGenBuffer,DirectIntBufferU, $(DIRECT_X_BUF), type := int, BO := U))
|
# After generating the buffer class, we need to do further post processing,
|
||||||
$(eval $(call SetupGenBuffer,DirectIntBufferRU, $(DIRECT_X_BUF), type := int, RW := R, BO := U))
|
# so output to a temporary file
|
||||||
$(eval $(call SetupGenBuffer,DirectLongBufferU, $(DIRECT_X_BUF), type := long, BO := U))
|
$1_REAL_OUTPUT := $$($1_OUTPUT)
|
||||||
$(eval $(call SetupGenBuffer,DirectLongBufferRU, $(DIRECT_X_BUF), type := long, RW := R, BO := U))
|
$1_OUTPUT := $$($1_OUTPUT).bin-snippet.tmp
|
||||||
$(eval $(call SetupGenBuffer,DirectFloatBufferU, $(DIRECT_X_BUF), type := float, BO := U))
|
endif
|
||||||
$(eval $(call SetupGenBuffer,DirectFloatBufferRU, $(DIRECT_X_BUF), type := float, RW := R, BO := U))
|
|
||||||
$(eval $(call SetupGenBuffer,DirectDoubleBufferU, $(DIRECT_X_BUF), type := double, BO := U))
|
|
||||||
$(eval $(call SetupGenBuffer,DirectDoubleBufferRU,$(DIRECT_X_BUF), type := double, RW := R, BO := U))
|
|
||||||
|
|
||||||
# Swapped views of direct byte buffers
|
$1_LBPV := $$(call Conv, $$($1_TYPE), LBPV)
|
||||||
|
ifeq ($$($1_READ_ONLY), true)
|
||||||
|
$1_RW_KEYS := ro
|
||||||
|
$1_RW_REPLACEMENT := R
|
||||||
|
else
|
||||||
|
$1_RW_KEYS := rw
|
||||||
|
$1_RW_REPLACEMENT :=
|
||||||
|
endif
|
||||||
|
|
||||||
|
$$(eval $$(call SetupStreamPreProcessing, GEN_BUFFER_$1, \
|
||||||
|
SOURCE_FILE := $$(BUFFER_INPUT_DIR)/$$($1_TEMPLATE).java.template, \
|
||||||
|
OUTPUT_FILE := $$($1_OUTPUT), \
|
||||||
|
INFO := Generating buffer class $1.java, \
|
||||||
|
KEYS := \
|
||||||
|
$$($1_TYPE) \
|
||||||
|
$$($1_RW_KEYS) \
|
||||||
|
bo$$($1_BYTE_ORDER) \
|
||||||
|
$$(call Conv, $$($1_TYPE), category) \
|
||||||
|
$$(call Conv, $$($1_TYPE), streams), \
|
||||||
|
REPLACEMENTS := \
|
||||||
|
type=$$($1_TYPE) \
|
||||||
|
BO=$$($1_BYTE_ORDER) \
|
||||||
|
RW=$$($1_RW_REPLACEMENT) \
|
||||||
|
LG_BYTES_PER_VALUE=$$($1_LBPV) \
|
||||||
|
BYTES_PER_VALUE="(1$$$$(SPACE)<<$$$$(SPACE)$$($1_$2_LBPV))" \
|
||||||
|
a=$$(call Conv, $$($1_TYPE), a) \
|
||||||
|
A=$$(call Conv, $$($1_TYPE), A) \
|
||||||
|
fulltype=$$(call Conv, $$($1_TYPE), fulltype) \
|
||||||
|
Fulltype=$$(call Conv, $$($1_TYPE), Fulltype) \
|
||||||
|
memtype=$$(call Conv, $$($1_TYPE), memtype) \
|
||||||
|
Memtype=$$(call Conv, $$($1_TYPE), Memtype) \
|
||||||
|
streamtype=$$(call Conv, $$($1_TYPE), streamtype) \
|
||||||
|
Streamtype=$$(call Conv, $$($1_TYPE), Streamtype) \
|
||||||
|
Type=$$(call Conv, $$($1_TYPE), Type) \
|
||||||
|
x=$$(call Conv, $$($1_TYPE), x) \
|
||||||
|
fromBits=$$(call Conv, $$($1_TYPE), fromBits, $$($1_BYTE_ORDER)) \
|
||||||
|
toBits=$$(call Conv, $$($1_TYPE), toBits, $$($1_BYTE_ORDER)) \
|
||||||
|
swap=$$(call Conv, $$($1_TYPE), swap, $$($1_BYTE_ORDER)) \
|
||||||
|
Swaptype=$$(call Conv, $$($1_TYPE), Swaptype, $$($1_BYTE_ORDER)), \
|
||||||
|
))
|
||||||
|
TARGETS += $$(GEN_BUFFER_$1)
|
||||||
|
$1 += $$(GEN_BUFFER_$1)
|
||||||
|
|
||||||
|
ifeq ($$($1_GENERATE_BIN), true)
|
||||||
|
# Setup generation of snippet files, one for each non-byte type. This will
|
||||||
|
# populate $1_BIN_SNIPPET_FILES.
|
||||||
|
$1_BIN_SNIPPET_FILES :=
|
||||||
|
$$(foreach t, $$(NON_BYTE_NUMBER_TYPES), \
|
||||||
|
$$(eval $$(call SetupGenBufferBinSnippets,$1,$$t)) \
|
||||||
|
)
|
||||||
|
|
||||||
|
# Inject these snippets in the file generated by GEN_BUFFER_$1
|
||||||
|
$$($1_REAL_OUTPUT): $$($1_OUTPUT) $$($1_BIN_SNIPPET_FILES)
|
||||||
|
$$(call LogInfo, Concatenating buffer class bin snippets for $1)
|
||||||
|
# Delete everything from the line containing #BIN and below
|
||||||
|
$$(SED) -e '/#BIN/,$$$$d' < $$($1_OUTPUT) > $$($1_REAL_OUTPUT).tmp
|
||||||
|
$$(CAT) $$($1_BIN_SNIPPET_FILES) >> $$($1_REAL_OUTPUT).tmp
|
||||||
|
$$(ECHO) "}" >> $$($1_REAL_OUTPUT).tmp
|
||||||
|
$$(MV) $$($1_REAL_OUTPUT).tmp $$($1_REAL_OUTPUT)
|
||||||
|
|
||||||
|
TARGETS += $$($1_REAL_OUTPUT)
|
||||||
|
$1 += $$($1_REAL_OUTPUT)
|
||||||
|
endif
|
||||||
|
endef
|
||||||
|
|
||||||
|
################################################################################
|
||||||
|
# Helper method to setup generation of all buffer classes, for a given
|
||||||
|
# modifiability state (read-only or not)
|
||||||
#
|
#
|
||||||
$(eval $(call SetupGenBuffer,DirectCharBufferS, $(DIRECT_X_BUF), type := char, BO := S))
|
# arg $1: READ_ONLY argument, true or false
|
||||||
$(eval $(call SetupGenBuffer,DirectCharBufferRS, $(DIRECT_X_BUF), type := char, RW := R, BO := S))
|
# arg $2: Modifiability marker for class name (R or empty)
|
||||||
$(eval $(call SetupGenBuffer,DirectShortBufferS, $(DIRECT_X_BUF), type := short, BO := S))
|
define SetupGenerateBuffersWithRO
|
||||||
$(eval $(call SetupGenBuffer,DirectShortBufferRS, $(DIRECT_X_BUF), type := short, RW := R, BO := S))
|
ifeq ($1, false)
|
||||||
$(eval $(call SetupGenBuffer,DirectIntBufferS, $(DIRECT_X_BUF), type := int, BO := S))
|
# The basic buffer classes are not generated in READ_ONLY versions
|
||||||
$(eval $(call SetupGenBuffer,DirectIntBufferRS, $(DIRECT_X_BUF), type := int, RW := R, BO := S))
|
$$(eval $$(call SetupGenBuffer, ByteBuffer, \
|
||||||
$(eval $(call SetupGenBuffer,DirectLongBufferS, $(DIRECT_X_BUF), type := long, BO := S))
|
TYPE := byte, \
|
||||||
$(eval $(call SetupGenBuffer,DirectLongBufferRS, $(DIRECT_X_BUF), type := long, RW := R, BO := S))
|
TEMPLATE := X-Buffer, \
|
||||||
$(eval $(call SetupGenBuffer,DirectFloatBufferS, $(DIRECT_X_BUF), type := float, BO := S))
|
GENERATE_BIN := true, \
|
||||||
$(eval $(call SetupGenBuffer,DirectFloatBufferRS, $(DIRECT_X_BUF), type := float, RW := R, BO := S))
|
))
|
||||||
$(eval $(call SetupGenBuffer,DirectDoubleBufferS, $(DIRECT_X_BUF), type := double, BO := S))
|
TARGETS += $$(ByteBuffer)
|
||||||
$(eval $(call SetupGenBuffer,DirectDoubleBufferRS,$(DIRECT_X_BUF), type := double, RW := R, BO := S))
|
|
||||||
|
|
||||||
# Big-endian views of byte buffers
|
$$(foreach t, $$(NON_BYTE_NUMBER_TYPES), \
|
||||||
#
|
$$(eval $$(call SetupGenBuffer, $$(call titlecase, $$t)Buffer, \
|
||||||
BYTE_X_BUF := ByteBufferAs-X-Buffer
|
TYPE := $$t, \
|
||||||
|
TEMPLATE := X-Buffer, \
|
||||||
|
)) \
|
||||||
|
$$(eval TARGETS += $$($$(call titlecase, $$t)Buffer)) \
|
||||||
|
)
|
||||||
|
endif
|
||||||
|
|
||||||
$(eval $(call SetupGenBuffer,ByteBufferAsCharBufferB, $(BYTE_X_BUF), type := char, BO := B))
|
# Buffers whose contents are heap-allocated, one for every type
|
||||||
$(eval $(call SetupGenBuffer,ByteBufferAsCharBufferRB, $(BYTE_X_BUF), type := char, RW := R, BO := B))
|
$$(foreach t, $$(NUMBER_TYPES), \
|
||||||
$(eval $(call SetupGenBuffer,ByteBufferAsShortBufferB, $(BYTE_X_BUF), type := short, BO := B))
|
$$(eval $$(call SetupGenBuffer, Heap$$(call titlecase, $$t)Buffer$2, \
|
||||||
$(eval $(call SetupGenBuffer,ByteBufferAsShortBufferRB, $(BYTE_X_BUF), type := short, RW := R, BO := B))
|
TYPE := $$t, \
|
||||||
$(eval $(call SetupGenBuffer,ByteBufferAsIntBufferB, $(BYTE_X_BUF), type := int, BO := B))
|
TEMPLATE := Heap-X-Buffer, \
|
||||||
$(eval $(call SetupGenBuffer,ByteBufferAsIntBufferRB, $(BYTE_X_BUF), type := int, RW := R, BO := B))
|
READ_ONLY := $1, \
|
||||||
$(eval $(call SetupGenBuffer,ByteBufferAsLongBufferB, $(BYTE_X_BUF), type := long, BO := B))
|
)) \
|
||||||
$(eval $(call SetupGenBuffer,ByteBufferAsLongBufferRB, $(BYTE_X_BUF), type := long, RW := R, BO := B))
|
$$(eval TARGETS += $$(Heap$$(call titlecase, $$t)Buffer$2)) \
|
||||||
$(eval $(call SetupGenBuffer,ByteBufferAsFloatBufferB, $(BYTE_X_BUF), type := float, BO := B))
|
)
|
||||||
$(eval $(call SetupGenBuffer,ByteBufferAsFloatBufferRB, $(BYTE_X_BUF), type := float, RW := R, BO := B))
|
|
||||||
$(eval $(call SetupGenBuffer,ByteBufferAsDoubleBufferB, $(BYTE_X_BUF), type := double, BO := B))
|
|
||||||
$(eval $(call SetupGenBuffer,ByteBufferAsDoubleBufferRB,$(BYTE_X_BUF), type := double, RW := R, BO := B))
|
|
||||||
|
|
||||||
# Little-endian views of byte buffers
|
# Treat byte special for DirectByteBuffer classes
|
||||||
#
|
$$(eval $$(call SetupGenBuffer, DirectByteBuffer$2, \
|
||||||
$(eval $(call SetupGenBuffer,ByteBufferAsCharBufferL, $(BYTE_X_BUF), type := char, BO := L))
|
TEMPLATE := Direct-X-Buffer, \
|
||||||
$(eval $(call SetupGenBuffer,ByteBufferAsCharBufferRL, $(BYTE_X_BUF), type := char, RW := R, BO := L))
|
TYPE := byte, \
|
||||||
$(eval $(call SetupGenBuffer,ByteBufferAsShortBufferL, $(BYTE_X_BUF), type := short, BO := L))
|
GENERATE_BIN := true, \
|
||||||
$(eval $(call SetupGenBuffer,ByteBufferAsShortBufferRL, $(BYTE_X_BUF), type := short, RW := R, BO := L))
|
READ_ONLY := $1, \
|
||||||
$(eval $(call SetupGenBuffer,ByteBufferAsIntBufferL, $(BYTE_X_BUF), type := int, BO := L))
|
))
|
||||||
$(eval $(call SetupGenBuffer,ByteBufferAsIntBufferRL, $(BYTE_X_BUF), type := int, RW := R, BO := L))
|
TARGETS += $$(DirectByteBuffer$2)
|
||||||
$(eval $(call SetupGenBuffer,ByteBufferAsLongBufferL, $(BYTE_X_BUF), type := long, BO := L))
|
|
||||||
$(eval $(call SetupGenBuffer,ByteBufferAsLongBufferRL, $(BYTE_X_BUF), type := long, RW := R, BO := L))
|
|
||||||
$(eval $(call SetupGenBuffer,ByteBufferAsFloatBufferL, $(BYTE_X_BUF), type := float, BO := L))
|
|
||||||
$(eval $(call SetupGenBuffer,ByteBufferAsFloatBufferRL, $(BYTE_X_BUF), type := float, RW := R, BO := L))
|
|
||||||
$(eval $(call SetupGenBuffer,ByteBufferAsDoubleBufferL, $(BYTE_X_BUF), type := double, BO := L))
|
|
||||||
$(eval $(call SetupGenBuffer,ByteBufferAsDoubleBufferRL,$(BYTE_X_BUF), type := double, RW := R, BO := L))
|
|
||||||
|
|
||||||
###
|
# Generate Swapped and Unswapped views of the direct byte buffers, each for
|
||||||
|
# every non-byte type
|
||||||
|
$$(foreach b, U S, \
|
||||||
|
$$(foreach t, $$(NON_BYTE_NUMBER_TYPES), \
|
||||||
|
$$(eval $$(call SetupGenBuffer, Direct$$(call titlecase, $$t)Buffer$2$$b, \
|
||||||
|
TYPE := $$t, \
|
||||||
|
TEMPLATE := Direct-X-Buffer, \
|
||||||
|
BYTE_ORDER := $$b, \
|
||||||
|
READ_ONLY := $1, \
|
||||||
|
)) \
|
||||||
|
$$(eval TARGETS += $$(Direct$$(call titlecase, $$t)Buffer$2$$b)) \
|
||||||
|
) \
|
||||||
|
)
|
||||||
|
|
||||||
$(GENSRC_BUFFER): $(BUILD_TOOLS_JDK)
|
# Generate Big and Little endian views of the direct byte buffers, each for
|
||||||
|
# every non-byte type
|
||||||
|
$$(foreach b, B L, \
|
||||||
|
$$(foreach t, $$(NON_BYTE_NUMBER_TYPES), \
|
||||||
|
$$(eval $$(call SetupGenBuffer, ByteBufferAs$$(call titlecase, $$t)Buffer$2$$b, \
|
||||||
|
TYPE := $$t, \
|
||||||
|
TEMPLATE := ByteBufferAs-X-Buffer, \
|
||||||
|
BYTE_ORDER := $$b, \
|
||||||
|
READ_ONLY := $1, \
|
||||||
|
)) \
|
||||||
|
$$(eval TARGETS += $$(ByteBufferAs$$(call titlecase, $$t)Buffer$2$$b)) \
|
||||||
|
) \
|
||||||
|
)
|
||||||
|
endef
|
||||||
|
|
||||||
TARGETS += $(GENSRC_BUFFER)
|
################################################################################
|
||||||
|
# Generate buffers in both read-write and read-only variants for all buffers
|
||||||
|
|
||||||
|
$(eval $(call SetupGenerateBuffersWithRO,false,))
|
||||||
|
$(eval $(call SetupGenerateBuffersWithRO,true,R))
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
|
|
||||||
|
|||||||
@@ -28,91 +28,74 @@ ifeq ($(INCLUDE), true)
|
|||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
|
|
||||||
GENSRC_CHARSETCODER :=
|
CHARSETCODER_INPUT := $(MODULE_SRC)/share/classes/java/nio/charset/Charset-X-Coder.java.template
|
||||||
|
CHARSETCODER_OUTPUT_DIR := $(SUPPORT_OUTPUTDIR)/gensrc/java.base/java/nio/charset
|
||||||
GENSRC_CHARSETCODER_DST := $(SUPPORT_OUTPUTDIR)/gensrc/java.base/java/nio/charset
|
|
||||||
|
|
||||||
GENSRC_CHARSETCODER_SRC := $(MODULE_SRC)/share/classes/java/nio
|
|
||||||
|
|
||||||
GENSRC_CHARSETCODER_TEMPLATE := $(GENSRC_CHARSETCODER_SRC)/charset/Charset-X-Coder.java.template
|
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
|
|
||||||
$(GENSRC_CHARSETCODER_DST)/CharsetDecoder.java: $(GENSRC_CHARSETCODER_TEMPLATE)
|
$(eval $(call SetupStreamPreProcessing, GEN_CHARSETDECODER, \
|
||||||
$(call MakeTargetDir)
|
SOURCE_FILE := $(CHARSETCODER_INPUT), \
|
||||||
$(RM) $@.tmp
|
OUTPUT_FILE := $(CHARSETCODER_OUTPUT_DIR)/CharsetDecoder.java, \
|
||||||
$(call ExecuteWithLog, $(SUPPORT_OUTPUTDIR)/gensrc/java.base/_charset_decoder, \
|
INFO := Generating CharsetDecoder.java, \
|
||||||
$(TOOL_SPP) -i$< -o$@.tmp \
|
KEYS := decoder, \
|
||||||
-Kdecoder \
|
REPLACEMENTS := \
|
||||||
-DA='A' \
|
A='A' \
|
||||||
-Da='a' \
|
a='a' \
|
||||||
-DCode='Decode' \
|
Code='Decode' \
|
||||||
-Dcode='decode' \
|
code='decode' \
|
||||||
-DitypesPhrase='bytes in a specific charset' \
|
itypesPhrase='bytes$$(SPACE)in$$(SPACE)a$$(SPACE)specific$$(SPACE)charset' \
|
||||||
-DotypesPhrase='sixteen-bit Unicode characters' \
|
otypesPhrase='sixteen-bit$$(SPACE)Unicode$$(SPACE)characters' \
|
||||||
-Ditype='byte' \
|
itype='byte' \
|
||||||
-Dotype='character' \
|
otype='character' \
|
||||||
-DItype='Byte' \
|
Itype='Byte' \
|
||||||
-DOtype='Char' \
|
Otype='Char' \
|
||||||
-Dcoder='decoder' \
|
coder='decoder' \
|
||||||
-DCoder='Decoder' \
|
Coder='Decoder' \
|
||||||
-Dcoding='decoding' \
|
coding='decoding' \
|
||||||
-DOtherCoder='Encoder' \
|
OtherCoder='Encoder' \
|
||||||
-DreplTypeName='string' \
|
replTypeName='string' \
|
||||||
-DdefaultRepl='"\\uFFFD"' \
|
replType='String' \
|
||||||
-DdefaultReplName='<code>"\\uFFFD"<\/code>' \
|
replFQType='java.lang.String' \
|
||||||
-DreplType='String' \
|
replLength='length()' \
|
||||||
-DreplFQType='java.lang.String' \
|
ItypesPerOtype='CharsPerByte' \
|
||||||
-DreplLength='length()' \
|
notLegal='not$$(SPACE)legal$$(SPACE)for$$(SPACE)this$$(SPACE)charset' \
|
||||||
-DItypesPerOtype='CharsPerByte' \
|
otypes-per-itype='chars-per-byte' \
|
||||||
-DnotLegal='not legal for this charset' \
|
outSequence='Unicode$$(SPACE)character', \
|
||||||
-Dotypes-per-itype='chars-per-byte' \
|
))
|
||||||
-DoutSequence='Unicode character')
|
|
||||||
$(MV) $@.tmp $@
|
|
||||||
|
|
||||||
GENSRC_CHARSETCODER += $(GENSRC_CHARSETCODER_DST)/CharsetDecoder.java
|
TARGETS += $(GEN_CHARSETDECODER)
|
||||||
|
|
||||||
################################################################################
|
$(eval $(call SetupStreamPreProcessing, GEN_CHARSETENCODER, \
|
||||||
|
SOURCE_FILE := $(CHARSETCODER_INPUT), \
|
||||||
|
OUTPUT_FILE := $(CHARSETCODER_OUTPUT_DIR)/CharsetEncoder.java, \
|
||||||
|
INFO := Generating CharsetEncoder.java, \
|
||||||
|
KEYS := encoder, \
|
||||||
|
REPLACEMENTS := \
|
||||||
|
A='An' \
|
||||||
|
a='an' \
|
||||||
|
Code='Encode' \
|
||||||
|
code='encode' \
|
||||||
|
itypesPhrase='sixteen-bit$$(SPACE)Unicode$$(SPACE)characters' \
|
||||||
|
otypesPhrase='bytes$$(SPACE)in$$(SPACE)a$$(SPACE)specific$$(SPACE)charset' \
|
||||||
|
itype='character' \
|
||||||
|
otype='byte' \
|
||||||
|
Itype='Char' \
|
||||||
|
Otype='Byte' \
|
||||||
|
coder='encoder' \
|
||||||
|
Coder='Encoder' \
|
||||||
|
coding='encoding' \
|
||||||
|
OtherCoder='Decoder' \
|
||||||
|
replTypeName='byte$$(SPACE)array' \
|
||||||
|
replType='byte[]' \
|
||||||
|
replFQType='byte[]' \
|
||||||
|
replLength='length' \
|
||||||
|
ItypesPerOtype='BytesPerChar' \
|
||||||
|
notLegal='not$$(SPACE)a$$(SPACE)legal$$(SPACE)sixteen-bit$$(SPACE)Unicode$$(SPACE)sequence' \
|
||||||
|
otypes-per-itype='bytes-per-char' \
|
||||||
|
outSequence='byte$$(SPACE)sequence$$(SPACE)in$$(SPACE)the$$(SPACE)given$$(SPACE)charset', \
|
||||||
|
))
|
||||||
|
|
||||||
$(GENSRC_CHARSETCODER_DST)/CharsetEncoder.java: $(GENSRC_CHARSETCODER_TEMPLATE)
|
TARGETS += $(GEN_CHARSETENCODER)
|
||||||
$(call MakeTargetDir)
|
|
||||||
$(RM) $@.tmp
|
|
||||||
$(call ExecuteWithLog, $(SUPPORT_OUTPUTDIR)/gensrc/java.base/_charset_encoder, \
|
|
||||||
$(TOOL_SPP) -i$< -o$@.tmp \
|
|
||||||
-Kencoder \
|
|
||||||
-DA='An' \
|
|
||||||
-Da='an' \
|
|
||||||
-DCode='Encode' \
|
|
||||||
-Dcode='encode' \
|
|
||||||
-DitypesPhrase='sixteen-bit Unicode characters' \
|
|
||||||
-DotypesPhrase='bytes in a specific charset' \
|
|
||||||
-Ditype='character' \
|
|
||||||
-Dotype='byte' \
|
|
||||||
-DItype='Char' \
|
|
||||||
-DOtype='Byte' \
|
|
||||||
-Dcoder='encoder' \
|
|
||||||
-DCoder='Encoder' \
|
|
||||||
-Dcoding='encoding' \
|
|
||||||
-DOtherCoder='Decoder' \
|
|
||||||
-DreplTypeName='byte array' \
|
|
||||||
-DdefaultRepl='new byte[] { (byte)'"'"\\?"'"' }' \
|
|
||||||
-DdefaultReplName='<code>{<\/code>\ <code>(byte)'"'"\\?"'"'<\/code>\ <code>}<\/code>' \
|
|
||||||
-DreplType='byte[]' \
|
|
||||||
-DreplFQType='byte[]' \
|
|
||||||
-DreplLength='length' \
|
|
||||||
-DItypesPerOtype='BytesPerChar' \
|
|
||||||
-DnotLegal='not a legal sixteen-bit Unicode sequence' \
|
|
||||||
-Dotypes-per-itype='bytes-per-char' \
|
|
||||||
-DoutSequence='byte sequence in the given charset')
|
|
||||||
$(MV) $@.tmp $@
|
|
||||||
|
|
||||||
GENSRC_CHARSETCODER += $(GENSRC_CHARSETCODER_DST)/CharsetEncoder.java
|
|
||||||
|
|
||||||
################################################################################
|
|
||||||
|
|
||||||
$(GENSRC_CHARSETCODER): $(BUILD_TOOLS_JDK)
|
|
||||||
|
|
||||||
TARGETS += $(GENSRC_CHARSETCODER)
|
|
||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
|
|
||||||
|
|||||||
@@ -50,5 +50,22 @@ TARGETS += $(GENSRC_INDICCONJUNCTBREAK)
|
|||||||
|
|
||||||
################################################################################
|
################################################################################
|
||||||
|
|
||||||
|
GENSRC_CASEFOLDING := $(SUPPORT_OUTPUTDIR)/gensrc/java.base/jdk/internal/util/regex/CaseFolding.java
|
||||||
|
|
||||||
|
CASEFOLDINGTEMP := $(MODULE_SRC)/share/classes/jdk/internal/util/regex/CaseFolding.java.template
|
||||||
|
CASEFOLDINGTXT := $(MODULE_SRC)/share/data/unicodedata/CaseFolding.txt
|
||||||
|
|
||||||
|
$(GENSRC_CASEFOLDING): $(BUILD_TOOLS_JDK) $(CASEFOLDINGTEMP) $(CASEFOLDINGTXT)
|
||||||
|
$(call LogInfo, Generating $@)
|
||||||
|
$(call MakeTargetDir)
|
||||||
|
$(TOOL_GENERATECASEFOLDING) \
|
||||||
|
$(CASEFOLDINGTEMP) \
|
||||||
|
$(CASEFOLDINGTXT) \
|
||||||
|
$(GENSRC_CASEFOLDING)
|
||||||
|
|
||||||
|
TARGETS += $(GENSRC_CASEFOLDING)
|
||||||
|
|
||||||
|
################################################################################
|
||||||
|
|
||||||
endif # include guard
|
endif # include guard
|
||||||
include MakeIncludeEnd.gmk
|
include MakeIncludeEnd.gmk
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user