Commit 95753bb
authored
Implement the Unix build system refactor (python#24)
This PR pretty much completely refactors the Rust build system. There are now two main ways Rust code is built:
# both
- The Rust triple is deduced based on the preprocessor run on Misc/platform_triplet.c
- A cpython-build-helper crate is used to pass the proper link arguments for each configuration
- The proper Rust toolchain is downloaded for iOS/Android/WASI for CI on those platforms
- cpython-sys is updated significantly to ensure bindgen properly generates the bindings for each platform
# shared
For shared builds, we build a crate into a cdylib and pass through link arguments from the makefile/configure and the linker executable so that the final link will match what is done for C programs.
# static
For static builds, a cpython-rust-staticlib crate is a built which depends on and re-exports the module initializers for each crate. This ensures there aren't duplicated Rust stdlib/core symbols.
Fixes python#231 parent e776700 commit 95753bb
File tree
22 files changed
+516
-126
lines changed- .github/workflows
- Misc
- Modules
- _base64
- src
- cpython-build-helper
- src
- cpython-rust-staticlib
- src
- cpython-sys
- src
- Tools/build
22 files changed
+516
-126
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
383 | 383 | | |
384 | 384 | | |
385 | 385 | | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
386 | 389 | | |
387 | 390 | | |
388 | 391 | | |
| |||
396 | 399 | | |
397 | 400 | | |
398 | 401 | | |
399 | | - | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
400 | 405 | | |
401 | 406 | | |
402 | 407 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
51 | 54 | | |
52 | 55 | | |
53 | 56 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
5 | 5 | | |
6 | 6 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
65 | 69 | | |
66 | 70 | | |
67 | 71 | | |
| |||
178 | 182 | | |
179 | 183 | | |
180 | 184 | | |
181 | | - | |
| 185 | + | |
| 186 | + | |
182 | 187 | | |
183 | 188 | | |
184 | 189 | | |
| |||
988 | 993 | | |
989 | 994 | | |
990 | 995 | | |
991 | | - | |
| 996 | + | |
992 | 997 | | |
993 | 998 | | |
994 | 999 | | |
| |||
1021 | 1026 | | |
1022 | 1027 | | |
1023 | 1028 | | |
1024 | | - | |
| 1029 | + | |
1025 | 1030 | | |
1026 | | - | |
| 1031 | + | |
1027 | 1032 | | |
1028 | 1033 | | |
1029 | 1034 | | |
1030 | 1035 | | |
1031 | 1036 | | |
1032 | 1037 | | |
1033 | | - | |
| 1038 | + | |
1034 | 1039 | | |
1035 | 1040 | | |
1036 | 1041 | | |
| |||
3374 | 3379 | | |
3375 | 3380 | | |
3376 | 3381 | | |
3377 | | - | |
| 3382 | + | |
| 3383 | + | |
| 3384 | + | |
| 3385 | + | |
| 3386 | + | |
| 3387 | + | |
3378 | 3388 | | |
3379 | 3389 | | |
3380 | 3390 | | |
| |||
0 commit comments