Merge pull request #1332 from odin-lang/nasm-support

NASM Support
This commit is contained in:
gingerBill
2021-11-26 23:06:33 +00:00
committed by GitHub
8 changed files with 128 additions and 27 deletions
+8
View File
@@ -4120,6 +4120,14 @@ 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);
}
if (has_asm_extension(fullpath)) {
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