This is the same as #23542 (Fix binaries incorrectly detected as shared libraries on some linux distros) but for Clang. It should be fine with Clang 4 or higher. (cherry picked from commit c0fcd55f96)
c0fcd55f96