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/config/chrome_build.gni") | 8 import("//build/config/chrome_build.gni") |
9 | 9 |
10 declare_args() { | 10 declare_args() { |
11 # The absolute path of the sysroot that is applied when compiling using | 11 # The absolute path of the sysroot that is applied when compiling using |
12 # the target toolchain. | 12 # the target toolchain. |
13 target_sysroot = "" | 13 target_sysroot = "" |
14 | 14 |
15 # The absolute path to directory containing sysroots for linux 32 and 64bit | 15 # The absolute path to directory containing sysroots for linux 32 and 64bit |
16 target_sysroot_dir = "" | 16 target_sysroot_dir = "" |
17 | 17 |
18 use_sysroot = true | 18 use_sysroot = true |
19 } | 19 } |
20 | 20 |
21 if (is_linux && target_sysroot_dir != "") { | 21 if (is_linux && target_sysroot_dir != "") { |
22 if (current_cpu == "x64") { | 22 if (current_cpu == "x64") { |
23 sysroot = target_sysroot_dir + "/wheezy-x64" | 23 sysroot = target_sysroot_dir + "/jessie-x64" |
24 } else if (current_cpu == "x86") { | 24 } else if (current_cpu == "x86") { |
25 sysroot = target_sysroot_dir + "/wheezy-ia32" | 25 sysroot = target_sysroot_dir + "/jessie-ia32" |
26 } | 26 } |
27 } else if (current_os == target_os && current_cpu == target_cpu && | 27 } else if (current_os == target_os && current_cpu == target_cpu && |
28 target_sysroot != "") { | 28 target_sysroot != "") { |
29 sysroot = target_sysroot | 29 sysroot = target_sysroot |
30 } else if (is_android) { | 30 } else if (is_android) { |
31 import("//build/config/android/config.gni") | 31 import("//build/config/android/config.gni") |
32 if (current_cpu == "x86") { | 32 if (current_cpu == "x86") { |
33 sysroot = "$android_ndk_root/$x86_android_sysroot_subdir" | 33 sysroot = "$android_ndk_root/$x86_android_sysroot_subdir" |
34 } else if (current_cpu == "arm") { | 34 } else if (current_cpu == "arm") { |
35 sysroot = "$android_ndk_root/$arm_android_sysroot_subdir" | 35 sysroot = "$android_ndk_root/$arm_android_sysroot_subdir" |
36 } else if (current_cpu == "mipsel") { | 36 } else if (current_cpu == "mipsel") { |
37 sysroot = "$android_ndk_root/$mips_android_sysroot_subdir" | 37 sysroot = "$android_ndk_root/$mips_android_sysroot_subdir" |
38 } else if (current_cpu == "x64") { | 38 } else if (current_cpu == "x64") { |
39 sysroot = "$android_ndk_root/$x86_64_android_sysroot_subdir" | 39 sysroot = "$android_ndk_root/$x86_64_android_sysroot_subdir" |
40 } else if (current_cpu == "arm64") { | 40 } else if (current_cpu == "arm64") { |
41 sysroot = "$android_ndk_root/$arm64_android_sysroot_subdir" | 41 sysroot = "$android_ndk_root/$arm64_android_sysroot_subdir" |
42 } else if (current_cpu == "mips64el") { | 42 } else if (current_cpu == "mips64el") { |
43 sysroot = "$android_ndk_root/$mips64_android_sysroot_subdir" | 43 sysroot = "$android_ndk_root/$mips64_android_sysroot_subdir" |
44 } else { | 44 } else { |
45 sysroot = "" | 45 sysroot = "" |
46 } | 46 } |
47 } else if (is_linux && use_sysroot) { | 47 } else if (is_linux && use_sysroot) { |
48 # By default build against a sysroot image downloaded from Cloud Storage | 48 # By default build against a sysroot image downloaded from Cloud Storage |
49 # during gclient runhooks. | 49 # during gclient runhooks. |
50 if (is_chromeos) { | 50 if (is_chromeos) { |
51 # Regular ChromeOS builds use custom sysroots, but desktop ChromeOS (where | 51 # Regular ChromeOS builds use custom sysroots, but desktop ChromeOS (where |
52 # we're building linux desktop binaries but using the ChromeOS UI and | 52 # we're building linux desktop binaries but using the ChromeOS UI and |
53 # functionality where possible) needs to run on the buliders, which are | 53 # functionality where possible) needs to run on the buliders, which are |
54 # running precise. The precise build has a different set of dependencies | 54 # running precise. The precise build has a different set of dependencies |
55 # from the wheezy build, so we cannot use the wheezy sysroot. | 55 # from the jessie build, so we cannot use the jessie sysroot. |
56 sysroot = "//build/linux/ubuntu_precise_amd64-sysroot" | 56 sysroot = "//build/linux/ubuntu_precise_amd64-sysroot" |
57 } else { | 57 } else { |
58 if (current_cpu == "x64") { | 58 if (current_cpu == "x64") { |
59 sysroot = "//build/linux/debian_wheezy_amd64-sysroot" | 59 sysroot = "//build/linux/debian_jessie_amd64-sysroot" |
60 } else if (current_cpu == "x86") { | 60 } else if (current_cpu == "x86") { |
61 sysroot = "//build/linux/debian_wheezy_i386-sysroot" | 61 sysroot = "//build/linux/debian_jessie_i386-sysroot" |
62 } else if (current_cpu == "mipsel") { | 62 } else if (current_cpu == "mipsel") { |
63 sysroot = "//build/linux/debian_wheezy_mips-sysroot" | 63 sysroot = "//build/linux/debian_jessie_mips-sysroot" |
64 } else if (current_cpu == "arm") { | 64 } else if (current_cpu == "arm") { |
65 sysroot = "//build/linux/debian_wheezy_arm-sysroot" | 65 sysroot = "//build/linux/debian_jessie_arm-sysroot" |
66 } else if (current_cpu == "arm64") { | 66 } else if (current_cpu == "arm64") { |
67 sysroot = "//build/linux/debian_jessie_arm64-sysroot" | 67 sysroot = "//build/linux/debian_jessie_arm64-sysroot" |
68 } else { | 68 } else { |
69 # Any other builds don't use a sysroot. | 69 # Any other builds don't use a sysroot. |
70 sysroot = "" | 70 sysroot = "" |
71 } | 71 } |
72 } | 72 } |
73 | 73 |
74 if (sysroot != "") { | 74 if (sysroot != "") { |
75 # Our sysroot images only contains gcc 4.6 headers, but chromium requires | 75 # Our sysroot images only contains gcc 4.6 headers, but chromium requires |
(...skipping 16 matching lines...) Expand all Loading... |
92 } | 92 } |
93 } else if (is_mac) { | 93 } else if (is_mac) { |
94 import("//build/config/mac/mac_sdk.gni") | 94 import("//build/config/mac/mac_sdk.gni") |
95 sysroot = mac_sdk_path | 95 sysroot = mac_sdk_path |
96 } else if (is_ios) { | 96 } else if (is_ios) { |
97 import("//build/config/ios/ios_sdk.gni") | 97 import("//build/config/ios/ios_sdk.gni") |
98 sysroot = ios_sdk_path | 98 sysroot = ios_sdk_path |
99 } else { | 99 } else { |
100 sysroot = "" | 100 sysroot = "" |
101 } | 101 } |
OLD | NEW |