[AIX] Default AIX to using -fno-use-cxa-atexit
authorXiangling Liao <Xiangling.Liao@ibm.com>
Thu, 18 Jun 2020 23:52:34 +0000 (19:52 -0400)
committerXiangling Liao <Xiangling.Liao@ibm.com>
Fri, 19 Jun 2020 12:27:07 +0000 (08:27 -0400)
commit3f2e61c1fe42e5b790096d6962f6bc2de6ee00ce
tree1d629cf55ffbc5b38daa8336462e7d31ab232650
parent22337bfe7d87f9bf2b072ec7fe9165f7b9e2d793
[AIX] Default AIX to using -fno-use-cxa-atexit

On AIX, we use __atexit to register dtor functions rather than __cxa_atexit.
So a driver change is needed to default AIX to using -fno-use-cxa-atexit.

Windows platform does not uses __cxa_atexit either. Following its precedent,
we remove the assertion for when -fuse-cxa-atexit is specified by the user,
do not produce a message and silently default to -fno-use-cxa-atexit behavior.

Differential Revision: https://reviews.llvm.org/D82136
clang/lib/CodeGen/ItaniumCXXABI.cpp
clang/lib/Driver/ToolChains/Clang.cpp
clang/test/CodeGenCXX/aix-static-init.cpp
clang/test/Driver/cxa-atexit.cpp