@@ -2031,7 +2031,7 @@ def fix_es6_import_statements(js_file):
2031
2031
save_intermediate ('es6-module' )
2032
2032
2033
2033
2034
- def create_worker_file (input_file , target_dir , output_file ):
2034
+ def create_worker_file (input_file , target_dir , output_file , options ):
2035
2035
output_file = os .path .join (target_dir , output_file )
2036
2036
input_file = utils .path_from_root (input_file )
2037
2037
contents = shared .read_and_preprocess (input_file , expand_macros = True )
@@ -2044,6 +2044,8 @@ def create_worker_file(input_file, target_dir, output_file):
2044
2044
contents = building .acorn_optimizer (output_file , ['minifyWhitespace' ], return_output = True )
2045
2045
write_file (output_file , contents )
2046
2046
2047
+ tools .line_endings .convert_line_endings_in_file (output_file , os .linesep , options .output_eol )
2048
+
2047
2049
2048
2050
@ToolchainProfiler .profile_block ('final emitting' )
2049
2051
def phase_final_emitting (options , state , target , wasm_target ):
@@ -2054,15 +2056,15 @@ def phase_final_emitting(options, state, target, wasm_target):
2054
2056
2055
2057
target_dir = os .path .dirname (os .path .abspath (target ))
2056
2058
if settings .PTHREADS :
2057
- create_worker_file ('src/worker.js' , target_dir , settings .PTHREAD_WORKER_FILE )
2059
+ create_worker_file ('src/worker.js' , target_dir , settings .PTHREAD_WORKER_FILE , options )
2058
2060
2059
2061
# Deploy the Wasm Worker bootstrap file as an output file (*.ww.js)
2060
2062
if settings .WASM_WORKERS == 1 :
2061
- create_worker_file ('src/wasm_worker.js' , target_dir , settings .WASM_WORKER_FILE )
2063
+ create_worker_file ('src/wasm_worker.js' , target_dir , settings .WASM_WORKER_FILE , options )
2062
2064
2063
2065
# Deploy the Audio Worklet module bootstrap file (*.aw.js)
2064
2066
if settings .AUDIO_WORKLET == 1 :
2065
- create_worker_file ('src/audio_worklet.js' , target_dir , settings .AUDIO_WORKLET_FILE )
2067
+ create_worker_file ('src/audio_worklet.js' , target_dir , settings .AUDIO_WORKLET_FILE , options )
2066
2068
2067
2069
if settings .MODULARIZE :
2068
2070
modularize ()
0 commit comments