diff options
author | Andreas Rumpf <rumpf_a@web.de> | 2018-06-10 17:06:02 +0200 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2018-06-10 17:06:02 +0200 |
commit | 2662d713f71da542e662860a3cadb5c57e4f7592 (patch) | |
tree | f7f5006e6fa21d126c03100bb81387c6092eaa19 /compiler/pragmas.nim | |
parent | 8e9551b1c7614029f12e7d62ba81f367d1aaf6bd (diff) | |
download | Nim-2662d713f71da542e662860a3cadb5c57e4f7592.tar.gz |
implement passL and passC for the compilation cache
Diffstat (limited to 'compiler/pragmas.nim')
-rw-r--r-- | compiler/pragmas.nim | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/compiler/pragmas.nim b/compiler/pragmas.nim index de9636809..a51d250a2 100644 --- a/compiler/pragmas.nim +++ b/compiler/pragmas.nim @@ -82,7 +82,6 @@ proc getPragmaVal*(procAst: PNode; name: TSpecialWord): PNode = return it[1] proc pragma*(c: PContext, sym: PSym, n: PNode, validPragmas: TSpecialWords) -# implementation proc recordPragma(c: PContext; n: PNode; key, val: string; val2 = "") = var recorded = newNodeI(nkCommentStmt, n.info) @@ -933,8 +932,14 @@ proc singlePragma(c: PContext, sym: PSym, n: PNode, i: var int, of wCompile: processCompile(c, it) of wLink: processCommonLink(c, it, linkNormal) of wLinksys: processCommonLink(c, it, linkSys) - of wPassl: extccomp.addLinkOption(c.config, expectStrLit(c, it)) - of wPassc: extccomp.addCompileOption(c.config, expectStrLit(c, it)) + of wPassl: + let s = expectStrLit(c, it) + extccomp.addLinkOption(c.config, s) + recordPragma(c, it, "passl", s) + of wPassc: + let s = expectStrLit(c, it) + extccomp.addCompileOption(c.config, s) + recordPragma(c, it, "passc", s) of wBreakpoint: pragmaBreakpoint(c, it) of wWatchPoint: pragmaWatchpoint(c, it) of wPush: |