Skip to content

Commit 6136069

Browse files
author
Jorge Aparicio
committed
change max_atomic_width type from u64 to Option<u64>
to better express the idea that omitting this field defaults this value to target_pointer_width
1 parent 251f04e commit 6136069

File tree

58 files changed

+69
-74
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+69
-74
lines changed

src/librustc/session/config.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -926,7 +926,7 @@ pub fn default_configuration(sess: &Session) -> ast::CrateConfig {
926926
let os = &sess.target.target.target_os;
927927
let env = &sess.target.target.target_env;
928928
let vendor = &sess.target.target.target_vendor;
929-
let max_atomic_width = sess.target.target.options.max_atomic_width;
929+
let max_atomic_width = sess.target.target.max_atomic_width();
930930

931931
let fam = if let Some(ref fam) = sess.target.target.options.target_family {
932932
intern(fam)

src/librustc_back/target/aarch64_apple_ios.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ pub fn target() -> TargetResult {
2525
options: TargetOptions {
2626
features: "+neon,+fp-armv8,+cyclone".to_string(),
2727
eliminate_frame_pointer: false,
28-
max_atomic_width: 128,
28+
max_atomic_width: Some(128),
2929
.. base
3030
},
3131
})

src/librustc_back/target/aarch64_linux_android.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ use target::{Target, TargetResult};
1212

1313
pub fn target() -> TargetResult {
1414
let mut base = super::android_base::opts();
15-
base.max_atomic_width = 128;
15+
base.max_atomic_width = Some(128);
1616
// As documented in http://developer.android.com/ndk/guides/cpu-features.html
1717
// the neon (ASIMD) and FP must exist on all android aarch64 targets.
1818
base.features = "+neon,+fp-armv8".to_string();

src/librustc_back/target/aarch64_unknown_linux_gnu.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ use target::{Target, TargetResult};
1212

1313
pub fn target() -> TargetResult {
1414
let mut base = super::linux_base::opts();
15-
base.max_atomic_width = 128;
15+
base.max_atomic_width = Some(128);
1616
Ok(Target {
1717
llvm_target: "aarch64-unknown-linux-gnu".to_string(),
1818
target_endian: "little".to_string(),

src/librustc_back/target/arm_linux_androideabi.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ use target::{Target, TargetResult};
1313
pub fn target() -> TargetResult {
1414
let mut base = super::android_base::opts();
1515
base.features = "+v7,+vfp3,+d16".to_string();
16-
base.max_atomic_width = 64;
16+
base.max_atomic_width = Some(64);
1717

1818
Ok(Target {
1919
llvm_target: "arm-linux-androideabi".to_string(),

src/librustc_back/target/arm_unknown_linux_gnueabi.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ use target::{Target, TargetOptions, TargetResult};
1212

1313
pub fn target() -> TargetResult {
1414
let mut base = super::linux_base::opts();
15-
base.max_atomic_width = 64;
15+
base.max_atomic_width = Some(64);
1616
Ok(Target {
1717
llvm_target: "arm-unknown-linux-gnueabi".to_string(),
1818
target_endian: "little".to_string(),

src/librustc_back/target/arm_unknown_linux_gnueabihf.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ use target::{Target, TargetOptions, TargetResult};
1212

1313
pub fn target() -> TargetResult {
1414
let mut base = super::linux_base::opts();
15-
base.max_atomic_width = 64;
15+
base.max_atomic_width = Some(64);
1616
Ok(Target {
1717
llvm_target: "arm-unknown-linux-gnueabihf".to_string(),
1818
target_endian: "little".to_string(),

src/librustc_back/target/arm_unknown_linux_musleabi.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ pub fn target() -> TargetResult {
1616
// Most of these settings are copied from the arm_unknown_linux_gnueabi
1717
// target.
1818
base.features = "+v6".to_string();
19-
base.max_atomic_width = 64;
19+
base.max_atomic_width = Some(64);
2020
Ok(Target {
2121
// It's important we use "gnueabi" and not "musleabi" here. LLVM uses it
2222
// to determine the calling convention and float ABI, and it doesn't

src/librustc_back/target/arm_unknown_linux_musleabihf.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ pub fn target() -> TargetResult {
1616
// Most of these settings are copied from the arm_unknown_linux_gnueabihf
1717
// target.
1818
base.features = "+v6,+vfp2".to_string();
19-
base.max_atomic_width = 64;
19+
base.max_atomic_width = Some(64);
2020
Ok(Target {
2121
// It's important we use "gnueabihf" and not "musleabihf" here. LLVM
2222
// uses it to determine the calling convention and float ABI, and it

src/librustc_back/target/armv7_apple_ios.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ pub fn target() -> TargetResult {
2424
target_vendor: "apple".to_string(),
2525
options: TargetOptions {
2626
features: "+v7,+vfp3,+neon".to_string(),
27-
max_atomic_width: 64,
27+
max_atomic_width: Some(64),
2828
.. base
2929
}
3030
})

0 commit comments

Comments
 (0)