2020-01-02 15:13:47 -05:00
|
|
|
// Copyright 2018-2020 the Deno authors. All rights reserved. MIT license.
|
2019-03-06 16:54:58 -05:00
|
|
|
|
2020-04-28 12:35:23 -04:00
|
|
|
export const build = {
|
|
|
|
target: "unknown",
|
|
|
|
arch: "unknown",
|
|
|
|
os: "unknown",
|
|
|
|
vendor: "unknown",
|
|
|
|
env: undefined as string | undefined,
|
2019-03-06 16:54:58 -05:00
|
|
|
};
|
|
|
|
|
2020-04-28 12:35:23 -04:00
|
|
|
export function setBuildInfo(target: string): void {
|
|
|
|
const [arch, vendor, os, env] = target.split("-", 4);
|
|
|
|
build.target = target;
|
2019-09-06 12:57:15 -04:00
|
|
|
build.arch = arch;
|
2020-04-28 12:35:23 -04:00
|
|
|
build.vendor = vendor;
|
|
|
|
build.os = os;
|
|
|
|
build.env = env;
|
2019-09-06 12:57:15 -04:00
|
|
|
Object.freeze(build);
|
|
|
|
}
|