From 997ebdd71f03e6d8c7c9d4cc52c1ea39aaccd5ea Mon Sep 17 00:00:00 2001 From: Konstantin Baladurin Date: Fri, 20 Jul 2018 15:19:50 +0300 Subject: Zapper::CompileAssembly: save NI file atomically It can get rid of possible problems with corrupted NI files if crossgen will be killed during image saving. --- src/zap/zapimage.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/zap/zapimage.cpp') diff --git a/src/zap/zapimage.cpp b/src/zap/zapimage.cpp index 3ad696720a..a58e372120 100644 --- a/src/zap/zapimage.cpp +++ b/src/zap/zapimage.cpp @@ -1082,7 +1082,7 @@ HANDLE ZapImage::GenerateFile(LPCWSTR wszOutputFileName, CORCOMPILE_NGEN_SIGNATU } -HANDLE ZapImage::SaveImage(LPCWSTR wszOutputFileName, CORCOMPILE_NGEN_SIGNATURE * pNativeImageSig) +HANDLE ZapImage::SaveImage(LPCWSTR wszOutputFileName, LPCWSTR wszDllPath, CORCOMPILE_NGEN_SIGNATURE * pNativeImageSig) { if (!IsReadyToRunCompilation()) { @@ -1095,7 +1095,7 @@ HANDLE ZapImage::SaveImage(LPCWSTR wszOutputFileName, CORCOMPILE_NGEN_SIGNATURE // that native images are resoure-only DLLs. It is important to NOT // be a resource-only DLL because those DLL's PDBS are not put up on the // symbol server and we want NEN PDBS to be placed there. - ZapPEExports* exports = new(GetHeap()) ZapPEExports(wszOutputFileName); + ZapPEExports* exports = new(GetHeap()) ZapPEExports(wszDllPath); m_pDebugSection->Place(exports); SetDirectoryEntry(IMAGE_DIRECTORY_ENTRY_EXPORT, exports); -- cgit v1.2.3