diff options
author | Michael Voronin <survivor.mail@gmail.com> | 2018-04-25 12:26:59 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-04-25 12:26:59 +0300 |
commit | 3949c9f977378ea3ab2b3c750f4dc2bc8d853022 (patch) | |
tree | e70fadb316aa330bd22694a71568316a103fecdd /compiler/options.nim | |
parent | 17d3c6f3f32649c7cc295e964e2fcc3af99eac20 (diff) | |
parent | e931f3b5a9643e0d7ac45b88b0bddb32dda4c540 (diff) | |
download | Nim-3949c9f977378ea3ab2b3c750f4dc2bc8d853022.tar.gz |
Merge pull request #2 from nim-lang/devel
Pull 25-04-18
Diffstat (limited to 'compiler/options.nim')
-rw-r--r-- | compiler/options.nim | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/compiler/options.nim b/compiler/options.nim index 93a3f1796..a5dfaa81c 100644 --- a/compiler/options.nim +++ b/compiler/options.nim @@ -41,7 +41,8 @@ type # please make sure we have under 32 options TOptions* = set[TOption] TGlobalOption* = enum # **keep binary compatible** - gloptNone, optForceFullMake, optDeadCodeElim, + gloptNone, optForceFullMake, + optDeadCodeElimUnused, # deprecated, always on optListCmd, optCompileOnly, optNoLinking, optCDebug, # turn on debugging information optGenDynLib, # generate a dynamic library @@ -102,13 +103,25 @@ type ideNone, ideSug, ideCon, ideDef, ideUse, ideDus, ideChk, ideMod, ideHighlight, ideOutline, ideKnown, ideMsg + Feature* = enum ## experimental features + implicitDeref, + dotOperators, + callOperator, + parallel, + destructor + ConfigRef* = ref object ## eventually all global configuration should be moved here cppDefines*: HashSet[string] headerFile*: string + features*: set[Feature] + arguments*: string ## the arguments to be passed to the program that + ## should be run + +const oldExperimentalFeatures* = {implicitDeref, dotOperators, callOperator, parallel} proc newConfigRef*(): ConfigRef = result = ConfigRef(cppDefines: initSet[string](), - headerFile: "") + headerFile: "", features: {}) proc cppDefine*(c: ConfigRef; define: string) = c.cppDefines.incl define @@ -145,8 +158,6 @@ var gListFullPaths*: bool gPreciseStack*: bool = false gNoNimblePath* = false - gExperimentalMode*: bool - newDestructors*: bool gDynlibOverrideAll*: bool useNimNamespace*: bool |