core: more code refactoring / improvements
Signed-off-by: Stephen Gutekanst <stephen@hexops.com>
This commit is contained in:
parent
de1275dc0a
commit
470a84909b
6 changed files with 7 additions and 35 deletions
|
|
@ -267,14 +267,14 @@ pub fn build(b: *std.Build) !void {
|
|||
|
||||
pub const Platform = enum {
|
||||
wasm,
|
||||
win32,
|
||||
windows,
|
||||
darwin,
|
||||
null,
|
||||
|
||||
pub fn fromTarget(target: std.Target) Platform {
|
||||
if (target.cpu.arch == .wasm32) return .wasm;
|
||||
if (target.os.tag.isDarwin()) return .darwin;
|
||||
if (target.os.tag == .windows) return .win32;
|
||||
if (target.os.tag == .windows) return .windows;
|
||||
return .null;
|
||||
}
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue