On some platform visibility option might be unsupported. eg: AIX.
The error 'unsupported option '-fvisibility=hidden'' will prevent us
from running the intended test.
This patch propose that we set the substition according to compiler
support.
Differential D120162
[libcxx][test] Test visibility option before using it jsji on Feb 18 2022, 1:28 PM. Authored by
Details
On some platform visibility option might be unsupported. eg: AIX. This patch propose that we set the substition according to compiler
Diff Detail
Event Timeline
Comment Actions Yes, AIX clang hasn't supported visibility yet, we simply ignore all the visibility for now. OK. Then I think we will leave this test as it is for now, we should be able to re-enable it once we support visibility later. Comment Actions We could pass the linker an export list with the desired visibility for the functions in test on AIX if we need the visibility for the test. This is likely what we'll have to do in other places in libc++ until clang on AIX has real visibility support. |
I checked and this test basically passes vacuously when we don't enforce hidden visibility. So instead, I would either mark the test as truly failing on AIX for lack of being able to control visibility (if that's the case -- IDK how AIX works when it comes to visibility):
Or, if there *is* a notion of visibility and it's simply that the compiler doesn't support -fvisibility=hidden, we should: