Files
TheRock/compiler/amd-llvm/clang/test/Driver/unsupported-target-arch.c
T
derek.holloway 7502bf64a4
CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
Flatten subprojects into a single base monorepo
2026-09-02 16:34:47 -07:00

80 lines
5.3 KiB
C

// Tests that clang does not crash with invalid architectures in target triples.
//
// RUN: not %clang --target=noarch-unknown-linux -o %t.o %s 2> %t.err
// RUN: FileCheck --input-file=%t.err --check-prefix=CHECK-NOARCH-LINUX %s
// CHECK-NOARCH-LINUX: error: unknown target triple 'noarch-unknown-linux'{{$}}
//
// RUN: not %clang --target=noarch-unknown-darwin -o %t.o %s 2> %t.err
// RUN: FileCheck --input-file=%t.err --check-prefix=CHECK-NOARCH-DARWIN %s
// CHECK-NOARCH-DARWIN: error: unknown target triple 'unknown-unknown-macosx{{.+}}'{{$}}
//
// RUN: not %clang --target=noarch-unknown-windows -o %t.o %s 2> %t.err
// RUN: FileCheck --input-file=%t.err --check-prefix=CHECK-NOARCH-WINDOWS %s
// CHECK-NOARCH-WINDOWS: error: unknown target triple 'noarch-unknown-windows-{{.+}}'{{$}}
//
// RUN: not %clang --target=noarch-unknown-freebsd -o %t.o %s 2> %t.err
// RUN: FileCheck --input-file=%t.err --check-prefix=CHECK-NOARCH-FREEBSD %s
// CHECK-NOARCH-FREEBSD: error: unknown target triple 'noarch-unknown-freebsd'{{$}}
//
// RUN: not %clang --target=noarch-unknown-netbsd -o %t.o %s 2> %t.err
// RUN: FileCheck --input-file=%t.err --check-prefix=CHECK-NOARCH-NETBSD %s
// CHECK-NOARCH-NETBSD: error: unknown target triple 'noarch-unknown-netbsd'{{$}}
//
// RUN: not %clang --target=noarch-unknown-windows-gnu -o %t.o %s 2> %t.err
// RUN: FileCheck --input-file=%t.err --check-prefix=CHECK-NOARCH-MINGW %s
// CHECK-NOARCH-MINGW: error: unknown target triple 'noarch-unknown-windows-gnu'
// RUN: not %clang --target=noarch-unknown-windows-itanium -o %t.o %s 2> %t.err
// RUN: FileCheck --input-file=%t.err --check-prefix=CHECK-NOARCH-CROSSWINDOWS %s
// CHECK-NOARCH-CROSSWINDOWS: error: unknown target triple 'noarch-unknown-windows-itanium'
// RUN: not %clang --target=aarch64-none-eabi -o %t.o %s 2> %t.err
// RUN: FileCheck --input-file=%t.err --check-prefix=CHECK-AARCH64-INVALID-ENV %s
// CHECK-AARCH64-INVALID-ENV: warning: mismatch between architecture and environment in target triple 'aarch64-none-eabi'; did you mean 'aarch64-none-elf'? [-Winvalid-command-line-argument]{{$}}
// RUN: not %clang --target=aarch64_be-none-eabihf -o %t.o %s 2> %t.err
// RUN: FileCheck --input-file=%t.err --check-prefix=CHECK-AARCH64_BE-INVALID-ENV %s
// CHECK-AARCH64_BE-INVALID-ENV: warning: mismatch between architecture and environment in target triple 'aarch64_be-none-eabihf'; did you mean 'aarch64_be-none-elf'? [-Winvalid-command-line-argument]{{$}}
// RUN: not %clang --target=aarch64_32-none-eabi -o %t.o %s 2> %t.err
// RUN: FileCheck --input-file=%t.err --check-prefix=CHECK-AARCH64_32-INVALID-ENV %s
// CHECK-AARCH64_32-INVALID-ENV: warning: mismatch between architecture and environment in target triple 'aarch64_32-none-eabi'; did you mean 'aarch64_32-none-elf'? [-Winvalid-command-line-argument]{{$}}
// RUN: not %clang --target=arm-none-elf -o %t.o %s 2> %t.err
// RUN: FileCheck --input-file=%t.err --check-prefix=CHECK-ARM-INVALID-ENV %s
// CHECK-ARM-INVALID-ENV: warning: mismatch between architecture and environment in target triple 'arm-none-elf'; did you mean 'arm-none-eabi'? [-Winvalid-command-line-argument]{{$}}
// RUN: not %clang --target=armeb-none-elf -o %t.o %s 2> %t.err
// RUN: FileCheck --input-file=%t.err --check-prefix=CHECK-ARMEB-INVALID-ENV %s
// CHECK-ARMEB-INVALID-ENV: warning: mismatch between architecture and environment in target triple 'armeb-none-elf'; did you mean 'armeb-none-eabi'? [-Winvalid-command-line-argument]{{$}}
// RUN: not %clang --target=thumbv6m-none-elf -o %t.o %s 2> %t.err
// RUN: FileCheck --input-file=%t.err --check-prefix=CHECK-THUMB-INVALID-ENV %s
// CHECK-THUMB-INVALID-ENV: warning: mismatch between architecture and environment in target triple 'thumbv6m-none-elf'; did you mean 'thumbv6m-none-eabi'? [-Winvalid-command-line-argument]{{$}}
// RUN: not %clang --target=thumbeb-none-elf -o %t.o %s 2> %t.err
// RUN: FileCheck --input-file=%t.err --check-prefix=CHECK-THUMBEB-INVALID-ENV %s
// CHECK-THUMBEB-INVALID-ENV: warning: mismatch between architecture and environment in target triple 'thumbeb-none-elf'; did you mean 'thumbeb-none-eabi'? [-Winvalid-command-line-argument]{{$}}
// RUN: not %clang --target=powerpc-apple-darwin -o /dev/null %s 2> %t.err
// RUN: FileCheck --input-file=%t.err --check-prefix=CHECK-PPCMAC %s
// CHECK-PPCMAC: error: unknown target triple 'unknown-apple-macosx{{.*}}'
// RUN: not %clang --target=aarch64-unknown-uefi -o %t.o %s 2> %t.err
// RUN: FileCheck --input-file=%t.err --check-prefix=CHECK-AARCH64 %s
// RUN: not %clang_cl --target=aarch64-unknown-uefi -o %t.o %s 2> %t.err
// RUN: FileCheck --input-file=%t.err --check-prefix=CHECK-AARCH64 %s
// CHECK-AARCH64: error: unknown target triple 'aarch64-unknown-uefi'{{$}}
// RUN: not %clang --target=arm-unknown-uefi -o %t.o %s 2> %t.err
// RUN: FileCheck --input-file=%t.err -check-prefixes=CHECK-ARM %s
// RUN: not %clang_cl --target=arm-unknown-uefi -o %t.o %s 2> %t.err
// RUN: FileCheck --input-file=%t.err -check-prefixes=CHECK-ARM %s
// CHECK-ARM: error: unknown target triple 'arm-unknown-uefi'{{$}}
// RUN: not %clang --target=x86-unknown-uefi -o %t.o %s 2> %t.err
// RUN: FileCheck --input-file=%t.err -check-prefixes=CHECK-x86 %s
// RUN: not %clang_cl --target=x86-unknown-uefi -o %t.o %s 2> %t.err
// RUN: FileCheck --input-file=%t.err -check-prefixes=CHECK-x86 %s
// CHECK-x86: error: unknown target triple 'x86-unknown-uefi'{{$}}