diff options
| author | Henry Jiang <henry.jiang1@ibm.com> | 2024-11-05 12:58:37 -0500 |
|---|---|---|
| committer | Henry Jiang <henry.jiang1@ibm.com> | 2024-11-05 12:58:37 -0500 |
| commit | 966f4b3b0c906838e689a438a06b9ade4f839e5c (patch) | |
| tree | 7d7eaf8313591c068696666dc0f40a293b9348d3 /src/tools | |
| parent | 096277e989d6de11c3077472fc05778e261e7b8e (diff) | |
add run-make support for aix
Diffstat (limited to 'src/tools')
| -rw-r--r-- | src/tools/compiletest/src/directive-list.rs | 1 | ||||
| -rw-r--r-- | src/tools/run-make-support/src/external_deps/rustc.rs | 5 | ||||
| -rw-r--r-- | src/tools/run-make-support/src/targets.rs | 6 |
3 files changed, 11 insertions, 1 deletions
diff --git a/src/tools/compiletest/src/directive-list.rs b/src/tools/compiletest/src/directive-list.rs index 980b3f6829a..446e90978f6 100644 --- a/src/tools/compiletest/src/directive-list.rs +++ b/src/tools/compiletest/src/directive-list.rs @@ -35,6 +35,7 @@ const KNOWN_DIRECTIVE_NAMES: &[&str] = &[ "ignore-64bit", "ignore-aarch64", "ignore-aarch64-unknown-linux-gnu", + "ignore-aix", "ignore-android", "ignore-apple", "ignore-arm", diff --git a/src/tools/run-make-support/src/external_deps/rustc.rs b/src/tools/run-make-support/src/external_deps/rustc.rs index 35d983dc607..c2989aedee1 100644 --- a/src/tools/run-make-support/src/external_deps/rustc.rs +++ b/src/tools/run-make-support/src/external_deps/rustc.rs @@ -5,7 +5,7 @@ use crate::command::Command; use crate::env::env_var; use crate::path_helpers::cwd; use crate::util::set_host_rpath; -use crate::{is_darwin, is_msvc, is_windows, uname}; +use crate::{is_aix, is_darwin, is_msvc, is_windows, uname}; /// Construct a new `rustc` invocation. This will automatically set the library /// search path as `-L cwd()`. Use [`bare_rustc`] to avoid this. @@ -365,6 +365,9 @@ impl Rustc { if is_msvc() { None } else { Some("-lstatic:-bundle=stdc++") } } else if is_darwin() { Some("-lc++") + } else if is_aix() { + self.cmd.arg("-lc++"); + Some("-lc++abi") } else { match &uname()[..] { "FreeBSD" | "SunOS" | "OpenBSD" => None, diff --git a/src/tools/run-make-support/src/targets.rs b/src/tools/run-make-support/src/targets.rs index 896abb73fc1..ae004fd0cbd 100644 --- a/src/tools/run-make-support/src/targets.rs +++ b/src/tools/run-make-support/src/targets.rs @@ -28,6 +28,12 @@ pub fn is_darwin() -> bool { target().contains("darwin") } +/// Check if target uses AIX. +#[must_use] +pub fn is_aix() -> bool { + target().contains("aix") +} + /// Get the target OS on Apple operating systems. #[must_use] pub fn apple_os() -> &'static str { |
