aboutsummaryrefslogtreecommitdiff
path: root/src/build_settings.cpp
diff options
context:
space:
mode:
authorJeroen van Rijn <Kelimion@users.noreply.github.com>2024-06-28 02:11:50 +0200
committerGitHub <noreply@github.com>2024-06-28 02:11:50 +0200
commitd31f88bfaa377fb2363615bcdeea3768a1258bf6 (patch)
tree5b21b566621f03f1c9e795616987922fc64fd98c /src/build_settings.cpp
parented7d34beb0d39ae8ae0fce43513fae809bca8ba4 (diff)
parentb79d7e69177ccbc25b75f1aa7a90a62f64c6cee1 (diff)
Merge pull request #3823 from laytan/enforce-global-foreign-import-variables
disallow non-global foreign import of variables on wasm
Diffstat (limited to 'src/build_settings.cpp')
-rw-r--r--src/build_settings.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/build_settings.cpp b/src/build_settings.cpp
index 0495cf3b5..1988e9cac 100644
--- a/src/build_settings.cpp
+++ b/src/build_settings.cpp
@@ -2053,10 +2053,12 @@ gb_internal void init_build_context(TargetMetrics *cross_target, Subtarget subta
gbString link_flags = gb_string_make(heap_allocator(), " ");
// link_flags = gb_string_appendc(link_flags, "--export-all ");
// link_flags = gb_string_appendc(link_flags, "--export-table ");
- link_flags = gb_string_appendc(link_flags, "--allow-undefined ");
// if (bc->metrics.arch == TargetArch_wasm64) {
// link_flags = gb_string_appendc(link_flags, "-mwasm64 ");
// }
+ if (bc->metrics.os != TargetOs_orca) {
+ link_flags = gb_string_appendc(link_flags, "--allow-undefined ");
+ }
if (bc->no_entry_point || bc->metrics.os == TargetOs_orca) {
link_flags = gb_string_appendc(link_flags, "--no-entry ");
}