File: unsupported-target-arch.c

package info (click to toggle)
swiftlang 6.1.3-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,791,604 kB
  • sloc: cpp: 9,901,740; ansic: 2,201,431; asm: 1,091,827; python: 308,252; objc: 82,166; f90: 80,126; lisp: 38,358; pascal: 25,559; sh: 20,429; ml: 5,058; perl: 4,745; makefile: 4,484; awk: 3,535; javascript: 3,018; xml: 918; fortran: 664; cs: 573; ruby: 396
file content (65 lines) | stat: -rw-r--r-- 4,637 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
// 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-nacl -o %t.o %s 2> %t.err
// RUN: FileCheck --input-file=%t.err --check-prefix=CHECK-NOARCH-NACL %s
// CHECK-NOARCH-NACL:  error: the target architecture 'noarch' is not supported by the target 'Native Client'

// 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{{.*}}'