diff --git a/libcxx/test/libcxx/debug/extern-templates.sh.cpp b/libcxx/test/libcxx/debug/extern-templates.sh.cpp --- a/libcxx/test/libcxx/debug/extern-templates.sh.cpp +++ b/libcxx/test/libcxx/debug/extern-templates.sh.cpp @@ -21,10 +21,8 @@ // option which clang doesn't accept on Windows.) // UNSUPPORTED: windows -// XFAIL: LIBCXX-AIX-FIXME - -// RUN: %{cxx} %{flags} %{compile_flags} %s %{link_flags} -fPIC -DTU1 -D_LIBCPP_DEBUG=1 -fvisibility=hidden -shared -o %t.lib -// RUN: cd %T && %{cxx} %{flags} %{compile_flags} %s ./%basename_t.tmp.lib %{link_flags} -DTU2 -D_LIBCPP_DEBUG=1 -fvisibility=hidden -o %t.exe +// RUN: %{cxx} %{flags} %{compile_flags} %s %{link_flags} -fPIC -DTU1 -D_LIBCPP_DEBUG=1 %{hiddenvisibility} -shared -o %t.lib +// RUN: cd %T && %{cxx} %{flags} %{compile_flags} %s ./%basename_t.tmp.lib %{link_flags} -DTU2 -D_LIBCPP_DEBUG=1 %{hiddenvisibility} -o %t.exe // RUN: %{exec} %t.exe #include diff --git a/libcxx/utils/libcxx/test/features.py b/libcxx/utils/libcxx/test/features.py --- a/libcxx/utils/libcxx/test/features.py +++ b/libcxx/utils/libcxx/test/features.py @@ -85,6 +85,13 @@ } """)), + # Substitue the hidden visibility to empty string if unsupported. + Feature(name='hidden-visibility-if-support', + actions=lambda cfg: + [AddSubstitution('%{hiddenvisibility}', '-fvisibility=hidden')] + if hasCompileFlag(cfg, '-fvisibility=hidden') else + [AddSubstitution('%{hiddenvisibility}', '')]), + # Whether Bash can run on the executor. # This is not always the case, for example when running on embedded systems. #