diff options
author | treeform <starplant@gmail.com> | 2019-09-18 11:03:51 -0700 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2019-09-18 20:03:51 +0200 |
commit | a948deebb32a59ea25549de6fb035ca479661cdf (patch) | |
tree | b559d34aa9cf4c76a6d38932e6b62e3db12ece0d /compiler | |
parent | 188ce5f3ee5c83d749918f9f286537d65a513c53 (diff) | |
download | Nim-a948deebb32a59ea25549de6fb035ca479661cdf.tar.gz |
Add --os:ios switch and docs. (#12204)
Diffstat (limited to 'compiler')
-rw-r--r-- | compiler/options.nim | 8 | ||||
-rw-r--r-- | compiler/platform.nim | 6 |
2 files changed, 10 insertions, 4 deletions
diff --git a/compiler/options.nim b/compiler/options.nim index 5c7513f6b..3a705ff8b 100644 --- a/compiler/options.nim +++ b/compiler/options.nim @@ -397,7 +397,7 @@ proc isDefined*(conf: ConfigRef; symbol: string): bool = result = conf.target.targetOS in {osLinux, osMorphos, osSkyos, osIrix, osPalmos, osQnx, osAtari, osAix, osHaiku, osVxWorks, osSolaris, osNetbsd, - osFreebsd, osOpenbsd, osDragonfly, osMacosx, + osFreebsd, osOpenbsd, osDragonfly, osMacosx, osIos, osAndroid, osNintendoSwitch} of "linux": result = conf.target.targetOS in {osLinux, osAndroid} @@ -407,8 +407,10 @@ proc isDefined*(conf: ConfigRef; symbol: string): bool = result = platform.OS[conf.target.targetOS].props.contains(ospLacksThreadVars) of "msdos": result = conf.target.targetOS == osDos of "mswindows", "win32": result = conf.target.targetOS == osWindows - of "macintosh": result = conf.target.targetOS in {osMacos, osMacosx} - of "osx": result = conf.target.targetOS == osMacosx + of "macintosh": + result = conf.target.targetOS in {osMacos, osMacosx, osIos} + of "osx": + result = conf.target.targetOS in {osMacosx, osIos} of "sunos": result = conf.target.targetOS == osSolaris of "nintendoswitch": result = conf.target.targetOS == osNintendoSwitch diff --git a/compiler/platform.nim b/compiler/platform.nim index 64e37961e..cfe3e1f48 100644 --- a/compiler/platform.nim +++ b/compiler/platform.nim @@ -21,7 +21,7 @@ type # conditionals to condsyms (end of module). osNone, osDos, osWindows, osOs2, osLinux, osMorphos, osSkyos, osSolaris, osIrix, osNetbsd, osFreebsd, osOpenbsd, osDragonfly, osAix, osPalmos, osQnx, - osAmiga, osAtari, osNetware, osMacos, osMacosx, osHaiku, osAndroid, osVxWorks + osAmiga, osAtari, osNetware, osMacos, osMacosx, osIos, osHaiku, osAndroid, osVxWorks osGenode, osJS, osNimVM, osStandalone, osNintendoSwitch type @@ -139,6 +139,10 @@ const objExt: ".o", newLine: "\x0A", pathSep: ":", dirSep: "/", scriptExt: ".sh", curDir: ".", exeExt: "", extSep: ".", props: {ospNeedsPIC, ospPosix, ospLacksThreadVars}), + (name: "iOS", parDir: "..", dllFrmt: "lib$1.so", altDirSep: "/", + objExt: ".o", newLine: "\x0A", pathSep: ":", dirSep: "/", + scriptExt: ".sh", curDir: ".", exeExt: "", extSep: ".", + props: {ospNeedsPIC, ospPosix}), (name: "Haiku", parDir: "..", dllFrmt: "lib$1.so", altDirSep: ":", objExt: ".o", newLine: "\x0A", pathSep: ":", dirSep: "/", scriptExt: ".sh", curDir: ".", exeExt: "", extSep: ".", |