blob: 6fa47f00cc7a3efc24a36e32055af99e53082427 [file] [log] [blame]
Brad Smith10cd0f42014-07-11 20:12:08 +00001// Check handling -mhard-float / -msoft-float options
2// when build for SPARC platforms.
3//
4// Default sparc
5// RUN: %clang -c %s -### -o %t.o 2>&1 \
6// RUN: -target sparc-linux-gnu \
7// RUN: | FileCheck --check-prefix=CHECK-DEF %s
James Y Knightb2406522015-06-15 20:51:24 +00008// CHECK-DEF-NOT: "-target-feature" "+soft-float"
9// CHECK-DEF-NOT: "-msoft-float"
Brad Smith10cd0f42014-07-11 20:12:08 +000010//
11// -mhard-float
12// RUN: %clang -c %s -### -o %t.o 2>&1 \
13// RUN: -target sparc-linux-gnu -mhard-float \
14// RUN: | FileCheck --check-prefix=CHECK-HARD %s
James Y Knightb2406522015-06-15 20:51:24 +000015// CHECK-HARD-NOT: "-msoft-float"
Brad Smith10cd0f42014-07-11 20:12:08 +000016//
17// -msoft-float
18// RUN: %clang -c %s -### -o %t.o 2>&1 \
19// RUN: -target sparc-linux-gnu -msoft-float \
20// RUN: | FileCheck --check-prefix=CHECK-SOFT %s
James Y Knightb2406522015-06-15 20:51:24 +000021// CHECK-SOFT: error: unsupported option '-msoft-float'
Brad Smith10cd0f42014-07-11 20:12:08 +000022//
23// Default sparc64
24// RUN: %clang -c %s -### -o %t.o 2>&1 \
25// RUN: -target sparc64-linux-gnu \
26// RUN: | FileCheck --check-prefix=CHECK-DEF-SPARC64 %s
James Y Knightb2406522015-06-15 20:51:24 +000027// CHECK-DEF-SPARC64-NOT: "-target-feature" "+soft-float"
28// CHECK-DEF-SPARC64-NOT: "-msoft-float"
Brad Smith10cd0f42014-07-11 20:12:08 +000029//
30// -mhard-float
31// RUN: %clang -c %s -### -o %t.o 2>&1 \
32// RUN: -target sparc64-linux-gnu -mhard-float \
33// RUN: | FileCheck --check-prefix=CHECK-HARD-SPARC64 %s
James Y Knightb2406522015-06-15 20:51:24 +000034// CHECK-HARD-SPARC64-NOT: "-msoft-float"
Brad Smith10cd0f42014-07-11 20:12:08 +000035//
36// -msoft-float
37// RUN: %clang -c %s -### -o %t.o 2>&1 \
38// RUN: -target sparc64-linux-gnu -msoft-float \
39// RUN: | FileCheck --check-prefix=CHECK-SOFT-SPARC64 %s
James Y Knightb2406522015-06-15 20:51:24 +000040// CHECK-SOFT-SPARC64: error: unsupported option '-msoft-float'