Gentoo Archives: gentoo-commits

From: Georgy Yakovlev <gyakovlev@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-lang/rust/
Date: Fri, 23 Sep 2022 03:34:56
Message-Id: 1663904069.4159d1c6bac0bf04a0a659d344f4bac47071b137.gyakovlev@gentoo
1 commit: 4159d1c6bac0bf04a0a659d344f4bac47071b137
2 Author: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
3 AuthorDate: Fri Sep 23 03:31:53 2022 +0000
4 Commit: Georgy Yakovlev <gyakovlev <AT> gentoo <DOT> org>
5 CommitDate: Fri Sep 23 03:34:29 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4159d1c6
7
8 dev-lang/rust: add 1.64.0
9
10 Signed-off-by: Georgy Yakovlev <gyakovlev <AT> gentoo.org>
11
12 dev-lang/rust/Manifest | 34 ++
13 dev-lang/rust/metadata.xml | 1 +
14 dev-lang/rust/rust-1.64.0.ebuild | 775 +++++++++++++++++++++++++++++++++++++++
15 3 files changed, 810 insertions(+)
16
17 diff --git a/dev-lang/rust/Manifest b/dev-lang/rust/Manifest
18 index c74098ee411a..2dab7c6a803c 100644
19 --- a/dev-lang/rust/Manifest
20 +++ b/dev-lang/rust/Manifest
21 @@ -158,6 +158,38 @@ DIST rust-1.62.0-x86_64-unknown-linux-gnu.tar.xz 153662720 BLAKE2B ff19ebb8a0607
22 DIST rust-1.62.0-x86_64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B a1602b9cfbdf1b66c479f13b7171cb445068b5f18eae620435b25c3ab1e762e41977e31f02158d259acf16b0c8cdf895af16d6f68904939333b030f21b6c7a01 SHA512 2d79af9fca5a7e19448aeefd330fcc436c3ecb8e617662f144b12303ef2a214a3ae3ec4d9a42f68a4d0d6e343b81b495deddf3df23031aacfbead0c97b083174
23 DIST rust-1.62.0-x86_64-unknown-linux-musl.tar.xz 254266584 BLAKE2B f566cdc94726532c50726ccf081eb2b825e52a56c74eb9d9e846f9933dafedef0a8a1b7c485938f96ae9945706192218cc318750738596923329bc23ef770ce1 SHA512 9cd01f0539db8cd344e9dd39fc5ffcd5b65c9c8c95ed692b9f7c23bc19c970c9f0056f8c8bb61813f1402143177a5b1c20bf844e64af8cf0be110e17e30aa4af
24 DIST rust-1.62.0-x86_64-unknown-linux-musl.tar.xz.asc 801 BLAKE2B 46f38806b5a6b67953c607d4a3074a9177e14245e746771d876530c398ea98019e534a22a099c087ea2386124cc952f0a488e45f8175922b19b42441d6607938 SHA512 bc30af1e75cbfc8b488782af26d91ccee6e3b3220913af8d2ca3fc6beb5790bd81e3348f8da5c0c542bd13ab6c4cee77f50f4ba0d48e9600620034acc2dafe15
25 +DIST rust-1.63.0-aarch64-unknown-linux-gnu.tar.xz 230083616 BLAKE2B 2b66b809d53cc971c9cd44435c10c4bf0faa20dcc3782b47955d0fac252c370c670f0adb59f51b6842b46277d584c5fd44b94202e57aed078480f5cb6952d815 SHA512 c9f7b885008c58f7aac0edd5b6cd0295d768215e2b26cb1f590206248d468fa78409f42f48d505080ee14e2a59dd887cfc564db5a41e91ed36d738a90961f89e
26 +DIST rust-1.63.0-aarch64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B a323669f0587c9785c587ac0eac72915e421a61d2b5252c2dcc7f637176d5d425fc8cbcfa6ef848fd0d7acfa17cd430e4d42e8c03729c563dda59aa13e6d5c5b SHA512 be2e1eff9228576b66e0a0434e1edbb4525d0ef66743082afef1ef55565e312e63fed7274d01298128fda0c7ab63827d5aed90f50e184582781a4e10ee311de1
27 +DIST rust-1.63.0-aarch64-unknown-linux-musl.tar.xz 224541836 BLAKE2B b32b7886ddc5da3af0c6e394ecb167288897b2c44b0108e33aeabb3842ff563c769e635413b092a36246bbcf137d692e94c6ce66cccad34c7e728c4cf4af7bc2 SHA512 e462c8b94defc5ac5dfe923c3a6273c3d414cf576840d46a680a4f333bc34fea874c4ec4363c4e1891a6fe95087bf4a68bba7f316bfed9db6313be989afd7428
28 +DIST rust-1.63.0-aarch64-unknown-linux-musl.tar.xz.asc 801 BLAKE2B ccac24e85deb6089468b763bce6cd54ec1c5ce506d10c8e84d3e8b0c9ee21946ac575a4aab5205c5a2d8328488641806a7dc1b15bd8cc48f3701630f223580f4 SHA512 9d41f34e507271e26e6ff7ce03d6a215a99971df77b246fa64b3518d70c2ec82142e96c4d0cf9641405065ec672f663316a93fe0e9183bd1e8f5af4de1ef41f1
29 +DIST rust-1.63.0-arm-unknown-linux-gnueabi.tar.xz 203850320 BLAKE2B 2a0f4e195d6e7ca66119b2bd45d58127b6aa305c77349c06d8ee109066ede59288ce067e222fca12f1414224a74ec9f33e7de1a18bf7b1e91e216e852e574a90 SHA512 d55ee6201bc4c3cd698396f08d4247b7578778b3c82da8ef496512e0f8cb1758009af6286230a1b26849b5f27101a242d7e04851ae41a41f7547589103f5c0ce
30 +DIST rust-1.63.0-arm-unknown-linux-gnueabi.tar.xz.asc 801 BLAKE2B 26bdf2e38262d3e4b23c72f86325dd1275c08b5ccccd99c82b91a05cf800e3e6a2500bdc6d89a3582311292f6ba1ddd65b8a081b608c83adcb39faa708f8376d SHA512 0f1213cf05bbbf659103c7178f20780fa3ef807cd03417edcb901d6560411c3f96bfeeb0dcf555460675573cfb9d402fa3882d787015ecfbf83765ae9fc35325
31 +DIST rust-1.63.0-arm-unknown-linux-gnueabihf.tar.xz 204273564 BLAKE2B 4a3730dc3d1cc08c8a0a687328e19e7a78265eb81cc1a3312cc547bd4823951c28ab57ac87919aab346994a6f96ce9803f7429c6b1831e4fdb3a7f7f086a2a87 SHA512 d53bc819c7ca2e5fc116fec5a731d280ac701f19fd9a8707ee5e69fdc41544d3dce17f8cd61f9ad0b59a89409c9859634e5d91444a0361add69c36c3f47a379d
32 +DIST rust-1.63.0-arm-unknown-linux-gnueabihf.tar.xz.asc 801 BLAKE2B e71f5d6f404a408774f6246fe72596c59255ba1f1b52c4ef6fdef08da63178fefa46966370a1f4e04b95a68b119f166e01d2d2d347f9e4517908e87146a56d83 SHA512 c70a350de8d378ed8dcec42d697143e4cce18dfd176b4fbcea25e7c608ff3db51642ab1be3b13d277d7eeec5a0262aaf9c38527f7f14c02fc64f760d6438efb2
33 +DIST rust-1.63.0-armv7-unknown-linux-gnueabihf.tar.xz 209545116 BLAKE2B 2cb5610fc665f50505fa8b0d18b88cf79abca6a6b8503d46f76fc58b74e7d58e3b7aa1a790e7ba555b250d0f0bd48acd176ff1cf463eb7f37b34780b04b2c838 SHA512 e809ac29a9b24c82f7d950ebbad5d3c01dafba9554c55716a28e728b0218c6f8b3b7f1e31c277be3946da1a0e4228717d7a1a63db66716c19a79b2c5ac11fb92
34 +DIST rust-1.63.0-armv7-unknown-linux-gnueabihf.tar.xz.asc 801 BLAKE2B c6f1e717a7cb746dfe3d9b109d77bdf7cd918c2d60491d83b2d7cebf412140b9cae257df850587c16a7b1c8faa16ef029f628c6c2c7e5b6f1d088e1a03c33899 SHA512 c832521179dd7b7cda0e979bfbfe491d3a255cb47f03fe113ac1290540fdc7134ea08a2815c9ec422919579fff3db995aa0e7f72249e2d00d4790a58f1142680
35 +DIST rust-1.63.0-i686-unknown-linux-gnu.tar.xz 224058112 BLAKE2B 6a83fa3bd0fe2a7f0cdbf8b8c7a6662235f9690177c9ed06af7be969b08959d2c58a8689247cd61a9d9ff765e6946f2bb12b9d278a0701d4764bdf8d141dd4cf SHA512 8441267b1fb1cec3c9a2e226f6f6c5d66cdf9fa2026df272374432c501aefb515b8d21266ddee5297f8570de72c55fa5bf485c5a9790ad7687e5ad1811c72cad
36 +DIST rust-1.63.0-i686-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 5c2e92bdf15c1dbfdb2715fd4b1874a270e21bedad1c84967c4bf92a2818935dfdfc48673e3b52d991ae9557378a62a5905e8f3005f1bf12f6eb93415cc47b1c SHA512 f42f5e65f76c72f7dd6bfdbc730b3c4da50d1444df2b1282334a6a3e6cb0af175536b037c6a5f1fc4000640756e57a3176315e288fe23ba56abe8a6f4c763525
37 +DIST rust-1.63.0-mips-unknown-linux-gnu.tar.xz 161238712 BLAKE2B a60f7b8a190fb90e123c18fafde9fbfa6e27bedc849175351ec9871ea705c2a54eae59b5597e71e20d2e63c73065717ccb56eea59ed46d12c13ae4fe8125ae5e SHA512 dc7ec2f92bdcd52af83c71b07df0f31187b8f195e9900ba0ffa3688175cdd22e81c34ef45b5e84c2cb9b47adf990de20a2c9296b46c17cc06176c19e956923cb
38 +DIST rust-1.63.0-mips-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 7803d7c07170d1a9af4e83add8f9b42caec19f5c8af4163dd541069f8b3f86087a09e4c3447c0faba19d1c2173c2411503856254b34d7c57320be250dd5b72ab SHA512 a9e80d1417353298656b99137a20478265458c95914c9d547bb57905ac9b654127fbf6e7a4292bfe74afd0aaae20730a126910383822d0c75b2da164bf60341e
39 +DIST rust-1.63.0-mips64-unknown-linux-gnuabi64.tar.xz 166872588 BLAKE2B 3a052d6f4196cbf55feb173e36c22cd3316abf6081d6a94dd6a7ab3a675f447471555b721e162ca15cbc485c4571b647a9257649a1d23b69b9a0ef262827b2d7 SHA512 db23d30021d6f8a5fbec50b6dac13264e3aac003ff0604185999318b47370b4476ce9e6034ab9ab5f4fba03b393898968b8c9a698f2b71bc1f58b452b030d1c4
40 +DIST rust-1.63.0-mips64-unknown-linux-gnuabi64.tar.xz.asc 801 BLAKE2B f30125c52883076251a22bb8a90fdd642167ebd0688ceb8e349555491824cffbc0873526b0269419fbc6421c5976aab18f5c3bbf35b997b4afc5d48b1e080c03 SHA512 d86940292aa891f7f0fc10d14b5ee386f8481448b6ed26bd8aabf21a7341c0916b08eae0e26bcd1dcc0fad1fbc0d216a767d8eba3dcc2ed47c4bb0aab107ab80
41 +DIST rust-1.63.0-mipsel-unknown-linux-gnu.tar.xz 165974484 BLAKE2B 4dcbcb3e6255c9266c4476e62aa9a6d31c4ba48b9a830789d9cf245002b4fec762f86fb6713507dfac8227a4e9da32347e5ce9d029d53220f8b3037e2dcf47c5 SHA512 2fb7e3bdc925abfc8efc4ee30f19bf6eb5d5afc803332059cf855eee7ba7c6a85c578701798fd1b9f9b07a4a7b091283406ca02c797fdafc9e437b0ea85de8be
42 +DIST rust-1.63.0-mipsel-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B c42a76a7902234490f33b520494d85c5000592cb781d97c9def132fce39f3e582cfbe6c868a7dc494ce550228ee0c4195500a17489323c22f9aecc74d4915135 SHA512 62fa9ace175d1359ae61229e6618972ff1db42b8e826113af247fccd67c4f49dd4ad4d93eefa3801a20a164332404f9fa5002c75ede2b81eb277e64d1a29396a
43 +DIST rust-1.63.0-powerpc-unknown-linux-gnu.tar.xz 184571616 BLAKE2B 452ee709ba25db4569e4ed20f88ea4a14c8b45c85803b065b5bc6e005473c02dc745ae531b8e0c7642dbe50880dd2f9d359520a3f0fc09628327613ed706dd38 SHA512 2dd3ab750044501e882442e54fc78fe73f36758458c6107df7afd55f8333c01a2e69bde181ca1bf3a1529a3a2bf616d4f69708081c494cc1781be5fd2a58df29
44 +DIST rust-1.63.0-powerpc-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 13796a48f4ae628c2242ce4632ebdf4106899aa0713b469e4ad4457f0bad23638626bdf6de6a2f6d1d84b8408872c5a4cc97ae4fa0409458d8bec6eb43adf9a5 SHA512 813601cbe547add62345d4a9ed1a31e364310724c2bddf9f76404095b9fa1ab3c33f9480953d22136635afc8d6f7d4a9df2839f2e3d9d5f74a6594ae3d7f9537
45 +DIST rust-1.63.0-powerpc64-unknown-linux-gnu.tar.xz 192446060 BLAKE2B 28a6c8a94caab7d23d203e55ad1ad1b689f07ea9d4bdb0a618833b36378ea731ca85f906c8fe0de2727001471fef9b30b8f12a241d9cd257851b2b0a8a94f15b SHA512 42a39558352c1cbdf7c9e9fa1aecae160b43e1bf74ace0df844d95bd43743642be7107bbb60a574de7219da355cf64939509d4f028f32d555a90900e962df6e8
46 +DIST rust-1.63.0-powerpc64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B ed2a82a7a04f1d831480f7aa32ef8f0524424aec50ae8f75d2c186937b1c3e3bd953306dafa026a492b1792043ccace535f26b4911691d58b27d799585d2f024 SHA512 c740ad1bd86074b27c233167e2a66b20a9e79d2505e6e00b38a1f8053f136218dc21618968c4d709c8c2936311449187ce15d16d078832b7107303b56ba9c55e
47 +DIST rust-1.63.0-powerpc64le-unknown-linux-gnu.tar.xz 202613736 BLAKE2B eb0fcc0c0a615dc1d48591e9d34bdfcdac5adbe2b5953faa8e11b0147a09a56fac3161e2c0f5c4c0d399a3a9431effdc84b938f00469f262c24f06d1c0489a08 SHA512 9c9927b9c22d8561a9b45b237e64d3afc1725cace695fa6623db65731e9ec2cd56e105949d866f5feb62c6ec717852461ef0153fc9d028fbc5323ef231eba69e
48 +DIST rust-1.63.0-powerpc64le-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B efdb321cae9af3c3ff8854b52281211c80833f30785004c70df79bb73b094a21fd63687372dd1cb192a2547fcb7d8bbc7c4ae27851695aecce71e085bad34396 SHA512 c876eedce00ef013d2af89218a6ab5108d9ab5e3a60d7afc5afacd39e5a017ab99ef12a0ff954e8861c42a3ff9bc9030077bd9801f575620e015590a82ea0f25
49 +DIST rust-1.63.0-riscv64gc-unknown-linux-gnu.tar.xz 195670272 BLAKE2B 487ce5fd3dfa59914264953792d8f44433d88d9ca29bb647effda24e170a55470cca35fe653f6706f78e6b0c70265d0735585b17d7108bd62b71cd84e7f1312a SHA512 b6da4a3651b205f819e002157d196b014e4ad9923f854271dd6b306d8c69dc3d619b9a3e51c56ea2d2402566fac775d42719a67952c8f3e93933594aadc67831
50 +DIST rust-1.63.0-riscv64gc-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 822415e792104724494f29dee1a9730fc0328e00ee613c163d3cc8298fd3f85465d5c31d2c94b479271dde0721690c78056ec3828e14087a5c5b82c0dee0d4b8 SHA512 9b2d8239708baefb075470aeb37d5b62fb934d4074c745d89467d4f9efb91c10b7c999b726c4edef720b58e95e525cc72fa20d4cfbe6d0ba1352f5fca5d1e195
51 +DIST rust-1.63.0-s390x-unknown-linux-gnu.tar.xz 219060812 BLAKE2B 8087db6ae903fed440bddfe4a07fee35292b16fdb847155cf584dc1a7adbeb4a8f55bd17afeb015dba53c29a05bfbd3f5373b2e30018e4a56d400fdbd1cedc3f SHA512 11bed7ebd8bf977aa34ef9f9dabee8428baede670885b4f268335fe87b81e41b426e94ca60db218e82be2e6e73ec33123c77922bfee7ae9373bfd9227417214c
52 +DIST rust-1.63.0-s390x-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 3f656cd12927155b4debb68e821d9db3fa880ee49c557246c34390c44ab6e2c456d8b29b1c15c933de868d0884a83b2b419501af06d4244830d59032d5ce82a5 SHA512 521f95024624200c67d556c533d307468007c01a7de37cbd65d4af949275933cfee51334338838f5e4a9136a363b65bec47bcf399ebacff7f5558ae59c1d006c
53 +DIST rust-1.63.0-x86_64-unknown-linux-gnu.tar.xz 155435832 BLAKE2B d5427a7380a214a7b1ad2f075b162f6f49056a96a3a1153df794025d9a1456083dd3e7ab9eb3c71982982701cc1f8a93405640f8b622fde60819ee022413446f SHA512 9e538980b6a42d14b7ec08bd1a3ddecfea24e5d3068226edf212486bb5a20bfcac22f1f917a06536f6f26dcffedd65c7049870bc3d70b9c972075bcbe58eb8d9
54 +DIST rust-1.63.0-x86_64-unknown-linux-gnu.tar.xz.asc 801 BLAKE2B 0b4465f1afbf2f5f9135cf722632ffd7df9ef4e92c65e9ef6d4aede5b1ff392973949a6737e88685033ee571dfefe9b099d477480d7aaec2a329926a87a6f5b2 SHA512 0c8d339204a23000cdebfaee7faaa576673bd8d98111ea187f5e19f03f7231f3bbec8158c5b04d8d903877f1addeebc9f4fdc6b1de0fc0ad2995742987eafb1c
55 +DIST rust-1.63.0-x86_64-unknown-linux-musl.tar.xz 254705824 BLAKE2B 8d35bbc3ffa53b52d7d7aacc51b90283d9703a40d5623c184a79195799aa3768a34942e235e2002a0b72d76110c0d66fb5ea403f9d0c81021ead52cea2a51e40 SHA512 995530319a14bd6674d5be145e777b7fd482953e62ecf672a29e2c5b4bf567e010d7db4d5c6acef1603d79135e74f21955d9fc13ed7e1c33279d05aae39bdfec
56 +DIST rust-1.63.0-x86_64-unknown-linux-musl.tar.xz.asc 801 BLAKE2B 2681d77ffb4c40305ff532f975a9e31ea72a50fa2a25661ecd721a50f081a4ab3a659b2a06500540dbf21357af098add2a4a4dec63f50d5b3ed4c041fe4b49dd SHA512 012b2cb560e0d2514eb288960e6a3703f9be9a7e611b915f07f1150645b8527fe653d3fbb795ad62c5e431cb4ca175a915710913eb2b9f2912c188d17baa0d14
57 DIST rustc-1.59.0-src.tar.xz 128942756 BLAKE2B b28114f14c9a0fec7db56fde79a985360fd8438c3b14eede49ed12e540c2636be960d0fd800c569af193886ac76fe8bf604d5dae59214ae08cb0cc6cc0ca404e SHA512 acace866871d13a55d365f65d7e15c192c3cd33096862571df6317e066b7474d668b95ae281e0244967778c05f1e33966c3c55616218bd25d3770a2b2d4f0365
58 DIST rustc-1.59.0-src.tar.xz.asc 801 BLAKE2B 061701c4fdbde930798f9f938ca3642204ae4a2ad9396937ca7d604268813d6d68f4979f20d35abdbbfeec0bb389acd86c9d3d84256db85861f6b11e3dbef80e SHA512 1b90bc01f9d68ba1f70591c4ae707295d7727b790d170a0b757d654684e59d3c26c45b66a21f9ac762debb6867494660c73daaf10be9bd567a38be44c0009f72
59 DIST rustc-1.60.0-src.tar.xz 136183048 BLAKE2B 8030f32c21f81af6abc7a282aab1189cb7d680c6bce58c119a1beaad71a3eeb36a696eef46a22d366e2c41a2f9182a9a5aa527426f2c8db05278184c37297dd0 SHA512 d0c113e8c2c67bf10773c9403dc4c4700c4deb2fb287bfec51e565d3473d2b481d8ae2c90b272cd67b3a87d7443ea25a34c7b40ba8cd7106bf5d71126ab141c3
60 @@ -170,3 +202,5 @@ DIST rustc-1.62.1-src.tar.xz 135644156 BLAKE2B ff8428362153770c57d53cb7eef07b759
61 DIST rustc-1.62.1-src.tar.xz.asc 801 BLAKE2B dd0e917f8b587eb8318a9c820df5ee9a052f14e7dea05d8afcb3cf687fa2e362e6d2f4d20fa94a19bdf97227c9ef29548a6e267ffd9113bfdc36cc42f341d8b8 SHA512 698bfd419c218a6cccce04869279708cf6084adc464a64d7dd1c981c0577249cd06b4de132634085c792c838aa1e1beaa11a5a06ea0e5f4c1a6f4e28afe65a3c
62 DIST rustc-1.63.0-src.tar.xz 136597192 BLAKE2B 52eb64ee11e7d9724a4c2654f7eea13521959ac5e04a4925eed5c89ec3661a7827146d6f9a9d05c98466bd4b74393af7bb18d9f418c785924f559833434dfe38 SHA512 0dd3cd1546bd9c1438afe0c4694e1ed80507f6b437674682c0474e13f83457e9ced4560ddeee58602e01837140f9e34a9e24c6828643dd6f613e07755af6997c
63 DIST rustc-1.63.0-src.tar.xz.asc 801 BLAKE2B b6c133768e368a7aeb0a4612a4c824d13f91ccdca6660feb5774ed6d79537084020780532c882ae3c9e4b6be3d36ceb0652eb134a580293ba8d8be74c4ba3c6e SHA512 f8807d46b9a3ca2a15a60f8062d63b3ee6e3210657cc752c948b3c7aa1626ec63cbd57529d010ad33f07ac47cf70dbf2cb50f200587338f77c631fc9e6786b17
64 +DIST rustc-1.64.0-src.tar.xz 137841332 BLAKE2B 8acd9e0a4632ba2114018a5cd3f2d544324c601c246658f60a9e0be513c40375434d0a416f0bfd4d24493eae3fec7c9f5bb52d008c88cde14de503a3b6873dd1 SHA512 919f40acd8c6eaaef399aa3248503bea19feb96697ab221aaede9ee789ce340b47cb899d1e0e41a31e5d7756653968a10d2faaa4aee83294c9f1243949b43516
65 +DIST rustc-1.64.0-src.tar.xz.asc 801 BLAKE2B 69f7bd7600d99794859c6fad4b44f0e98868e4e16041d6fe81d9d09a8435c75abac67a735adb0b81a2d9f85651841d404bc1ef4cd64fccd75e8a25d6d95729d0 SHA512 a831e3941849add1082c5b47b619ea87405b875d6eeb90a35f42742a511d124c29503debd17dcc8c6aa9e03a754ab51c3a15e99192bdd0dd1b8a59af9b6eb0b8
66
67 diff --git a/dev-lang/rust/metadata.xml b/dev-lang/rust/metadata.xml
68 index 99bf9058f4f2..f64700dcc740 100644
69 --- a/dev-lang/rust/metadata.xml
70 +++ b/dev-lang/rust/metadata.xml
71 @@ -18,6 +18,7 @@
72 <flag name="profiler">Build the profiler runtime and rust-demangler tool (needed for '-C profile-generate' or '-C instrument-coverage' codegen opts)</flag>
73 <flag name="rls">Install rls, Rust Language Server (used with IDEs supporting RLS protocol)</flag>
74 <flag name="rustfmt">Install rustfmt, Rust code formatter</flag>
75 + <flag name="rust-analyzer">Install rust-analyzer, A Rust compiler front-end for IDEs (like rls)</flag>
76 <flag name="rust-src">Install rust-src, needed by developer tools and for build-std (cross)</flag>
77 <flag name="system-bootstrap">Bootstrap using installed rust compiler</flag>
78 <flag name="system-llvm">Use the system LLVM installation</flag>
79
80 diff --git a/dev-lang/rust/rust-1.64.0.ebuild b/dev-lang/rust/rust-1.64.0.ebuild
81 new file mode 100644
82 index 000000000000..b979489c2f06
83 --- /dev/null
84 +++ b/dev-lang/rust/rust-1.64.0.ebuild
85 @@ -0,0 +1,775 @@
86 +# Copyright 1999-2022 Gentoo Authors
87 +# Distributed under the terms of the GNU General Public License v2
88 +
89 +EAPI=8
90 +
91 +PYTHON_COMPAT=( python3_{8..11} )
92 +
93 +inherit bash-completion-r1 check-reqs estack flag-o-matic llvm multiprocessing \
94 + multilib multilib-build python-any-r1 rust-toolchain toolchain-funcs verify-sig
95 +
96 +if [[ ${PV} = *beta* ]]; then
97 + betaver=${PV//*beta}
98 + BETA_SNAPSHOT="${betaver:0:4}-${betaver:4:2}-${betaver:6:2}"
99 + MY_P="rustc-beta"
100 + SLOT="beta/${PV}"
101 + SRC="${BETA_SNAPSHOT}/rustc-beta-src.tar.xz -> rustc-${PV}-src.tar.xz"
102 +else
103 + ABI_VER="$(ver_cut 1-2)"
104 + SLOT="stable/${ABI_VER}"
105 + MY_P="rustc-${PV}"
106 + SRC="${MY_P}-src.tar.xz"
107 + KEYWORDS="~amd64 ~arm ~arm64 ~mips ~ppc64 ~riscv ~sparc ~x86"
108 +fi
109 +
110 +RUST_STAGE0_VERSION="1.$(($(ver_cut 2) - 1)).0"
111 +
112 +DESCRIPTION="Systems programming language from Mozilla"
113 +HOMEPAGE="https://www.rust-lang.org/"
114 +
115 +SRC_URI="
116 + https://static.rust-lang.org/dist/${SRC}
117 + verify-sig? ( https://static.rust-lang.org/dist/${SRC}.asc )
118 + !system-bootstrap? ( $(rust_all_arch_uris rust-${RUST_STAGE0_VERSION}) )
119 +"
120 +
121 +# keep in sync with llvm ebuild of the same version as bundled one.
122 +ALL_LLVM_TARGETS=( AArch64 AMDGPU ARM AVR BPF Hexagon Lanai Mips MSP430
123 + NVPTX PowerPC RISCV Sparc SystemZ WebAssembly X86 XCore )
124 +ALL_LLVM_TARGETS=( "${ALL_LLVM_TARGETS[@]/#/llvm_targets_}" )
125 +LLVM_TARGET_USEDEPS=${ALL_LLVM_TARGETS[@]/%/(-)?}
126 +
127 +LICENSE="|| ( MIT Apache-2.0 ) BSD-1 BSD-2 BSD-4 UoI-NCSA"
128 +
129 +IUSE="clippy cpu_flags_x86_sse2 debug dist doc llvm-libunwind miri nightly parallel-compiler profiler rls rustfmt rust-analyzer rust-src system-bootstrap system-llvm test wasm ${ALL_LLVM_TARGETS[*]}"
130 +
131 +# Please keep the LLVM dependency block separate. Since LLVM is slotted,
132 +# we need to *really* make sure we're not pulling more than one slot
133 +# simultaneously.
134 +
135 +# How to use it:
136 +# List all the working slots in LLVM_VALID_SLOTS, newest first.
137 +LLVM_VALID_SLOTS=( 14 )
138 +LLVM_MAX_SLOT="${LLVM_VALID_SLOTS[0]}"
139 +
140 +# splitting usedeps needed to avoid CI/pkgcheck's UncheckableDep limitation
141 +# (-) usedep needed because we may build with older llvm without that target
142 +LLVM_DEPEND="|| ( "
143 +for _s in ${LLVM_VALID_SLOTS[@]}; do
144 + LLVM_DEPEND+=" ( "
145 + for _x in ${ALL_LLVM_TARGETS[@]}; do
146 + LLVM_DEPEND+="
147 + ${_x}? ( sys-devel/llvm:${_s}[${_x}(-)] )"
148 + done
149 + LLVM_DEPEND+=" )"
150 +done
151 +unset _s _x
152 +LLVM_DEPEND+=" )
153 + <sys-devel/llvm-$(( LLVM_MAX_SLOT + 1 )):=
154 + wasm? ( sys-devel/lld )
155 +"
156 +
157 +# to bootstrap we need at least exactly previous version, or same.
158 +# most of the time previous versions fail to bootstrap with newer
159 +# for example 1.47.x, requires at least 1.46.x, 1.47.x is ok,
160 +# but it fails to bootstrap with 1.48.x
161 +# https://github.com/rust-lang/rust/blob/${PV}/src/stage0.txt
162 +RUST_DEP_PREV="$(ver_cut 1).$(($(ver_cut 2) - 1))*"
163 +RUST_DEP_CURR="$(ver_cut 1).$(ver_cut 2)*"
164 +BOOTSTRAP_DEPEND="||
165 + (
166 + =dev-lang/rust-"${RUST_DEP_PREV}"
167 + =dev-lang/rust-bin-"${RUST_DEP_PREV}"
168 + =dev-lang/rust-"${RUST_DEP_CURR}"
169 + =dev-lang/rust-bin-"${RUST_DEP_CURR}"
170 + )
171 +"
172 +
173 +BDEPEND="${PYTHON_DEPS}
174 + app-eselect/eselect-rust
175 + || (
176 + >=sys-devel/gcc-4.7
177 + >=sys-devel/clang-3.5
178 + )
179 + system-bootstrap? ( ${BOOTSTRAP_DEPEND} )
180 + !system-llvm? (
181 + >=dev-util/cmake-3.13.4
182 + dev-util/ninja
183 + )
184 + test? ( sys-devel/gdb )
185 + verify-sig? ( sec-keys/openpgp-keys-rust )
186 +"
187 +
188 +DEPEND="
189 + >=app-arch/xz-utils-5.2
190 + net-misc/curl:=[http2,ssl]
191 + sys-libs/zlib:=
192 + dev-libs/openssl:0=
193 + system-llvm? (
194 + ${LLVM_DEPEND}
195 + llvm-libunwind? ( sys-libs/llvm-libunwind:= )
196 + )
197 + !system-llvm? (
198 + !llvm-libunwind? (
199 + elibc_musl? ( sys-libs/libunwind:= )
200 + )
201 + )
202 +"
203 +
204 +RDEPEND="${DEPEND}
205 + app-eselect/eselect-rust
206 + sys-apps/lsb-release
207 +"
208 +
209 +REQUIRED_USE="|| ( ${ALL_LLVM_TARGETS[*]} )
210 + miri? ( nightly )
211 + parallel-compiler? ( nightly )
212 + rls? ( rust-src )
213 + test? ( ${ALL_LLVM_TARGETS[*]} )
214 + wasm? ( llvm_targets_WebAssembly )
215 + x86? ( cpu_flags_x86_sse2 )
216 +"
217 +
218 +# we don't use cmake.eclass, but can get a warning
219 +CMAKE_WARN_UNUSED_CLI=no
220 +
221 +QA_FLAGS_IGNORED="
222 + usr/lib/${PN}/${PV}/bin/.*
223 + usr/lib/${PN}/${PV}/libexec/.*
224 + usr/lib/${PN}/${PV}/lib/lib.*.so
225 + usr/lib/${PN}/${PV}/lib/rustlib/.*/bin/.*
226 + usr/lib/${PN}/${PV}/lib/rustlib/.*/lib/lib.*.so
227 +"
228 +
229 +QA_SONAME="
230 + usr/lib/${PN}/${PV}/lib/lib.*.so.*
231 + usr/lib/${PN}/${PV}/lib/rustlib/.*/lib/lib.*.so
232 +"
233 +
234 +QA_PRESTRIPPED="
235 + usr/lib/${PN}/${PV}/lib/rustlib/.*/bin/rust-llvm-dwp
236 +"
237 +
238 +# An rmeta file is custom binary format that contains the metadata for the crate.
239 +# rmeta files do not support linking, since they do not contain compiled object files.
240 +# so we can safely silence the warning for this QA check.
241 +QA_EXECSTACK="usr/lib/${PN}/${PV}/lib/rustlib/*/lib*.rlib:lib.rmeta"
242 +
243 +# causes double bootstrap
244 +RESTRICT="test"
245 +
246 +VERIFY_SIG_OPENPGP_KEY_PATH=${BROOT}/usr/share/openpgp-keys/rust.asc
247 +
248 +PATCHES=(
249 + "${FILESDIR}"/1.55.0-ignore-broken-and-non-applicable-tests.patch
250 + "${FILESDIR}"/1.62.1-musl-dynamic-linking.patch
251 + "${FILESDIR}"/1.61.0-gentoo-musl-target-specs.patch
252 +)
253 +
254 +S="${WORKDIR}/${MY_P}-src"
255 +
256 +toml_usex() {
257 + usex "${1}" true false
258 +}
259 +
260 +bootstrap_rust_version_check() {
261 + # never call from pkg_pretend. eselect-rust may be not installed yet.
262 + [[ ${MERGE_TYPE} == binary ]] && return
263 + local rustc_wanted="$(ver_cut 1).$(($(ver_cut 2) - 1))"
264 + local rustc_toonew="$(ver_cut 1).$(($(ver_cut 2) + 1))"
265 + local rustc_version=( $(eselect --brief rust show 2>/dev/null) )
266 + rustc_version=${rustc_version[0]#rust-bin-}
267 + rustc_version=${rustc_version#rust-}
268 +
269 + [[ -z "${rustc_version}" ]] && die "Failed to determine rust version, check 'eselect rust' output"
270 +
271 + if ver_test "${rustc_version}" -lt "${rustc_wanted}" ; then
272 + eerror "Rust >=${rustc_wanted} is required"
273 + eerror "please run 'eselect rust' and set correct rust version"
274 + die "selected rust version is too old"
275 + elif ver_test "${rustc_version}" -ge "${rustc_toonew}" ; then
276 + eerror "Rust <${rustc_toonew} is required"
277 + eerror "please run 'eselect rust' and set correct rust version"
278 + die "selected rust version is too new"
279 + else
280 + einfo "Using rust ${rustc_version} to build"
281 + fi
282 +}
283 +
284 +pre_build_checks() {
285 + local M=8192
286 + # multiply requirements by 1.3 if we are doing x86-multilib
287 + if use amd64; then
288 + M=$(( $(usex abi_x86_32 13 10) * ${M} / 10 ))
289 + fi
290 + M=$(( $(usex clippy 128 0) + ${M} ))
291 + M=$(( $(usex miri 128 0) + ${M} ))
292 + M=$(( $(usex rls 512 0) + ${M} ))
293 + M=$(( $(usex rustfmt 256 0) + ${M} ))
294 + # add 2G if we compile llvm and 256M per llvm_target
295 + if ! use system-llvm; then
296 + M=$(( 2048 + ${M} ))
297 + local ltarget
298 + for ltarget in ${ALL_LLVM_TARGETS[@]}; do
299 + M=$(( $(usex ${ltarget} 256 0) + ${M} ))
300 + done
301 + fi
302 + M=$(( $(usex wasm 256 0) + ${M} ))
303 + M=$(( $(usex debug 2 1) * ${M} ))
304 + eshopts_push -s extglob
305 + if is-flagq '-g?(gdb)?([1-9])'; then
306 + M=$(( 15 * ${M} / 10 ))
307 + fi
308 + eshopts_pop
309 + M=$(( $(usex system-bootstrap 0 1024) + ${M} ))
310 + M=$(( $(usex doc 256 0) + ${M} ))
311 + CHECKREQS_DISK_BUILD=${M}M check-reqs_pkg_${EBUILD_PHASE}
312 +}
313 +
314 +llvm_check_deps() {
315 + has_version -r "sys-devel/llvm:${LLVM_SLOT}[${LLVM_TARGET_USEDEPS// /,}]"
316 +}
317 +
318 +pkg_pretend() {
319 + pre_build_checks
320 +}
321 +
322 +pkg_setup() {
323 + pre_build_checks
324 + python-any-r1_pkg_setup
325 +
326 + export LIBGIT2_NO_PKG_CONFIG=1 #749381
327 +
328 + use system-bootstrap && bootstrap_rust_version_check
329 +
330 + if use system-llvm; then
331 + llvm_pkg_setup
332 +
333 + local llvm_config="$(get_llvm_prefix "${LLVM_MAX_SLOT}")/bin/llvm-config"
334 + export LLVM_LINK_SHARED=1
335 + export RUSTFLAGS="${RUSTFLAGS} -Lnative=$("${llvm_config}" --libdir)"
336 + fi
337 +}
338 +
339 +esetup_unwind_hack() {
340 + # https://bugs.gentoo.org/870280
341 + # this is a hack needed to bootstrap with libgcc_s linked tarball on llvm-libunwind system.
342 + # it should trigger for internal bootstrap or system-bootstrap with rust-bin.
343 + # the whole idea is for stage0 to bootstrap with fake libgcc_s.
344 + # final stage will receive -L${T}/lib but not -lgcc_s args, producing clean compiler.
345 + local fakelib="${T}/fakelib"
346 + mkdir -p "${fakelib}" || die
347 + # we need both symlinks, one for cargo runtime, other for linker.
348 + ln -s "${ESYSROOT}/usr/lib/libunwind.so" "${fakelib}/libgcc_s.so.1" || die
349 + ln -s "${ESYSROOT}/usr/lib/libunwind.so" "${fakelib}/libgcc_s.so" || die
350 + export LD_LIBRARY_PATH="${fakelib}"
351 + export RUSTFLAGS+=" -L${fakelib}"
352 + # this is a literally magic variable that gets through cargo cache, without it some
353 + # crates ignore RUSTFLAGS.
354 + # this variable can not contain leading space.
355 + export MAGIC_EXTRA_RUSTFLAGS+="${MAGIC_EXTRA_RUSTFLAGS:+ }-L${fakelib}"
356 +}
357 +
358 +src_prepare() {
359 + if ! use system-bootstrap; then
360 + has_version sys-devel/gcc || esetup_unwind_hack
361 + local rust_stage0_root="${WORKDIR}"/rust-stage0
362 + local rust_stage0="rust-${RUST_STAGE0_VERSION}-$(rust_abi)"
363 +
364 + "${WORKDIR}/${rust_stage0}"/install.sh --disable-ldconfig \
365 + --without=rust-docs --destdir="${rust_stage0_root}" --prefix=/ || die
366 + fi
367 +
368 + default
369 +}
370 +
371 +src_configure() {
372 + use system-llvm && filter-flags '-flto*' # https://bugs.gentoo.org/862109
373 +
374 + local rust_target="" rust_targets="" arch_cflags use_libcxx="false"
375 + local chost_target="$(get_abi_CHOST ${v##*.})"
376 +
377 + # Collect rust target names to compile standard libs for all ABIs.
378 + for v in $(multilib_get_enabled_abi_pairs); do
379 + rust_targets+=",\"$(rust_abi ${chost_target})\""
380 + done
381 + if use elibc_musl; then
382 + # we also want to build our -gentoo- target on musl, in addition to
383 + # -unknown- one provided by upstream
384 + rust_targets+="${rust_targets//-unknown-/-gentoo-}"
385 + fi
386 + if use wasm; then
387 + rust_targets+=",\"wasm32-unknown-unknown\""
388 + if use system-llvm; then
389 + # un-hardcode rust-lld linker for this target
390 + # https://bugs.gentoo.org/715348
391 + sed -i '/linker:/ s/rust-lld/wasm-ld/' compiler/rustc_target/src/spec/wasm_base.rs || die
392 + fi
393 + fi
394 + rust_targets="${rust_targets#,}"
395 +
396 + local tools='"cargo"'
397 + use clippy && tools+=',"clippy"'
398 + use miri && tools+=',"miri"'
399 + use profiler && tools+=',"rust-demangler"'
400 + use rls && tools+=',"rls","analysis"'
401 + use rustfmt && tools+=',"rustfmt"'
402 + use rust-analyzer && tools+=',"rust-analyzer"'
403 + use rust-src && tools+=',"src"'
404 +
405 + local rust_stage0_root
406 + if use system-bootstrap; then
407 + local printsysroot
408 + printsysroot="$(rustc --print sysroot || die "Can't determine rust's sysroot")"
409 + rust_stage0_root="${printsysroot}"
410 + else
411 + rust_stage0_root="${WORKDIR}"/rust-stage0
412 + fi
413 + # in case of prefix it will be already prefixed, as --print sysroot returns full path
414 + [[ -d ${rust_stage0_root} ]] || die "${rust_stage0_root} is not a directory"
415 +
416 + rust_target="$(rust_abi)"
417 +
418 + # https://bugs.gentoo.org/732632
419 + if tc-is-clang; then
420 + local clang_slot="$(clang-major-version)"
421 + if { has_version "sys-devel/clang:${clang_slot}[default-libcxx]" || is-flagq -stdlib=libc++; }; then
422 + use_libcxx="true"
423 + fi
424 + fi
425 +
426 + local cm_btype="$(usex debug DEBUG RELEASE)"
427 + cat <<- _EOF_ > "${S}"/config.toml
428 + changelog-seen = 2
429 + [llvm]
430 + download-ci-llvm = false
431 + optimize = $(toml_usex !debug)
432 + release-debuginfo = $(toml_usex debug)
433 + assertions = $(toml_usex debug)
434 + ninja = true
435 + targets = "${LLVM_TARGETS// /;}"
436 + experimental-targets = ""
437 + link-shared = $(toml_usex system-llvm)
438 + $(if [[ ${use_libcxx} == true ]]; then
439 + echo "use-libcxx = true"
440 + echo "static-libstdcpp = false"
441 + fi)
442 + $(case "${rust_target}" in
443 + i586-*-linux-*)
444 + # https://github.com/rust-lang/rust/issues/93059
445 + echo 'cflags = "-fcf-protection=none"'
446 + echo 'cxxflags = "-fcf-protection=none"'
447 + echo 'ldflags = "-fcf-protection=none"'
448 + ;;
449 + *)
450 + ;;
451 + esac)
452 + [llvm.build-config]
453 + CMAKE_VERBOSE_MAKEFILE = "ON"
454 + CMAKE_C_FLAGS_${cm_btype} = "${CFLAGS}"
455 + CMAKE_CXX_FLAGS_${cm_btype} = "${CXXFLAGS}"
456 + CMAKE_EXE_LINKER_FLAGS_${cm_btype} = "${LDFLAGS}"
457 + CMAKE_MODULE_LINKER_FLAGS_${cm_btype} = "${LDFLAGS}"
458 + CMAKE_SHARED_LINKER_FLAGS_${cm_btype} = "${LDFLAGS}"
459 + CMAKE_STATIC_LINKER_FLAGS_${cm_btype} = "${ARFLAGS}"
460 + [build]
461 + build-stage = 2
462 + test-stage = 2
463 + doc-stage = 2
464 + build = "${rust_target}"
465 + host = ["${rust_target}"]
466 + target = [${rust_targets}]
467 + cargo = "${rust_stage0_root}/bin/cargo"
468 + rustc = "${rust_stage0_root}/bin/rustc"
469 + rustfmt = "${rust_stage0_root}/bin/rustfmt"
470 + docs = $(toml_usex doc)
471 + compiler-docs = false
472 + submodules = false
473 + python = "${EPYTHON}"
474 + locked-deps = true
475 + vendor = true
476 + extended = true
477 + tools = [${tools}]
478 + verbose = 2
479 + sanitizers = false
480 + profiler = $(toml_usex profiler)
481 + cargo-native-static = false
482 + [install]
483 + prefix = "${EPREFIX}/usr/lib/${PN}/${PV}"
484 + sysconfdir = "etc"
485 + docdir = "share/doc/rust"
486 + bindir = "bin"
487 + libdir = "lib"
488 + mandir = "share/man"
489 + [rust]
490 + # https://github.com/rust-lang/rust/issues/54872
491 + codegen-units-std = 1
492 + optimize = true
493 + debug = $(toml_usex debug)
494 + debug-assertions = $(toml_usex debug)
495 + debug-assertions-std = $(toml_usex debug)
496 + debuginfo-level = $(usex debug 2 0)
497 + debuginfo-level-rustc = $(usex debug 2 0)
498 + debuginfo-level-std = $(usex debug 2 0)
499 + debuginfo-level-tools = $(usex debug 2 0)
500 + debuginfo-level-tests = 0
501 + backtrace = true
502 + incremental = false
503 + default-linker = "$(tc-getCC)"
504 + parallel-compiler = $(toml_usex parallel-compiler)
505 + channel = "$(usex nightly nightly stable)"
506 + description = "gentoo"
507 + rpath = false
508 + verbose-tests = true
509 + optimize-tests = $(toml_usex !debug)
510 + codegen-tests = true
511 + dist-src = false
512 + remap-debuginfo = true
513 + lld = $(usex system-llvm false $(toml_usex wasm))
514 + # only deny warnings if doc+wasm are NOT requested, documenting stage0 wasm std fails without it
515 + # https://github.com/rust-lang/rust/issues/74976
516 + # https://github.com/rust-lang/rust/issues/76526
517 + deny-warnings = $(usex wasm $(usex doc false true) true)
518 + backtrace-on-ice = true
519 + jemalloc = false
520 + [dist]
521 + src-tarball = false
522 + compression-formats = ["xz"]
523 + _EOF_
524 +
525 + for v in $(multilib_get_enabled_abi_pairs); do
526 + rust_target=$(rust_abi $(get_abi_CHOST ${v##*.}))
527 + arch_cflags="$(get_abi_CFLAGS ${v##*.})"
528 +
529 + export CFLAGS_${rust_target//-/_}="${arch_cflags}"
530 +
531 + cat <<- _EOF_ >> "${S}"/config.toml
532 + [target.${rust_target}]
533 + ar = "$(tc-getAR)"
534 + cc = "$(tc-getCC)"
535 + cxx = "$(tc-getCXX)"
536 + linker = "$(tc-getCC)"
537 + ranlib = "$(tc-getRANLIB)"
538 + llvm-libunwind = "$(usex llvm-libunwind $(usex system-llvm system in-tree) no)"
539 + _EOF_
540 + if use system-llvm; then
541 + cat <<- _EOF_ >> "${S}"/config.toml
542 + llvm-config = "$(get_llvm_prefix "${LLVM_MAX_SLOT}")/bin/llvm-config"
543 + _EOF_
544 + fi
545 + # by default librustc_target/spec/linux_musl_base.rs sets base.crt_static_default = true;
546 + # but we patch it and set to false here as well
547 + # also we enable extra -gentoo- vendor triplet target with same settings as above
548 + # musl-sysroot needs to be defined because rust treats it like an extra cross target
549 + # so HOST still stays -unknown-, but --tagrget xx-gentoo-linux-musl will have stdlib.
550 + if use elibc_musl; then
551 + cat <<- _EOF_ >> "${S}"/config.toml
552 + crt-static = false
553 + [target.${rust_target//-unknown-/-gentoo-}]
554 + musl-root = "${ESYSROOT}/usr"
555 + ar = "$(tc-getAR)"
556 + cc = "$(tc-getCC)"
557 + cxx = "$(tc-getCXX)"
558 + linker = "$(tc-getCC)"
559 + ranlib = "$(tc-getRANLIB)"
560 + llvm-libunwind = "$(usex llvm-libunwind $(usex system-llvm system in-tree) no)"
561 + _EOF_
562 + if use system-llvm; then
563 + cat <<- _EOF_ >> "${S}"/config.toml
564 + llvm-config = "$(get_llvm_prefix "${LLVM_MAX_SLOT}")/bin/llvm-config"
565 + _EOF_
566 + fi
567 +
568 + fi
569 + done
570 + if use wasm; then
571 + cat <<- _EOF_ >> "${S}"/config.toml
572 + [target.wasm32-unknown-unknown]
573 + linker = "$(usex system-llvm lld rust-lld)"
574 + # wasm target does not have profiler_builtins https://bugs.gentoo.org/848483
575 + profiler = false
576 + _EOF_
577 + fi
578 +
579 + if [[ -n ${I_KNOW_WHAT_I_AM_DOING_CROSS} ]]; then # whitespace intentionally shifted below
580 + # experimental cross support
581 + # discussion: https://bugs.gentoo.org/679878
582 + # TODO: c*flags, clang, system-llvm, cargo.eclass target support
583 + # it would be much better if we could split out stdlib
584 + # complilation to separate ebuild and abuse CATEGORY to
585 + # just install to /usr/lib/rustlib/<target>
586 +
587 + # extra targets defined as a bash array
588 + # spec format: <LLVM target>:<rust-target>:<CTARGET>
589 + # best place would be /etc/portage/env/dev-lang/rust
590 + # Example:
591 + # RUST_CROSS_TARGETS=(
592 + # "AArch64:aarch64-unknown-linux-gnu:aarch64-unknown-linux-gnu"
593 + # )
594 + # no extra hand holding is done, no target transformations, all
595 + # values are passed as-is with just basic checks, so it's up to user to supply correct values
596 + # valid rust targets can be obtained with
597 + # rustc --print target-list
598 + # matching cross toolchain has to be installed
599 + # matching LLVM_TARGET has to be enabled for both rust and llvm (if using system one)
600 + # only gcc toolchains installed with crossdev are checked for now.
601 +
602 + # BUG: we can't pass host flags to cross compiler, so just filter for now
603 + # BUG: this should be more fine-grained.
604 + filter-flags '-mcpu=*' '-march=*' '-mtune=*'
605 +
606 + local cross_target_spec
607 + for cross_target_spec in "${RUST_CROSS_TARGETS[@]}";do
608 + # extracts first element form <LLVM target>:<rust-target>:<CTARGET>
609 + local cross_llvm_target="${cross_target_spec%%:*}"
610 + # extracts toolchain triples, <rust-target>:<CTARGET>
611 + local cross_triples="${cross_target_spec#*:}"
612 + # extracts first element after before : separator
613 + local cross_rust_target="${cross_triples%%:*}"
614 + # extracts last element after : separator
615 + local cross_toolchain="${cross_triples##*:}"
616 + use llvm_targets_${cross_llvm_target} || die "need llvm_targets_${cross_llvm_target} target enabled"
617 + command -v ${cross_toolchain}-gcc > /dev/null 2>&1 || die "need ${cross_toolchain} cross toolchain"
618 +
619 + cat <<- _EOF_ >> "${S}"/config.toml
620 + [target.${cross_rust_target}]
621 + ar = "${cross_toolchain}-ar"
622 + cc = "${cross_toolchain}-gcc"
623 + cxx = "${cross_toolchain}-g++"
624 + linker = "${cross_toolchain}-gcc"
625 + ranlib = "${cross_toolchain}-ranlib"
626 + _EOF_
627 + if use system-llvm; then
628 + cat <<- _EOF_ >> "${S}"/config.toml
629 + llvm-config = "$(get_llvm_prefix "${LLVM_MAX_SLOT}")/bin/llvm-config"
630 + _EOF_
631 + fi
632 + if [[ "${cross_toolchain}" == *-musl* ]]; then
633 + cat <<- _EOF_ >> "${S}"/config.toml
634 + musl-root = "$(${cross_toolchain}-gcc -print-sysroot)/usr"
635 + _EOF_
636 + fi
637 +
638 + # append cross target to "normal" target list
639 + # example 'target = ["powerpc64le-unknown-linux-gnu"]'
640 + # becomes 'target = ["powerpc64le-unknown-linux-gnu","aarch64-unknown-linux-gnu"]'
641 +
642 + rust_targets="${rust_targets},\"${cross_rust_target}\""
643 + sed -i "/^target = \[/ s#\[.*\]#\[${rust_targets}\]#" config.toml || die
644 +
645 + ewarn
646 + ewarn "Enabled ${cross_rust_target} rust target"
647 + ewarn "Using ${cross_toolchain} cross toolchain"
648 + ewarn
649 + if ! has_version -b 'sys-devel/binutils[multitarget]' ; then
650 + ewarn "'sys-devel/binutils[multitarget]' is not installed"
651 + ewarn "'strip' will be unable to strip cross libraries"
652 + ewarn "cross targets will be installed with full debug information"
653 + ewarn "enable 'multitarget' USE flag for binutils to be able to strip object files"
654 + ewarn
655 + ewarn "Alternatively llvm-strip can be used, it supports stripping any target"
656 + ewarn "define STRIP=\"llvm-strip\" to use it (experimental)"
657 + ewarn
658 + fi
659 + done
660 + fi # I_KNOW_WHAT_I_AM_DOING_CROSS
661 +
662 + einfo "Rust configured with the following flags:"
663 + echo
664 + echo RUSTFLAGS="\"${RUSTFLAGS}\""
665 + echo RUSTFLAGS_BOOTSTRAP="\"${RUSTFLAGS_BOOTSTRAP}\""
666 + echo RUSTFLAGS_NOT_BOOTSTRAP="\"${RUSTFLAGS_NOT_BOOTSTRAP}\""
667 + echo MAGIC_EXTRA_RUSTFLAGS="\"${MAGIC_EXTRA_RUSTFLAGS}\""
668 + env | grep "CARGO_TARGET_.*_RUSTFLAGS="
669 + env | grep "CFLAGS_.*"
670 + echo
671 + einfo "config.toml contents:"
672 + cat "${S}"/config.toml || die
673 + echo
674 +}
675 +
676 +src_compile() {
677 + RUST_BACKTRACE=1 "${EPYTHON}" ./x.py build -vv --config="${S}"/config.toml -j$(makeopts_jobs) || die
678 +}
679 +
680 +src_test() {
681 + # https://rustc-dev-guide.rust-lang.org/tests/intro.html
682 +
683 + # those are basic and codegen tests.
684 + local tests=(
685 + codegen
686 + codegen-units
687 + compile-fail
688 + incremental
689 + mir-opt
690 + pretty
691 + run-make
692 + )
693 +
694 + # fails if llvm is not built with ALL targets.
695 + # and known to fail with system llvm sometimes.
696 + use system-llvm || tests+=( assembly )
697 +
698 + # fragile/expensive/less important tests
699 + # or tests that require extra builds
700 + # TODO: instead of skipping, just make some nonfatal.
701 + if [[ ${ERUST_RUN_EXTRA_TESTS:-no} != no ]]; then
702 + tests+=(
703 + rustdoc
704 + rustdoc-js
705 + rustdoc-js-std
706 + rustdoc-ui
707 + run-make-fulldeps
708 + ui
709 + ui-fulldeps
710 + )
711 + fi
712 +
713 + local i failed=()
714 + einfo "rust_src_test: enabled tests ${tests[@]/#/src/test/}"
715 + for i in "${tests[@]}"; do
716 + local t="src/test/${i}"
717 + einfo "rust_src_test: running ${t}"
718 + if ! (
719 + IFS=$'\n'
720 + env $(cat "${S}"/config.env) RUST_BACKTRACE=1 \
721 + "${EPYTHON}" ./x.py test -vv --config="${S}"/config.toml \
722 + -j$(makeopts_jobs) --no-doc --no-fail-fast "${t}"
723 + )
724 + then
725 + failed+=( "${t}" )
726 + eerror "rust_src_test: ${t} failed"
727 + fi
728 + done
729 +
730 + if [[ ${#failed[@]} -ne 0 ]]; then
731 + eerror "rust_src_test: failure summary: ${failed[@]}"
732 + die "aborting due to test failures"
733 + fi
734 +}
735 +
736 +src_install() {
737 + (
738 + IFS=$'\n'
739 + env $(cat "${S}"/config.env) DESTDIR="${D}" \
740 + "${EPYTHON}" ./x.py install -vv --config="${S}"/config.toml -j$(makeopts_jobs) || die
741 + )
742 +
743 + # bug #689562, #689160
744 + rm -v "${ED}/usr/lib/${PN}/${PV}/etc/bash_completion.d/cargo" || die
745 + rmdir -v "${ED}/usr/lib/${PN}/${PV}"/etc{/bash_completion.d,} || die
746 + newbashcomp src/tools/cargo/src/etc/cargo.bashcomp.sh cargo
747 +
748 + local symlinks=(
749 + cargo
750 + rustc
751 + rustdoc
752 + rust-gdb
753 + rust-gdbgui
754 + rust-lldb
755 + )
756 +
757 + use clippy && symlinks+=( clippy-driver cargo-clippy )
758 + use miri && symlinks+=( miri cargo-miri )
759 + use profiler && symlinks+=( rust-demangler )
760 + use rls && symlinks+=( rls )
761 + use rustfmt && symlinks+=( rustfmt cargo-fmt )
762 + use rust-analyzer && symlinks+=( rust-analyzer )
763 +
764 + einfo "installing eselect-rust symlinks and paths: ${symlinks[@]}"
765 + local i
766 + for i in "${symlinks[@]}"; do
767 + # we need realpath on /usr/bin/* symlink return version-appended binary path.
768 + # so /usr/bin/rustc should point to /usr/lib/rust/<ver>/bin/rustc-<ver>
769 + # need to fix eselect-rust to remove this hack.
770 + local ver_i="${i}-${PV}"
771 + if [[ -f "${ED}/usr/lib/${PN}/${PV}/bin/${i}" ]]; then
772 + einfo "Installing ${i} symlink"
773 + ln -v "${ED}/usr/lib/${PN}/${PV}/bin/${i}" "${ED}/usr/lib/${PN}/${PV}/bin/${ver_i}" || die
774 + else
775 + ewarn "${i} symlink requested, but source file not found"
776 + ewarn "please report this"
777 + fi
778 + dosym "../lib/${PN}/${PV}/bin/${ver_i}" "/usr/bin/${ver_i}"
779 + done
780 +
781 + # symlinks to switch components to active rust in eselect
782 + dosym "${PV}/lib" "/usr/lib/${PN}/lib-${PV}"
783 + dosym "${PV}/libexec" "/usr/lib/${PN}/libexec-${PV}"
784 + dosym "${PV}/share/man" "/usr/lib/${PN}/man-${PV}"
785 + dosym "rust/${PV}/lib/rustlib" "/usr/lib/rustlib-${PV}"
786 + dosym "../../lib/${PN}/${PV}/share/doc/rust" "/usr/share/doc/${P}"
787 +
788 + newenvd - "50${P}" <<-_EOF_
789 + LDPATH="${EPREFIX}/usr/lib/rust/lib"
790 + MANPATH="${EPREFIX}/usr/lib/rust/man"
791 + _EOF_
792 +
793 + rm -rf "${ED}/usr/lib/${PN}/${PV}"/*.old || die
794 + rm -rf "${ED}/usr/lib/${PN}/${PV}/doc"/*.old || die
795 +
796 + # note: eselect-rust adds EROOT to all paths below
797 + cat <<-_EOF_ > "${T}/provider-${P}"
798 + /usr/bin/cargo
799 + /usr/bin/rustdoc
800 + /usr/bin/rust-gdb
801 + /usr/bin/rust-gdbgui
802 + /usr/bin/rust-lldb
803 + /usr/lib/rustlib
804 + /usr/lib/rust/lib
805 + /usr/lib/rust/libexec
806 + /usr/lib/rust/man
807 + /usr/share/doc/rust
808 + _EOF_
809 +
810 + if use clippy; then
811 + echo /usr/bin/clippy-driver >> "${T}/provider-${P}"
812 + echo /usr/bin/cargo-clippy >> "${T}/provider-${P}"
813 + fi
814 + if use miri; then
815 + echo /usr/bin/miri >> "${T}/provider-${P}"
816 + echo /usr/bin/cargo-miri >> "${T}/provider-${P}"
817 + fi
818 + if use profiler; then
819 + echo /usr/bin/rust-demangler >> "${T}/provider-${P}"
820 + fi
821 + if use rls; then
822 + echo /usr/bin/rls >> "${T}/provider-${P}"
823 + fi
824 + if use rustfmt; then
825 + echo /usr/bin/rustfmt >> "${T}/provider-${P}"
826 + echo /usr/bin/cargo-fmt >> "${T}/provider-${P}"
827 + fi
828 + if use rust-analyzer; then
829 + echo /usr/bin/rust-analyzer >> "${T}/provider-${P}"
830 + fi
831 +
832 + insinto /etc/env.d/rust
833 + doins "${T}/provider-${P}"
834 +
835 + if use dist; then
836 + insinto "/usr/lib/${PN}/${PV}/dist"
837 + doins -r "${S}/build/dist/."
838 + fi
839 +}
840 +
841 +pkg_postinst() {
842 + eselect rust update
843 +
844 + if has_version sys-devel/gdb || has_version dev-util/lldb; then
845 + elog "Rust installs a helper script for calling GDB and LLDB,"
846 + elog "for your convenience it is installed under /usr/bin/rust-{gdb,lldb}-${PV}."
847 + fi
848 +
849 + if has_version app-editors/emacs; then
850 + elog "install app-emacs/rust-mode to get emacs support for rust."
851 + fi
852 +
853 + if has_version app-editors/gvim || has_version app-editors/vim; then
854 + elog "install app-vim/rust-vim to get vim support for rust."
855 + fi
856 +}
857 +
858 +pkg_postrm() {
859 + eselect rust cleanup
860 +}