Skip to content

Commit 54ff057

Browse files
committed
Remove unused internal setting: EMSCRIPTEN_VERSION. NFC
1 parent 1f463d1 commit 54ff057

File tree

3 files changed

+9
-7
lines changed

3 files changed

+9
-7
lines changed

src/settings_internal.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -106,10 +106,6 @@ var WASI_MODULE_NAME = "wasi_snapshot_preview1";
106106
// implicitly linked libraries added by the JS compiler.
107107
var JS_LIBRARIES = [];
108108

109-
// This will contain the emscripten version. This can be useful in combination
110-
// with RETAIN_COMPILER_SETTINGS
111-
var EMSCRIPTEN_VERSION = '';
112-
113109
// Will be set to 0 if -fno-rtti is used on the command line.
114110
var USE_RTTI = true;
115111

tools/link.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1809,7 +1809,6 @@ def get_full_import_name(name):
18091809
'emscripten_stack_get_base',
18101810
'emscripten_stack_get_end']
18111811

1812-
settings.EMSCRIPTEN_VERSION = utils.EMSCRIPTEN_VERSION
18131812
settings.SOURCE_MAP_BASE = options.source_map_base or ''
18141813

18151814
settings.LINK_AS_CXX = (shared.run_via_emxx or settings.DEFAULT_TO_CXX) and not options.nostdlibxx

tools/maint/find_unused_settings.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,20 @@
1818

1919

2020
def main():
21+
print(f'Searching {len(settings.internal_settings)} internal settings')
22+
for key in settings.internal_settings:
23+
#print('CHECKING:', key)
24+
cmd = ['git', 'grep', '-q', f'\\<{key}\\>', '*.mjs', '*.js', ':(exclude)src/settings.js', ':(exclude)src/settings_internal.js']
25+
if subprocess.run(cmd, check=False).returncode:
26+
print('NOT FOUND IN JS:', key)
27+
2128
print(f'Searching {len(settings.attrs)} settings')
2229
for key in settings.attrs:
30+
#print('CHECKING:', key)
2331
cmd = ['git', 'grep', '-q', f'\\<{key}\\>', ':(exclude)src/settings.js', ':(exclude)src/settings_internal.js']
24-
print('CHECKING:', key)
2532
# git grep returns 0 if there is a match and non-zero when there is not
2633
if subprocess.run(cmd, check=False).returncode:
27-
print('NOT FOUND: ', key)
34+
print('NOT FOUND ANYWHERE:', key)
2835

2936

3037
if __name__ == '__main__':

0 commit comments

Comments
 (0)