From 7169659752557aa107e3efe470ba988155ae3bbd Mon Sep 17 00:00:00 2001 From: Louis Dionne Date: Wed, 20 Jul 2022 09:10:40 -0400 Subject: [PATCH] [clang] Small adjustments for -fexperimental-library Move -lc++experimental before -lc++abi (that was forgotten in the original patch), and mark a test as UNSUPPORTED on AIX. I contacted the owners of the AIX bot that failed because I was unable to reproduce the issue locally. --- clang/lib/Driver/ToolChains/Hexagon.cpp | 4 ++-- clang/test/Driver/experimental-library-flag.cpp | 7 +++++-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/clang/lib/Driver/ToolChains/Hexagon.cpp b/clang/lib/Driver/ToolChains/Hexagon.cpp index 0e47704ab636..93b987c07f29 100644 --- a/clang/lib/Driver/ToolChains/Hexagon.cpp +++ b/clang/lib/Driver/ToolChains/Hexagon.cpp @@ -614,10 +614,10 @@ void HexagonToolChain::AddCXXStdlibLibArgs(const ArgList &Args, switch (Type) { case ToolChain::CST_Libcxx: CmdArgs.push_back("-lc++"); - CmdArgs.push_back("-lc++abi"); - CmdArgs.push_back("-lunwind"); if (Args.hasArg(options::OPT_fexperimental_library)) CmdArgs.push_back("-lc++experimental"); + CmdArgs.push_back("-lc++abi"); + CmdArgs.push_back("-lunwind"); break; case ToolChain::CST_Libstdcxx: diff --git a/clang/test/Driver/experimental-library-flag.cpp b/clang/test/Driver/experimental-library-flag.cpp index bd6fd87c258e..db661c026d06 100644 --- a/clang/test/Driver/experimental-library-flag.cpp +++ b/clang/test/Driver/experimental-library-flag.cpp @@ -1,7 +1,10 @@ -// On Windows, -stdlib=libc++ is currently ignored, so -lc++experimental is not added. -// Once -stdlib=libc++ works on Windows, this XFAIL can be removed. +// On some platforms, -stdlib=libc++ is currently ignored, so -lc++experimental is not added. +// Once -stdlib=libc++ works on those, this XFAIL can be removed. // XFAIL: windows, x86_64-scei-ps4, x86_64-sie-ps5 +// For some reason, this fails with a core dump on AIX. This needs to be investigated. +// UNSUPPORTED: powerpc-ibm-aix + // RUN: %clangxx -fexperimental-library -stdlib=libc++ -### %s 2>&1 | FileCheck --check-prefixes=CHECK,CHECK-LIBCXX %s // RUN: %clangxx -fexperimental-library -stdlib=libstdc++ -### %s 2>&1 | FileCheck --check-prefixes=CHECK,CHECK-LIBSTDCXX %s // RUN: %clangxx -fexperimental-library -stdlib=libc++ -nostdlib++ -### %s 2>&1 | FileCheck --check-prefixes=CHECK,CHECK-NOSTDLIB %s -- 2.34.1