Dan Willemsen | 490fd49 | 2015-11-24 17:53:15 -0800 | [diff] [blame] | 1 | // Copyright 2015 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 | |
Colin Cross | b98c8b0 | 2016-07-29 13:44:28 -0700 | [diff] [blame] | 15 | package config |
Dan Willemsen | 490fd49 | 2015-11-24 17:53:15 -0800 | [diff] [blame] | 16 | |
| 17 | import ( |
| 18 | "strings" |
| 19 | |
Colin Cross | 635c3b0 | 2016-05-18 15:37:25 -0700 | [diff] [blame] | 20 | "android/soong/android" |
Dan Willemsen | 490fd49 | 2015-11-24 17:53:15 -0800 | [diff] [blame] | 21 | ) |
| 22 | |
| 23 | var ( |
| 24 | windowsCflags = []string{ |
Dan Willemsen | 490fd49 | 2015-11-24 17:53:15 -0800 | [diff] [blame] | 25 | "-DUSE_MINGW", |
| 26 | "-DWIN32_LEAN_AND_MEAN", |
| 27 | "-Wno-unused-parameter", |
Dan Willemsen | 490fd49 | 2015-11-24 17:53:15 -0800 | [diff] [blame] | 28 | |
| 29 | // Workaround differences in inttypes.h between host and target. |
| 30 | //See bug 12708004. |
| 31 | "-D__STDC_FORMAT_MACROS", |
| 32 | "-D__STDC_CONSTANT_MACROS", |
| 33 | |
| 34 | // Use C99-compliant printf functions (%zd). |
| 35 | "-D__USE_MINGW_ANSI_STDIO=1", |
Jerome Gaillard | 82bb8b1 | 2018-12-04 12:36:49 +0000 | [diff] [blame^] | 36 | // Admit to using >= Windows 7. Both are needed because of <_mingw.h>. |
| 37 | "-D_WIN32_WINNT=0x0601", |
| 38 | "-DWINVER=0x0601", |
Dan Willemsen | 490fd49 | 2015-11-24 17:53:15 -0800 | [diff] [blame] | 39 | // Get 64-bit off_t and related functions. |
| 40 | "-D_FILE_OFFSET_BITS=64", |
| 41 | |
Colin Cross | b98c8b0 | 2016-07-29 13:44:28 -0700 | [diff] [blame] | 42 | "--sysroot ${WindowsGccRoot}/${WindowsGccTriple}", |
Dan Willemsen | 490fd49 | 2015-11-24 17:53:15 -0800 | [diff] [blame] | 43 | } |
Dan Willemsen | 01f388c | 2017-11-30 13:31:26 -0800 | [diff] [blame] | 44 | windowsClangCflags = append(ClangFilterUnknownCflags(windowsCflags), []string{}...) |
Dan Willemsen | 490fd49 | 2015-11-24 17:53:15 -0800 | [diff] [blame] | 45 | |
| 46 | windowsIncludeFlags = []string{ |
Colin Cross | b98c8b0 | 2016-07-29 13:44:28 -0700 | [diff] [blame] | 47 | "-isystem ${WindowsGccRoot}/${WindowsGccTriple}/include", |
Dan Willemsen | 490fd49 | 2015-11-24 17:53:15 -0800 | [diff] [blame] | 48 | } |
| 49 | |
Pirama Arumuga Nainar | a403cc7 | 2018-08-08 10:28:12 -0700 | [diff] [blame] | 50 | windowsClangCppflags = []string{} |
Dan Willemsen | 01f388c | 2017-11-30 13:31:26 -0800 | [diff] [blame] | 51 | |
Pirama Arumuga Nainar | a403cc7 | 2018-08-08 10:28:12 -0700 | [diff] [blame] | 52 | windowsX86ClangCppflags = []string{} |
Dan Willemsen | 01f388c | 2017-11-30 13:31:26 -0800 | [diff] [blame] | 53 | |
Pirama Arumuga Nainar | a403cc7 | 2018-08-08 10:28:12 -0700 | [diff] [blame] | 54 | windowsX8664ClangCppflags = []string{} |
Dan Willemsen | 01f388c | 2017-11-30 13:31:26 -0800 | [diff] [blame] | 55 | |
Dan Willemsen | 490fd49 | 2015-11-24 17:53:15 -0800 | [diff] [blame] | 56 | windowsLdflags = []string{ |
Dan Willemsen | 490fd49 | 2015-11-24 17:53:15 -0800 | [diff] [blame] | 57 | "--enable-stdcall-fixup", |
Pirama Arumuga Nainar | 191f646 | 2018-08-30 12:37:56 -0700 | [diff] [blame] | 58 | "-Wl,--dynamicbase", |
| 59 | "-Wl,--nxcompat", |
Dan Willemsen | 490fd49 | 2015-11-24 17:53:15 -0800 | [diff] [blame] | 60 | } |
Chih-Hung Hsieh | 3101a96 | 2018-04-17 14:16:05 -0700 | [diff] [blame] | 61 | windowsClangLdflags = append(ClangFilterUnknownCflags(windowsLdflags), []string{}...) |
| 62 | windowsClangLldflags = ClangFilterUnknownLldflags(windowsClangLdflags) |
Dan Willemsen | 07cd051 | 2016-02-03 23:16:33 -0800 | [diff] [blame] | 63 | |
| 64 | windowsX86Cflags = []string{ |
| 65 | "-m32", |
| 66 | } |
| 67 | |
| 68 | windowsX8664Cflags = []string{ |
| 69 | "-m64", |
| 70 | } |
| 71 | |
| 72 | windowsX86Ldflags = []string{ |
| 73 | "-m32", |
Dan Willemsen | 7752bca | 2017-03-14 13:36:23 -0700 | [diff] [blame] | 74 | "-Wl,--large-address-aware", |
Colin Cross | b98c8b0 | 2016-07-29 13:44:28 -0700 | [diff] [blame] | 75 | "-L${WindowsGccRoot}/${WindowsGccTriple}/lib32", |
Dan Willemsen | 07cd051 | 2016-02-03 23:16:33 -0800 | [diff] [blame] | 76 | } |
Dan Willemsen | 01f388c | 2017-11-30 13:31:26 -0800 | [diff] [blame] | 77 | windowsX86ClangLdflags = append(ClangFilterUnknownCflags(windowsX86Ldflags), []string{ |
Pirama Arumuga Nainar | 8a852e7 | 2018-06-19 20:07:54 -0700 | [diff] [blame] | 78 | "-B${WindowsGccRoot}/${WindowsGccTriple}/bin", |
Dan Willemsen | 01f388c | 2017-11-30 13:31:26 -0800 | [diff] [blame] | 79 | "-B${WindowsGccRoot}/lib/gcc/${WindowsGccTriple}/4.8.3/32", |
| 80 | "-L${WindowsGccRoot}/lib/gcc/${WindowsGccTriple}/4.8.3/32", |
| 81 | "-B${WindowsGccRoot}/${WindowsGccTriple}/lib32", |
| 82 | }...) |
Chih-Hung Hsieh | 3101a96 | 2018-04-17 14:16:05 -0700 | [diff] [blame] | 83 | windowsX86ClangLldflags = ClangFilterUnknownLldflags(windowsX86ClangLdflags) |
Dan Willemsen | 07cd051 | 2016-02-03 23:16:33 -0800 | [diff] [blame] | 84 | |
| 85 | windowsX8664Ldflags = []string{ |
| 86 | "-m64", |
Colin Cross | b98c8b0 | 2016-07-29 13:44:28 -0700 | [diff] [blame] | 87 | "-L${WindowsGccRoot}/${WindowsGccTriple}/lib64", |
Pirama Arumuga Nainar | 191f646 | 2018-08-30 12:37:56 -0700 | [diff] [blame] | 88 | "-Wl,--high-entropy-va", |
Dan Willemsen | 07cd051 | 2016-02-03 23:16:33 -0800 | [diff] [blame] | 89 | } |
Dan Willemsen | 01f388c | 2017-11-30 13:31:26 -0800 | [diff] [blame] | 90 | windowsX8664ClangLdflags = append(ClangFilterUnknownCflags(windowsX8664Ldflags), []string{ |
Pirama Arumuga Nainar | 8a852e7 | 2018-06-19 20:07:54 -0700 | [diff] [blame] | 91 | "-B${WindowsGccRoot}/${WindowsGccTriple}/bin", |
Dan Willemsen | 01f388c | 2017-11-30 13:31:26 -0800 | [diff] [blame] | 92 | "-B${WindowsGccRoot}/lib/gcc/${WindowsGccTriple}/4.8.3", |
| 93 | "-L${WindowsGccRoot}/lib/gcc/${WindowsGccTriple}/4.8.3", |
| 94 | "-B${WindowsGccRoot}/${WindowsGccTriple}/lib64", |
| 95 | }...) |
Chih-Hung Hsieh | 3101a96 | 2018-04-17 14:16:05 -0700 | [diff] [blame] | 96 | windowsX8664ClangLldflags = ClangFilterUnknownLldflags(windowsX8664ClangLdflags) |
Dan Willemsen | 2b1f094 | 2016-07-20 12:47:47 -0700 | [diff] [blame] | 97 | |
| 98 | windowsAvailableLibraries = addPrefix([]string{ |
| 99 | "gdi32", |
| 100 | "imagehlp", |
Dan Willemsen | b18cf7a | 2017-09-09 01:42:00 -0700 | [diff] [blame] | 101 | "iphlpapi", |
| 102 | "netapi32", |
Dan Willemsen | 2b1f094 | 2016-07-20 12:47:47 -0700 | [diff] [blame] | 103 | "ole32", |
Dan Willemsen | b18cf7a | 2017-09-09 01:42:00 -0700 | [diff] [blame] | 104 | "powrprof", |
Dan Willemsen | 2b1f094 | 2016-07-20 12:47:47 -0700 | [diff] [blame] | 105 | "psapi", |
Kenny Root | b912349 | 2016-09-20 14:49:33 -0700 | [diff] [blame] | 106 | "pthread", |
Dan Willemsen | 2b1f094 | 2016-07-20 12:47:47 -0700 | [diff] [blame] | 107 | "userenv", |
| 108 | "uuid", |
Colin Cross | 124fd9a | 2016-11-21 17:31:08 -0800 | [diff] [blame] | 109 | "version", |
Dan Willemsen | 2b1f094 | 2016-07-20 12:47:47 -0700 | [diff] [blame] | 110 | "ws2_32", |
| 111 | }, "-l") |
Dan Willemsen | 490fd49 | 2015-11-24 17:53:15 -0800 | [diff] [blame] | 112 | ) |
| 113 | |
Dan Willemsen | 34fc3b1 | 2015-12-07 12:30:44 -0800 | [diff] [blame] | 114 | const ( |
| 115 | windowsGccVersion = "4.8" |
| 116 | ) |
| 117 | |
Dan Willemsen | 490fd49 | 2015-11-24 17:53:15 -0800 | [diff] [blame] | 118 | func init() { |
Colin Cross | b98c8b0 | 2016-07-29 13:44:28 -0700 | [diff] [blame] | 119 | pctx.StaticVariable("WindowsGccVersion", windowsGccVersion) |
Dan Willemsen | 490fd49 | 2015-11-24 17:53:15 -0800 | [diff] [blame] | 120 | |
Colin Cross | b98c8b0 | 2016-07-29 13:44:28 -0700 | [diff] [blame] | 121 | pctx.SourcePathVariable("WindowsGccRoot", |
| 122 | "prebuilts/gcc/${HostPrebuiltTag}/host/x86_64-w64-mingw32-${WindowsGccVersion}") |
Dan Willemsen | 490fd49 | 2015-11-24 17:53:15 -0800 | [diff] [blame] | 123 | |
Colin Cross | b98c8b0 | 2016-07-29 13:44:28 -0700 | [diff] [blame] | 124 | pctx.StaticVariable("WindowsGccTriple", "x86_64-w64-mingw32") |
Dan Willemsen | 490fd49 | 2015-11-24 17:53:15 -0800 | [diff] [blame] | 125 | |
Dan Willemsen | 01f388c | 2017-11-30 13:31:26 -0800 | [diff] [blame] | 126 | pctx.StaticVariable("WindowsClangCflags", strings.Join(windowsClangCflags, " ")) |
| 127 | pctx.StaticVariable("WindowsClangLdflags", strings.Join(windowsClangLdflags, " ")) |
Chih-Hung Hsieh | 3101a96 | 2018-04-17 14:16:05 -0700 | [diff] [blame] | 128 | pctx.StaticVariable("WindowsClangLldflags", strings.Join(windowsClangLldflags, " ")) |
Dan Willemsen | 01f388c | 2017-11-30 13:31:26 -0800 | [diff] [blame] | 129 | pctx.StaticVariable("WindowsClangCppflags", strings.Join(windowsClangCppflags, " ")) |
| 130 | |
Dan Willemsen | 01f388c | 2017-11-30 13:31:26 -0800 | [diff] [blame] | 131 | pctx.StaticVariable("WindowsX86ClangCflags", |
| 132 | strings.Join(ClangFilterUnknownCflags(windowsX86Cflags), " ")) |
| 133 | pctx.StaticVariable("WindowsX8664ClangCflags", |
| 134 | strings.Join(ClangFilterUnknownCflags(windowsX8664Cflags), " ")) |
| 135 | pctx.StaticVariable("WindowsX86ClangLdflags", strings.Join(windowsX86ClangLdflags, " ")) |
Chih-Hung Hsieh | 3101a96 | 2018-04-17 14:16:05 -0700 | [diff] [blame] | 136 | pctx.StaticVariable("WindowsX86ClangLldflags", strings.Join(windowsX86ClangLldflags, " ")) |
Dan Willemsen | 01f388c | 2017-11-30 13:31:26 -0800 | [diff] [blame] | 137 | pctx.StaticVariable("WindowsX8664ClangLdflags", strings.Join(windowsX8664ClangLdflags, " ")) |
Chih-Hung Hsieh | 3101a96 | 2018-04-17 14:16:05 -0700 | [diff] [blame] | 138 | pctx.StaticVariable("WindowsX8664ClangLldflags", strings.Join(windowsX8664ClangLldflags, " ")) |
Dan Willemsen | 01f388c | 2017-11-30 13:31:26 -0800 | [diff] [blame] | 139 | pctx.StaticVariable("WindowsX86ClangCppflags", strings.Join(windowsX86ClangCppflags, " ")) |
| 140 | pctx.StaticVariable("WindowsX8664ClangCppflags", strings.Join(windowsX8664ClangCppflags, " ")) |
| 141 | |
Colin Cross | b98c8b0 | 2016-07-29 13:44:28 -0700 | [diff] [blame] | 142 | pctx.StaticVariable("WindowsIncludeFlags", strings.Join(windowsIncludeFlags, " ")) |
Jerome Gaillard | 80fec09 | 2018-11-29 15:34:32 +0000 | [diff] [blame] | 143 | // Yasm flags |
| 144 | pctx.StaticVariable("WindowsX86YasmFlags", "-f win32 -m x86") |
| 145 | pctx.StaticVariable("WindowsX8664YasmFlags", "-f win64 -m amd64") |
Dan Willemsen | 490fd49 | 2015-11-24 17:53:15 -0800 | [diff] [blame] | 146 | } |
| 147 | |
| 148 | type toolchainWindows struct { |
Dan Willemsen | 490fd49 | 2015-11-24 17:53:15 -0800 | [diff] [blame] | 149 | cFlags, ldFlags string |
| 150 | } |
| 151 | |
Dan Willemsen | 07cd051 | 2016-02-03 23:16:33 -0800 | [diff] [blame] | 152 | type toolchainWindowsX86 struct { |
| 153 | toolchain32Bit |
| 154 | toolchainWindows |
| 155 | } |
| 156 | |
| 157 | type toolchainWindowsX8664 struct { |
| 158 | toolchain64Bit |
| 159 | toolchainWindows |
| 160 | } |
| 161 | |
| 162 | func (t *toolchainWindowsX86) Name() string { |
Dan Willemsen | 490fd49 | 2015-11-24 17:53:15 -0800 | [diff] [blame] | 163 | return "x86" |
| 164 | } |
| 165 | |
Dan Willemsen | 07cd051 | 2016-02-03 23:16:33 -0800 | [diff] [blame] | 166 | func (t *toolchainWindowsX8664) Name() string { |
| 167 | return "x86_64" |
| 168 | } |
| 169 | |
Dan Willemsen | 490fd49 | 2015-11-24 17:53:15 -0800 | [diff] [blame] | 170 | func (t *toolchainWindows) GccRoot() string { |
Colin Cross | b98c8b0 | 2016-07-29 13:44:28 -0700 | [diff] [blame] | 171 | return "${config.WindowsGccRoot}" |
Dan Willemsen | 490fd49 | 2015-11-24 17:53:15 -0800 | [diff] [blame] | 172 | } |
| 173 | |
| 174 | func (t *toolchainWindows) GccTriple() string { |
Colin Cross | b98c8b0 | 2016-07-29 13:44:28 -0700 | [diff] [blame] | 175 | return "${config.WindowsGccTriple}" |
Dan Willemsen | 490fd49 | 2015-11-24 17:53:15 -0800 | [diff] [blame] | 176 | } |
| 177 | |
| 178 | func (t *toolchainWindows) GccVersion() string { |
Dan Willemsen | 34fc3b1 | 2015-12-07 12:30:44 -0800 | [diff] [blame] | 179 | return windowsGccVersion |
Dan Willemsen | 490fd49 | 2015-11-24 17:53:15 -0800 | [diff] [blame] | 180 | } |
| 181 | |
Dan Willemsen | 490fd49 | 2015-11-24 17:53:15 -0800 | [diff] [blame] | 182 | func (t *toolchainWindows) IncludeFlags() string { |
Colin Cross | b98c8b0 | 2016-07-29 13:44:28 -0700 | [diff] [blame] | 183 | return "${config.WindowsIncludeFlags}" |
Dan Willemsen | 490fd49 | 2015-11-24 17:53:15 -0800 | [diff] [blame] | 184 | } |
| 185 | |
Dan Willemsen | 4f1c3d4 | 2017-09-09 01:15:26 -0700 | [diff] [blame] | 186 | func (t *toolchainWindowsX86) WindresFlags() string { |
| 187 | return "-F pe-i386" |
| 188 | } |
| 189 | |
| 190 | func (t *toolchainWindowsX8664) WindresFlags() string { |
| 191 | return "-F pe-x86-64" |
| 192 | } |
| 193 | |
Dan Willemsen | 01f388c | 2017-11-30 13:31:26 -0800 | [diff] [blame] | 194 | func (t *toolchainWindowsX86) ClangTriple() string { |
| 195 | return "i686-windows-gnu" |
Dan Willemsen | 490fd49 | 2015-11-24 17:53:15 -0800 | [diff] [blame] | 196 | } |
| 197 | |
Dan Willemsen | 01f388c | 2017-11-30 13:31:26 -0800 | [diff] [blame] | 198 | func (t *toolchainWindowsX8664) ClangTriple() string { |
| 199 | return "x86_64-pc-windows-gnu" |
Dan Willemsen | 490fd49 | 2015-11-24 17:53:15 -0800 | [diff] [blame] | 200 | } |
| 201 | |
Dan Willemsen | 01f388c | 2017-11-30 13:31:26 -0800 | [diff] [blame] | 202 | func (t *toolchainWindowsX86) ClangCflags() string { |
| 203 | return "${config.WindowsClangCflags} ${config.WindowsX86ClangCflags}" |
Dan Willemsen | 490fd49 | 2015-11-24 17:53:15 -0800 | [diff] [blame] | 204 | } |
| 205 | |
Dan Willemsen | 01f388c | 2017-11-30 13:31:26 -0800 | [diff] [blame] | 206 | func (t *toolchainWindowsX8664) ClangCflags() string { |
| 207 | return "${config.WindowsClangCflags} ${config.WindowsX8664ClangCflags}" |
| 208 | } |
| 209 | |
| 210 | func (t *toolchainWindowsX86) ClangCppflags() string { |
| 211 | return "${config.WindowsClangCppflags} ${config.WindowsX86ClangCppflags}" |
| 212 | } |
| 213 | |
| 214 | func (t *toolchainWindowsX8664) ClangCppflags() string { |
| 215 | return "${config.WindowsClangCppflags} ${config.WindowsX8664ClangCppflags}" |
| 216 | } |
| 217 | |
| 218 | func (t *toolchainWindowsX86) ClangLdflags() string { |
| 219 | return "${config.WindowsClangLdflags} ${config.WindowsX86ClangLdflags}" |
| 220 | } |
| 221 | |
Chih-Hung Hsieh | 02b4da5 | 2018-04-03 11:33:34 -0700 | [diff] [blame] | 222 | func (t *toolchainWindowsX86) ClangLldflags() string { |
Chih-Hung Hsieh | 3101a96 | 2018-04-17 14:16:05 -0700 | [diff] [blame] | 223 | return "${config.WindowsClangLldflags} ${config.WindowsX86ClangLldflags}" |
Chih-Hung Hsieh | 02b4da5 | 2018-04-03 11:33:34 -0700 | [diff] [blame] | 224 | } |
| 225 | |
Dan Willemsen | 01f388c | 2017-11-30 13:31:26 -0800 | [diff] [blame] | 226 | func (t *toolchainWindowsX8664) ClangLdflags() string { |
| 227 | return "${config.WindowsClangLdflags} ${config.WindowsX8664ClangLdflags}" |
Dan Willemsen | 490fd49 | 2015-11-24 17:53:15 -0800 | [diff] [blame] | 228 | } |
| 229 | |
Chih-Hung Hsieh | 02b4da5 | 2018-04-03 11:33:34 -0700 | [diff] [blame] | 230 | func (t *toolchainWindowsX8664) ClangLldflags() string { |
Chih-Hung Hsieh | 3101a96 | 2018-04-17 14:16:05 -0700 | [diff] [blame] | 231 | return "${config.WindowsClangLldflags} ${config.WindowsX8664ClangLldflags}" |
Chih-Hung Hsieh | 02b4da5 | 2018-04-03 11:33:34 -0700 | [diff] [blame] | 232 | } |
| 233 | |
Jerome Gaillard | 80fec09 | 2018-11-29 15:34:32 +0000 | [diff] [blame] | 234 | func (t *toolchainWindowsX86) YasmFlags() string { |
| 235 | return "${config.WindowsX86YasmFlags}" |
| 236 | } |
| 237 | |
| 238 | func (t *toolchainWindowsX8664) YasmFlags() string { |
| 239 | return "${config.WindowsX8664YasmFlags}" |
| 240 | } |
| 241 | |
Dan Willemsen | 490fd49 | 2015-11-24 17:53:15 -0800 | [diff] [blame] | 242 | func (t *toolchainWindows) ShlibSuffix() string { |
| 243 | return ".dll" |
| 244 | } |
| 245 | |
| 246 | func (t *toolchainWindows) ExecutableSuffix() string { |
| 247 | return ".exe" |
| 248 | } |
| 249 | |
Dan Willemsen | 2b1f094 | 2016-07-20 12:47:47 -0700 | [diff] [blame] | 250 | func (t *toolchainWindows) AvailableLibraries() []string { |
| 251 | return windowsAvailableLibraries |
| 252 | } |
| 253 | |
Dan Willemsen | 2e47b34 | 2016-11-17 01:02:25 -0800 | [diff] [blame] | 254 | func (t *toolchainWindows) Bionic() bool { |
| 255 | return false |
| 256 | } |
| 257 | |
Dan Willemsen | 07cd051 | 2016-02-03 23:16:33 -0800 | [diff] [blame] | 258 | var toolchainWindowsX86Singleton Toolchain = &toolchainWindowsX86{} |
| 259 | var toolchainWindowsX8664Singleton Toolchain = &toolchainWindowsX8664{} |
Dan Willemsen | 490fd49 | 2015-11-24 17:53:15 -0800 | [diff] [blame] | 260 | |
Colin Cross | 635c3b0 | 2016-05-18 15:37:25 -0700 | [diff] [blame] | 261 | func windowsX86ToolchainFactory(arch android.Arch) Toolchain { |
Dan Willemsen | 07cd051 | 2016-02-03 23:16:33 -0800 | [diff] [blame] | 262 | return toolchainWindowsX86Singleton |
| 263 | } |
| 264 | |
Colin Cross | 635c3b0 | 2016-05-18 15:37:25 -0700 | [diff] [blame] | 265 | func windowsX8664ToolchainFactory(arch android.Arch) Toolchain { |
Dan Willemsen | 07cd051 | 2016-02-03 23:16:33 -0800 | [diff] [blame] | 266 | return toolchainWindowsX8664Singleton |
Dan Willemsen | 490fd49 | 2015-11-24 17:53:15 -0800 | [diff] [blame] | 267 | } |
| 268 | |
| 269 | func init() { |
Colin Cross | a1ad8d1 | 2016-06-01 17:09:44 -0700 | [diff] [blame] | 270 | registerToolchainFactory(android.Windows, android.X86, windowsX86ToolchainFactory) |
| 271 | registerToolchainFactory(android.Windows, android.X86_64, windowsX8664ToolchainFactory) |
Dan Willemsen | 490fd49 | 2015-11-24 17:53:15 -0800 | [diff] [blame] | 272 | } |