mirror of
https://github.com/nim-lang/Nim.git
synced 2025-12-28 17:04:41 +00:00
* fixes #22321; Building DLL with --noMain produces an unexpected DllMain on devel branch * remove implicit nomain
This commit is contained in:
@@ -1636,7 +1636,7 @@ proc genMainProc(m: BModule) =
|
||||
appcg(m, m.s[cfsProcs], nimMain,
|
||||
[m.g.mainModInit, initStackBottomCall, m.labels, preMainCode, m.config.nimMainPrefix, isVolatile])
|
||||
|
||||
if optNoMain notin m.config.globalOptions or optGenDynLib in m.config.globalOptions:
|
||||
if optNoMain notin m.config.globalOptions:
|
||||
if m.config.cppCustomNamespace.len > 0:
|
||||
closeNamespaceNim(m.s[cfsProcs])
|
||||
m.s[cfsProcs].add "using namespace " & m.config.cppCustomNamespace & ";\L"
|
||||
|
||||
@@ -802,7 +802,6 @@ proc processSwitch*(switch, arg: string, pass: TCmdLinePass, info: TLineInfo;
|
||||
defineSymbol(conf.symbols, "consoleapp")
|
||||
of "lib":
|
||||
incl(conf.globalOptions, optGenDynLib)
|
||||
incl(conf.globalOptions, optNoMain)
|
||||
excl(conf.globalOptions, optGenGuiApp)
|
||||
defineSymbol(conf.symbols, "library")
|
||||
defineSymbol(conf.symbols, "dll")
|
||||
|
||||
Reference in New Issue
Block a user