aboutsummaryrefslogtreecommitdiff
path: root/src/checker.cpp
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2021-11-26 14:46:03 +0000
committergingerBill <bill@gingerbill.org>2021-11-26 14:46:03 +0000
commit33dc12a61aa2040d5cd82c8a20e3d9ed82a8c9a3 (patch)
tree225307105a444078ab79d1cb4fbabca7c1bd446a /src/checker.cpp
parentffd7ca57f14efe63469b45cc0757d847c17c5556 (diff)
Add supported check for `.asm` files
Diffstat (limited to 'src/checker.cpp')
-rw-r--r--src/checker.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/checker.cpp b/src/checker.cpp
index c0a15905b..3301e2bf4 100644
--- a/src/checker.cpp
+++ b/src/checker.cpp
@@ -4120,6 +4120,15 @@ void check_add_foreign_import_decl(CheckerContext *ctx, Ast *decl) {
mpmc_enqueue(&ctx->info->required_foreign_imports_through_force_queue, e);
add_entity_use(ctx, nullptr, e);
}
+
+ String ext = path_extension(fullpath);
+ if (ext == ".asm") {
+ if (build_context.metrics.arch != TargetArch_amd64 ||
+ build_context.metrics.os != TargetOs_windows) {
+ error(decl, "Assembly files are not yet supported on this platform: %.*s_%.*s",
+ LIT(target_os_names[build_context.metrics.os]), LIT(target_arch_names[build_context.metrics.arch]));
+ }
+ }
}
// Returns true if a new package is present