aboutsummaryrefslogtreecommitdiffstats
path: root/cc
diff options
context:
space:
mode:
authorPirama Arumuga Nainar <pirama@google.com>2018-06-25 16:42:23 -0700
committerPirama Arumuga Nainar <pirama@google.com>2018-06-25 18:31:01 -0700
commitabf1b31a201acf4218b9ff63a51a66b50a9108bb (patch)
treec29b534a9a2b613efa3a5922be16576cd7a9c215 /cc
parent87e50a0d14a7d6e0cba4ce4bd7dc73fae5e06eaa (diff)
downloadbuild_soong-abf1b31a201acf4218b9ff63a51a66b50a9108bb.tar.gz
build_soong-abf1b31a201acf4218b9ff63a51a66b50a9108bb.tar.bz2
build_soong-abf1b31a201acf4218b9ff63a51a66b50a9108bb.zip
Use -static-libgcc for Windows
Bug: http://b/69970955 With the MinGW prebuilts update (http://aosp/709402), executables get a runtime dependency on libgcc_s_sjlj-1.dll with both gcc and Clang. Passing -static-libgcc removes this dependency and is a better option than having to package an extra dll with executables. Test: Run gcc-built adb_test.exe under wine Change-Id: I18e5fadb1b8ace510ae684e2d4cfa7fe7d007cff
Diffstat (limited to 'cc')
-rw-r--r--cc/config/x86_windows_host.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/cc/config/x86_windows_host.go b/cc/config/x86_windows_host.go
index 6fbff9f1..4e13230b 100644
--- a/cc/config/x86_windows_host.go
+++ b/cc/config/x86_windows_host.go
@@ -79,6 +79,7 @@ var (
"-m32",
"-Wl,--large-address-aware",
"-L${WindowsGccRoot}/${WindowsGccTriple}/lib32",
+ "-static-libgcc",
}
windowsX86ClangLdflags = append(ClangFilterUnknownCflags(windowsX86Ldflags), []string{
"-B${WindowsGccRoot}/lib/gcc/${WindowsGccTriple}/4.8.3/32",
@@ -90,6 +91,7 @@ var (
windowsX8664Ldflags = []string{
"-m64",
"-L${WindowsGccRoot}/${WindowsGccTriple}/lib64",
+ "-static-libgcc",
}
windowsX8664ClangLdflags = append(ClangFilterUnknownCflags(windowsX8664Ldflags), []string{
"-B${WindowsGccRoot}/lib/gcc/${WindowsGccTriple}/4.8.3",