Fangrui Song 9f07256a51 [Driver] -p: change from unused warning to error for most targets
AIX and OpenBSD seem to use -p. For most targets (at least FreeBSD and Linux),
-p is legacy (GCC freebsd has a warning). We don't want the uses to grow, so
making -p an alias for -pg is not recommended. I think the uses are small.

Reviewed By: mgorny

Differential Revision: https://reviews.llvm.org/D138255
2022-12-02 18:57:48 +00:00

8 lines
459 B
C

/// For most targets -p is legacy. We used to report -Wunused-command-line-argument.
// RUN: %clang -### --target=x86_64-unknown-linux-gnu -c -p %s 2>&1 | FileCheck %s --check-prefix=ERR
// RUN: %clang -### --target=x86_64-unknown-openbsd -c -p %s 2>&1 | FileCheck %s --implicit-check-not=error:
// RUN: %clang -### --target=powerpc64-ibm-aix -c -p %s 2>&1 | FileCheck %s --implicit-check-not=error:
// ERR: error: unsupported option '-p' for target {{.*}}