Skip to content

Commit cc2834b

Browse files
authored
Merge pull request #8818 from bnbarham/temp-revert-arch-block
Revert "[Driver] Mark -arch as TargetSpecific (llvm#74365)"
2 parents 05aad6b + 201e84d commit cc2834b

File tree

4 files changed

+8
-12
lines changed

4 files changed

+8
-12
lines changed

clang/include/clang/Driver/Options.td

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1060,7 +1060,7 @@ def all__load : Flag<["-"], "all_load">;
10601060
def allowable__client : Separate<["-"], "allowable_client">;
10611061
def ansi : Flag<["-", "--"], "ansi">, Group<CompileOnly_Group>;
10621062
def arch__errors__fatal : Flag<["-"], "arch_errors_fatal">;
1063-
def arch : Separate<["-"], "arch">, Flags<[NoXarchOption,TargetSpecific]>;
1063+
def arch : Separate<["-"], "arch">, Flags<[NoXarchOption]>;
10641064
def arch__only : Separate<["-"], "arch_only">;
10651065
def autocomplete : Joined<["--"], "autocomplete=">;
10661066
def bind__at__load : Flag<["-"], "bind_at_load">;

clang/test/Driver/arc-exceptions.m

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
// RUN: %clang -### -x objective-c --target=x86_64-apple-macos10.6 -fobjc-arc -fsyntax-only %s 2> %t.log
1+
// RUN: %clang -### -x objective-c -arch x86_64 -fobjc-arc -fsyntax-only %s 2> %t.log
22
// RUN: grep objective-c %t.log
33
// RUN: not grep "fobjc-arc-exceptions" %t.log
4-
// RUN: %clang -### -x objective-c++ --target=x86_64-apple-macos10.6 -fobjc-arc -fsyntax-only %s 2> %t.log
4+
// RUN: %clang -### -x objective-c++ -arch x86_64 -fobjc-arc -fsyntax-only %s 2> %t.log
55
// RUN: grep "fobjc-arc-exceptions" %t.log

clang/test/Driver/arm-arch-darwin.c

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
// On Darwin, arch should override CPU for triple purposes
22
// RUN: %clang -target armv7m-apple-darwin -arch armv7m -mcpu=cortex-m4 -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-V7M-DARWIN %s
33
// CHECK-V7M-DARWIN: "-cc1"{{.*}} "-triple" "thumbv7m-{{.*}} "-target-cpu" "cortex-m4"
4+
// RUN: %clang -target armv7m -arch armv7m -mcpu=cortex-m4 -### -c %s 2>&1 | FileCheck -check-prefix=CHECK-V7M-OVERRIDDEN %s
5+
// CHECK-V7M-OVERRIDDEN: "-cc1"{{.*}} "-triple" "thumbv7em-{{.*}} "-target-cpu" "cortex-m4"
46

5-
/// -arch is unsupported for non-Darwin targets.
6-
// RUN: not %clang --target=armv7m -arch armv7m -mcpu=cortex-m4 -### -c %s 2>&1 | FileCheck -check-prefix=ERR %s
7-
// ERR: unsupported option '-arch' for target 'armv7m'
8-
9-
// RUN: not %clang --target=aarch64-linux-gnu -arch arm64 -### -c %s 2>&1 | FileCheck -check-prefix=ERR2 %s
10-
// ERR2: unsupported option '-arch' for target 'aarch64-linux-gnu'

clang/test/Frontend/darwin-eabi.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
// RUN: %clang --target=armv6m-apple-darwin -dM -E %s | FileCheck %s
2-
// RUN: %clang --target=armv7m-apple-darwin -dM -E %s | FileCheck %s
3-
// RUN: %clang --target=armv7em-apple-darwin -dM -E %s | FileCheck %s
1+
// RUN: %clang -arch armv6m -dM -E %s | FileCheck %s
2+
// RUN: %clang -arch armv7m -dM -E %s | FileCheck %s
3+
// RUN: %clang -arch armv7em -dM -E %s | FileCheck %s
44
// RUN: %clang_cc1 -triple thumbv7m-apple-unknown-macho -dM -E %s | FileCheck %s
55

66
// CHECK-NOT: __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__

0 commit comments

Comments
 (0)