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

Unified Diff: build/config/sysroot.gni

Issue 1493043002: GN: Add an assert that sysroot exists (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove script changes Created 5 years 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 | « .gn ('k') | 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 debf77129b4b96688a04f1a42e19910124f442f0..2ca64518f6e23722d22fab6e6d31d01d2a074995 100644
--- a/build/config/sysroot.gni
+++ b/build/config/sysroot.gni
@@ -48,6 +48,18 @@ if (current_toolchain == default_toolchain && target_sysroot != "") {
# Any other builds don't use a sysroot.
sysroot = ""
}
+
+ if (sysroot != "") {
+ _script_arch = current_cpu
+ if (_script_arch == "x86") {
+ _script_arch = "i386"
+ } else if (_script_arch == "x64") {
+ _script_arch = "amd64"
+ }
+ assert(
+ exec_script("//build/dir_exists.py", [ sysroot ], "string") == "True",
+ "Missing sysroot ($sysroot). To fix, run: build/linux/sysroot_scripts/install-sysroot.py --arch=$_script_arch")
+ }
} else if (is_mac) {
import("//build/config/mac/mac_sdk.gni")
sysroot = mac_sdk_path
« no previous file with comments | « .gn ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698