diff options
author | Andreas Rumpf <rumpf_a@web.de> | 2019-11-22 14:20:15 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-11-22 14:20:15 +0100 |
commit | 64e8f050e1fc88eadd96c9006b97e59d5edb5a94 (patch) | |
tree | 1a2c82428e19d223373ecf5febb08d674f2113d3 /compiler/pragmas.nim | |
parent | c0eeea4f3c110dd22fedd5c2b8b456e10bebfe3e (diff) | |
download | Nim-64e8f050e1fc88eadd96c9006b97e59d5edb5a94.tar.gz |
implemented a new localPassc pragma (#12706)
Diffstat (limited to 'compiler/pragmas.nim')
-rw-r--r-- | compiler/pragmas.nim | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/compiler/pragmas.nim b/compiler/pragmas.nim index e43004bf8..ad58c0bd8 100644 --- a/compiler/pragmas.nim +++ b/compiler/pragmas.nim @@ -46,7 +46,7 @@ const wWarnings, wHints, wLineDir, wStackTrace, wLineTrace, wOptimization, wHint, wWarning, wError, wFatal, wDefine, wUndef, wCompile, wLink, wLinksys, wPure, wPush, wPop, - wPassl, wPassc, + wPassl, wPassc, wLocalPassc, wDeadCodeElimUnused, # deprecated, always on wDeprecated, wFloatChecks, wInfChecks, wNanChecks, wPragma, wEmit, wUnroll, @@ -998,6 +998,11 @@ proc singlePragma(c: PContext, sym: PSym, n: PNode, i: var int, let s = expectStrLit(c, it) extccomp.addCompileOption(c.config, s) recordPragma(c, it, "passc", s) + of wLocalPassc: + assert sym != nil and sym.kind == skModule + let s = expectStrLit(c, it) + extccomp.addLocalCompileOption(c.config, s, toFullPathConsiderDirty(c.config, sym.info.fileIndex)) + recordPragma(c, it, "localpassl", s) of wPush: processPush(c, n, i + 1) result = true |