| 1 |
// RUN: %clang -### -c --target=x86_64-linux %s -fbinutils-version=none 2>&1 | FileCheck %s --check-prefix=NONE |
| 2 |
|
| 3 |
// NONE: "-fbinutils-version=none" |
| 4 |
|
| 5 |
// RUN: %clang -### -c --target=aarch64-linux %s -fbinutils-version=2 2>&1 | FileCheck %s --check-prefix=CHECK2 |
| 6 |
|
| 7 |
// CHECK2: "-fbinutils-version=2" |
| 8 |
|
| 9 |
// RUN: %clang -### -c --target=aarch64-linux %s -fbinutils-version=2.35 2>&1 | FileCheck %s --check-prefix=CHECK2_35 |
| 10 |
|
| 11 |
// CHECK2_35: "-fbinutils-version=2.35" |
| 12 |
|
| 13 |
/// Disallow -fbinutils-version=0 because we use $major==0 to indicate the MC |
| 14 |
/// default in the backend. |
| 15 |
// RUN: not %clang -c --target=x86_64-linux %s -fbinutils-version=0 2>&1 | FileCheck %s --check-prefix=ERR0 |
| 16 |
|
| 17 |
// ERR0: error: invalid argument '0' to -fbinutils-version= |
| 18 |
|
| 19 |
// RUN: not %clang -c --target=x86_64-linux %s -fbinutils-version=nan 2>&1 | FileCheck %s --check-prefix=ERR1 |
| 20 |
|
| 21 |
// ERR1: error: invalid argument 'nan' to -fbinutils-version= |
| 22 |
|
| 23 |
// RUN: not %clang -c --target=x86_64-linux %s -fbinutils-version=2. 2>&1 | FileCheck %s --check-prefix=ERR2 |
| 24 |
|
| 25 |
// ERR2: error: invalid argument '2.' to -fbinutils-version= |
| 26 |
|
| 27 |
// RUN: not %clang -c --target=x86_64-linux %s -fbinutils-version=3.-14 2>&1 | FileCheck %s --check-prefix=ERR3 |
| 28 |
|
| 29 |
// ERR3: error: invalid argument '3.-14' to -fbinutils-version= |