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
8 changes: 4 additions & 4 deletions emcc.py
Original file line number Diff line number Diff line change
Expand Up @@ -344,17 +344,17 @@ def main(args):
linker_args = [f.value for f in linker_args]
# Delay import of link.py to avoid processing this file when only compiling
from tools import link
link.run_post_link(options.input_files[0], options, linker_args)
link.run_post_link(options.input_files[0], linker_args)
return 0

# Compile source code to object files
# When only compiling this function never returns.
linker_args = phase_compile_inputs(options, state, newargs)
linker_args = phase_compile_inputs(state, newargs)

if state.mode == Mode.COMPILE_AND_LINK:
# Delay import of link.py to avoid processing this file when only compiling
from tools import link
return link.run(options, linker_args)
return link.run(linker_args)
else:
logger.debug('stopping after compile phase')
return 0
Expand Down Expand Up @@ -502,7 +502,7 @@ def phase_setup(state):


@ToolchainProfiler.profile_block('compile inputs')
def phase_compile_inputs(options, state, newargs):
def phase_compile_inputs(state, newargs):
if shared.run_via_emxx:
compiler = [shared.CLANG_CXX]
else:
Expand Down
4 changes: 3 additions & 1 deletion tools/cmdline.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
config,
diagnostics,
feature_matrix,
ports,
shared,
utils,
)
Expand Down Expand Up @@ -204,6 +203,9 @@ def parse_args(newargs): # ruff: ignore[complex-structure, too-many-branches, t

To revalidate these numbers, run `ruff check --select=C901,PLR091`.
"""
# TODO(sbc): Remove this import, or move it to the top, once we resolve the
# circular dependency issue with ports/__init__.py -> system_libs.py -> cmdline.py
from tools import ports
should_exit = False
skip = False
builtin_settings = set(settings.keys())
Expand Down
Loading
Loading