2021-01-11 12:13:41 -05:00
|
|
|
// Copyright 2018-2021 the Deno authors. All rights reserved. MIT license.
|
2021-02-04 17:18:32 -05:00
|
|
|
"use strict";
|
2020-07-19 13:49:44 -04:00
|
|
|
|
|
|
|
((window) => {
|
2021-07-03 10:58:08 -04:00
|
|
|
const { ObjectFreeze, StringPrototypeSplit } = window.__bootstrap.primordials;
|
|
|
|
|
2020-07-19 13:49:44 -04:00
|
|
|
const build = {
|
|
|
|
target: "unknown",
|
|
|
|
arch: "unknown",
|
|
|
|
os: "unknown",
|
|
|
|
vendor: "unknown",
|
|
|
|
env: undefined,
|
|
|
|
};
|
|
|
|
|
|
|
|
function setBuildInfo(target) {
|
2021-07-03 10:58:08 -04:00
|
|
|
const [arch, vendor, os, env] = StringPrototypeSplit(target, "-", 4);
|
2020-07-19 13:49:44 -04:00
|
|
|
build.target = target;
|
|
|
|
build.arch = arch;
|
|
|
|
build.vendor = vendor;
|
|
|
|
build.os = os;
|
|
|
|
build.env = env;
|
2021-07-03 10:58:08 -04:00
|
|
|
ObjectFreeze(build);
|
2020-07-19 13:49:44 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
window.__bootstrap.build = {
|
|
|
|
build,
|
|
|
|
setBuildInfo,
|
|
|
|
};
|
|
|
|
})(this);
|