3737import  clang_native 
3838import  jsrun 
3939import  line_endings 
40- from  tools .shared  import  EMCC , EMXX , DEBUG ,  exe_suffix 
40+ from  tools .shared  import  EMCC , EMXX , DEBUG 
4141from  tools .shared  import  get_canonical_temp_dir , path_from_root 
4242from  tools .utils  import  MACOS , WINDOWS , read_file , read_binary , write_binary , exit_with_error 
4343from  tools .settings  import  COMPILE_TIME_SETTINGS 
@@ -125,7 +125,7 @@ class FirefoxConfig:
125125  data_dir_flag  =  '-profile ' 
126126  default_flags  =  ('-new-instance' ,)
127127  headless_flags  =  '-headless' 
128-   executable_name  =  exe_suffix ('firefox' )
128+   executable_name  =  utils . exe_suffix ('firefox' )
129129
130130  @staticmethod  
131131  def  configure (data_dir ):
@@ -157,13 +157,13 @@ def configure(data_dir):
157157
158158DEFAULT_BROWSER_DATA_DIR  =  path_from_root ('out/browser-profile' )
159159
160- WEBIDL_BINDER  =  shared .bat_suffix (path_from_root ('tools/webidl_binder' ))
160+ WEBIDL_BINDER  =  utils .bat_suffix (path_from_root ('tools/webidl_binder' ))
161161
162- EMBUILDER  =  shared .bat_suffix (path_from_root ('embuilder' ))
163- EMMAKE  =  shared .bat_suffix (path_from_root ('emmake' ))
164- EMCMAKE  =  shared .bat_suffix (path_from_root ('emcmake' ))
165- EMCONFIGURE  =  shared .bat_suffix (path_from_root ('emconfigure' ))
166- EMRUN  =  shared .bat_suffix (shared .path_from_root ('emrun' ))
162+ EMBUILDER  =  utils .bat_suffix (path_from_root ('embuilder' ))
163+ EMMAKE  =  utils .bat_suffix (path_from_root ('emmake' ))
164+ EMCMAKE  =  utils .bat_suffix (path_from_root ('emcmake' ))
165+ EMCONFIGURE  =  utils .bat_suffix (path_from_root ('emconfigure' ))
166+ EMRUN  =  utils .bat_suffix (shared .path_from_root ('emrun' ))
167167WASM_DIS  =  os .path .join (building .get_binaryen_bin (), 'wasm-dis' )
168168LLVM_OBJDUMP  =  shared .llvm_tool_path ('llvm-objdump' )
169169PYTHON  =  sys .executable 
@@ -240,7 +240,7 @@ def get_browser_config():
240240
241241
242242def  compiler_for (filename , force_c = False ):
243-   if  shared .suffix (filename ) in  ('.cc' , '.cxx' , '.cpp' ) and  not  force_c :
243+   if  utils .suffix (filename ) in  ('.cc' , '.cxx' , '.cpp' ) and  not  force_c :
244244    return  EMXX 
245245  else :
246246    return  EMCC 
@@ -1531,7 +1531,7 @@ def build(self, filename, libraries=None, includes=None, force_c=False, cflags=N
15311531    compiler  =  [compiler_for (filename , force_c )]
15321532
15331533    if  force_c :
1534-       assert  shared .suffix (filename ) !=  '.c' , 'force_c is not needed for source files ending in .c' 
1534+       assert  utils .suffix (filename ) !=  '.c' , 'force_c is not needed for source files ending in .c' 
15351535      compiler .append ('-xc' )
15361536
15371537    all_cflags  =  self .get_cflags (main_file = True )
@@ -1543,7 +1543,7 @@ def build(self, filename, libraries=None, includes=None, force_c=False, cflags=N
15431543    if  output_basename :
15441544      output  =  output_basename  +  output_suffix 
15451545    else :
1546-       output  =  shared .unsuffixed_basename (filename ) +  output_suffix 
1546+       output  =  utils .unsuffixed_basename (filename ) +  output_suffix 
15471547    cmd  =  compiler  +  [str (filename ), '-o' , output ] +  all_cflags 
15481548    if  libraries :
15491549      cmd  +=  libraries 
@@ -1983,7 +1983,7 @@ def _test_dylink_dso_needed(self, do_run):
19831983    so  =  '.wasm'  if  self .is_wasm () else  '.js' 
19841984
19851985    def  ccshared (src , linkto = None ):
1986-       cmdv  =  [EMCC , src , '-o' , shared .unsuffixed (src ) +  so , '-sSIDE_MODULE' ] +  self .get_cflags ()
1986+       cmdv  =  [EMCC , src , '-o' , utils .unsuffixed (src ) +  so , '-sSIDE_MODULE' ] +  self .get_cflags ()
19871987      if  linkto :
19881988        cmdv  +=  linkto 
19891989      self .run_process (cmdv )
@@ -2059,7 +2059,7 @@ def do_runf(self, filename, expected_output=None, **kwargs):
20592059  def  do_run_in_out_file_test (self , srcfile , ** kwargs ):
20602060    srcfile  =  maybe_test_file (srcfile )
20612061    out_suffix  =  kwargs .pop ('out_suffix' , '' )
2062-     outfile  =  shared .unsuffixed (srcfile ) +  out_suffix  +  '.out' 
2062+     outfile  =  utils .unsuffixed (srcfile ) +  out_suffix  +  '.out' 
20632063    if  EMTEST_REBASELINE :
20642064      expected  =  None 
20652065    else :
0 commit comments