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() { |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 } else if (current_cpu == "arm") { | 56 } else if (current_cpu == "arm") { |
57 sysroot = "//build/linux/debian_jessie_arm-sysroot" | 57 sysroot = "//build/linux/debian_jessie_arm-sysroot" |
58 } else if (current_cpu == "arm64") { | 58 } else if (current_cpu == "arm64") { |
59 sysroot = "//build/linux/debian_jessie_arm64-sysroot" | 59 sysroot = "//build/linux/debian_jessie_arm64-sysroot" |
60 } else { | 60 } else { |
61 # Any other builds don't use a sysroot. | 61 # Any other builds don't use a sysroot. |
62 sysroot = "" | 62 sysroot = "" |
63 } | 63 } |
64 | 64 |
65 if (sysroot != "") { | 65 if (sysroot != "") { |
66 # Our sysroot images only contains gcc 4.6 headers, but chromium requires | |
67 # gcc 4.9. Clang is able to detect and work with the 4.6 headers while | |
68 # gcc is not. This check can be removed if we ever update to a more modern | |
69 # sysroot. | |
70 assert(is_clang, "sysroot images require clang (try use_sysroot=false)") | |
71 | |
72 _script_arch = current_cpu | 66 _script_arch = current_cpu |
73 if (_script_arch == "x86") { | 67 if (_script_arch == "x86") { |
74 _script_arch = "i386" | 68 _script_arch = "i386" |
75 } else if (_script_arch == "x64") { | 69 } else if (_script_arch == "x64") { |
76 _script_arch = "amd64" | 70 _script_arch = "amd64" |
77 } | 71 } |
78 assert( | 72 assert( |
79 exec_script("//build/dir_exists.py", | 73 exec_script("//build/dir_exists.py", |
80 [ rebase_path(sysroot) ], | 74 [ rebase_path(sysroot) ], |
81 "string") == "True", | 75 "string") == "True", |
82 "Missing sysroot ($sysroot). To fix, run: build/linux/sysroot_scripts/in
stall-sysroot.py --arch=$_script_arch") | 76 "Missing sysroot ($sysroot). To fix, run: build/linux/sysroot_scripts/in
stall-sysroot.py --arch=$_script_arch") |
83 } | 77 } |
84 } else if (is_mac) { | 78 } else if (is_mac) { |
85 import("//build/config/mac/mac_sdk.gni") | 79 import("//build/config/mac/mac_sdk.gni") |
86 sysroot = mac_sdk_path | 80 sysroot = mac_sdk_path |
87 } else if (is_ios) { | 81 } else if (is_ios) { |
88 import("//build/config/ios/ios_sdk.gni") | 82 import("//build/config/ios/ios_sdk.gni") |
89 sysroot = ios_sdk_path | 83 sysroot = ios_sdk_path |
90 } else { | 84 } else { |
91 sysroot = "" | 85 sysroot = "" |
92 } | 86 } |
OLD | NEW |