Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 13 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,8 @@ jobs:
os: ubuntu-latest
- tuple: nvptx64-nvidia-cuda
os: ubuntu-latest
- tuple: amdgcn-amd-amdhsa
os: ubuntu-latest
- tuple: thumbv6m-none-eabi
os: ubuntu-latest
- tuple: thumbv7m-none-eabi
Expand Down Expand Up @@ -201,6 +203,10 @@ jobs:
tuple: aarch64-apple-ios-macabi
os: macos-15
norun: true # https://github.com/rust-lang/stdarch/issues/1206
- target:
tuple: amdgcn-amd-amdhsa
os: ubuntu-latest
norun: true

steps:
- uses: actions/checkout@v4
Expand All @@ -212,12 +218,17 @@ jobs:

- run: rustup target add ${{ matrix.target.tuple }}
shell: bash
if: matrix.build_std == ''
if: matrix.build_std == '' && matrix.target.tuple != 'amdgcn-amd-amdhsa'
- run: |
rustup component add rust-src
echo "CARGO_UNSTABLE_BUILD_STD=std" >> $GITHUB_ENV
shell: bash
if: matrix.build_std != ''
- run: |
rustup component add rust-src
echo "CARGO_UNSTABLE_BUILD_STD=core,alloc" >> $GITHUB_ENV
shell: bash
if: matrix.target.tuple == 'amdgcn-amd-amdhsa'

# Configure some env vars based on matrix configuration
- run: echo "PROFILE=--profile=${{matrix.profile}}" >> $GITHUB_ENV
Expand All @@ -233,7 +244,7 @@ jobs:
if: matrix.disable_assert_instr != ''
- run: echo "NOSTD=1" >> $GITHUB_ENV
shell: bash
if: startsWith(matrix.target.tuple, 'thumb') || matrix.target.tuple == 'nvptx64-nvidia-cuda'
if: startsWith(matrix.target.tuple, 'thumb') || matrix.target.tuple == 'nvptx64-nvidia-cuda' || matrix.target.tuple == 'amdgcn-amd-amdhsa'

# Windows & OSX go straight to `run.sh` ...
- run: ./ci/run.sh
Expand Down
5 changes: 5 additions & 0 deletions ci/docker/amdgcn-amd-amdhsa/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
FROM ubuntu:25.10
RUN apt-get update && apt-get install -y --no-install-recommends \
gcc \
libc6-dev \
ca-certificates
9 changes: 9 additions & 0 deletions ci/dox.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,14 @@ dox() {

cargo clean --target "${1}"

if [ "${1}" == "amdgcn-amd-amdhsa" ]; then
if [ "$CI" != "" ]; then
rustup component add rust-src
fi
export CARGO_UNSTABLE_BUILD_STD=core,alloc
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we need to build alloc, core_arch is no_std, no_alloc

export RUSTFLAGS="${RUSTFLAGS} -Ctarget-cpu=gfx900"
fi

cargo build --verbose --target "${1}" --manifest-path crates/core_arch/Cargo.toml
cargo doc --verbose --target "${1}" --manifest-path crates/core_arch/Cargo.toml
}
Expand All @@ -33,6 +41,7 @@ if [ -z "$1" ]; then
#dox mips64-unknown-linux-gnuabi64
dox wasm32-unknown-unknown
dox nvptx64-nvidia-cuda
dox amdgcn-amd-amdhsa
else
dox "${1}"
fi
3 changes: 3 additions & 0 deletions ci/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ case ${TARGET} in
armv7-*eabihf | thumbv7-*eabihf)
export RUSTFLAGS="${RUSTFLAGS} -Ctarget-feature=+neon"
;;
amdgcn-*)
export RUSTFLAGS="${RUSTFLAGS} -Ctarget-cpu=gfx900"
;;
# Some of our test dependencies use the deprecated `gcc` crates which
# doesn't detect RISC-V compilers automatically, so do it manually here.
riscv*)
Expand Down
Loading