Building the llvm runtime: 'Can't destroy file: Theprocess cannot access the fi

From: Jeff Cohen Date: Wed, 26 Jan 2005 19:47:44 -0800

Fixed.

Yes, now it isn't the path.

I've recorded this trace:

my_make_tools-only.zip (4.76 KB)

Here's what's happening in the archiver. It is creating libc.bca. The
way it does that is to create a temporary file using the
Path::createTemporaryFile. The file with the -000000 suffix is the
temporary file that gets renamed as libc.bca when llvm-ar is finished
build it. So, I think what is going on is that the file is being renamed
correctly but Win32/Path.inc is throwing an exception anyway (where the
error message comes from) and llvm-ar returns error code 2 (which means
an error exception was generated). We just need to find out why
Win32/Path.inc is throwing an exception on rename. Possibly the
temporary file has not been closed at the point of the rename.

See the logic in Archive::writeToDisk in
lib/Bytecode/Archive/ArchiveWriter.cpp for the details. The logic looks
correct to me. The Archive file is closed and then renamed.

Reid.

The mapped files weren't being closed at all; they were only being unmapped. It's now fixed.

Reid Spencer wrote:

Oops! Thanks for fixing it.

Reid.