From 105cab2b5af8ae8c589eaf4be0ab7f4284496ad4 Mon Sep 17 00:00:00 2001 From: Pirama Arumuga Nainar Date: Tue, 15 Oct 2019 13:56:29 -0700 Subject: [PATCH] Pass -static-libgcc to Windows link commands This was unnecessary in the past, when -nodefaultlibs was used while linking, but that changed with aosp/I722bd6596a1f3f5819f2767c29c0fa1e8b3ec0e8. Test: simpleperf_ndk64.exe no longer depends on libgcc_s_seh-1.dll. Change-Id: I435d7302906eb3758e758b5aefca8763bfba6290 --- cc/config/x86_windows_host.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cc/config/x86_windows_host.go b/cc/config/x86_windows_host.go index 0f500b6fb..43e8c85e8 100644 --- a/cc/config/x86_windows_host.go +++ b/cc/config/x86_windows_host.go @@ -73,6 +73,7 @@ var ( "-m32", "-Wl,--large-address-aware", "-L${WindowsGccRoot}/${WindowsGccTriple}/lib32", + "-static-libgcc", } windowsX86ClangLdflags = append(ClangFilterUnknownCflags(windowsX86Ldflags), []string{ "-B${WindowsGccRoot}/${WindowsGccTriple}/bin", @@ -86,6 +87,7 @@ var ( "-m64", "-L${WindowsGccRoot}/${WindowsGccTriple}/lib64", "-Wl,--high-entropy-va", + "-static-libgcc", } windowsX8664ClangLdflags = append(ClangFilterUnknownCflags(windowsX8664Ldflags), []string{ "-B${WindowsGccRoot}/${WindowsGccTriple}/bin",