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 # This header file defines the "sysroot" variable which is the absolute path | 5 # This header file defines the "sysroot" variable which is the absolute path |
6 # of the sysroot. If no sysroot applies, the variable will be an empty string. | 6 # of the sysroot. If no sysroot applies, the variable will be an empty string. |
7 | 7 |
8 import("//build/module_args/nacl.gni") | 8 import("//build/module_args/nacl.gni") |
9 import("$nacl_shared_build_dir/config/chrome_build.gni") | 9 import("$nacl_shared_build_dir/config/chrome_build.gni") |
10 | 10 |
11 if (is_android) { | 11 if (is_android) { |
12 import("$nacl_shared_build_dir/config/android/config.gni") | 12 import("$nacl_shared_build_dir/config/android/config.gni") |
13 if (current_cpu == "x86") { | 13 if (current_cpu == "x86") { |
14 sysroot = rebase_path("$android_ndk_root/$x86_android_sysroot_subdir") | 14 sysroot = rebase_path("$android_ndk_root/$x86_android_sysroot_subdir") |
15 } else if (current_cpu == "arm") { | 15 } else if (current_cpu == "arm") { |
16 sysroot = rebase_path("$android_ndk_root/$arm_android_sysroot_subdir") | 16 sysroot = rebase_path("$android_ndk_root/$arm_android_sysroot_subdir") |
17 } else if (current_cpu == "mipsel") { | 17 } else if (current_cpu == "mipsel") { |
18 sysroot = rebase_path("$android_ndk_root/$mips_android_sysroot_subdir") | 18 sysroot = rebase_path("$android_ndk_root/$mips_android_sysroot_subdir") |
19 } else { | 19 } else { |
20 sysroot = "" | 20 sysroot = "" |
21 } | 21 } |
22 } else if (is_linux && is_chrome_branded && is_official_build && !is_chromeos) { | 22 } else if (is_desktop_linux && is_chrome_branded && is_official_build) { |
23 # For official builds, use the sysroot checked into the internal source repo | 23 # For official builds, use the sysroot checked into the internal source repo |
24 # so that the builds work on older versions of Linux. | 24 # so that the builds work on older versions of Linux. |
25 if (current_cpu == "x64") { | 25 if (current_cpu == "x64") { |
26 sysroot = | 26 sysroot = |
27 rebase_path("//chrome/installer/linux/debian_wheezy_amd64-sysroot") | 27 rebase_path("//chrome/installer/linux/debian_wheezy_amd64-sysroot") |
28 } else if (current_cpu == "x86") { | 28 } else if (current_cpu == "x86") { |
29 sysroot = rebase_path("//chrome/installer/linux/debian_wheezy_i386-sysroot") | 29 sysroot = rebase_path("//chrome/installer/linux/debian_wheezy_i386-sysroot") |
30 } else { | 30 } else { |
31 # Any other builds don't use a sysroot. | 31 # Any other builds don't use a sysroot. |
32 sysroot = "" | 32 sysroot = "" |
33 } | 33 } |
34 } else if (is_linux && !is_chromeos) { | 34 } else if (is_desktop_linux) { |
35 if (current_cpu == "mipsel") { | 35 if (current_cpu == "mipsel") { |
36 sysroot = rebase_path("//mipsel-sysroot/sysroot") | 36 sysroot = rebase_path("//mipsel-sysroot/sysroot") |
37 } else { | 37 } else { |
38 sysroot = "" | 38 sysroot = "" |
39 } | 39 } |
40 } else if (is_mac) { | 40 } else if (is_mac) { |
41 import("$nacl_shared_build_dir/config/mac/mac_sdk.gni") | 41 import("$nacl_shared_build_dir/config/mac/mac_sdk.gni") |
42 | 42 |
43 sysroot = mac_sdk_path | 43 sysroot = mac_sdk_path |
44 } else if (is_ios) { | 44 } else if (is_ios) { |
45 import("$nacl_shared_build_dir/config/ios/ios_sdk.gni") | 45 import("$nacl_shared_build_dir/config/ios/ios_sdk.gni") |
46 sysroot = ios_sdk_path | 46 sysroot = ios_sdk_path |
47 } else { | 47 } else { |
48 sysroot = "" | 48 sysroot = "" |
49 } | 49 } |
OLD | NEW |