3838import clang_native
3939import jsrun
4040import line_endings
41- from tools .shared import EMCC , EMXX , DEBUG , exe_suffix
41+ from tools .shared import EMCC , EMXX , DEBUG
4242from tools .shared import get_canonical_temp_dir , path_from_root
4343from tools .utils import MACOS , WINDOWS , read_file , read_binary , write_binary , exit_with_error
4444from tools .settings import COMPILE_TIME_SETTINGS
@@ -126,7 +126,7 @@ class FirefoxConfig:
126126 data_dir_flag = '-profile '
127127 default_flags = ('-new-instance' ,)
128128 headless_flags = '-headless'
129- executable_name = exe_suffix ('firefox' )
129+ executable_name = utils . exe_suffix ('firefox' )
130130
131131 @staticmethod
132132 def configure (data_dir ):
@@ -158,13 +158,13 @@ def configure(data_dir):
158158
159159DEFAULT_BROWSER_DATA_DIR = path_from_root ('out/browser-profile' )
160160
161- WEBIDL_BINDER = shared .bat_suffix (path_from_root ('tools/webidl_binder' ))
161+ WEBIDL_BINDER = utils .bat_suffix (path_from_root ('tools/webidl_binder' ))
162162
163- EMBUILDER = shared .bat_suffix (path_from_root ('embuilder' ))
164- EMMAKE = shared .bat_suffix (path_from_root ('emmake' ))
165- EMCMAKE = shared .bat_suffix (path_from_root ('emcmake' ))
166- EMCONFIGURE = shared .bat_suffix (path_from_root ('emconfigure' ))
167- EMRUN = shared .bat_suffix (shared .path_from_root ('emrun' ))
163+ EMBUILDER = utils .bat_suffix (path_from_root ('embuilder' ))
164+ EMMAKE = utils .bat_suffix (path_from_root ('emmake' ))
165+ EMCMAKE = utils .bat_suffix (path_from_root ('emcmake' ))
166+ EMCONFIGURE = utils .bat_suffix (path_from_root ('emconfigure' ))
167+ EMRUN = utils .bat_suffix (shared .path_from_root ('emrun' ))
168168WASM_DIS = os .path .join (building .get_binaryen_bin (), 'wasm-dis' )
169169LLVM_OBJDUMP = shared .llvm_tool_path ('llvm-objdump' )
170170PYTHON = sys .executable
@@ -241,7 +241,7 @@ def get_browser_config():
241241
242242
243243def compiler_for (filename , force_c = False ):
244- if shared .suffix (filename ) in ('.cc' , '.cxx' , '.cpp' ) and not force_c :
244+ if utils .suffix (filename ) in ('.cc' , '.cxx' , '.cpp' ) and not force_c :
245245 return EMXX
246246 else :
247247 return EMCC
@@ -1532,7 +1532,7 @@ def build(self, filename, libraries=None, includes=None, force_c=False, cflags=N
15321532 compiler = [compiler_for (filename , force_c )]
15331533
15341534 if force_c :
1535- assert shared .suffix (filename ) != '.c' , 'force_c is not needed for source files ending in .c'
1535+ assert utils .suffix (filename ) != '.c' , 'force_c is not needed for source files ending in .c'
15361536 compiler .append ('-xc' )
15371537
15381538 all_cflags = self .get_cflags (main_file = True )
@@ -1544,7 +1544,7 @@ def build(self, filename, libraries=None, includes=None, force_c=False, cflags=N
15441544 if output_basename :
15451545 output = output_basename + output_suffix
15461546 else :
1547- output = shared .unsuffixed_basename (filename ) + output_suffix
1547+ output = utils .unsuffixed_basename (filename ) + output_suffix
15481548 cmd = compiler + [str (filename ), '-o' , output ] + all_cflags
15491549 if libraries :
15501550 cmd += libraries
@@ -1984,7 +1984,7 @@ def _test_dylink_dso_needed(self, do_run):
19841984 so = '.wasm' if self .is_wasm () else '.js'
19851985
19861986 def ccshared (src , linkto = None ):
1987- cmdv = [EMCC , src , '-o' , shared .unsuffixed (src ) + so , '-sSIDE_MODULE' ] + self .get_cflags ()
1987+ cmdv = [EMCC , src , '-o' , utils .unsuffixed (src ) + so , '-sSIDE_MODULE' ] + self .get_cflags ()
19881988 if linkto :
19891989 cmdv += linkto
19901990 self .run_process (cmdv )
@@ -2060,7 +2060,7 @@ def do_runf(self, filename, expected_output=None, **kwargs):
20602060 def do_run_in_out_file_test (self , srcfile , ** kwargs ):
20612061 srcfile = maybe_test_file (srcfile )
20622062 out_suffix = kwargs .pop ('out_suffix' , '' )
2063- outfile = shared .unsuffixed (srcfile ) + out_suffix + '.out'
2063+ outfile = utils .unsuffixed (srcfile ) + out_suffix + '.out'
20642064 if EMTEST_REBASELINE :
20652065 expected = None
20662066 else :
0 commit comments