| Colin Cross | ca860ac | 2016-01-04 14:34:37 -0800 | [diff] [blame] | 1 | // Copyright 2016 Google Inc. All rights reserved. | 
|  | 2 | // | 
|  | 3 | // Licensed under the Apache License, Version 2.0 (the "License"); | 
|  | 4 | // you may not use this file except in compliance with the License. | 
|  | 5 | // You may obtain a copy of the License at | 
|  | 6 | // | 
|  | 7 | //     http://www.apache.org/licenses/LICENSE-2.0 | 
|  | 8 | // | 
|  | 9 | // Unless required by applicable law or agreed to in writing, software | 
|  | 10 | // distributed under the License is distributed on an "AS IS" BASIS, | 
|  | 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | 
|  | 12 | // See the License for the specific language governing permissions and | 
|  | 13 | // limitations under the License. | 
|  | 14 |  | 
|  | 15 | package cc | 
|  | 16 |  | 
|  | 17 | import ( | 
| Colin Cross | 635c3b0 | 2016-05-18 15:37:25 -0700 | [diff] [blame] | 18 | "android/soong/android" | 
| Colin Cross | ca860ac | 2016-01-04 14:34:37 -0800 | [diff] [blame] | 19 | "fmt" | 
| Dan Albert | 90b9bbc | 2018-11-15 11:29:28 -0800 | [diff] [blame] | 20 | "strconv" | 
| Colin Cross | ca860ac | 2016-01-04 14:34:37 -0800 | [diff] [blame] | 21 | ) | 
|  | 22 |  | 
| Colin Cross | b60190a | 2018-09-04 16:28:17 -0700 | [diff] [blame] | 23 | func getNdkStlFamily(m *Module) string { | 
|  | 24 | family, _ := getNdkStlFamilyAndLinkType(m) | 
|  | 25 | return family | 
|  | 26 | } | 
|  | 27 |  | 
|  | 28 | func getNdkStlFamilyAndLinkType(m *Module) (string, string) { | 
| Dan Albert | 202fe49 | 2017-12-15 13:56:59 -0800 | [diff] [blame] | 29 | stl := m.stl.Properties.SelectedStl | 
|  | 30 | switch stl { | 
| Colin Cross | b60190a | 2018-09-04 16:28:17 -0700 | [diff] [blame] | 31 | case "ndk_libc++_shared": | 
|  | 32 | return "libc++", "shared" | 
|  | 33 | case "ndk_libc++_static": | 
|  | 34 | return "libc++", "static" | 
| Dan Albert | 202fe49 | 2017-12-15 13:56:59 -0800 | [diff] [blame] | 35 | case "ndk_system": | 
| Colin Cross | b60190a | 2018-09-04 16:28:17 -0700 | [diff] [blame] | 36 | return "system", "shared" | 
| Dan Albert | 202fe49 | 2017-12-15 13:56:59 -0800 | [diff] [blame] | 37 | case "": | 
| Colin Cross | b60190a | 2018-09-04 16:28:17 -0700 | [diff] [blame] | 38 | return "none", "none" | 
| Dan Albert | 202fe49 | 2017-12-15 13:56:59 -0800 | [diff] [blame] | 39 | default: | 
| Colin Cross | b60190a | 2018-09-04 16:28:17 -0700 | [diff] [blame] | 40 | panic(fmt.Errorf("stl: %q is not a valid STL", stl)) | 
| Dan Albert | 202fe49 | 2017-12-15 13:56:59 -0800 | [diff] [blame] | 41 | } | 
|  | 42 | } | 
|  | 43 |  | 
| Colin Cross | ca860ac | 2016-01-04 14:34:37 -0800 | [diff] [blame] | 44 | type StlProperties struct { | 
| Dan Albert | 749fc78 | 2018-01-04 14:21:14 -0800 | [diff] [blame] | 45 | // Select the STL library to use.  Possible values are "libc++", | 
|  | 46 | // "libc++_static", "libstdc++", or "none". Leave blank to select the | 
|  | 47 | // default. | 
| Colin Cross | 245ced7 | 2017-07-20 16:57:46 -0700 | [diff] [blame] | 48 | Stl *string `android:"arch_variant"` | 
| Colin Cross | ca860ac | 2016-01-04 14:34:37 -0800 | [diff] [blame] | 49 |  | 
|  | 50 | SelectedStl string `blueprint:"mutated"` | 
|  | 51 | } | 
|  | 52 |  | 
| Colin Cross | a8e07cc | 2016-04-04 15:07:06 -0700 | [diff] [blame] | 53 | type stl struct { | 
| Colin Cross | ca860ac | 2016-01-04 14:34:37 -0800 | [diff] [blame] | 54 | Properties StlProperties | 
|  | 55 | } | 
|  | 56 |  | 
| Colin Cross | a8e07cc | 2016-04-04 15:07:06 -0700 | [diff] [blame] | 57 | func (stl *stl) props() []interface{} { | 
| Colin Cross | ca860ac | 2016-01-04 14:34:37 -0800 | [diff] [blame] | 58 | return []interface{}{&stl.Properties} | 
|  | 59 | } | 
|  | 60 |  | 
| Colin Cross | a8e07cc | 2016-04-04 15:07:06 -0700 | [diff] [blame] | 61 | func (stl *stl) begin(ctx BaseModuleContext) { | 
| Colin Cross | ca860ac | 2016-01-04 14:34:37 -0800 | [diff] [blame] | 62 | stl.Properties.SelectedStl = func() string { | 
| Colin Cross | 7924885 | 2016-07-12 13:12:33 -0700 | [diff] [blame] | 63 | s := "" | 
|  | 64 | if stl.Properties.Stl != nil { | 
|  | 65 | s = *stl.Properties.Stl | 
|  | 66 | } | 
| Jeff Gaston | af3cc2d | 2017-09-27 17:01:44 -0700 | [diff] [blame] | 67 | if ctx.useSdk() && ctx.Device() { | 
| Colin Cross | 7924885 | 2016-07-12 13:12:33 -0700 | [diff] [blame] | 68 | switch s { | 
| Colin Cross | ca860ac | 2016-01-04 14:34:37 -0800 | [diff] [blame] | 69 | case "": | 
|  | 70 | return "ndk_system" | 
| Dan Albert | 749fc78 | 2018-01-04 14:21:14 -0800 | [diff] [blame] | 71 | case "c++_shared", "c++_static": | 
| Colin Cross | 7924885 | 2016-07-12 13:12:33 -0700 | [diff] [blame] | 72 | return "ndk_lib" + s | 
| David Benjamin | 87f9f03 | 2017-01-25 14:10:04 -0500 | [diff] [blame] | 73 | case "libc++": | 
|  | 74 | return "ndk_libc++_shared" | 
|  | 75 | case "libc++_static": | 
|  | 76 | return "ndk_libc++_static" | 
| Colin Cross | 4a97cb4 | 2016-04-21 15:53:42 -0700 | [diff] [blame] | 77 | case "none": | 
|  | 78 | return "" | 
| Colin Cross | ca860ac | 2016-01-04 14:34:37 -0800 | [diff] [blame] | 79 | default: | 
| Colin Cross | 7924885 | 2016-07-12 13:12:33 -0700 | [diff] [blame] | 80 | ctx.ModuleErrorf("stl: %q is not a supported STL with sdk_version set", s) | 
| Colin Cross | ca860ac | 2016-01-04 14:34:37 -0800 | [diff] [blame] | 81 | return "" | 
|  | 82 | } | 
| Colin Cross | 3edeee1 | 2017-04-04 12:59:48 -0700 | [diff] [blame] | 83 | } else if ctx.Windows() { | 
| Colin Cross | 7924885 | 2016-07-12 13:12:33 -0700 | [diff] [blame] | 84 | switch s { | 
| Pirama Arumuga Nainar | a403cc7 | 2018-08-08 10:28:12 -0700 | [diff] [blame] | 85 | case "libc++", "libc++_static", "": | 
|  | 86 | // Only use static libc++ for Windows. | 
|  | 87 | return "libc++_static" | 
| Colin Cross | ca860ac | 2016-01-04 14:34:37 -0800 | [diff] [blame] | 88 | case "none": | 
|  | 89 | return "" | 
|  | 90 | default: | 
| Colin Cross | 7924885 | 2016-07-12 13:12:33 -0700 | [diff] [blame] | 91 | ctx.ModuleErrorf("stl: %q is not a supported STL for windows", s) | 
| Colin Cross | ca860ac | 2016-01-04 14:34:37 -0800 | [diff] [blame] | 92 | return "" | 
|  | 93 | } | 
| Doug Horn | c32c6b0 | 2019-01-17 14:44:05 -0800 | [diff] [blame] | 94 | } else if ctx.Fuchsia() { | 
|  | 95 | switch s { | 
|  | 96 | case "c++_static": | 
|  | 97 | return "libc++_static" | 
|  | 98 | case "c++_shared": | 
|  | 99 | return "libc++" | 
|  | 100 | case "libc++", "libc++_static": | 
|  | 101 | return s | 
|  | 102 | case "none": | 
|  | 103 | return "" | 
|  | 104 | case "": | 
|  | 105 | if ctx.static() { | 
|  | 106 | return "libc++_static" | 
|  | 107 | } else { | 
|  | 108 | return "libc++" | 
|  | 109 | } | 
|  | 110 | default: | 
|  | 111 | ctx.ModuleErrorf("stl: %q is not a supported STL on Fuchsia", s) | 
|  | 112 | return "" | 
|  | 113 | } | 
| Colin Cross | ca860ac | 2016-01-04 14:34:37 -0800 | [diff] [blame] | 114 | } else { | 
| Colin Cross | 7924885 | 2016-07-12 13:12:33 -0700 | [diff] [blame] | 115 | switch s { | 
| Dan Willemsen | 141d566 | 2016-06-15 13:47:51 -0700 | [diff] [blame] | 116 | case "libc++", "libc++_static": | 
| Colin Cross | 7924885 | 2016-07-12 13:12:33 -0700 | [diff] [blame] | 117 | return s | 
| Colin Cross | ca860ac | 2016-01-04 14:34:37 -0800 | [diff] [blame] | 118 | case "none": | 
|  | 119 | return "" | 
|  | 120 | case "": | 
|  | 121 | if ctx.static() { | 
|  | 122 | return "libc++_static" | 
|  | 123 | } else { | 
|  | 124 | return "libc++" | 
|  | 125 | } | 
|  | 126 | default: | 
| Colin Cross | 7924885 | 2016-07-12 13:12:33 -0700 | [diff] [blame] | 127 | ctx.ModuleErrorf("stl: %q is not a supported STL", s) | 
| Colin Cross | ca860ac | 2016-01-04 14:34:37 -0800 | [diff] [blame] | 128 | return "" | 
|  | 129 | } | 
|  | 130 | } | 
|  | 131 | }() | 
|  | 132 | } | 
|  | 133 |  | 
| Dan Albert | 90b9bbc | 2018-11-15 11:29:28 -0800 | [diff] [blame] | 134 | func needsLibAndroidSupport(ctx BaseModuleContext) bool { | 
|  | 135 | versionStr, err := normalizeNdkApiLevel(ctx, ctx.sdkVersion(), ctx.Arch()) | 
|  | 136 | if err != nil { | 
|  | 137 | ctx.PropertyErrorf("sdk_version", err.Error()) | 
|  | 138 | } | 
|  | 139 |  | 
|  | 140 | if versionStr == "current" { | 
|  | 141 | return false | 
|  | 142 | } | 
|  | 143 |  | 
|  | 144 | version, err := strconv.Atoi(versionStr) | 
|  | 145 | if err != nil { | 
|  | 146 | panic(fmt.Sprintf( | 
|  | 147 | "invalid API level returned from normalizeNdkApiLevel: %q", | 
|  | 148 | versionStr)) | 
|  | 149 | } | 
|  | 150 |  | 
|  | 151 | return version < 21 | 
|  | 152 | } | 
|  | 153 |  | 
| Colin Cross | a8e07cc | 2016-04-04 15:07:06 -0700 | [diff] [blame] | 154 | func (stl *stl) deps(ctx BaseModuleContext, deps Deps) Deps { | 
| Colin Cross | ca860ac | 2016-01-04 14:34:37 -0800 | [diff] [blame] | 155 | switch stl.Properties.SelectedStl { | 
|  | 156 | case "libstdc++": | 
| Dan Willemsen | 141d566 | 2016-06-15 13:47:51 -0700 | [diff] [blame] | 157 | // Nothing | 
| Colin Cross | ca860ac | 2016-01-04 14:34:37 -0800 | [diff] [blame] | 158 | case "libc++", "libc++_static": | 
|  | 159 | if stl.Properties.SelectedStl == "libc++" { | 
|  | 160 | deps.SharedLibs = append(deps.SharedLibs, stl.Properties.SelectedStl) | 
|  | 161 | } else { | 
|  | 162 | deps.StaticLibs = append(deps.StaticLibs, stl.Properties.SelectedStl) | 
|  | 163 | } | 
| Dan Willemsen | 2e47b34 | 2016-11-17 01:02:25 -0800 | [diff] [blame] | 164 | if ctx.toolchain().Bionic() { | 
| Colin Cross | 635c3b0 | 2016-05-18 15:37:25 -0700 | [diff] [blame] | 165 | if ctx.Arch().ArchType == android.Arm { | 
| Colin Cross | ca860ac | 2016-01-04 14:34:37 -0800 | [diff] [blame] | 166 | deps.StaticLibs = append(deps.StaticLibs, "libunwind_llvm") | 
|  | 167 | } | 
|  | 168 | if ctx.staticBinary() { | 
| Colin Cross | 3d92b27 | 2016-07-14 15:59:32 -0700 | [diff] [blame] | 169 | deps.StaticLibs = append(deps.StaticLibs, "libm", "libc", "libdl") | 
| Colin Cross | ca860ac | 2016-01-04 14:34:37 -0800 | [diff] [blame] | 170 | } | 
|  | 171 | } | 
|  | 172 | case "": | 
|  | 173 | // None or error. | 
|  | 174 | case "ndk_system": | 
|  | 175 | // TODO: Make a system STL prebuilt for the NDK. | 
|  | 176 | // The system STL doesn't have a prebuilt (it uses the system's libstdc++), but it does have | 
|  | 177 | // its own includes. The includes are handled in CCBase.Flags(). | 
|  | 178 | deps.SharedLibs = append([]string{"libstdc++"}, deps.SharedLibs...) | 
| Ryan Prichard | b170365 | 2018-03-26 16:30:31 -0700 | [diff] [blame] | 179 | case "ndk_libc++_shared", "ndk_libc++_static": | 
|  | 180 | if stl.Properties.SelectedStl == "ndk_libc++_shared" { | 
|  | 181 | deps.SharedLibs = append(deps.SharedLibs, stl.Properties.SelectedStl) | 
|  | 182 | } else { | 
|  | 183 | deps.StaticLibs = append(deps.StaticLibs, stl.Properties.SelectedStl, "ndk_libc++abi") | 
|  | 184 | } | 
| Dan Albert | 90b9bbc | 2018-11-15 11:29:28 -0800 | [diff] [blame] | 185 | if needsLibAndroidSupport(ctx) { | 
|  | 186 | deps.StaticLibs = append(deps.StaticLibs, "ndk_libandroid_support") | 
|  | 187 | } | 
| Ryan Prichard | b170365 | 2018-03-26 16:30:31 -0700 | [diff] [blame] | 188 | if ctx.Arch().ArchType == android.Arm { | 
|  | 189 | deps.StaticLibs = append(deps.StaticLibs, "ndk_libunwind") | 
|  | 190 | } | 
| Colin Cross | ca860ac | 2016-01-04 14:34:37 -0800 | [diff] [blame] | 191 | default: | 
|  | 192 | panic(fmt.Errorf("Unknown stl: %q", stl.Properties.SelectedStl)) | 
|  | 193 | } | 
|  | 194 |  | 
|  | 195 | return deps | 
|  | 196 | } | 
|  | 197 |  | 
| Colin Cross | a8e07cc | 2016-04-04 15:07:06 -0700 | [diff] [blame] | 198 | func (stl *stl) flags(ctx ModuleContext, flags Flags) Flags { | 
| Colin Cross | ca860ac | 2016-01-04 14:34:37 -0800 | [diff] [blame] | 199 | switch stl.Properties.SelectedStl { | 
|  | 200 | case "libc++", "libc++_static": | 
|  | 201 | flags.CFlags = append(flags.CFlags, "-D_USING_LIBCXX") | 
| Dan Albert | a07b845 | 2018-01-11 13:00:46 -0800 | [diff] [blame] | 202 |  | 
|  | 203 | if ctx.Darwin() { | 
|  | 204 | // libc++'s headers are annotated with availability macros that | 
|  | 205 | // indicate which version of Mac OS was the first to ship with a | 
|  | 206 | // libc++ feature available in its *system's* libc++.dylib. We do | 
|  | 207 | // not use the system's library, but rather ship our own. As such, | 
|  | 208 | // these availability attributes are meaningless for us but cause | 
|  | 209 | // build breaks when we try to use code that would not be available | 
|  | 210 | // in the system's dylib. | 
|  | 211 | flags.CppFlags = append(flags.CppFlags, | 
|  | 212 | "-D_LIBCPP_DISABLE_AVAILABILITY") | 
|  | 213 | } | 
|  | 214 |  | 
| Dan Willemsen | 2e47b34 | 2016-11-17 01:02:25 -0800 | [diff] [blame] | 215 | if !ctx.toolchain().Bionic() { | 
| Colin Cross | ca860ac | 2016-01-04 14:34:37 -0800 | [diff] [blame] | 216 | flags.CppFlags = append(flags.CppFlags, "-nostdinc++") | 
|  | 217 | flags.LdFlags = append(flags.LdFlags, "-nodefaultlibs") | 
| Colin Cross | ca860ac | 2016-01-04 14:34:37 -0800 | [diff] [blame] | 218 | if ctx.staticBinary() { | 
| Colin Cross | a1ad8d1 | 2016-06-01 17:09:44 -0700 | [diff] [blame] | 219 | flags.LdFlags = append(flags.LdFlags, hostStaticGccLibs[ctx.Os()]...) | 
| Colin Cross | ca860ac | 2016-01-04 14:34:37 -0800 | [diff] [blame] | 220 | } else { | 
| Colin Cross | a1ad8d1 | 2016-06-01 17:09:44 -0700 | [diff] [blame] | 221 | flags.LdFlags = append(flags.LdFlags, hostDynamicGccLibs[ctx.Os()]...) | 
| Colin Cross | ca860ac | 2016-01-04 14:34:37 -0800 | [diff] [blame] | 222 | } | 
| Pirama Arumuga Nainar | a403cc7 | 2018-08-08 10:28:12 -0700 | [diff] [blame] | 223 | if ctx.Windows() { | 
|  | 224 | // Use SjLj exceptions for 32-bit.  libgcc_eh implements SjLj | 
|  | 225 | // exception model for 32-bit. | 
|  | 226 | if ctx.Arch().ArchType == android.X86 { | 
|  | 227 | flags.CppFlags = append(flags.CppFlags, "-fsjlj-exceptions") | 
|  | 228 | } | 
|  | 229 | flags.CppFlags = append(flags.CppFlags, | 
|  | 230 | // Disable visiblity annotations since we're using static | 
|  | 231 | // libc++. | 
|  | 232 | "-D_LIBCPP_DISABLE_VISIBILITY_ANNOTATIONS", | 
|  | 233 | "-D_LIBCXXABI_DISABLE_VISIBILITY_ANNOTATIONS", | 
|  | 234 | // Use Win32 threads in libc++. | 
|  | 235 | "-D_LIBCPP_HAS_THREAD_API_WIN32") | 
|  | 236 | } | 
| Colin Cross | ca860ac | 2016-01-04 14:34:37 -0800 | [diff] [blame] | 237 | } else { | 
| Colin Cross | 635c3b0 | 2016-05-18 15:37:25 -0700 | [diff] [blame] | 238 | if ctx.Arch().ArchType == android.Arm { | 
| Colin Cross | ca860ac | 2016-01-04 14:34:37 -0800 | [diff] [blame] | 239 | flags.LdFlags = append(flags.LdFlags, "-Wl,--exclude-libs,libunwind_llvm.a") | 
|  | 240 | } | 
|  | 241 | } | 
|  | 242 | case "libstdc++": | 
| Dan Willemsen | 141d566 | 2016-06-15 13:47:51 -0700 | [diff] [blame] | 243 | // Nothing | 
| Colin Cross | ca860ac | 2016-01-04 14:34:37 -0800 | [diff] [blame] | 244 | case "ndk_system": | 
| Colin Cross | 635c3b0 | 2016-05-18 15:37:25 -0700 | [diff] [blame] | 245 | ndkSrcRoot := android.PathForSource(ctx, "prebuilts/ndk/current/sources/cxx-stl/system/include") | 
| Colin Cross | ca860ac | 2016-01-04 14:34:37 -0800 | [diff] [blame] | 246 | flags.CFlags = append(flags.CFlags, "-isystem "+ndkSrcRoot.String()) | 
|  | 247 | case "ndk_libc++_shared", "ndk_libc++_static": | 
| Elliott Hughes | 5789ca9 | 2018-02-16 17:15:19 -0800 | [diff] [blame] | 248 | // Nothing. | 
| Colin Cross | ca860ac | 2016-01-04 14:34:37 -0800 | [diff] [blame] | 249 | case "": | 
|  | 250 | // None or error. | 
| Dan Willemsen | 2e47b34 | 2016-11-17 01:02:25 -0800 | [diff] [blame] | 251 | if !ctx.toolchain().Bionic() { | 
| Colin Cross | ca860ac | 2016-01-04 14:34:37 -0800 | [diff] [blame] | 252 | flags.CppFlags = append(flags.CppFlags, "-nostdinc++") | 
|  | 253 | flags.LdFlags = append(flags.LdFlags, "-nodefaultlibs") | 
|  | 254 | if ctx.staticBinary() { | 
| Colin Cross | a1ad8d1 | 2016-06-01 17:09:44 -0700 | [diff] [blame] | 255 | flags.LdFlags = append(flags.LdFlags, hostStaticGccLibs[ctx.Os()]...) | 
| Colin Cross | ca860ac | 2016-01-04 14:34:37 -0800 | [diff] [blame] | 256 | } else { | 
| Colin Cross | a1ad8d1 | 2016-06-01 17:09:44 -0700 | [diff] [blame] | 257 | flags.LdFlags = append(flags.LdFlags, hostDynamicGccLibs[ctx.Os()]...) | 
| Colin Cross | ca860ac | 2016-01-04 14:34:37 -0800 | [diff] [blame] | 258 | } | 
|  | 259 | } | 
|  | 260 | default: | 
|  | 261 | panic(fmt.Errorf("Unknown stl: %q", stl.Properties.SelectedStl)) | 
|  | 262 | } | 
|  | 263 |  | 
|  | 264 | return flags | 
|  | 265 | } | 
|  | 266 |  | 
| Colin Cross | a1ad8d1 | 2016-06-01 17:09:44 -0700 | [diff] [blame] | 267 | var hostDynamicGccLibs, hostStaticGccLibs map[android.OsType][]string | 
| Colin Cross | ca860ac | 2016-01-04 14:34:37 -0800 | [diff] [blame] | 268 |  | 
|  | 269 | func init() { | 
| Colin Cross | a1ad8d1 | 2016-06-01 17:09:44 -0700 | [diff] [blame] | 270 | hostDynamicGccLibs = map[android.OsType][]string{ | 
| Doug Horn | c32c6b0 | 2019-01-17 14:44:05 -0800 | [diff] [blame] | 271 | android.Fuchsia: []string{"-lc", "-lunwind"}, | 
|  | 272 | android.Linux:   []string{"-lgcc_s", "-lgcc", "-lc", "-lgcc_s", "-lgcc"}, | 
|  | 273 | android.Darwin:  []string{"-lc", "-lSystem"}, | 
| Pirama Arumuga Nainar | a403cc7 | 2018-08-08 10:28:12 -0700 | [diff] [blame] | 274 | android.Windows: []string{"-Wl,--start-group", "-lmingw32", "-lgcc", "-lgcc_eh", | 
| Pirama Arumuga Nainar | 087bba7 | 2018-11-29 17:19:25 -0800 | [diff] [blame] | 275 | "-lmoldname", "-lmingwex", "-lmsvcrt", "-lucrt", "-lpthread", | 
| Pirama Arumuga Nainar | a403cc7 | 2018-08-08 10:28:12 -0700 | [diff] [blame] | 276 | "-ladvapi32", "-lshell32", "-luser32", "-lkernel32", "-lpsapi", | 
|  | 277 | "-Wl,--end-group"}, | 
| Colin Cross | ca860ac | 2016-01-04 14:34:37 -0800 | [diff] [blame] | 278 | } | 
| Colin Cross | a1ad8d1 | 2016-06-01 17:09:44 -0700 | [diff] [blame] | 279 | hostStaticGccLibs = map[android.OsType][]string{ | 
| Colin Cross | 635c3b0 | 2016-05-18 15:37:25 -0700 | [diff] [blame] | 280 | android.Linux:   []string{"-Wl,--start-group", "-lgcc", "-lgcc_eh", "-lc", "-Wl,--end-group"}, | 
|  | 281 | android.Darwin:  []string{"NO_STATIC_HOST_BINARIES_ON_DARWIN"}, | 
|  | 282 | android.Windows: []string{"NO_STATIC_HOST_BINARIES_ON_WINDOWS"}, | 
| Colin Cross | ca860ac | 2016-01-04 14:34:37 -0800 | [diff] [blame] | 283 | } | 
|  | 284 | } |