mirror of
https://github.com/intel/llvm.git
synced 2026-01-13 11:02:04 +08:00
[z/OS][pg] Throw error when using -pg on z/OS
Throw an error when trying to compile with `-pg` on z/OS, as the platform does not support `gprof`. Reviewed By: cebowleratibm, MaskRay Differential Revision: https://reviews.llvm.org/D137756
This commit is contained in:
@@ -6338,6 +6338,12 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
|
||||
<< A->getAsString(Args) << TripleStr;
|
||||
}
|
||||
}
|
||||
if (Arg *A = Args.getLastArgNoClaim(options::OPT_pg)) {
|
||||
if (TC.getTriple().isOSzOS()) {
|
||||
D.Diag(diag::err_drv_unsupported_opt_for_target)
|
||||
<< A->getAsString(Args) << TripleStr;
|
||||
}
|
||||
}
|
||||
|
||||
if (Args.getLastArg(options::OPT_fapple_kext) ||
|
||||
(Args.hasArg(options::OPT_mkernel) && types::isCXX(InputType)))
|
||||
|
||||
2
clang/test/Driver/zos-profiling-error.c
Normal file
2
clang/test/Driver/zos-profiling-error.c
Normal file
@@ -0,0 +1,2 @@
|
||||
// RUN: %clang 2>&1 -### --target=s390x-none-zos -pg -S %s | FileCheck -check-prefix=FAIL-PG-NAME %s
|
||||
// FAIL-PG-NAME: error: unsupported option '-pg' for target 's390x-none-zos'
|
||||
Reference in New Issue
Block a user