OLD | NEW |
---|---|
1 # Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2013 The Chromium Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 if (target_os == "") { | 5 if (target_os == "") { |
6 target_os = host_os | 6 target_os = host_os |
7 } | 7 } |
8 | 8 |
9 if (target_cpu == "") { | 9 if (target_cpu == "") { |
10 if (target_os == "android") { | 10 if (target_os == "android") { |
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
155 | 155 |
156 if (current_os == "win") { | 156 if (current_os == "win") { |
157 is_android = false | 157 is_android = false |
158 is_chromeos = false | 158 is_chromeos = false |
159 is_ios = false | 159 is_ios = false |
160 is_linux = false | 160 is_linux = false |
161 is_mac = false | 161 is_mac = false |
162 is_nacl = false | 162 is_nacl = false |
163 is_posix = false | 163 is_posix = false |
164 is_win = true | 164 is_win = true |
165 is_fnl = false | |
viettrungluu
2015/09/15 23:48:22
nit: I believe all these are in alphabetical order
cdotstout
2015/09/16 22:00:59
Done.
| |
165 } else if (current_os == "mac") { | 166 } else if (current_os == "mac") { |
166 is_android = false | 167 is_android = false |
167 is_chromeos = false | 168 is_chromeos = false |
168 is_ios = false | 169 is_ios = false |
169 is_linux = false | 170 is_linux = false |
170 is_mac = true | 171 is_mac = true |
171 is_nacl = false | 172 is_nacl = false |
172 is_posix = true | 173 is_posix = true |
173 is_win = false | 174 is_win = false |
175 is_fnl = false | |
174 } else if (current_os == "android") { | 176 } else if (current_os == "android") { |
175 is_android = true | 177 is_android = true |
176 is_chromeos = false | 178 is_chromeos = false |
177 is_ios = false | 179 is_ios = false |
178 is_linux = false | 180 is_linux = false |
179 is_mac = false | 181 is_mac = false |
180 is_nacl = false | 182 is_nacl = false |
181 is_posix = true | 183 is_posix = true |
182 is_win = false | 184 is_win = false |
185 is_fnl = false | |
183 } else if (current_os == "chromeos") { | 186 } else if (current_os == "chromeos") { |
184 is_android = false | 187 is_android = false |
185 is_chromeos = true | 188 is_chromeos = true |
186 is_ios = false | 189 is_ios = false |
187 is_linux = true | 190 is_linux = true |
188 is_mac = false | 191 is_mac = false |
189 is_nacl = false | 192 is_nacl = false |
190 is_posix = true | 193 is_posix = true |
191 is_win = false | 194 is_win = false |
195 is_fnl = false | |
192 } else if (current_os == "nacl") { | 196 } else if (current_os == "nacl") { |
193 # current_os == "nacl" will be passed by the nacl toolchain definition. | 197 # current_os == "nacl" will be passed by the nacl toolchain definition. |
194 # It is not set by default or on the command line. We treat is as a | 198 # It is not set by default or on the command line. We treat is as a |
195 # Posix variant. | 199 # Posix variant. |
196 is_android = false | 200 is_android = false |
197 is_chromeos = false | 201 is_chromeos = false |
198 is_ios = false | 202 is_ios = false |
199 is_linux = false | 203 is_linux = false |
200 is_mac = false | 204 is_mac = false |
201 is_nacl = true | 205 is_nacl = true |
202 is_posix = true | 206 is_posix = true |
203 is_win = false | 207 is_win = false |
208 is_fnl = false | |
204 } else if (current_os == "ios") { | 209 } else if (current_os == "ios") { |
205 is_android = false | 210 is_android = false |
206 is_chromeos = false | 211 is_chromeos = false |
207 is_ios = true | 212 is_ios = true |
208 is_linux = false | 213 is_linux = false |
209 is_mac = false | 214 is_mac = false |
210 is_nacl = false | 215 is_nacl = false |
211 is_posix = true | 216 is_posix = true |
212 is_win = false | 217 is_win = false |
218 is_fnl = false | |
213 } else if (current_os == "linux") { | 219 } else if (current_os == "linux") { |
214 is_android = false | 220 is_android = false |
215 is_chromeos = false | 221 is_chromeos = false |
216 is_ios = false | 222 is_ios = false |
217 is_linux = true | 223 is_linux = true |
218 is_mac = false | 224 is_mac = false |
219 is_nacl = false | 225 is_nacl = false |
220 is_posix = true | 226 is_posix = true |
221 is_win = false | 227 is_win = false |
228 is_fnl = false | |
229 } else if (current_os == "fnl") { | |
230 is_android = false | |
231 is_chromeos = false | |
232 is_ios = false | |
233 is_linux = true | |
234 is_mac = false | |
235 is_nacl = false | |
236 is_posix = true | |
237 is_win = false | |
238 is_fnl = true | |
222 } | 239 } |
223 | 240 |
224 # ============================================================================= | 241 # ============================================================================= |
225 # SOURCES FILTERS | 242 # SOURCES FILTERS |
226 # ============================================================================= | 243 # ============================================================================= |
227 # | 244 # |
228 # These patterns filter out platform-specific files when assigning to the | 245 # These patterns filter out platform-specific files when assigning to the |
229 # sources variable. The magic variable |sources_assignment_filter| is applied | 246 # sources variable. The magic variable |sources_assignment_filter| is applied |
230 # to each assignment or appending to the sources variable and matches are | 247 # to each assignment or appending to the sources variable and matches are |
231 # automatcally removed. | 248 # automatcally removed. |
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
373 "//build/config/win:winver", | 390 "//build/config/win:winver", |
374 ] | 391 ] |
375 } | 392 } |
376 if (is_posix) { | 393 if (is_posix) { |
377 _native_compiler_configs += [ | 394 _native_compiler_configs += [ |
378 "//build/config/gcc:no_exceptions", | 395 "//build/config/gcc:no_exceptions", |
379 "//build/config/gcc:symbol_visibility_hidden", | 396 "//build/config/gcc:symbol_visibility_hidden", |
380 ] | 397 ] |
381 } | 398 } |
382 | 399 |
383 if (is_linux) { | 400 if (is_fnl) { |
401 _native_compiler_configs += [ "//build/config/fnl:sdk" ] | |
402 } else if (is_linux) { | |
384 _native_compiler_configs += [ "//build/config/linux:sdk" ] | 403 _native_compiler_configs += [ "//build/config/linux:sdk" ] |
385 } else if (is_mac) { | 404 } else if (is_mac) { |
386 _native_compiler_configs += [ "//build/config/mac:sdk" ] | 405 _native_compiler_configs += [ "//build/config/mac:sdk" ] |
387 } else if (is_ios) { | 406 } else if (is_ios) { |
388 _native_compiler_configs += [ "//build/config/ios:sdk" ] | 407 _native_compiler_configs += [ "//build/config/ios:sdk" ] |
389 } else if (is_android) { | 408 } else if (is_android) { |
390 _native_compiler_configs += [ "//build/config/android:sdk" ] | 409 _native_compiler_configs += [ "//build/config/android:sdk" ] |
391 } | 410 } |
392 | 411 |
393 if (is_clang) { | 412 if (is_clang) { |
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
547 if (is_clang) { | 566 if (is_clang) { |
548 host_toolchain = "//build/toolchain/linux:clang_$host_cpu" | 567 host_toolchain = "//build/toolchain/linux:clang_$host_cpu" |
549 set_default_toolchain("//build/toolchain/linux:clang_$current_cpu") | 568 set_default_toolchain("//build/toolchain/linux:clang_$current_cpu") |
550 } else { | 569 } else { |
551 host_toolchain = "//build/toolchain/linux:$host_cpu" | 570 host_toolchain = "//build/toolchain/linux:$host_cpu" |
552 set_default_toolchain("//build/toolchain/linux:$current_cpu") | 571 set_default_toolchain("//build/toolchain/linux:$current_cpu") |
553 } | 572 } |
554 if (is_chromeos && cros_use_custom_toolchain) { | 573 if (is_chromeos && cros_use_custom_toolchain) { |
555 set_default_toolchain("//build/toolchain/cros:target") | 574 set_default_toolchain("//build/toolchain/cros:target") |
556 } | 575 } |
576 if (is_fnl) { | |
577 set_default_toolchain("//build/toolchain/fnl:target") | |
578 } | |
557 } else if (is_mac) { | 579 } else if (is_mac) { |
558 host_toolchain = "//build/toolchain/mac:clang_x64" | 580 host_toolchain = "//build/toolchain/mac:clang_x64" |
559 set_default_toolchain(host_toolchain) | 581 set_default_toolchain(host_toolchain) |
560 } else if (is_ios) { | 582 } else if (is_ios) { |
561 host_toolchain = "//build/toolchain/mac:clang_x64" | 583 host_toolchain = "//build/toolchain/mac:clang_x64" |
562 set_default_toolchain("//build/toolchain/mac:clang_$current_cpu") | 584 set_default_toolchain("//build/toolchain/mac:clang_$current_cpu") |
563 } else if (is_nacl) { | 585 } else if (is_nacl) { |
564 # TODO(GYP): This will need to change when we get NaCl working | 586 # TODO(GYP): This will need to change when we get NaCl working |
565 # on multiple platforms, but this whole block of code (how we define | 587 # on multiple platforms, but this whole block of code (how we define |
566 # host_toolchain) needs to be reworked regardless to key off of host_os | 588 # host_toolchain) needs to be reworked regardless to key off of host_os |
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
768 } | 790 } |
769 if (defined(invoker.testonly)) { | 791 if (defined(invoker.testonly)) { |
770 testonly = invoker.testonly | 792 testonly = invoker.testonly |
771 } | 793 } |
772 if (defined(invoker.visibility)) { | 794 if (defined(invoker.visibility)) { |
773 visibility = invoker.visibility | 795 visibility = invoker.visibility |
774 } | 796 } |
775 } | 797 } |
776 } | 798 } |
777 } | 799 } |
OLD | NEW |