Target modifiers (special marked options) are recorded in metainfo#133138
Target modifiers (special marked options) are recorded in metainfo#133138bors merged 1 commit intorust-lang:masterfrom
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.
|
I have no idea how to fix those apple build problems. May I use "only-x86" in tests to avoid this problem? |
Yes, so long as you also comment alongside that directive that
|
a3a4327 to
e3aa87a
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 has been minimized.
This comment has been minimized.
This comment was marked as resolved.
This comment was marked as resolved.
…d compared to be equal in different crates
e3aa87a to
05c88a3
Compare
|
@bors r=davidtwco,saethlin |
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. |
|
@rustbot label F-target_modifiers |
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
Debugtrait.Error example:
-Cunsafe-allow-abi-mismatch=regparm,reg-struct-returnto disable list of flags.