Skip to content

Commit eebbead

Browse files
committed
Remove some remaining internal uses of the old USE_PTHREADS settings. NFC
These were not showing up in tests because they only show up with `-sSTRICT` + `-O2` (or above). I'm not sure how I missed them in #18923. My guess is that they might have shown up as part of later commits. Fixes: #19471
1 parent 137fea5 commit eebbead

File tree

4 files changed

+6
-5
lines changed

4 files changed

+6
-5
lines changed

src/shell_minimal_runtime.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<script>
55
#if !MODULARIZE
66
var {{{ EXPORT_NAME }}} = {
7-
#if USE_PTHREADS
7+
#if PTHREADS
88
worker: '{{{ PTHREAD_WORKER_FILE }}}'
99
#endif
1010
};

test/test_other.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10042,6 +10042,7 @@ def test_minimal_runtime_code_size(self, test_name, js, compare_js_output=False)
1004210042
'-sMIN_CHROME_VERSION=58',
1004310043
'-sGL_WORKAROUND_SAFARI_GETCONTEXT_BUG=0',
1004410044
'-sNO_FILESYSTEM',
10045+
'-sSTRICT',
1004510046
'--output_eol', 'linux',
1004610047
'-Oz',
1004710048
'--closure=1',

tools/building.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -551,7 +551,7 @@ def closure_compiler(filename, pretty, advanced=True, extra_closure_args=None):
551551
if settings.DYNCALLS:
552552
CLOSURE_EXTERNS += [path_from_root('src/closure-externs/dyncall-externs.js')]
553553

554-
if settings.MINIMAL_RUNTIME and settings.USE_PTHREADS:
554+
if settings.MINIMAL_RUNTIME and settings.PTHREADS:
555555
CLOSURE_EXTERNS += [path_from_root('src/closure-externs/minimal_runtime_worker_externs.js')]
556556

557557
args = ['--compilation_level', 'ADVANCED_OPTIMIZATIONS' if advanced else 'SIMPLE_OPTIMIZATIONS']
@@ -888,7 +888,7 @@ def wasm2js(js_file, wasm_file, opt_level, minify_whitespace, use_closure_compil
888888
# JS optimizations
889889
if opt_level >= 2:
890890
passes = []
891-
if not debug_info and not settings.USE_PTHREADS:
891+
if not debug_info and not settings.PTHREADS:
892892
passes += ['minifyNames']
893893
if symbols_file_js:
894894
passes += ['symbolMap=%s' % symbols_file_js]

tools/minimal_runtime_shell.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ def generate_minimal_runtime_load_statement(target_basename):
7575
if download_wasm and settings.WASM_WORKERS == 1:
7676
files_to_load += ["binary('%s')" % (target_basename + '.ww.js')]
7777

78-
if settings.MODULARIZE and settings.USE_PTHREADS:
78+
if settings.MODULARIZE and settings.PTHREADS:
7979
modularize_imports += ["worker: '{{{ PTHREAD_WORKER_FILE }}}'"]
8080

8181
# Download Wasm2JS code if target browser does not support WebAssembly
@@ -153,7 +153,7 @@ def generate_minimal_runtime_load_statement(target_basename):
153153
# script load from direct script() load to a binary() load so we can still
154154
# immediately start the download, but can control when we add the script to the
155155
# DOM.
156-
if settings.USE_PTHREADS or settings.WASM_WORKERS:
156+
if settings.PTHREADS or settings.WASM_WORKERS:
157157
script_load = "script(url)"
158158
else:
159159
script_load = "script(url).then(() => { URL.revokeObjectURL(url) });"

0 commit comments

Comments
 (0)