Skip to content

Commit a21f8c5

Browse files
authored
[emcc.py] Remove main wrapper. NFC (emscripten-core#25700)
We have the toolchain profiler (EMPROFILE=2) so we don't need to inject our own timing here.
1 parent a45c791 commit a21f8c5

File tree

1 file changed

+2
-13
lines changed

1 file changed

+2
-13
lines changed

emcc.py

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
import shutil
2727
import sys
2828
import tarfile
29-
import time
3029
from dataclasses import dataclass
3130
from enum import Enum, auto, unique
3231

@@ -171,10 +170,8 @@ def make_relative(filename):
171170
reproduce_file.add(rsp_name, os.path.join(root, 'response.txt'))
172171

173172

174-
#
175-
# Main run() function
176-
#
177-
def run(args):
173+
@ToolchainProfiler.profile()
174+
def main(args):
178175
if shared.run_via_emxx:
179176
clang = shared.CLANG_CXX
180177
else:
@@ -591,14 +588,6 @@ def compile_source_file(input_file):
591588
return [f.value for f in linker_args]
592589

593590

594-
@ToolchainProfiler.profile()
595-
def main(args):
596-
start_time = time.time()
597-
ret = run(args)
598-
logger.debug('total time: %.2f seconds', (time.time() - start_time))
599-
return ret
600-
601-
602591
if __name__ == '__main__':
603592
try:
604593
sys.exit(main(sys.argv))

0 commit comments

Comments
 (0)