aboutsummaryrefslogtreecommitdiff
path: root/build
diff options
context:
space:
mode:
Diffstat (limited to 'build')
-rw-r--r--build/config/BUILD.gn1
-rw-r--r--build/config/sysroot.gni12
-rwxr-xr-xbuild/scripts/install-sysroot.py10
-rw-r--r--build/scripts/sysroots.json10
4 files changed, 27 insertions, 6 deletions
diff --git a/build/config/BUILD.gn b/build/config/BUILD.gn
index 52f0d6fb..9745e3f0 100644
--- a/build/config/BUILD.gn
+++ b/build/config/BUILD.gn
@@ -233,6 +233,7 @@ config("sysroot_runtime_libraries") {
[
"--print-hash",
"$current_cpu",
+ "$sysroot_platform",
],
"trim string",
[ "//build/scripts/sysroots.json" ])
diff --git a/build/config/sysroot.gni b/build/config/sysroot.gni
index 8ce9455a..deecdeca 100644
--- a/build/config/sysroot.gni
+++ b/build/config/sysroot.gni
@@ -12,20 +12,28 @@ declare_args() {
target_sysroot_dir = "../"
use_sysroot = current_cpu == "arm" || current_cpu == "arm64"
+
+ sysroot_platform = "sid"
}
if (use_sysroot) {
+ assert(sysroot_platform == "sid" || sysroot_platform == "stretch")
assert(current_cpu == "arm" || current_cpu == "arm64")
# By default build against a sysroot image downloaded from Cloud Storage
# during gclient runhooks.
- sysroot = "${target_sysroot_dir}/debian_sid_${current_cpu}-sysroot"
+ sysroot =
+ "${target_sysroot_dir}/debian_${sysroot_platform}_${current_cpu}-sysroot"
_script_arch = current_cpu
if (exec_script("//build/scripts/dir_exists.py",
[ rebase_path(sysroot) ],
"string") != "True") {
print("Missing or outdated sysroot for $current_cpu, downloading latest...")
- exec_script("//build/scripts/install-sysroot.py", [ "$current_cpu" ])
+ exec_script("//build/scripts/install-sysroot.py",
+ [
+ "$current_cpu",
+ "$sysroot_platform",
+ ])
}
}
diff --git a/build/scripts/install-sysroot.py b/build/scripts/install-sysroot.py
index e4a2e92b..374598f1 100755
--- a/build/scripts/install-sysroot.py
+++ b/build/scripts/install-sysroot.py
@@ -44,6 +44,7 @@ URL_PREFIX = 'https://storage.googleapis.com'
URL_PATH = 'openscreen-sysroots'
VALID_ARCHS = ('arm', 'arm64')
+VALID_PLATFORMS = ('stretch', 'sid')
class Error(Exception):
@@ -135,6 +136,9 @@ def parse_args(args):
'arch',
help='Sysroot architecture: %s' % ', '.join(VALID_ARCHS))
p.add_argument(
+ 'platform',
+ help='Sysroot platform: %s' % ', '.join(VALID_PLATFORMS))
+ p.add_argument(
'--print-hash', action="store_true",
help='Print the hash of the sysroot for the specified arch.')
@@ -146,13 +150,11 @@ def main(args):
print('Unsupported platform. Only Linux and Mac OS X are supported.')
return 1
- # Currently, we only support linking against the sid sysroot image.
- PLATFORM = 'sid'
parsed_args = parse_args(args)
if parsed_args.print_hash:
- print(GetSysrootDict(PLATFORM, parsed_args.arch)['Sha1Sum'])
+ print(GetSysrootDict(parsed_args.platform, parsed_args.arch)['Sha1Sum'])
- InstallSysroot(PLATFORM, parsed_args.arch)
+ InstallSysroot(parsed_args.platform, parsed_args.arch)
return 0
diff --git a/build/scripts/sysroots.json b/build/scripts/sysroots.json
index 2772287d..193e9412 100644
--- a/build/scripts/sysroots.json
+++ b/build/scripts/sysroots.json
@@ -1,4 +1,14 @@
{
+ "stretch_arm": {
+ "Sha1Sum": "407ba17bd8a686d1c82dadb593579325e4b9cd61",
+ "SysrootDir": "debian_stretch_arm-sysroot",
+ "Tarball": "debian_stretch_arm_sysroot.tar.xz"
+ },
+ "stretch_arm64": {
+ "Sha1Sum": "5523478d833a735643c0a36feed5d89a1f70846b",
+ "SysrootDir": "debian_stretch_arm64-sysroot",
+ "Tarball": "debian_stretch_arm64_sysroot.tar.xz"
+ },
"sid_arm": {
"Sha1Sum": "07ef353ec66ca510a9b24a927db823e44435c764",
"SysrootDir": "debian_sid_arm-sysroot",