[AIX] report_fatal_error on `-fregister_global_dtors_with_atexit` for static…

Authored by Xiangling_L on Jul 16 2020, 11:29 AM.


[AIX] report_fatal_error on -fregister_global_dtors_with_atexit for static init

On AIX, the semantic of global_dtors contains sterm functions associated with C++
cleanup actions and user-declared
attribute((destructor)) functions. We should
never merely register
sterm with atexit(), so currently
-fregister_global_dtors_with_atexit does not work well on AIX: It would cause
finalization actions to not occur when unloading shared libraries. We need to figure
out a way to handle that when we start supporting user-declared
attribute((destructor)) functions.

Currently we report_fatal_error on this option temporarily.

Differential Revision: https://reviews.llvm.org/D83974