Fangrui Song 4e0275a2c8
[Driver] Mark -arch as TargetSpecific (#74365)
`-arch` is a Darwin-specific option that is ignored for other targets
and not known by GCC.
```
% clang -arch arm64 -c a.c
clang: warning: argument unused during compilation: '-arch arm64' [-Wunused-command-line-argument]
```

We are utilizing TargetSpecific (from https://reviews.llvm.org/D151590)
to make more options lead to errors for unsupported targets.
2023-12-05 08:27:55 -08:00

8 lines
411 B
C

// RUN: %clang --target=armv6m-apple-darwin -dM -E %s | FileCheck %s
// RUN: %clang --target=armv7m-apple-darwin -dM -E %s | FileCheck %s
// RUN: %clang --target=armv7em-apple-darwin -dM -E %s | FileCheck %s
// RUN: %clang_cc1 -triple thumbv7m-apple-unknown-macho -dM -E %s | FileCheck %s
// CHECK-NOT: __ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__
// CHECK-NOT: __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__