Index: build/config/linux/BUILD.gn |
diff --git a/build/config/linux/BUILD.gn b/build/config/linux/BUILD.gn |
index 29b446ae0b18f8893ae6a7e3325d93bd614e3169..d166ac792bb550d20f6c3e715457503e0fb0aad3 100644 |
--- a/build/config/linux/BUILD.gn |
+++ b/build/config/linux/BUILD.gn |
@@ -3,6 +3,20 @@ |
# found in the LICENSE file. |
import("//build/config/linux/pkg_config.gni") |
+import("//build/config/sysroot.gni") |
+ |
+config("sdk") { |
+ if (sysroot != "") { |
+ cflags = [ "--sysroot=" + sysroot ] |
+ ldflags = [ "--sysroot=" + sysroot ] |
+ |
+ # Need to get some linker flags out of the sysroot. |
+ ldflags += [ exec_script("sysroot_ld_path.py", |
+ [ rebase_path("//build/linux/sysroot_ld_path.sh", ".", root_build_dir), |
+ sysroot ], |
+ "value") ] |
+ } |
+} |
# Sets up the dynamic library search path to include our "lib" directory. |
config("executable_ldconfig") { |