-
Notifications
You must be signed in to change notification settings - Fork 13.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Target modifiers (special marked options) are recorded in metainfo #133138
Conversation
r? @davidtwco rustbot has assigned @davidtwco. Use |
This comment has been minimized.
This comment has been minimized.
d99ff62
to
bd52a23
Compare
This comment has been minimized.
This comment has been minimized.
bd52a23
to
500600b
Compare
This comment has been minimized.
This comment has been minimized.
db91299
to
43e5956
Compare
This comment has been minimized.
This comment has been minimized.
43e5956
to
6793451
Compare
95f9595
to
9cd86c3
Compare
@rustbot ready |
9cd86c3
to
97a8240
Compare
This comment has been minimized.
This comment has been minimized.
97a8240
to
8603b2b
Compare
8603b2b
to
95ffdf8
Compare
This comment was marked as resolved.
This comment was marked as resolved.
e3aa87a
to
05c88a3
Compare
@bors r=davidtwco,saethlin |
…davidtwco,saethlin Target modifiers (special marked options) are recorded in metainfo Target modifiers (special marked options) are recorded in metainfo and compared to be equal in different linked crates. PR for this RFC: rust-lang/rfcs#3716 Option may be marked as `TARGET_MODIFIER`, example: `regparm: Option<u32> = (None, parse_opt_number, [TRACKED TARGET_MODIFIER]`. If an TARGET_MODIFIER-marked option has non-default value, it will be recorded in crate metainfo as a `Vec<TargetModifier>`: ``` pub struct TargetModifier { pub opt: OptionsTargetModifiers, pub value_name: String, } ``` OptionsTargetModifiers is a macro-generated enum. Option value code (for comparison) is generated using `Debug` trait. Error example: ``` error: mixing `-Zregparm` will cause an ABI mismatch in crate `incompatible_regparm` --> $DIR/incompatible_regparm.rs:10:1 | LL | #![crate_type = "lib"] | ^ | = help: the `-Zregparm` flag modifies the ABI so Rust crates compiled with different values of this flag cannot be used together safely = note: `-Zregparm=1` in this crate is incompatible with `-Zregparm=2` in dependency `wrong_regparm` = help: set `-Zregparm=2` in this crate or `-Zregparm=1` in `wrong_regparm` = help: if you are sure this will not cause problems, use `-Cunsafe-allow-abi-mismatch=regparm` to silence this error error: aborting due to 1 previous error ``` `-Cunsafe-allow-abi-mismatch=regparm,reg-struct-return` to disable list of flags.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
@bors retry |
☀️ Test successful - checks-actions |
Finished benchmarking commit (7daf4cf): comparison URL. Overall result: no relevant changes - no action needed@rustbot label: -perf-regression Instruction countThis benchmark run did not return any relevant results for this metric. Max RSS (memory usage)This benchmark run did not return any relevant results for this metric. CyclesResults (primary 4.5%)This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
Binary sizeResults (secondary 0.0%)This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
Bootstrap: 778.369s -> 779.014s (0.08%) |
The tests are unignored on all platforms in #137801. |
Also, the amount of over-engineering in the implementation here is very high. There will only be several options like this, half of them will likely use some individual approach and smart comparison. A structure with a manually written field per every modifier should work well enough here. |
…rors tests: Unignore target modifier tests on all platforms These tests can be `check-pass` and do not need dynamic libraries. Also remove other unnecessary stuff from them. Follow up to rust-lang#133138.
…rors tests: Unignore target modifier tests on all platforms These tests can be `check-pass` and do not need dynamic libraries. Also remove other unnecessary stuff from them. Follow up to rust-lang#133138.
…rors tests: Unignore target modifier tests on all platforms These tests can be `check-pass` and do not need dynamic libraries. Also remove other unnecessary stuff from them. Follow up to rust-lang#133138.
…rors tests: Unignore target modifier tests on all platforms These tests can be `check-pass` and do not need dynamic libraries. Also remove other unnecessary stuff from them. Follow up to rust-lang#133138.
Rollup merge of rust-lang#137801 - petrochenkov:tarmod, r=compiler-errors tests: Unignore target modifier tests on all platforms These tests can be `check-pass` and do not need dynamic libraries. Also remove other unnecessary stuff from them. Follow up to rust-lang#133138.
Target modifiers (special marked options) are recorded in metainfo and compared to be equal in different linked crates.
PR for this RFC: rust-lang/rfcs#3716
Option may be marked as
TARGET_MODIFIER
, example:regparm: Option<u32> = (None, parse_opt_number, [TRACKED TARGET_MODIFIER]
.If an TARGET_MODIFIER-marked option has non-default value, it will be recorded in crate metainfo as a
Vec<TargetModifier>
:OptionsTargetModifiers is a macro-generated enum.
Option value code (for comparison) is generated using
Debug
trait.Error example:
-Cunsafe-allow-abi-mismatch=regparm,reg-struct-return
to disable list of flags.