File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -397,7 +397,13 @@ impl Default for TargetOptions {
397
397
allow_asm : true ,
398
398
has_elf_tls : false ,
399
399
obj_is_bitcode : false ,
400
- max_atomic_width : 0 ,
400
+ /// 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 ( ) ,
401
407
}
402
408
}
403
409
}
You can’t perform that action at this time.
0 commit comments