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

Unified Diff: build/config/sysroot.gni

Issue 683063005: Allow sysroot to be overridden via GN arguments when using target toolchain. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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 2b04c568895628745a398f046345c2dadaa576e6..77032f7d4fa3aec5117c77d6685336ff483223b0 100644
--- a/build/config/sysroot.gni
+++ b/build/config/sysroot.gni
@@ -5,7 +5,15 @@
# This header file defines the "sysroot" variable which is the absolute path
# of the sysroot. If no sysroot applies, the variable will be an empty string.
-if (is_android) {
+declare_args() {
+ # The absolute path of the sysroot that is applied when compiling using
+ # the target toolchain.
+ target_sysroot = ""
+}
+
+if (current_toolchain == default_toolchain && target_sysroot != "") {
+ sysroot = target_sysroot
+} else if (is_android) {
import("//build/config/android/config.gni")
if (!is_android_webview_build) {
if (cpu_arch == "x86") {
« 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