| 1 |
! RUN: %flang -### -c -fveclib=none %s 2>&1 | FileCheck -check-prefix CHECK-NOLIB %s |
| 2 |
! RUN: %flang -### -c -fveclib=Accelerate %s 2>&1 | FileCheck -check-prefix CHECK-ACCELERATE %s |
| 3 |
! RUN: %flang -### -c -fveclib=libmvec %s 2>&1 | FileCheck -check-prefix CHECK-libmvec %s |
| 4 |
! RUN: %flang -### -c -fveclib=MASSV %s 2>&1 | FileCheck -check-prefix CHECK-MASSV %s |
| 5 |
! RUN: %flang -### -c -fveclib=Darwin_libsystem_m %s 2>&1 | FileCheck -check-prefix CHECK-DARWIN_LIBSYSTEM_M %s |
| 6 |
! RUN: %flang -### -c --target=aarch64-none-none -fveclib=SLEEF %s 2>&1 | FileCheck -check-prefix CHECK-SLEEF %s |
| 7 |
! RUN: %flang -### -c --target=aarch64-none-none -fveclib=ArmPL %s 2>&1 | FileCheck -check-prefix CHECK-ARMPL %s |
| 8 |
! RUN: %flang -### -c --target=aarch64-apple-darwin -fveclib=none %s 2>&1 | FileCheck -check-prefix CHECK-NOLIB-DARWIN %s |
| 9 |
! RUN: not %flang -c -fveclib=something %s 2>&1 | FileCheck -check-prefix CHECK-INVALID %s |
| 10 |
|
| 11 |
! CHECK-NOLIB: "-fveclib=none" |
| 12 |
! CHECK-ACCELERATE: "-fveclib=Accelerate" |
| 13 |
! CHECK-libmvec: "-fveclib=libmvec" |
| 14 |
! CHECK-MASSV: "-fveclib=MASSV" |
| 15 |
! CHECK-DARWIN_LIBSYSTEM_M: "-fveclib=Darwin_libsystem_m" |
| 16 |
! CHECK-SLEEF: "-fveclib=SLEEF" |
| 17 |
! CHECK-ARMPL: "-fveclib=ArmPL" |
| 18 |
! CHECK-NOLIB-DARWIN: "-fveclib=none" |
| 19 |
|
| 20 |
! CHECK-INVALID: error: invalid value 'something' in '-fveclib=something' |
| 21 |
|
| 22 |
! RUN: not %flang --target=x86-none-none -c -fveclib=SLEEF %s 2>&1 | FileCheck -check-prefix CHECK-ERROR %s |
| 23 |
! RUN: not %flang --target=x86-none-none -c -fveclib=ArmPL %s 2>&1 | FileCheck -check-prefix CHECK-ERROR %s |
| 24 |
! RUN: not %flang --target=aarch64-none-none -c -fveclib=LIBMVEC-X86 %s 2>&1 | FileCheck -check-prefix CHECK-ERROR %s |
| 25 |
! RUN: not %flang --target=aarch64-none-none -c -fveclib=SVML %s 2>&1 | FileCheck -check-prefix CHECK-ERROR %s |
| 26 |
! CHECK-ERROR: unsupported option {{.*}} for target |
| 27 |
|
| 28 |
! RUN: %flang -fveclib=Accelerate %s -target arm64-apple-ios8.0.0 -### 2>&1 | FileCheck --check-prefix=CHECK-LINK %s |
| 29 |
! CHECK-LINK: "-framework" "Accelerate" |
| 30 |
|
| 31 |
! TODO: if we add support for -nostdlib or -nodefaultlibs we need to test that |
| 32 |
! these prevent "-framework Accelerate" being added on Darwin |