Skip to content

Commit c27617a

Browse files
authored
Remove BINARYEN_SCRIPTS settings (#12159)
This was designed for running scripts in `binaryen/scripts` but I don't think there are any scripts there there are useful these days.
1 parent 4e682da commit c27617a

File tree

3 files changed

+6
-16
lines changed

3 files changed

+6
-16
lines changed

ChangeLog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ Current Trunk
3434
corrupted program state.
3535
- Use `__indirect_function_table` as the import name for the table, which is
3636
what LLVM does.
37+
- Remove `BINARYEN_SCRIPTS` setting.
3738

3839
2.0.2: 09/02/2020
3940
-----------------

emcc.py

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,7 @@ def standardize_setting_change(key, value):
358358
'GL_MAX_TEMP_BUFFER_SIZE', 'MAXIMUM_MEMORY', 'DEFAULT_PTHREAD_STACK_SIZE'):
359359
value = str(expand_byte_size_suffixes(value))
360360

361-
if value[0] == '@':
361+
if value and value[0] == '@':
362362
filename = value[1:]
363363
if not os.path.exists(filename):
364364
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,
26322632
building.strip(wasm_binary_target, wasm_binary_target,
26332633
debug=strip_debug, producers=strip_producers)
26342634

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)
26462635
if shared.Settings.EVAL_CTORS:
26472636
building.save_intermediate(wasm_binary_target, 'pre-ctors.wasm')
26482637
building.eval_ctors(final, wasm_binary_target, binaryen_bin, debug_info=intermediate_debug_info)
@@ -3156,6 +3145,9 @@ def in_directory(root, child):
31563145

31573146

31583147
def parse_value(text):
3148+
if not text:
3149+
return text
3150+
31593151
# Note that using response files can introduce whitespace, if the file
31603152
# has a newline at the end. For that reason, we rstrip() in relevant
31613153
# places here.

src/settings.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1105,10 +1105,6 @@ var WASM = 1;
11051105
// or specify a list of EXPORTED_FUNCTIONS that does not include `main`.
11061106
var STANDALONE_WASM = 0;
11071107

1108-
// An optional comma-separated list of script hooks to run after binaryen,
1109-
// in binaryen's /scripts dir.
1110-
var BINARYEN_SCRIPTS = "";
1111-
11121108
// Whether to ignore implicit traps when optimizing in binaryen. Implicit
11131109
// traps are the traps that happen in a load that is out of bounds, or
11141110
// div/rem of 0, etc. With this option set, the optimizer assumes that loads
@@ -1690,4 +1686,5 @@ var LEGACY_SETTINGS = [
16901686
['EXPORT_BINDINGS', [0, 1], 'No longer needed'],
16911687
['RUNNING_JS_OPTS', [0], 'Fastcomp cared about running JS which could alter asm.js validation, but not upstream'],
16921688
['EXPORT_FUNCTION_TABLES', [0], 'No longer needed'],
1689+
['BINARYEN_SCRIPTS', [""], 'No longer needed'],
16931690
];

0 commit comments

Comments
 (0)