Skip to content

Commit

Permalink
[clang] Small adjustments for -fexperimental-library
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
ldionne committed Jul 20, 2022
1 parent db0a658 commit 7169659
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
4 changes: 2 additions & 2 deletions clang/lib/Driver/ToolChains/Hexagon.cpp
Expand Up @@ -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:
Expand Down
7 changes: 5 additions & 2 deletions 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
Expand Down

2 comments on commit 7169659

@jakeegan
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, the AIX bot is 64-bit, so the triple powerpc64-ibm-aix should also be unsupported

@jakeegan
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll submit a commit to make this change

Please sign in to comment.