Rollup merge of #102293 - ecnelises:aix.initial, r=davidtwco
Add powerpc64-ibm-aix as Tier-3 target
This is part of the effort mentioned in https://github.com/rust-lang/compiler-team/issues/553.
A reference to these options are definitions from [clang](ad6fe32032/clang/lib/Basic/Targets/PPC.h (L414-L448)
) and [llvm](https://github.com/llvm/llvm-project/blob/main/llvm/lib/Target/PowerPC/PPCTargetMachine.cpp).
AIX has a system `ld` but [its options and behaviors](https://www.ibm.com/docs/en/aix/7.3?topic=l-ld-command) are different from GNU ld. Thanks to ``@bzEq`` for contributing the linking args.
This commit is contained in:
commit
b162bb4270
5 changed files with 65 additions and 1 deletions
|
@ -58,6 +58,7 @@ use rustc_macros::HashStable_Generic;
|
|||
pub mod abi;
|
||||
pub mod crt_objects;
|
||||
|
||||
mod aix_base;
|
||||
mod android_base;
|
||||
mod apple_base;
|
||||
mod avr_gnu_base;
|
||||
|
@ -1027,6 +1028,7 @@ supported_targets! {
|
|||
("powerpc-unknown-linux-gnu", powerpc_unknown_linux_gnu),
|
||||
("powerpc-unknown-linux-gnuspe", powerpc_unknown_linux_gnuspe),
|
||||
("powerpc-unknown-linux-musl", powerpc_unknown_linux_musl),
|
||||
("powerpc64-ibm-aix", powerpc64_ibm_aix),
|
||||
("powerpc64-unknown-linux-gnu", powerpc64_unknown_linux_gnu),
|
||||
("powerpc64-unknown-linux-musl", powerpc64_unknown_linux_musl),
|
||||
("powerpc64le-unknown-linux-gnu", powerpc64le_unknown_linux_gnu),
|
||||
|
@ -1454,6 +1456,9 @@ pub struct TargetOptions {
|
|||
pub families: StaticCow<[StaticCow<str>]>,
|
||||
/// Whether the target toolchain's ABI supports returning small structs as an integer.
|
||||
pub abi_return_struct_as_int: bool,
|
||||
/// Whether the target toolchain is like AIX's. Linker options on AIX are special and it uses
|
||||
/// XCOFF as binary format. Defaults to false.
|
||||
pub is_like_aix: bool,
|
||||
/// Whether the target toolchain is like macOS's. Only useful for compiling against iOS/macOS,
|
||||
/// in particular running dsymutil and some other stuff like `-dead_strip`. Defaults to false.
|
||||
/// Also indiates whether to use Apple-specific ABI changes, such as extending function
|
||||
|
@ -1817,6 +1822,7 @@ impl Default for TargetOptions {
|
|||
staticlib_suffix: ".a".into(),
|
||||
families: cvs![],
|
||||
abi_return_struct_as_int: false,
|
||||
is_like_aix: false,
|
||||
is_like_osx: false,
|
||||
is_like_solaris: false,
|
||||
is_like_windows: false,
|
||||
|
@ -2488,6 +2494,7 @@ impl Target {
|
|||
key!(staticlib_suffix);
|
||||
key!(families, TargetFamilies);
|
||||
key!(abi_return_struct_as_int, bool);
|
||||
key!(is_like_aix, bool);
|
||||
key!(is_like_osx, bool);
|
||||
key!(is_like_solaris, bool);
|
||||
key!(is_like_windows, bool);
|
||||
|
@ -2741,6 +2748,7 @@ impl ToJson for Target {
|
|||
target_option_val!(staticlib_suffix);
|
||||
target_option_val!(families, "target-family");
|
||||
target_option_val!(abi_return_struct_as_int);
|
||||
target_option_val!(is_like_aix);
|
||||
target_option_val!(is_like_osx);
|
||||
target_option_val!(is_like_solaris);
|
||||
target_option_val!(is_like_windows);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue