From b746e5287e86c71dc0d764c7f7c7ad1790587d77 Mon Sep 17 00:00:00 2001 From: Laytan Laats Date: Mon, 14 Oct 2024 16:06:16 +0200 Subject: [PATCH] build tracking allocator code on freestanding wasm --- core/mem/tracking_allocator.odin | 2 +- tests/core/odin/test_file_tags.odin | 16 ++++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/core/mem/tracking_allocator.odin b/core/mem/tracking_allocator.odin index 5da38e62f..cf780de3f 100644 --- a/core/mem/tracking_allocator.odin +++ b/core/mem/tracking_allocator.odin @@ -1,4 +1,4 @@ -#+build !freestanding +#+build !freestanding, wasm32, wasm64p32 package mem import "base:runtime" diff --git a/tests/core/odin/test_file_tags.odin b/tests/core/odin/test_file_tags.odin index dc004dfe3..ec686f279 100644 --- a/tests/core/odin/test_file_tags.odin +++ b/tests/core/odin/test_file_tags.odin @@ -96,6 +96,22 @@ package main {{.JS, .wasm64p32, "baz"}, true}, {{.JS, .wasm64p32, "bar"}, false}, }, + }, {// [5] + src = ` +#+build !freestanding, wasm32, wasm64p32 +package main`, + tags = { + build = { + {os = runtime.ALL_ODIN_OS_TYPES - {.Freestanding}, arch = runtime.ALL_ODIN_ARCH_TYPES}, + {os = runtime.ALL_ODIN_OS_TYPES, arch = {.wasm32}}, + {os = runtime.ALL_ODIN_OS_TYPES, arch = {.wasm64p32}}, + }, + }, + matching_targets = { + {{.Freestanding, .wasm32, ""}, true}, + {{.Freestanding, .wasm64p32, ""}, true}, + {{.Freestanding, .arm64, ""}, false}, + }, }, }