[docs] Add LICENSE.txt to the root of the mono-repo
[llvm-project.git] / clang / test / Driver / darwin-embedded.c
blobbeb8b195c42d12db0cab77c8facf97be1410a479
1 // RUN: %clang -target x86_64-apple-darwin -arch armv6m -resource-dir=%S/Inputs/resource_dir %s -### 2> %t
2 // RUN: %clang -target x86_64-apple-darwin -arch armv7em -resource-dir=%S/Inputs/resource_dir %s -### 2>> %t
3 // RUN: %clang -target x86_64-apple-darwin -arch armv7em -mfloat-abi=soft -resource-dir=%S/Inputs/resource_dir %s -### 2>> %t
5 // RUN: %clang -target x86_64-apple-darwin -arch armv7m -fPIC -resource-dir=%S/Inputs/resource_dir %s -### 2>> %t
6 // RUN: %clang -target x86_64-apple-darwin -arch armv7em -fPIC -mfloat-abi=hard -resource-dir=%S/Inputs/resource_dir %s -### 2>> %t
7 // RUN: %clang -target x86_64-apple-darwin -arch armv7em -fPIC -mfloat-abi=softfp -resource-dir=%S/Inputs/resource_dir %s -### 2>> %t
8 // RUN: %clang -target x86_64-apple-none-macho -arch armv7 -mhard-float -resource-dir=%S/Inputs/resource_dir %s -### 2>> %t
9 // RUN: %clang -target x86_64-apple-none-macho -arch armv7 -msoft-float -fPIC -resource-dir=%S/Inputs/resource_dir %s -### 2>> %t
12 // RUN: FileCheck %s < %t
14 // ARMv6m has no float
15 // CHECK-LABEL: Target:
16 // CHECK-NOT: warning: unknown platform
17 // CHECK: "-mfloat-abi" "soft"
18 // CHECK: libclang_rt.soft_static.a
20 // ARMv7em does
21 // CHECK-LABEL: Target:
22 // CHECK-NOT: warning: unknown platform
23 // CHECK: "-mfloat-abi" "hard"
24 // CHECK: libclang_rt.hard_static.a
26 // but the ABI can be overridden
27 // CHECK-LABEL: Target:
28 // CHECK-NOT: warning: unknown platform
29 // CHECK: "-target-feature" "+soft-float"
30 // CHECK: "-mfloat-abi" "soft"
31 // CHECK: libclang_rt.soft_static.a
33 // ARMv7m has no float either
34 // CHECK-LABEL: Target:
35 // CHECK-NOT: warning: unknown platform
36 // CHECK: "-mfloat-abi" "soft"
37 // CHECK: libclang_rt.soft_pic.a
39 // But it can be enabled on ARMv7em
40 // CHECK-LABEL: Target:
41 // CHECK-NOT: warning: unknown platform
42 // CHECK: "-mfloat-abi" "hard"
43 // CHECK: libclang_rt.hard_pic.a
45 // "softfp" must link against a soft-float library since that's what the
46 // callers we're compiling will expect.
47 // CHECK-LABEL: Target:
48 // CHECK-NOT: warning: unknown platform
49 // CHECK: "-mfloat-abi" "soft"
50 // CHECK: libclang_rt.soft_pic.a
52 // -arch "armv7" (== embedded v7a) can be used in a couple of variants:
53 // CHECK-LABEL: Target:
54 // CHECK-NOT: warning: unknown platform
55 // CHECK: "-mfloat-abi" "hard"
56 // CHECK: libclang_rt.hard_static.a
58 // CHECK-LABEL: Target:
59 // CHECK-NOT: warning: unknown platform
60 // CHECK: "-mfloat-abi" "soft"
61 // CHECK: libclang_rt.soft_pic.a