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

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: 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
Index: build/config/sysroot.gni
diff --git a/build/config/sysroot.gni b/build/config/sysroot.gni
index debf77129b4b96688a04f1a42e19910124f442f0..948054ce8d30c8540a47d1301a3262fd273bd9aa 100644
--- a/build/config/sysroot.gni
+++ b/build/config/sysroot.gni
@@ -48,6 +48,12 @@ if (current_toolchain == default_toolchain && target_sysroot != "") {
# Any other builds don't use a sysroot.
sysroot = ""
}
+
+ if (sysroot != "") {
+ assert(
+ exec_script("//build/dir_exists.py", [ sysroot ], "string") == "True",
+ "Missing sysroot ($sysroot). To fix, run: build/linux/sysroot_scripts/install-sysroot.py --arch=$current_cpu")
+ }
} else if (is_mac) {
import("//build/config/mac/mac_sdk.gni")
sysroot = mac_sdk_path

Powered by Google App Engine
This is Rietveld 408576698