Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(149)

Unified Diff: build/config/sysroot.gni

Issue 2810633004: Refactor target_sysroot_dir gn argument (Closed)
Patch Set: Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/config/sysroot.gni
diff --git a/build/config/sysroot.gni b/build/config/sysroot.gni
index 63e3c137255a749f47c1eeb20ba7231bb1d974ec..aa43c2cd0bd3d14ba8b2a3ed6403c2b9a0f9e9fc 100644
--- a/build/config/sysroot.gni
+++ b/build/config/sysroot.gni
@@ -12,19 +12,13 @@ declare_args() {
# the target toolchain.
target_sysroot = ""
- # The absolute path to directory containing sysroots for linux 32 and 64bit
- target_sysroot_dir = ""
+ # The absolute path to directory containing linux sysroot images
+ target_sysroot_dir = "//build/linux"
use_sysroot = true
}
-if (is_linux && target_sysroot_dir != "") {
- if (current_cpu == "x64") {
- sysroot = target_sysroot_dir + "/wheezy-x64"
- } else if (current_cpu == "x86") {
- sysroot = target_sysroot_dir + "/wheezy-ia32"
- }
-} else if (current_os == target_os && current_cpu == target_cpu &&
+if (current_os == target_os && current_cpu == target_cpu &&
target_sysroot != "") {
sysroot = target_sysroot
} else if (is_android) {
@@ -42,24 +36,23 @@ if (is_linux && target_sysroot_dir != "") {
} else if (current_cpu == "mips64el") {
sysroot = "$android_ndk_root/$mips64_android_sysroot_subdir"
} else {
- sysroot = ""
+ assert(false, "No android sysroot for cpu: $target_cpu")
}
} else if (is_linux && use_sysroot) {
# By default build against a sysroot image downloaded from Cloud Storage
# during gclient runhooks.
if (current_cpu == "x64") {
- sysroot = "//build/linux/debian_jessie_amd64-sysroot"
+ sysroot = "$target_sysroot_dir/debian_jessie_amd64-sysroot"
} else if (current_cpu == "x86") {
- sysroot = "//build/linux/debian_jessie_i386-sysroot"
+ sysroot = "$target_sysroot_dir/debian_jessie_i386-sysroot"
} else if (current_cpu == "mipsel") {
- sysroot = "//build/linux/debian_jessie_mips-sysroot"
+ sysroot = "$target_sysroot_dir/debian_jessie_mips-sysroot"
} else if (current_cpu == "arm") {
- sysroot = "//build/linux/debian_jessie_arm-sysroot"
+ sysroot = "$target_sysroot_dir/debian_jessie_arm-sysroot"
} else if (current_cpu == "arm64") {
- sysroot = "//build/linux/debian_jessie_arm64-sysroot"
+ sysroot = "$target_sysroot_dir/debian_jessie_arm64-sysroot"
} else {
- # Any other builds don't use a sysroot.
- sysroot = ""
+ assert(false, "No linux sysroot for cpu: $target_cpu")
}
if (sysroot != "") {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698