forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replace per-target ABI denylist with an allowlist
It makes very little sense to maintain denylists of ABIs when, as far as non-generic ABIs are concerned, targets usually only support a small subset of the available ABIs. This has historically been a cause of bugs such as us allowing use of the platform-specific ABIs on x86 targets – these in turn would cause LLVM errors or assertions to fire. Fixes rust-lang#57182 Sponsored by: standard.ai
- Loading branch information
Showing
101 changed files
with
1,507 additions
and
1,038 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,15 @@ | ||
use crate::spec::{SanitizerSet, Target, TargetOptions}; | ||
|
||
pub fn target() -> Target { | ||
let mut base = super::fuchsia_base::opts(); | ||
base.max_atomic_width = Some(128); | ||
base.supported_sanitizers = SanitizerSet::ADDRESS; | ||
|
||
Target { | ||
llvm_target: "aarch64-fuchsia".to_string(), | ||
pointer_width: 64, | ||
data_layout: "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128".to_string(), | ||
arch: "aarch64".to_string(), | ||
options: TargetOptions { unsupported_abis: super::arm_base::unsupported_abis(), ..base }, | ||
options: TargetOptions { | ||
max_atomic_width: Some(128), | ||
supported_sanitizers: SanitizerSet::ADDRESS, | ||
..super::fuchsia_base::opts() | ||
}, | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,11 @@ | ||
use crate::spec::{Target, TargetOptions}; | ||
|
||
pub fn target() -> Target { | ||
let mut base = super::freebsd_base::opts(); | ||
base.max_atomic_width = Some(128); | ||
|
||
Target { | ||
llvm_target: "aarch64-unknown-freebsd".to_string(), | ||
pointer_width: 64, | ||
data_layout: "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128".to_string(), | ||
arch: "aarch64".to_string(), | ||
options: TargetOptions { unsupported_abis: super::arm_base::unsupported_abis(), ..base }, | ||
options: TargetOptions { max_atomic_width: Some(128), ..super::freebsd_base::opts() }, | ||
} | ||
} |
17 changes: 7 additions & 10 deletions
17
compiler/rustc_target/src/spec/aarch64_unknown_linux_gnu.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,20 @@ | ||
use crate::spec::{SanitizerSet, Target, TargetOptions}; | ||
|
||
pub fn target() -> Target { | ||
let mut base = super::linux_gnu_base::opts(); | ||
base.max_atomic_width = Some(128); | ||
base.supported_sanitizers = SanitizerSet::ADDRESS | ||
| SanitizerSet::LEAK | ||
| SanitizerSet::MEMORY | ||
| SanitizerSet::THREAD | ||
| SanitizerSet::HWADDRESS; | ||
|
||
Target { | ||
llvm_target: "aarch64-unknown-linux-gnu".to_string(), | ||
pointer_width: 64, | ||
data_layout: "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128".to_string(), | ||
arch: "aarch64".to_string(), | ||
options: TargetOptions { | ||
unsupported_abis: super::arm_base::unsupported_abis(), | ||
mcount: "\u{1}_mcount".to_string(), | ||
..base | ||
max_atomic_width: Some(128), | ||
supported_sanitizers: SanitizerSet::ADDRESS | ||
| SanitizerSet::LEAK | ||
| SanitizerSet::MEMORY | ||
| SanitizerSet::THREAD | ||
| SanitizerSet::HWADDRESS, | ||
..super::linux_gnu_base::opts() | ||
}, | ||
} | ||
} |
7 changes: 2 additions & 5 deletions
7
compiler/rustc_target/src/spec/aarch64_unknown_linux_gnu_ilp32.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,15 @@ | ||
use crate::spec::{Target, TargetOptions}; | ||
|
||
pub fn target() -> Target { | ||
let mut base = super::linux_gnu_base::opts(); | ||
base.max_atomic_width = Some(128); | ||
|
||
Target { | ||
llvm_target: "aarch64-unknown-linux-gnu_ilp32".to_string(), | ||
pointer_width: 32, | ||
data_layout: "e-m:e-p:32:32-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128".to_string(), | ||
arch: "aarch64".to_string(), | ||
options: TargetOptions { | ||
unsupported_abis: super::arm_base::unsupported_abis(), | ||
max_atomic_width: Some(128), | ||
mcount: "\u{1}_mcount".to_string(), | ||
..base | ||
..super::linux_gnu_base::opts() | ||
}, | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,15 @@ | ||
use crate::spec::{Target, TargetOptions}; | ||
|
||
pub fn target() -> Target { | ||
let mut base = super::netbsd_base::opts(); | ||
base.max_atomic_width = Some(128); | ||
base.unsupported_abis = super::arm_base::unsupported_abis(); | ||
|
||
Target { | ||
llvm_target: "aarch64-unknown-netbsd".to_string(), | ||
pointer_width: 64, | ||
data_layout: "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128".to_string(), | ||
arch: "aarch64".to_string(), | ||
options: TargetOptions { mcount: "__mcount".to_string(), ..base }, | ||
options: TargetOptions { | ||
mcount: "__mcount".to_string(), | ||
max_atomic_width: Some(128), | ||
..super::netbsd_base::opts() | ||
}, | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,11 @@ | ||
use crate::spec::Target; | ||
use crate::spec::{Target, TargetOptions}; | ||
|
||
pub fn target() -> Target { | ||
let mut base = super::openbsd_base::opts(); | ||
base.max_atomic_width = Some(128); | ||
base.unsupported_abis = super::arm_base::unsupported_abis(); | ||
|
||
Target { | ||
llvm_target: "aarch64-unknown-openbsd".to_string(), | ||
pointer_width: 64, | ||
data_layout: "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128".to_string(), | ||
arch: "aarch64".to_string(), | ||
options: base, | ||
options: TargetOptions { max_atomic_width: Some(128), ..super::openbsd_base::opts() }, | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,11 @@ | ||
use crate::spec::{Target, TargetOptions}; | ||
|
||
pub fn target() -> Target { | ||
let mut base = super::vxworks_base::opts(); | ||
base.max_atomic_width = Some(128); | ||
|
||
Target { | ||
llvm_target: "aarch64-unknown-linux-gnu".to_string(), | ||
pointer_width: 64, | ||
data_layout: "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128".to_string(), | ||
arch: "aarch64".to_string(), | ||
options: TargetOptions { unsupported_abis: super::arm_base::unsupported_abis(), ..base }, | ||
options: TargetOptions { max_atomic_width: Some(128), ..super::vxworks_base::opts() }, | ||
} | ||
} |
Oops, something went wrong.