diff options
author | Douglas Yung <douglas.yung@sony.com> | 2018-05-12 00:06:59 +0000 |
---|---|---|
committer | Douglas Yung <douglas.yung@sony.com> | 2018-05-12 00:06:59 +0000 |
commit | a9f47524d104716f95ee3adaae77573369e10e0f (patch) | |
tree | 33b9a343b7e966b39818822e1d9c4696b50806be /lib/Frontend/CompilerInvocation.cpp | |
parent | 01b0b85e241d03e52ad26f2048fce3b4eca43c0f (diff) | |
download | clang-a9f47524d104716f95ee3adaae77573369e10e0f.tar.gz |
Force the PS4 clang ABI version to 6.
The PS4 requires clang ABI version 6 for compatibility reasons. This change forces this and if the user specifies a different version when the PS4 target is specified, the compiler emits a warning that the specified version is being ignored.
Reviewers: probinson
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D46767
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@332160 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Frontend/CompilerInvocation.cpp')
-rw-r--r-- | lib/Frontend/CompilerInvocation.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/Frontend/CompilerInvocation.cpp b/lib/Frontend/CompilerInvocation.cpp index 05e5196e32..b8e05b523e 100644 --- a/lib/Frontend/CompilerInvocation.cpp +++ b/lib/Frontend/CompilerInvocation.cpp @@ -2751,6 +2751,16 @@ static void ParseLangArgs(LangOptions &Opts, ArgList &Args, InputKind IK, << A->getAsString(Args) << A->getValue(); } } + // The PS4 requires version 6 of the clang ABI. + if (T.isPS4()) { + // Issue a warning if another version of the ABI was requested. + if (Args.getLastArg(OPT_fclang_abi_compat_EQ) && + Opts.getClangABICompat() != LangOptions::ClangABI::Ver6) { + Diags.Report(diag::warn_drv_ignored_clang_abi_version) + << 6; + } + Opts.setClangABICompat(LangOptions::ClangABI::Ver6); + } } static bool isStrictlyPreprocessorAction(frontend::ActionKind Action) { |