From 911004be057f1f6878e4d1f9629d1bf70a85ed16 Mon Sep 17 00:00:00 2001 From: Sam Clegg Date: Thu, 2 Oct 2025 09:48:51 -0700 Subject: [PATCH] Remove unused internal setting: BULK_MEMORY. NFC It looks like the last usage of this setting was removed in #22873. The setting of `Feature.BULK_MEMORY` is already handled in `apply_min_browser_versions`: ``` elif settings.WASM_WORKERS or settings.SHARED_MEMORY: enable_feature(Feature.BULK_MEMORY, 'shared-mem') ``` --- emcc.py | 3 --- src/settings_internal.js | 2 -- tools/cmdline.py | 2 -- tools/link.py | 2 -- tools/settings.py | 1 - 5 files changed, 10 deletions(-) diff --git a/emcc.py b/emcc.py index 64546c56c729b..2f806e28f0f64 100644 --- a/emcc.py +++ b/emcc.py @@ -431,9 +431,6 @@ def phase_setup(options, state): if settings.PTHREADS or settings.WASM_WORKERS: settings.SHARED_MEMORY = 1 - if settings.SHARED_MEMORY: - settings.BULK_MEMORY = 1 - if 'DISABLE_EXCEPTION_CATCHING' in user_settings and 'EXCEPTION_CATCHING_ALLOWED' in user_settings: # If we get here then the user specified both DISABLE_EXCEPTION_CATCHING and EXCEPTION_CATCHING_ALLOWED # on the command line. This is no longer valid so report either an error or a warning (for diff --git a/src/settings_internal.js b/src/settings_internal.js index 2f81a0ea647fc..24581016c317c 100644 --- a/src/settings_internal.js +++ b/src/settings_internal.js @@ -254,8 +254,6 @@ var POST_JS_FILES = []; // Set when -pthread / -sPTHREADS is passed var PTHREADS = false; -var BULK_MEMORY = false; - var MINIFY_WHITESPACE = true; var ASYNCIFY_IMPORTS_EXCEPT_JS_LIBS = []; diff --git a/tools/cmdline.py b/tools/cmdline.py index cd316d8c8963d..c5d7021d78ce7 100644 --- a/tools/cmdline.py +++ b/tools/cmdline.py @@ -520,12 +520,10 @@ def consume_arg_file(): settings.DISABLE_EXCEPTION_THROWING = 1 settings.WASM_EXCEPTIONS = 0 elif arg == '-mbulk-memory': - settings.BULK_MEMORY = 1 feature_matrix.enable_feature(feature_matrix.Feature.BULK_MEMORY, '-mbulk-memory', override=True) elif arg == '-mno-bulk-memory': - settings.BULK_MEMORY = 0 feature_matrix.disable_feature(feature_matrix.Feature.BULK_MEMORY) elif arg == '-msign-ext': feature_matrix.enable_feature(feature_matrix.Feature.SIGN_EXT, diff --git a/tools/link.py b/tools/link.py index 9b0392d71fcb3..e733532189c47 100644 --- a/tools/link.py +++ b/tools/link.py @@ -1473,8 +1473,6 @@ def limit_incoming_module_api(): # TODO(sbc): Find make a generic way to expose the feature matrix to JS # compiler rather then adding them all ad-hoc as internal settings settings.SUPPORTS_PROMISE_ANY = feature_matrix.caniuse(feature_matrix.Feature.PROMISE_ANY) - if not settings.BULK_MEMORY: - settings.BULK_MEMORY = feature_matrix.caniuse(feature_matrix.Feature.BULK_MEMORY) default_setting('WASM_BIGINT', feature_matrix.caniuse(feature_matrix.Feature.JS_BIGINT_INTEGRATION)) if settings.AUDIO_WORKLET: diff --git a/tools/settings.py b/tools/settings.py index 6a92f5b67ca2f..61818c153974c 100644 --- a/tools/settings.py +++ b/tools/settings.py @@ -95,7 +95,6 @@ 'SUPPORT_LONGJMP', 'WASM_OBJECT_FILES', 'WASM_WORKERS', - 'BULK_MEMORY', # Internal settings used during compilation 'EXCEPTION_CATCHING_ALLOWED',