diff --git lib/Driver/Tools.cpp lib/Driver/Tools.cpp
index 3e71522..5a5cba7 100644
--- lib/Driver/Tools.cpp
+++ lib/Driver/Tools.cpp
@@ -3978,7 +3978,8 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
                     options::OPT_fno_use_cxa_atexit,
                     !IsWindowsCygnus && !IsWindowsGNU &&
                     getToolChain().getArch() != llvm::Triple::hexagon &&
-                    getToolChain().getArch() != llvm::Triple::xcore) ||
+                    getToolChain().getArch() != llvm::Triple::xcore &&
+                    getToolChain().getTriple().getEnvironment() != llvm::Triple::Musl) ||
       KernelOrKext)
     CmdArgs.push_back("-fno-use-cxa-atexit");
 
