diff options
| author | Laytan Laats <laytanlaats@hotmail.com> | 2024-07-02 15:28:08 +0200 |
|---|---|---|
| committer | Laytan Laats <laytanlaats@hotmail.com> | 2024-07-02 15:28:08 +0200 |
| commit | 6f1cc8071c3ff49c5431cc8ad078d12883f91545 (patch) | |
| tree | d87348be99cb43cfbd830bedbfdc25aafdda6cc0 /src/parser.cpp | |
| parent | 5637ed9ecdd31929792c59a79d396d24b5bb0ee1 (diff) | |
wasm: add foreign import and linking of wasm object files
Diffstat (limited to 'src/parser.cpp')
| -rw-r--r-- | src/parser.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/parser.cpp b/src/parser.cpp index 583f4a57d..997d32fa5 100644 --- a/src/parser.cpp +++ b/src/parser.cpp @@ -5813,7 +5813,6 @@ gb_internal bool determine_path_from_string(BlockingMutex *file_mutex, Ast *node return false; } - if (collection_name.len > 0) { // NOTE(bill): `base:runtime` == `core:runtime` if (collection_name == "core") { @@ -5968,7 +5967,7 @@ gb_internal void parse_setup_file_decls(Parser *p, AstFile *f, String const &bas Token fp_token = fp->BasicLit.token; String file_str = string_trim_whitespace(string_value_from_token(f, fp_token)); String fullpath = file_str; - if (allow_check_foreign_filepath()) { + if (!is_arch_wasm() || string_ends_with(fullpath, str_lit(".o"))) { String foreign_path = {}; bool ok = determine_path_from_string(&p->file_decl_mutex, node, base_dir, file_str, &foreign_path); if (!ok) { |