Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions bazel/emscripten_toolchain/link_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@

# If the output name has no extension, give it the appropriate extension.
if not base_name_split[1]:
os.rename(output_file, output_file + '.' + oformat)
os.replace(output_file, output_file + '.' + oformat)

# If the output name does have an extension and it matches the output format,
# change the base_name so it doesn't have an extension.
Expand All @@ -77,7 +77,7 @@
# Please don't do that.
else:
base_name = base_name_split[0]
os.rename(output_file, os.path.join(outdir, base_name + '.' + oformat))
os.replace(output_file, os.path.join(outdir, base_name + '.' + oformat))

files = []
extensions = [
Expand Down Expand Up @@ -161,6 +161,6 @@
# cc_binary must output exactly one file; put all the output files in a tarball.
cmd = ['tar', 'cf', 'tmp.tar'] + files
subprocess.check_call(cmd, cwd=outdir)
os.rename(os.path.join(outdir, 'tmp.tar'), output_file)
os.replace(os.path.join(outdir, 'tmp.tar'), output_file)

sys.exit(0)