diff options
author | ringabout <43030857+ringabout@users.noreply.github.com> | 2023-07-24 23:22:50 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-24 17:22:50 +0200 |
commit | 8216d7dd4635db3c0566155c35bb6f339daedbe3 (patch) | |
tree | 5f4e87489f122103b7d58d7d2bb9f80347168159 | |
parent | 49a108b3027914eec18fab4bc47d9b4846eb362e (diff) | |
download | Nim-8216d7dd4635db3c0566155c35bb6f339daedbe3.tar.gz |
fixes #22321; fixes building DLL with --noMain still produces a DllMain (#22323)
* fixes #22321; Building DLL with --noMain produces an unexpected DllMain on devel branch * remove implicit nomain
-rw-r--r-- | compiler/cgen.nim | 2 | ||||
-rw-r--r-- | compiler/commands.nim | 1 |
2 files changed, 1 insertions, 2 deletions
diff --git a/compiler/cgen.nim b/compiler/cgen.nim index 0242ae2f7..363bbce42 100644 --- a/compiler/cgen.nim +++ b/compiler/cgen.nim @@ -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" diff --git a/compiler/commands.nim b/compiler/commands.nim index 5396cbe0d..f14c3d1d1 100644 --- a/compiler/commands.nim +++ b/compiler/commands.nim @@ -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") |