Commit 5a70908
committed
rustc_target: Add TargetOption.check_environment
This function gets called after a Target is created, and can be used to verify
that the environment is suitable for building for a given target. E.g. it's a
place to check for environment variables, executables in the path, libraries
required for linking, and so on.
If the check fails, the user gets a simple error message instead of a backtrace
culminating in a message to file a bug against the Rust team.1 parent ac91805 commit 5a70908
File tree
6 files changed
+63
-7
lines changed- compiler
- rustc_driver_impl/src
- rustc_interface/src
- rustc_target/src/spec
- src/librustdoc
6 files changed
+63
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
271 | 271 | | |
272 | 272 | | |
273 | 273 | | |
274 | | - | |
| 274 | + | |
275 | 275 | | |
276 | 276 | | |
277 | 277 | | |
| |||
379 | 379 | | |
380 | 380 | | |
381 | 381 | | |
382 | | - | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
383 | 385 | | |
384 | 386 | | |
385 | 387 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
378 | 378 | | |
379 | 379 | | |
380 | 380 | | |
381 | | - | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
382 | 385 | | |
383 | 386 | | |
384 | 387 | | |
| |||
392 | 395 | | |
393 | 396 | | |
394 | 397 | | |
| 398 | + | |
395 | 399 | | |
396 | 400 | | |
397 | 401 | | |
398 | 402 | | |
399 | 403 | | |
400 | | - | |
| 404 | + | |
401 | 405 | | |
402 | 406 | | |
403 | 407 | | |
| |||
537 | 541 | | |
538 | 542 | | |
539 | 543 | | |
540 | | - | |
| 544 | + | |
541 | 545 | | |
542 | 546 | | |
543 | 547 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
261 | 261 | | |
262 | 262 | | |
263 | 263 | | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
264 | 273 | | |
265 | 274 | | |
266 | 275 | | |
| |||
655 | 664 | | |
656 | 665 | | |
657 | 666 | | |
| 667 | + | |
658 | 668 | | |
659 | 669 | | |
660 | 670 | | |
| |||
834 | 844 | | |
835 | 845 | | |
836 | 846 | | |
| 847 | + | |
837 | 848 | | |
838 | 849 | | |
839 | 850 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
933 | 933 | | |
934 | 934 | | |
935 | 935 | | |
| 936 | + | |
| 937 | + | |
| 938 | + | |
| 939 | + | |
| 940 | + | |
| 941 | + | |
| 942 | + | |
| 943 | + | |
| 944 | + | |
| 945 | + | |
| 946 | + | |
| 947 | + | |
| 948 | + | |
| 949 | + | |
| 950 | + | |
| 951 | + | |
| 952 | + | |
| 953 | + | |
| 954 | + | |
| 955 | + | |
| 956 | + | |
936 | 957 | | |
937 | 958 | | |
938 | 959 | | |
| |||
2657 | 2678 | | |
2658 | 2679 | | |
2659 | 2680 | | |
| 2681 | + | |
| 2682 | + | |
| 2683 | + | |
| 2684 | + | |
| 2685 | + | |
| 2686 | + | |
| 2687 | + | |
| 2688 | + | |
2660 | 2689 | | |
2661 | 2690 | | |
2662 | 2691 | | |
| |||
2759 | 2788 | | |
2760 | 2789 | | |
2761 | 2790 | | |
| 2791 | + | |
| 2792 | + | |
| 2793 | + | |
| 2794 | + | |
| 2795 | + | |
| 2796 | + | |
2762 | 2797 | | |
2763 | 2798 | | |
2764 | 2799 | | |
| |||
2884 | 2919 | | |
2885 | 2920 | | |
2886 | 2921 | | |
| 2922 | + | |
2887 | 2923 | | |
2888 | 2924 | | |
2889 | 2925 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
248 | 248 | | |
249 | 249 | | |
250 | 250 | | |
251 | | - | |
| 251 | + | |
| 252 | + | |
252 | 253 | | |
253 | 254 | | |
254 | 255 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
834 | 834 | | |
835 | 835 | | |
836 | 836 | | |
837 | | - | |
| 837 | + | |
| 838 | + | |
838 | 839 | | |
839 | 840 | | |
840 | 841 | | |
| |||
908 | 909 | | |
909 | 910 | | |
910 | 911 | | |
| 912 | + | |
911 | 913 | | |
0 commit comments