diff options
Diffstat (limited to 'platform/web')
-rw-r--r-- | platform/web/SCsub | 3 | ||||
-rw-r--r-- | platform/web/detect.py | 11 | ||||
-rw-r--r-- | platform/web/export/export_plugin.cpp | 5 |
3 files changed, 10 insertions, 9 deletions
diff --git a/platform/web/SCsub b/platform/web/SCsub index e44e59bfb9..1af0642554 100644 --- a/platform/web/SCsub +++ b/platform/web/SCsub @@ -70,6 +70,9 @@ if env["dlink_enabled"]: sys_env.Append(LINKFLAGS=["-s", "WARN_ON_UNDEFINED_SYMBOLS=0"]) # Force exporting the standard library (printf, malloc, etc.) sys_env["ENV"]["EMCC_FORCE_STDLIBS"] = "libc,libc++,libc++abi" + sys_env["CCFLAGS"].remove("-fvisibility=hidden") + sys_env["LINKFLAGS"].remove("-fvisibility=hidden") + # The main emscripten runtime, with exported standard libraries. sys = sys_env.Program(build_targets, ["web_runtime.cpp"]) diff --git a/platform/web/detect.py b/platform/web/detect.py index 2685cbcd63..4015c8ff16 100644 --- a/platform/web/detect.py +++ b/platform/web/detect.py @@ -97,12 +97,9 @@ def configure(env: "Environment"): if env["use_assertions"]: env.Append(LINKFLAGS=["-s", "ASSERTIONS=1"]) - if env.editor_build: - if env["initial_memory"] < 64: - print('Note: Forcing "initial_memory=64" as it is required for the web editor.') - env["initial_memory"] = 64 - else: - env.Append(CPPFLAGS=["-fno-exceptions"]) + if env.editor_build and env["initial_memory"] < 64: + print('Note: Forcing "initial_memory=64" as it is required for the web editor.') + env["initial_memory"] = 64 env.Append(LINKFLAGS=["-s", "INITIAL_MEMORY=%sMB" % env["initial_memory"]]) @@ -211,6 +208,8 @@ def configure(env: "Environment"): env.Append(CCFLAGS=["-s", "SIDE_MODULE=2"]) env.Append(LINKFLAGS=["-s", "SIDE_MODULE=2"]) + env.Append(CCFLAGS=["-fvisibility=hidden"]) + env.Append(LINKFLAGS=["-fvisibility=hidden"]) env.extra_suffix = ".dlink" + env.extra_suffix # Reduce code size by generating less support code (e.g. skip NodeJS support). diff --git a/platform/web/export/export_plugin.cpp b/platform/web/export/export_plugin.cpp index 38e2714d9f..993abd2cee 100644 --- a/platform/web/export/export_plugin.cpp +++ b/platform/web/export/export_plugin.cpp @@ -37,6 +37,7 @@ #include "editor/editor_scale.h" #include "editor/editor_settings.h" #include "editor/export/editor_export.h" +#include "editor/import/resource_importer_texture_settings.h" #include "scene/resources/image_texture.h" #include "modules/modules_enabled.gen.h" // For mono and svg. @@ -406,10 +407,8 @@ bool EditorExportPlatformWeb::has_valid_project_configuration(const Ref<EditorEx // Validate the project configuration. if (p_preset->get("vram_texture_compression/for_mobile")) { - String etc_error = test_etc2(); - if (!etc_error.is_empty()) { + if (!ResourceImporterTextureSettings::should_import_etc2_astc()) { valid = false; - err += etc_error; } } |