diff --git a/DEPS b/DEPS index 9b6cb2efb8c..aa3369bccbc 100644 --- a/DEPS +++ b/DEPS @@ -386,6 +386,16 @@ deps = { Var("dart_root") + "/third_party/pkg/web": Var("dart_git") + "web.git" + "@" + Var("web_rev"), + Var("dart_root") + "/buildtools/sysroot/linux": { + "packages": [ + { + "package": "fuchsia/third_party/sysroot/linux", + "version": "git_revision:fa7a5a9710540f30ff98ae48b62f2cdf72ed2acd", + }, + ], + "condition": "host_os == linux", + "dep_type": "cipd", + }, Var("dart_root") + "/buildtools/sysroot/focal": { "packages": [ { diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn index 33a3be186b5..4e72c0206bf 100644 --- a/build/config/compiler/BUILD.gn +++ b/build/config/compiler/BUILD.gn @@ -414,8 +414,13 @@ config("compiler") { defines = [ "TOOLCHAIN_VERSION=${toolchain_cipd_version.instance_id}" ] if (is_linux) { - sysroot_stamp_file = - "//buildtools/sysroot/focal/.versions/sysroot.cipd_version" + if (current_cpu == "riscv64") { + sysroot_stamp_file = + "//buildtools/sysroot/focal/.versions/sysroot.cipd_version" + } else { + sysroot_stamp_file = + "//buildtools/sysroot/linux/.versions/sysroot.cipd_version" + } sysroot_cipd_version = read_file(sysroot_stamp_file, "json") defines += [ "SYSROOT_VERSION=${sysroot_cipd_version.instance_id}" ] } diff --git a/build/config/sysroot.gni b/build/config/sysroot.gni index dde0994fa82..a2e91adcdea 100644 --- a/build/config/sysroot.gni +++ b/build/config/sysroot.gni @@ -37,7 +37,12 @@ if (is_linux) { assert(false) } } else if (dart_sysroot == "debian") { - target_sysroot = rebase_path("//buildtools/sysroot/focal", root_build_dir) + if (current_cpu == "riscv64") { + target_sysroot = rebase_path("//buildtools/sysroot/focal", root_build_dir) + } else { + # Updating to focal would increase the required libc from 2.17 to 2.28. + target_sysroot = rebase_path("//buildtools/sysroot/linux", root_build_dir) + } } else if (dart_sysroot != "") { print("There is no $dart_sysroot sysroot support") assert(false)