summaryrefslogtreecommitdiff
path: root/src/ilasm/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/ilasm/main.cpp')
-rw-r--r--src/ilasm/main.cpp38
1 files changed, 4 insertions, 34 deletions
diff --git a/src/ilasm/main.cpp b/src/ilasm/main.cpp
index 2bef40dd47..29a24b0203 100644
--- a/src/ilasm/main.cpp
+++ b/src/ilasm/main.cpp
@@ -106,7 +106,6 @@ extern "C" int _cdecl wmain(int argc, __in WCHAR **argv)
{
int i, NumFiles = 0, NumDeltaFiles = 0;
bool IsDLL = false, IsOBJ = false;
- char szOpt[128];
Assembler *pAsm;
MappedFileStream *pIn;
AsmParse *pParser;
@@ -224,14 +223,13 @@ extern "C" int _cdecl wmain(int argc, __in WCHAR **argv)
if((argv[i][0] == L'/') || (argv[i][0] == L'-'))
#endif
{
- memset(szOpt,0,sizeof(szOpt));
- WszWideCharToMultiByte(uCodePage,0,&argv[i][1],-1,szOpt,sizeof(szOpt),NULL,NULL);
- szOpt[3] = 0;
- if (!_stricmp(szOpt,"NOA"))
+ char szOpt[3 + 1] = { 0 };
+ WszWideCharToMultiByte(uCodePage, 0, &argv[i][1], 3, szOpt, sizeof(szOpt), NULL, NULL);
+ if (!_stricmp(szOpt, "NOA"))
{
pAsm->m_fAutoInheritFromObject = FALSE;
}
- else if (!_stricmp(szOpt,"QUI"))
+ else if (!_stricmp(szOpt, "QUI"))
{
pAsm->m_fReportProgress = FALSE;
bReportProgress = FALSE;
@@ -248,12 +246,8 @@ extern "C" int _cdecl wmain(int argc, __in WCHAR **argv)
else if (!_stricmp(szOpt, "DEB"))
{
pAsm->m_dwIncludeDebugInfo = 0x101;
-#ifdef FEATURE_CORECLR
// PDB is ignored under 'DEB' option for ilasm on CoreCLR.
// https://github.com/dotnet/coreclr/issues/2982
-#else
- pAsm->m_fGeneratePDB = TRUE;
-#endif
bNoDebug = FALSE;
WCHAR *pStr = EqualOrColon(argv[i]);
@@ -281,12 +275,8 @@ extern "C" int _cdecl wmain(int argc, __in WCHAR **argv)
}
else if (!_stricmp(szOpt, "PDB"))
{
-#ifdef FEATURE_CORECLR
// 'PDB' option is ignored for ilasm on CoreCLR.
// https://github.com/dotnet/coreclr/issues/2982
-#else
- pAsm->m_fGeneratePDB = TRUE;
-#endif
bNoDebug = FALSE;
}
else if (!_stricmp(szOpt, "CLO"))
@@ -746,21 +736,8 @@ extern "C" int _cdecl wmain(int argc, __in WCHAR **argv)
exitval = 1;
pParser->msg("Failed to write output file, error code=0x%08X\n",hr);
}
-#ifndef FEATURE_CORECLR
- else if (pAsm->m_pManifest->m_sStrongName.m_fFullSign)
- {
- // Strong name sign the resultant assembly.
- if(pAsm->m_fReportProgress) pParser->msg("Signing file with strong name\n");
- if (FAILED(hr=pAsm->StrongNameSign()))
- {
- exitval = 1;
- pParser->msg("Failed to strong name sign output file, error code=0x%08X\n",hr);
- }
- }
-#endif
if(bClock) cw.cEnd = GetTickCount();
#define ENC_ENABLED
-#ifdef ENC_ENABLED
if(exitval==0)
{
pAsm->m_fENCMode = TRUE;
@@ -857,7 +834,6 @@ extern "C" int _cdecl wmain(int argc, __in WCHAR **argv)
}
} // end for(iFile)
} // end if(exitval==0)
-#endif
}
}
@@ -922,12 +898,6 @@ extern "C" int _cdecl wmain(int argc, __in WCHAR **argv)
#pragma warning(pop)
#endif
-#ifndef FEATURE_CORECLR
-HINSTANCE GetModuleInst()
-{
- return (NULL);
-}
-#endif // !FEATURE_CORECLR
#ifdef FEATURE_PAL
int main(int argc, char* str[])