summaryrefslogtreecommitdiff
path: root/src/zap/zapimage.cpp
diff options
context:
space:
mode:
authordanmosemsft <danmose@microsoft.com>2017-02-12 16:51:48 -0800
committerdanmosemsft <danmose@microsoft.com>2017-02-12 17:00:53 -0800
commitb9f410b7b85d3948aece3aa009885df244f11e41 (patch)
tree4adbb4ae045896b11f373794e79b572e26d2def1 /src/zap/zapimage.cpp
parent206b6a7efbc2e947eff900f448b86573b77ae392 (diff)
downloadcoreclr-b9f410b7b85d3948aece3aa009885df244f11e41.tar.gz
coreclr-b9f410b7b85d3948aece3aa009885df244f11e41.tar.bz2
coreclr-b9f410b7b85d3948aece3aa009885df244f11e41.zip
Remove never defined FEATURE_FUSION
Diffstat (limited to 'src/zap/zapimage.cpp')
-rw-r--r--src/zap/zapimage.cpp94
1 files changed, 0 insertions, 94 deletions
diff --git a/src/zap/zapimage.cpp b/src/zap/zapimage.cpp
index 2fbeb03afb..24f081a6f9 100644
--- a/src/zap/zapimage.cpp
+++ b/src/zap/zapimage.cpp
@@ -1076,75 +1076,6 @@ HANDLE ZapImage::GenerateFile(LPCWSTR wszOutputFileName, CORCOMPILE_NGEN_SIGNATU
return hFile;
}
-#ifdef FEATURE_FUSION
-#define WOF_PROVIDER_FILE (0x00000002)
-
-typedef BOOL (WINAPI *WofShouldCompressBinaries_t) (
- __in LPCWSTR Volume,
- __out PULONG Algorithm
- );
-
-typedef HRESULT (WINAPI *WofSetFileDataLocation_t) (
- __in HANDLE hFile,
- __in ULONG Provider,
- __in PVOID FileInfo,
- __in ULONG Length
- );
-
-typedef struct _WOF_FILE_COMPRESSION_INFO {
- ULONG Algorithm;
-} WOF_FILE_COMPRESSION_INFO, *PWOF_FILE_COMPRESSION_INFO;
-
-// Check if files on the volume identified by volumeLetter should be compressed.
-// If yes, compress the file associated with hFile.
-static void CompressFile(WCHAR volumeLetter, HANDLE hFile)
-{
- if (IsNgenOffline())
- {
- return;
- }
-
- // Wofutil.dll is available on Windows 8.1 and above. Return on platforms without wofutil.dll.
- HModuleHolder wofLibrary(WszLoadLibraryEx(L"wofutil.dll", NULL, LOAD_LIBRARY_SEARCH_SYSTEM32));
- if (wofLibrary == nullptr)
- {
- return;
- }
-
- // WofShouldCompressBinaries is available on Windows 10 and above.
- // Windows 8.1 version of wofutil.dll does not have this function.
- WofShouldCompressBinaries_t WofShouldCompressBinaries
- = (WofShouldCompressBinaries_t)GetProcAddress(wofLibrary, "WofShouldCompressBinaries");
- if (WofShouldCompressBinaries == nullptr)
- {
- return;
- }
-
- WCHAR volume[4] = L"X:\\";
- volume[0] = volumeLetter;
- ULONG algorithm = 0;
-
- bool compressionSuitable = (WofShouldCompressBinaries(volume, &algorithm) == TRUE);
- if (compressionSuitable)
- {
- // WofSetFileDataLocation is available on Windows 8.1 and above, however, Windows 8.1 version
- // of WofSetFileDataLocation works for WIM only, and Windows 10 is required for compression of
- // normal files. This isn't a problem for us, since the check for WofShouldCompressBinaries
- // above should have already returned on Windows 8.1.
- WofSetFileDataLocation_t WofSetFileDataLocation =
- (WofSetFileDataLocation_t)GetProcAddress(wofLibrary, "WofSetFileDataLocation");
- if (WofSetFileDataLocation == nullptr)
- {
- return;
- }
-
- WOF_FILE_COMPRESSION_INFO fileInfo;
- fileInfo.Algorithm = algorithm;
-
- WofSetFileDataLocation(hFile, WOF_PROVIDER_FILE, &fileInfo, sizeof(WOF_FILE_COMPRESSION_INFO));
- }
-}
-#endif
HANDLE ZapImage::SaveImage(LPCWSTR wszOutputFileName, CORCOMPILE_NGEN_SIGNATURE * pNativeImageSig)
{
@@ -1173,9 +1104,6 @@ HANDLE ZapImage::SaveImage(LPCWSTR wszOutputFileName, CORCOMPILE_NGEN_SIGNATURE
HANDLE hFile = GenerateFile(wszOutputFileName, pNativeImageSig);
-#ifdef FEATURE_FUSION
- CompressFile(wszOutputFileName[0], hFile);
-#endif
return hFile;
}
@@ -1392,28 +1320,6 @@ void ZapImage::Open(CORINFO_MODULE_HANDLE hModule,
m_ModuleDecoder = *m_zapper->m_pEECompileInfo->GetModuleDecoder(hModule);
-#ifdef FEATURE_FUSION
- // If TranslatePEToArchitectureType fails then we have an invalid format
- DWORD dwPEKind, dwMachine;
- m_ModuleDecoder.GetPEKindAndMachine(&dwPEKind, &dwMachine);
-
- PEKIND PeKind;
- IfFailThrow(TranslatePEToArchitectureType((CorPEKind)dwPEKind, dwMachine, &PeKind));
-
- // Valid images for this platform are peMSIL and the native image for the platform
- if (!(PeKind == peMSIL
-#if defined(_TARGET_AMD64_)
- || PeKind == peAMD64
-#elif defined(_TARGET_X86_)
- || PeKind == peI386
-#elif defined(_TARGET_ARM_)
- || PeKind == peARM
-#endif
- ))
- {
- ThrowHR(NGEN_E_EXE_MACHINE_TYPE_MISMATCH);
- }
-#endif // FEATURE_FUSION
//
// Get file name, and base address from module