| 1 |
// Check that we add relevant linker flags for Android ARM/AArch64/i386/x86_64. |
| 2 |
|
| 3 |
// RUN: %clang -### --target=arm-linux-androideabi %s 2>&1 | \ |
| 4 |
// RUN: FileCheck --check-prefix=MAX-PAGE-SIZE-4KB %s |
| 5 |
|
| 6 |
// RUN: %clang --target=aarch64-none-linux-android \ |
| 7 |
// RUN: -### -v %s 2> %t |
| 8 |
// RUN: FileCheck -check-prefix=GENERIC-ARM < %t %s |
| 9 |
|
| 10 |
// RUN: %clang --target=aarch64-none-linux-android \ |
| 11 |
// RUN: -mcpu=cortex-a53 -### -v %s 2> %t |
| 12 |
// RUN: FileCheck -check-prefix=CORTEX-A53 < %t %s |
| 13 |
|
| 14 |
// RUN: %clang --target=aarch64-none-linux-android \ |
| 15 |
// RUN: -mcpu=cortex-a57 -### -v %s 2> %t |
| 16 |
// RUN: FileCheck -check-prefix=CORTEX-A57 < %t %s |
| 17 |
|
| 18 |
// RUN: %clang --target=aarch64-none-linux-android \ |
| 19 |
// RUN: -mno-fix-cortex-a53-843419 \ |
| 20 |
// RUN: -### -v %s 2> %t |
| 21 |
// RUN: FileCheck -check-prefix=OVERRIDDEN < %t %s |
| 22 |
// |
| 23 |
// RUN: %clang -target aarch64-none-linux-android \ |
| 24 |
// RUN: -mno-fix-cortex-a53-843419 -mfix-cortex-a53-843419 \ |
| 25 |
// RUN: -### -v %s 2> %t |
| 26 |
// RUN: FileCheck -check-prefix=OVERRIDDEN2 < %t %s |
| 27 |
// |
| 28 |
// RUN: %clang -target aarch64-none-linux-android \ |
| 29 |
// RUN: -### -v %s 2> %t |
| 30 |
// RUN: FileCheck -check-prefix=MAX-PAGE-SIZE-16KB < %t %s |
| 31 |
|
| 32 |
// RUN: %clang -### --target=i386-none-linux-android %s 2>&1 | \ |
| 33 |
// RUN: FileCheck --check-prefix=NO-MAX-PAGE-SIZE-16KB %s |
| 34 |
|
| 35 |
// RUN: %clang -### --target=x86_64-none-linux-gnu %s 2>&1 | \ |
| 36 |
// RUN: FileCheck --check-prefix=NO-MAX-PAGE-SIZE-16KB %s |
| 37 |
|
| 38 |
// RUN: %clang -### --target=x86_64-none-linux-android %s 2>&1 | \ |
| 39 |
// RUN: FileCheck --check-prefix=MAX-PAGE-SIZE-16KB %s |
| 40 |
|
| 41 |
// GENERIC-ARM: --fix-cortex-a53-843419 |
| 42 |
// CORTEX-A53: --fix-cortex-a53-843419 |
| 43 |
// CORTEX-A57-NOT: --fix-cortex-a53-843419 |
| 44 |
// OVERRIDDEN-NOT: --fix-cortex-a53-843419 |
| 45 |
// OVERRIDDEN2: --fix-cortex-a53-843419 |
| 46 |
// MAX-PAGE-SIZE-4KB: "-z" "max-page-size=4096" |
| 47 |
// MAX-PAGE-SIZE-16KB: "-z" "max-page-size=16384" |
| 48 |
// NO-MAX-PAGE-SIZE-16KB-NOT: "-z" "max-page-size=16384" |