2010-08-13 12:44:20 +08:00
|
|
|
// Check that we don't try to forward -Xclang or -mlinker-version to GCC.
|
2013-08-19 19:51:51 +08:00
|
|
|
// PR12920 -- Check also we may not forward W_Group options to GCC.
|
2010-08-13 12:44:20 +08:00
|
|
|
//
|
2012-01-21 06:01:23 +08:00
|
|
|
// RUN: %clang -target powerpc-unknown-unknown \
|
2013-08-19 19:51:51 +08:00
|
|
|
// RUN: %s \
|
|
|
|
// RUN: -Wall -Wdocumentation \
|
2010-08-13 12:44:20 +08:00
|
|
|
// RUN: -Xclang foo-bar \
|
2016-01-07 09:23:19 +08:00
|
|
|
// RUN: -march=x86-64 \
|
2010-08-13 12:44:20 +08:00
|
|
|
// RUN: -mlinker-version=10 -### 2> %t
|
|
|
|
// RUN: FileCheck < %t %s
|
|
|
|
//
|
2016-01-07 09:23:19 +08:00
|
|
|
// clang -cc1
|
|
|
|
// CHECK: clang
|
2013-08-19 19:51:51 +08:00
|
|
|
// CHECK: "-Wall" "-Wdocumentation"
|
|
|
|
// CHECK: "-o" "{{[^"]+}}.o"
|
|
|
|
//
|
2016-01-07 09:23:19 +08:00
|
|
|
// gcc as ld.
|
2014-06-30 00:00:11 +08:00
|
|
|
// CHECK: gcc{{[^"]*}}"
|
2010-08-13 12:44:20 +08:00
|
|
|
// CHECK-NOT: "-mlinker-version=10"
|
|
|
|
// CHECK-NOT: "-Xclang"
|
|
|
|
// CHECK-NOT: "foo-bar"
|
2013-08-19 19:51:51 +08:00
|
|
|
// CHECK-NOT: "-Wall"
|
|
|
|
// CHECK-NOT: "-Wdocumentation"
|
2014-06-30 00:00:11 +08:00
|
|
|
// CHECK: -march
|
2013-06-20 09:33:59 +08:00
|
|
|
// CHECK-NOT: "-mlinker-version=10"
|
|
|
|
// CHECK-NOT: "-Xclang"
|
|
|
|
// CHECK-NOT: "foo-bar"
|
2013-08-19 19:51:51 +08:00
|
|
|
// CHECK-NOT: "-Wall"
|
|
|
|
// CHECK-NOT: "-Wdocumentation"
|
|
|
|
// CHECK: "-o" "a.out"
|
2016-01-07 09:23:12 +08:00
|
|
|
|
|
|
|
// Check that we're not forwarding -g options to the assembler
|
|
|
|
// RUN: %clang -g -target x86_64-unknown-linux-gnu -no-integrated-as -c %s -### 2>&1 \
|
|
|
|
// RUN: | FileCheck --check-prefix=CHECK-ASM %s
|
|
|
|
// CHECK-ASM: as
|
|
|
|
// CHECK-ASM-NOT: "-g"
|