https://github.com/MaskRay approved this pull request. Alternatively, change MCAsmInfoELF::getNonexecutableStackSection . It already has a Ctx.getTargetTriple().isOSSolaris() check. https://github.com/llvm/llvm-project/pull/159960