[all-commits] [llvm/llvm-project] f42f59: [LLD][ELF][Windows] Allow LLD to overwrite existin...

bd1976bris via All-commits all-commits at lists.llvm.org
Fri Jul 3 05:09:17 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: f42f599d3724cd4a2f470a53551604f722965de6
      https://github.com/llvm/llvm-project/commit/f42f599d3724cd4a2f470a53551604f722965de6
  Author: Ben Dunbobbin <Ben.Dunbobbin at sony.com>
  Date:   2020-07-03 (Fri, 03 Jul 2020)

  Changed paths:
    M lld/Common/Filesystem.cpp
    A lld/test/ELF/link-open-file.test

  Log Message:
  -----------
  [LLD][ELF][Windows] Allow LLD to overwrite existing output files that are in use

On Windows co-operative programs can be expected to open LLD's
output in FILE_SHARE_DELETE mode. This allows us to delete the
file (by moving it to a temporary filename and then deleting
it) so that we can link another output file that overwrites
the existing file, even if the current file is in use.

A similar strategy is documented here:
https://boostgsoc13.github.io/boost.afio/doc/html/afio/FAQ/deleting_open_files.html

Differential Revision: https://reviews.llvm.org/D82567




More information about the All-commits mailing list