We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 40f94c0 commit 9acc050Copy full SHA for 9acc050
src/librustc_back/target/mod.rs
@@ -397,7 +397,13 @@ impl Default for TargetOptions {
397
allow_asm: true,
398
has_elf_tls: false,
399
obj_is_bitcode: false,
400
- max_atomic_width: 0,
+ /// NOTE this is *not* the real default value. The default value of max_atomic_width is
401
+ /// actually the pointer width of the target. This default is injected in the
402
+ /// Target::from_json function. Still, we have to pick some value to put here. We'll pick
403
+ /// an impossible value: u64::max_value() because using a valid value like 0 or 8 as the
404
+ /// default would cause the max-atomic-width field to be "lost" (it would get replaced
405
+ /// by target_pointer_width) during the Target <-> JSON round trip
406
+ max_atomic_width: u64::max_value(),
407
}
408
409
0 commit comments