The Ananas Operating System (https://github.com/zhmu/ananas) has shared library support as of commit 57739c0b6ece56dd4872aedf30264ed4b9412c77.
This change adds the necessary settings to clang so that shared executables and libraries can be build correctly.
This logic is used multiple times. Would it make sense to do something like this?