1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118
|
// PR21000: Test that -I is passed to both external and integrated assemblers.
// RUN: %clang -target x86_64-linux-gnu -c -no-integrated-as %s \
// RUN: -Ifoo_dir -### 2>&1 \
// RUN: | FileCheck %s
// RUN: %clang -target x86_64-linux-gnu -c -no-integrated-as %s \
// RUN: -I foo_dir -### 2>&1 \
// RUN: | FileCheck %s
// RUN: %clang -target x86_64-linux-gnu -c -integrated-as %s \
// RUN: -Ifoo_dir -### 2>&1 \
// RUN: | FileCheck %s
// RUN: %clang -target x86_64-linux-gnu -c -integrated-as %s \
// RUN: -I foo_dir -### 2>&1 \
// RUN: | FileCheck %s
// Other GNU targets
// RUN: %clang -target aarch64-linux-gnu -c -no-integrated-as %s \
// RUN: -Ifoo_dir -### 2>&1 \
// RUN: | FileCheck %s
// RUN: %clang -target aarch64-linux-gnu -c -integrated-as %s \
// RUN: -Ifoo_dir -### 2>&1 \
// RUN: | FileCheck %s
// RUN: %clang -target armv7-linux-gnueabihf -c -no-integrated-as %s \
// RUN: -Ifoo_dir -### 2>&1 \
// RUN: | FileCheck %s
// RUN: %clang -target armv7-linux-gnueabihf -c -integrated-as %s \
// RUN: -Ifoo_dir -### 2>&1 \
// RUN: | FileCheck %s
// CHECK: "-I" "foo_dir"
// Test that assembler options don't cause warnings when there's no assembler
// stage.
// RUN: %clang -mincremental-linker-compatible -E -fintegrated-as \
// RUN: -o /dev/null -x c++ %s 2>&1 \
// RUN: | FileCheck --check-prefix=NOWARN --allow-empty %s
// RUN: %clang -mincremental-linker-compatible -E -fno-integrated-as \
// RUN: -o /dev/null -x c++ %s 2>&1 \
// RUN: | FileCheck --check-prefix=WARN --allow-empty %s
// RUN: %clang -mincremental-linker-compatible -E -fintegrated-as \
// RUN: -o /dev/null -x assembler-with-cpp %s 2>&1 \
// RUN: | FileCheck --check-prefix=NOWARN --allow-empty %s
// RUN: %clang -mincremental-linker-compatible -E -fno-integrated-as \
// RUN: -o /dev/null -x assembler-with-cpp %s 2>&1 \
// RUN: | FileCheck --check-prefix=WARN --allow-empty %s
// RUN: %clang -mimplicit-it=always -target armv7-linux-gnueabi -E \
// RUN: -fintegrated-as -o /dev/null -x c++ %s 2>&1 \
// RUN: | FileCheck --check-prefix=NOWARN --allow-empty %s
// RUN: %clang -mimplicit-it=always -target armv7-linux-gnueabi -E \
// RUN: -fno-integrated-as -o /dev/null -x c++ %s 2>&1 \
// RUN: | FileCheck --check-prefix=WARN --allow-empty %s
// RUN: %clang -mimplicit-it=always -target armv7-linux-gnueabi -E \
// RUN: -fintegrated-as -o /dev/null -x assembler-with-cpp %s 2>&1 \
// RUN: | FileCheck --check-prefix=NOWARN --allow-empty %s
// RUN: %clang -mimplicit-it=always -target armv7-linux-gnueabi -E \
// RUN: -fno-integrated-as -o /dev/null -x assembler-with-cpp %s 2>&1 \
// RUN: | FileCheck --check-prefix=WARN --allow-empty %s
// RUN: %clang -Wa,-mbig-obj -target i386-pc-windows -E -fintegrated-as \
// RUN: -o /dev/null -x c++ %s 2>&1 \
// RUN: | FileCheck --check-prefix=NOWARN --allow-empty %s
// RUN: %clang -Wa,-mbig-obj -target i386-pc-windows -E -fno-integrated-as \
// RUN: -o /dev/null -x c++ %s 2>&1 \
// RUN: | FileCheck --check-prefix=NOWARN --allow-empty %s
// RUN: %clang -Wa,-mbig-obj -target i386-pc-windows -E -fintegrated-as \
// RUN: -o /dev/null -x assembler-with-cpp %s 2>&1 \
// RUN: | FileCheck --check-prefix=NOWARN --allow-empty %s
// RUN: %clang -Wa,-mbig-obj -target i386-pc-windows -E -fno-integrated-as \
// RUN: -o /dev/null -x assembler-with-cpp %s 2>&1 \
// RUN: | FileCheck --check-prefix=NOWARN --allow-empty %s
// RUN: %clang -Xassembler -mbig-obj -target i386-pc-windows -E -fintegrated-as \
// RUN: -o /dev/null -x c++ %s 2>&1 \
// RUN: | FileCheck --check-prefix=NOWARN --allow-empty %s
// RUN: %clang -Xassembler -mbig-obj -target i386-pc-windows -E \
// RUN: -fno-integrated-as -o /dev/null -x c++ %s 2>&1 \
// RUN: | FileCheck --check-prefix=NOWARN --allow-empty %s
// RUN: %clang -Xassembler -mbig-obj -target i386-pc-windows -E -fintegrated-as \
// RUN: -o /dev/null -x assembler-with-cpp %s 2>&1 \
// RUN: | FileCheck --check-prefix=NOWARN --allow-empty %s
// RUN: %clang -Xassembler -mbig-obj -target i386-pc-windows -E \
// RUN: -fno-integrated-as -o /dev/null -x assembler-with-cpp %s 2>&1 \
// RUN: | FileCheck --check-prefix=NOWARN --allow-empty %s
// NOWARN-NOT: unused
// Test that unsupported arguments do not cause errors when -fno-integrated-as
// is set.
// RUN: %clang -Wa,-mno-warn-deprecated -fno-integrated-as %s -S 2>&1 \
// RUN: | FileCheck --check-prefix=NOERROR --allow-empty %s
// NOERROR-NOT: error: unsupported argument '-mno-warn-deprecated' to option 'Wa,'
// -Wa flags shouldn't cause warnings without an assembler stage with
// -fno-integrated-as either.
// RUN: %clang -Wa,-mno-warn-deprecated -fno-integrated-as -x c++ %s -S 2>&1 \
// RUN: -o /dev/null \
// RUN: | FileCheck --check-prefix=NOWARN --allow-empty %s
// But -m flags for the integrated assembler _should_ warn if the integrated
// assembler is not in use.
// RUN: %clang -mrelax-all -fintegrated-as -x c++ %s -S -o /dev/null 2>&1 \
// RUN: | FileCheck --check-prefix=NOWARN --allow-empty %s
// RUN: %clang -mrelax-all -fno-integrated-as -x c++ %s -S -o /dev/null 2>&1 \
// RUN: | FileCheck --check-prefix=WARN --allow-empty %s
// WARN: unused
|