Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions emcc.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,16 +148,16 @@
VALID_ENVIRONMENTS = ('web', 'webview', 'worker', 'node', 'shell')
SIMD_INTEL_FEATURE_TOWER = ['-msse', '-msse2', '-msse3', '-mssse3', '-msse4.1', '-msse4.2', '-mavx']
SIMD_NEON_FLAGS = ['-mfpu=neon']
COMPILE_ONLY_FLAGS = set(['--default-obj-ext'])
LINK_ONLY_FLAGS = set([
COMPILE_ONLY_FLAGS = {'--default-obj-ext'}
LINK_ONLY_FLAGS = {
'--bind', '--closure', '--cpuprofiler', '--embed-file',
'--emit-symbol-map', '--emrun', '--exclude-file', '--extern-post-js',
'--extern-pre-js', '--ignore-dynamic-linking', '--js-library',
'--js-transform', '--memory-init-file', '--oformat', '--output_eol',
'--post-js', '--pre-js', '--preload-file', '--profiling-funcs',
'--proxy-to-worker', '--shell-file', '--source-map-base',
'--threadprofiler', '--use-preload-plugins'
])
}


# this function uses the global 'final' variable, which contains the current
Expand Down
6 changes: 3 additions & 3 deletions emscripten.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,16 +80,16 @@ def optimize_syscalls(declares):
settings.SYSCALLS_REQUIRE_FILESYSTEM = 0
else:
syscall_prefixes = ('__syscall_', 'fd_')
syscalls = [d for d in declares if d.startswith(syscall_prefixes)]
syscalls = {d for d in declares if d.startswith(syscall_prefixes)}
# check if the only filesystem syscalls are in: close, ioctl, llseek, write
# (without open, etc.. nothing substantial can be done, so we can disable
# extra filesystem support in that case)
if set(syscalls).issubset(set([
if syscalls.issubset({
'__syscall_ioctl',
'fd_seek',
'fd_write',
'fd_close',
])):
}):
if DEBUG:
logger.debug('very limited syscalls (%s) so disabling full filesystem support', ', '.join(str(s) for s in syscalls))
settings.SYSCALLS_REQUIRE_FILESYSTEM = 0
Expand Down
6 changes: 3 additions & 3 deletions tools/building.py
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,7 @@ def link_bitcode(args, target, force_archive_contents=False):
# Tracking unresolveds is necessary for .a linking, see below.
# Specify all possible entry points to seed the linking process.
# For a simple application, this would just be "main".
unresolved_symbols = set([func[1:] for func in settings.EXPORTED_FUNCTIONS])
unresolved_symbols = {func[1:] for func in settings.EXPORTED_FUNCTIONS}
resolved_symbols = set()
# Paths of already included object files from archives.
added_contents = set()
Expand Down Expand Up @@ -1028,7 +1028,7 @@ def metadce(js_file, wasm_file, minify_whitespace, debug_info):
'root': True
})
# fix wasi imports TODO: support wasm stable with an option?
WASI_IMPORTS = set([
WASI_IMPORTS = {
'environ_get',
'environ_sizes_get',
'args_get',
Expand All @@ -1044,7 +1044,7 @@ def metadce(js_file, wasm_file, minify_whitespace, debug_info):
'proc_exit',
'clock_res_get',
'clock_time_get',
])
}
for item in graph:
if 'import' in item and item['import'][1][1:] in WASI_IMPORTS:
item['import'][0] = settings.WASI_MODULE_NAME
Expand Down
12 changes: 6 additions & 6 deletions tools/maint/check_for_unused_test_files.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,24 +12,24 @@
script_dir = os.path.dirname(os.path.abspath(__file__))
root_dir = os.path.dirname(os.path.dirname(script_dir))
test_dir = os.path.join(root_dir, 'tests')
ignore_dirs = set([
ignore_dirs = {
'third_party',
'metadce',
'__pycache__',
])
ignore_files = set([
}
ignore_files = {
'getValue_setValue_assert.out',
'legacy_exported_runtime_numbers_assert.out',
])
}
ignore_root_patterns = ['runner.*', 'test_*.py']
ignore_root_files = set([
ignore_root_files = {
'jsrun.py',
'clang_native.py',
'common.py',
'parallel_testsuite.py',
'parse_benchmark_output.py',
'malloc_bench.c',
])
}


def grep(string, subdir=''):
Expand Down
2 changes: 1 addition & 1 deletion tools/ports/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ def get_needed_ports(settings):

def build_port(port_name, settings):
port = ports_by_name[port_name]
port_set = set((port,))
port_set = {port}
resolve_dependencies(port_set, settings)
for port in dependency_order(port_set):
port.get(Ports, settings, shared)
Expand Down