diff options
author | Fangrui Song <maskray@google.com> | 2019-12-21 22:22:59 -0800 |
---|---|---|
committer | Fangrui Song <maskray@google.com> | 2019-12-21 22:47:24 -0800 |
commit | 0792ef72564071f21b727d0de3a14d565950290f (patch) | |
tree | f2bb660bb416582e6a703e65a799e7c0587ba954 /clang/lib/CodeGen/CodeGenFunction.cpp | |
parent | ba0eb7b66fd9dac7bf4883f70b65bded03a4b97a (diff) | |
download | bcm5719-llvm-0792ef72564071f21b727d0de3a14d565950290f.tar.gz bcm5719-llvm-0792ef72564071f21b727d0de3a14d565950290f.zip |
[Driver] Verify -mrecord-mcount in Driver, instead of CodeGen after D71627
GCC's x86 and s390 ports support -mrecord-mcount. Other ports reject the
option.
aarch64-linux-gnu-gcc: error: unrecognized command line option ‘-mrecord-mcount’
Allowing this option can cause failures when building Linux kernel for
aarch64, powerpc64, etc, which will think the feature is available if
the clang command returns 0.
Diffstat (limited to 'clang/lib/CodeGen/CodeGenFunction.cpp')
-rw-r--r-- | clang/lib/CodeGen/CodeGenFunction.cpp | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/clang/lib/CodeGen/CodeGenFunction.cpp b/clang/lib/CodeGen/CodeGenFunction.cpp index 6f7e06b773d..0f90f6ecf5b 100644 --- a/clang/lib/CodeGen/CodeGenFunction.cpp +++ b/clang/lib/CodeGen/CodeGenFunction.cpp @@ -959,10 +959,6 @@ void CodeGenFunction::StartFunction(GlobalDecl GD, QualType RetTy, getTarget().getMCountName()); } if (CGM.getCodeGenOpts().MNopMCount) { - if (getContext().getTargetInfo().getTriple().getArch() != - llvm::Triple::systemz) - CGM.getDiags().Report(diag::err_opt_not_valid_on_target) - << "-mnop-mcount"; if (!CGM.getCodeGenOpts().CallFEntry) CGM.getDiags().Report(diag::err_opt_not_valid_without_opt) << "-mnop-mcount" << "-mfentry"; @@ -970,10 +966,6 @@ void CodeGenFunction::StartFunction(GlobalDecl GD, QualType RetTy, } if (CGM.getCodeGenOpts().RecordMCount) { - if (getContext().getTargetInfo().getTriple().getArch() != - llvm::Triple::systemz) - CGM.getDiags().Report(diag::err_opt_not_valid_on_target) - << "-mrecord-mcount"; if (!CGM.getCodeGenOpts().CallFEntry) CGM.getDiags().Report(diag::err_opt_not_valid_without_opt) << "-mrecord-mcount" << "-mfentry"; |