| 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 29 matching lines...) Expand all Loading... |
| 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 (current_cpu == "x64") { |
| 51 # Regular ChromeOS builds use custom sysroots, but desktop ChromeOS (where | 51 sysroot = "//build/linux/debian_jessie_amd64-sysroot" |
| 52 # we're building linux desktop binaries but using the ChromeOS UI and | 52 } else if (current_cpu == "x86") { |
| 53 # functionality where possible) needs to run on the buliders, which are | 53 sysroot = "//build/linux/debian_jessie_i386-sysroot" |
| 54 # running precise. The precise build has a different set of dependencies | 54 } else if (current_cpu == "mipsel") { |
| 55 # from the wheezy build, so we cannot use the wheezy sysroot. | 55 sysroot = "//build/linux/debian_jessie_mips-sysroot" |
| 56 # TODO(sbc): This condition can perhaps be eliminated now that we are | 56 } else if (current_cpu == "arm") { |
| 57 # using jessie rather than wheezy. | 57 sysroot = "//build/linux/debian_jessie_arm-sysroot" |
| 58 sysroot = "//build/linux/ubuntu_precise_amd64-sysroot" | 58 } else if (current_cpu == "arm64") { |
| 59 sysroot = "//build/linux/debian_jessie_arm64-sysroot" |
| 59 } else { | 60 } else { |
| 60 if (current_cpu == "x64") { | 61 # Any other builds don't use a sysroot. |
| 61 sysroot = "//build/linux/debian_jessie_amd64-sysroot" | 62 sysroot = "" |
| 62 } else if (current_cpu == "x86") { | |
| 63 sysroot = "//build/linux/debian_jessie_i386-sysroot" | |
| 64 } else if (current_cpu == "mipsel") { | |
| 65 sysroot = "//build/linux/debian_jessie_mips-sysroot" | |
| 66 } else if (current_cpu == "arm") { | |
| 67 sysroot = "//build/linux/debian_jessie_arm-sysroot" | |
| 68 } else if (current_cpu == "arm64") { | |
| 69 sysroot = "//build/linux/debian_jessie_arm64-sysroot" | |
| 70 } else { | |
| 71 # Any other builds don't use a sysroot. | |
| 72 sysroot = "" | |
| 73 } | |
| 74 } | 63 } |
| 75 | 64 |
| 76 if (sysroot != "") { | 65 if (sysroot != "") { |
| 77 # Our sysroot images only contains gcc 4.6 headers, but chromium requires | 66 # Our sysroot images only contains gcc 4.6 headers, but chromium requires |
| 78 # gcc 4.9. Clang is able to detect and work with the 4.6 headers while | 67 # gcc 4.9. Clang is able to detect and work with the 4.6 headers while |
| 79 # gcc is not. This check can be removed if we ever update to a more modern | 68 # gcc is not. This check can be removed if we ever update to a more modern |
| 80 # sysroot. | 69 # sysroot. |
| 81 assert(is_clang, "sysroot images require clang (try use_sysroot=false)") | 70 assert(is_clang, "sysroot images require clang (try use_sysroot=false)") |
| 82 | 71 |
| 83 _script_arch = current_cpu | 72 _script_arch = current_cpu |
| (...skipping 10 matching lines...) Expand all Loading... |
| 94 } | 83 } |
| 95 } else if (is_mac) { | 84 } else if (is_mac) { |
| 96 import("//build/config/mac/mac_sdk.gni") | 85 import("//build/config/mac/mac_sdk.gni") |
| 97 sysroot = mac_sdk_path | 86 sysroot = mac_sdk_path |
| 98 } else if (is_ios) { | 87 } else if (is_ios) { |
| 99 import("//build/config/ios/ios_sdk.gni") | 88 import("//build/config/ios/ios_sdk.gni") |
| 100 sysroot = ios_sdk_path | 89 sysroot = ios_sdk_path |
| 101 } else { | 90 } else { |
| 102 sysroot = "" | 91 sysroot = "" |
| 103 } | 92 } |
| OLD | NEW |