From e520181b6f534399efd89d772c01eab1db0295b9 Mon Sep 17 00:00:00 2001 From: chen zheng Date: Tue, 16 Sep 2025 11:56:58 +0800 Subject: [PATCH] [SMEMatrix] add unwinder library when -fenable-matrix is enabled. --- clang/lib/Driver/ToolChain.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/clang/lib/Driver/ToolChain.cpp b/clang/lib/Driver/ToolChain.cpp index 7941b5ba9250..5031205d5408 100644 --- a/clang/lib/Driver/ToolChain.cpp +++ b/clang/lib/Driver/ToolChain.cpp @@ -1152,6 +1152,10 @@ ToolChain::UnwindLibType ToolChain::GetUnwindLibType( unwindLibType = GetDefaultUnwindLibType(); } + const llvm::Triple::ArchType Arch = getArch(); + if (Arch == llvm::Triple::aarch64 && Args.hasArg(options::OPT_fenable_matrix)) + unwindLibType = ToolChain::UNW_CompilerRT; + return *unwindLibType; } -- Gitee