Skip to content

Commit a6a81ae

Browse files
committed
ci: Disable building std for AIX
``` error[E0425]: cannot find function `getenv` in this scope --> /home/runner/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/sys/pal/unix/os.rs:285:22 | 285 | if let Some(p) = getenv(OsStr::from_bytes("PATH".as_bytes())) { | ^^^^^^ not found in this scope | help: consider importing one of these functions | 8 + use crate::sys::env::getenv; | 8 + use libc::getenv; | ```
1 parent af0206e commit a6a81ae

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,8 @@ critical-section = { version = "1", optional = true }
8484

8585
# [target.'cfg(portable_atomic_test_no_std_static_assert_ffi)'.dependencies] #build:static_assert_ffi
8686
# test-helper = { features = ["sys"], git = "https://github.com/taiki-e/test-helper.git", rev = "93816e3" } #build:static_assert_ffi
87+
# [target.'cfg(all(portable_atomic_test_no_std_static_assert_ffi, target_os = "aix"))'.dependencies] #build:static_assert_ffi
88+
# libc = "=0.2.163" #build:static_assert_ffi
8789

8890
[dev-dependencies]
8991
build-context = "0.1"

tools/build.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,9 +159,9 @@ is_no_std() {
159159
case "$1" in
160160
*-linux-none*) ;;
161161
# https://github.com/rust-lang/rust/blob/1.84.0/library/std/build.rs#L65
162-
# ESP-IDF supports std, but it is often broken.
162+
# ESP-IDF and AIX supports std, but they are often broken.
163163
# aarch64-unknown-linux-uclibc is a custom target and libc/std currently doesn't support it.
164-
*-none* | *-psp* | *-psx* | *-cuda* | avr* | *-espidf | aarch64-unknown-linux-uclibc) return 0 ;;
164+
*-none* | *-psp* | *-psx* | *-cuda* | avr* | *-espidf | *-aix | aarch64-unknown-linux-uclibc) return 0 ;;
165165
esac
166166
return 1
167167
}

0 commit comments

Comments
 (0)