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") { |