From d95309d5b845fd5430ff117ac28c15b7f1daa800 Mon Sep 17 00:00:00 2001 From: Sam Clegg Date: Fri, 24 Jan 2025 14:23:28 -0800 Subject: [PATCH] [emcc.py] Remove redundant check. NFC This only run in COMPILE_AND_LINK mode (see assertion above). --- emcc.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/emcc.py b/emcc.py index 99fbc105313ee..8f89323cb049e 100644 --- a/emcc.py +++ b/emcc.py @@ -973,8 +973,8 @@ def compile_source_file(i, input_file): if get_file_suffix(input_file) in ['.pcm']: cmd = [c for c in cmd if not c.startswith('-fprebuilt-module-path=')] cmd += compile_args + ['-c', input_file, '-o', output_file] - if state.mode == Mode.COMPILE_AND_LINK and options.requested_debug == '-gsplit-dwarf': - # When running in COMPILE_AND_LINK mode we compile to temporary location + if options.requested_debug == '-gsplit-dwarf': + # When running in COMPILE_AND_LINK mode we compile objects to a temporary location # but we want the `.dwo` file to be generated in the current working directory, # like it is under clang. We could avoid this hack if we use the clang driver # to generate the temporary files, but that would also involve using the clang