| 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 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 149 # - is_linux is true for desktop Linux and ChromeOS, but not Android (which is | 149 # - is_linux is true for desktop Linux and ChromeOS, but not Android (which is |
| 150 # generally too different despite being based on the Linux kernel). | 150 # generally too different despite being based on the Linux kernel). |
| 151 # | 151 # |
| 152 # Do not add more is_* variants here for random lesser-used Unix systems like | 152 # Do not add more is_* variants here for random lesser-used Unix systems like |
| 153 # aix or one of the BSDs. If you need to check these, just check the | 153 # aix or one of the BSDs. If you need to check these, just check the |
| 154 # current_os value directly. | 154 # current_os value directly. |
| 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_fnl = false |
| 159 is_ios = false | 160 is_ios = false |
| 160 is_linux = false | 161 is_linux = false |
| 161 is_mac = false | 162 is_mac = false |
| 162 is_nacl = false | 163 is_nacl = false |
| 163 is_posix = false | 164 is_posix = false |
| 164 is_win = true | 165 is_win = true |
| 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 |
| 169 is_fnl = false |
| 168 is_ios = false | 170 is_ios = false |
| 169 is_linux = false | 171 is_linux = false |
| 170 is_mac = true | 172 is_mac = true |
| 171 is_nacl = false | 173 is_nacl = false |
| 172 is_posix = true | 174 is_posix = true |
| 173 is_win = false | 175 is_win = 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 |
| 179 is_fnl = false |
| 177 is_ios = false | 180 is_ios = false |
| 178 is_linux = false | 181 is_linux = false |
| 179 is_mac = false | 182 is_mac = false |
| 180 is_nacl = false | 183 is_nacl = false |
| 181 is_posix = true | 184 is_posix = true |
| 182 is_win = false | 185 is_win = 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 |
| 189 is_fnl = false |
| 186 is_ios = false | 190 is_ios = false |
| 187 is_linux = true | 191 is_linux = true |
| 188 is_mac = false | 192 is_mac = false |
| 189 is_nacl = false | 193 is_nacl = false |
| 190 is_posix = true | 194 is_posix = true |
| 191 is_win = false | 195 is_win = 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 |
| 202 is_fnl = false |
| 198 is_ios = false | 203 is_ios = false |
| 199 is_linux = false | 204 is_linux = false |
| 200 is_mac = false | 205 is_mac = false |
| 201 is_nacl = true | 206 is_nacl = true |
| 202 is_posix = true | 207 is_posix = true |
| 203 is_win = false | 208 is_win = 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 |
| 212 is_fnl = false |
| 207 is_ios = true | 213 is_ios = true |
| 208 is_linux = false | 214 is_linux = false |
| 209 is_mac = false | 215 is_mac = false |
| 210 is_nacl = false | 216 is_nacl = false |
| 211 is_posix = true | 217 is_posix = true |
| 212 is_win = false | 218 is_win = 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 |
| 222 is_fnl = false |
| 216 is_ios = false | 223 is_ios = false |
| 217 is_linux = true | 224 is_linux = true |
| 218 is_mac = false | 225 is_mac = false |
| 226 is_nacl = false |
| 227 is_posix = true |
| 228 is_win = false |
| 229 } else if (current_os == "fnl") { |
| 230 is_android = false |
| 231 is_chromeos = false |
| 232 is_fnl = true |
| 233 is_ios = false |
| 234 is_linux = true |
| 235 is_mac = false |
| 219 is_nacl = false | 236 is_nacl = false |
| 220 is_posix = true | 237 is_posix = true |
| 221 is_win = false | 238 is_win = false |
| 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 |
| (...skipping 144 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 |