[WebAssembly] Remove existing library before creating it with 'ar'

This commit is contained in:
Sam Clegg 2017-10-26 19:19:48 -07:00
parent 46cf4c8640
commit 012c04aa2b

View File

@ -160,6 +160,8 @@ class ObjCompiler(Compiler):
return os.path.basename(src)[:-1] + 'o' # .c -> .o
def binary(self):
if os.path.exists(self.out):
os.remove(self.out)
check_output([os.path.join(self.clang_dir, 'llvm-ar'), 'rcs', self.out] + self.compiled,
cwd=self.tmpdir)