From: Anjan Kumar Guttahalli Krishna Date: Thu, 22 Jul 2021 19:32:06 +0000 (-0400) Subject: [AIX] Clang's library integration support for 128-bit long double is incomplete on... X-Git-Tag: llvmorg-14-init~586 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f719dff043962832f221dd8e28af2344a0ab80e0;p=platform%2Fupstream%2Fllvm.git [AIX] Clang's library integration support for 128-bit long double is incomplete on AIX. Emit the unsupported option error until the Clang's library integration support for 128-bit long double is available for AIX. Reviewed By: Whitney, cebowleratibm Differential Revision: https://reviews.llvm.org/D106074 --- diff --git a/clang/lib/Driver/ToolChains/Clang.cpp b/clang/lib/Driver/ToolChains/Clang.cpp index 837ead8..75bc329 100644 --- a/clang/lib/Driver/ToolChains/Clang.cpp +++ b/clang/lib/Driver/ToolChains/Clang.cpp @@ -4841,6 +4841,14 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA, CmdArgs.push_back("-mabi=vec-default"); } + if (Arg *A = Args.getLastArg(options::OPT_mlong_double_128)) { + // Emit the unsupported option error until the Clang's library integration + // support for 128-bit long double is available for AIX. + if (Triple.isOSAIX()) + D.Diag(diag::err_drv_unsupported_opt_for_target) + << A->getSpelling() << RawTriple.str(); + } + if (Arg *A = Args.getLastArg(options::OPT_Wframe_larger_than_EQ)) { StringRef v = A->getValue(); // FIXME: Validate the argument here so we don't produce meaningless errors diff --git a/clang/test/Driver/unsupported-option.c b/clang/test/Driver/unsupported-option.c index 9754403..c263bb0 100644 --- a/clang/test/Driver/unsupported-option.c +++ b/clang/test/Driver/unsupported-option.c @@ -21,3 +21,11 @@ // RUN: not %clang -fprofile-generate -flto=thin --target=powerpc64-ibm-aix %s 2>&1 | \ // RUN: FileCheck %s --check-prefix=AIX-PROFILE-THINLTO // AIX-PROFILE-THINLTO: error: invalid argument '-fprofile-generate' only allowed with '-flto' + +// RUN: not %clang --target=powerpc-ibm-aix %s -mlong-double-128 2>&1 | \ +// RUN: FileCheck %s --check-prefix=AIX-LONGDOUBLE128-ERR +// AIX-LONGDOUBLE128-ERR: error: unsupported option '-mlong-double-128' for target 'powerpc-ibm-aix' + +// RUN: not %clang --target=powerpc64-ibm-aix %s -mlong-double-128 2>&1 | \ +// RUN: FileCheck %s --check-prefix=AIX64-LONGDOUBLE128-ERR +// AIX64-LONGDOUBLE128-ERR: error: unsupported option '-mlong-double-128' for target 'powerpc64-ibm-aix'