https://github.com/MaskRay requested changes to this pull request. Commented on #160059 . This will break linking glibc with lld and some other projects that specify --dynamic-linker= but don't bother removing the option for -shared. https://github.com/llvm/llvm-project/pull/161374