@@ -358,7 +358,7 @@ def standardize_setting_change(key, value):
358
358
'GL_MAX_TEMP_BUFFER_SIZE' , 'MAXIMUM_MEMORY' , 'DEFAULT_PTHREAD_STACK_SIZE' ):
359
359
value = str (expand_byte_size_suffixes (value ))
360
360
361
- if value [0 ] == '@' :
361
+ if value and value [0 ] == '@' :
362
362
filename = value [1 :]
363
363
if not os .path .exists (filename ):
364
364
exit_with_error ('%s: file not found parsing argument: %s' % (filename , change ))
@@ -2632,17 +2632,6 @@ def do_binaryen(target, asm_target, options, memfile, wasm_binary_target,
2632
2632
building .strip (wasm_binary_target , wasm_binary_target ,
2633
2633
debug = strip_debug , producers = strip_producers )
2634
2634
2635
- if shared .Settings .BINARYEN_SCRIPTS :
2636
- binaryen_scripts = os .path .join (shared .BINARYEN_ROOT , 'scripts' )
2637
- script_env = os .environ .copy ()
2638
- root_dir = os .path .abspath (os .path .dirname (__file__ ))
2639
- if script_env .get ('PYTHONPATH' ):
2640
- script_env ['PYTHONPATH' ] += ':' + root_dir
2641
- else :
2642
- script_env ['PYTHONPATH' ] = root_dir
2643
- for script in shared .Settings .BINARYEN_SCRIPTS .split (',' ):
2644
- logger .debug ('running binaryen script: ' + script )
2645
- shared .check_call ([shared .PYTHON , os .path .join (binaryen_scripts , script ), final , wasm_text_target ], env = script_env )
2646
2635
if shared .Settings .EVAL_CTORS :
2647
2636
building .save_intermediate (wasm_binary_target , 'pre-ctors.wasm' )
2648
2637
building .eval_ctors (final , wasm_binary_target , binaryen_bin , debug_info = intermediate_debug_info )
@@ -3156,6 +3145,9 @@ def in_directory(root, child):
3156
3145
3157
3146
3158
3147
def parse_value (text ):
3148
+ if not text :
3149
+ return text
3150
+
3159
3151
# Note that using response files can introduce whitespace, if the file
3160
3152
# has a newline at the end. For that reason, we rstrip() in relevant
3161
3153
# places here.
0 commit comments