Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iOS platform definition (and where to get all os and cpu arch supported) #9369

Closed
mratsim opened this issue Oct 14, 2018 · 4 comments
Closed
Assignees

Comments

@mratsim
Copy link
Collaborator

mratsim commented Oct 14, 2018

I'm curious what defines the iOS constant (if it's actually defined).

In platform.nim I see no mention of it even though osMacosx and osAndroid are defined there:

type
TSystemOS* = enum # Also add OS in initialization section and alias
# 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
osGenode, osJS, osNimVM, osStandalone, osNintendoSwitch

Searching for iOS in the code shows that it's used in 2 places:

useNSGetEnviron = (defined(macosx) and not defined(ios)) or defined(nimscript)

Nim/lib/system/syslocks.nim

Lines 141 to 144 in 72e15ff

when defined(ios):
# iOS will behave badly if sync primitives are moved in memory. In order
# to prevent this once and for all, we're doing an extra malloc when
# initializing the primitive.

Are there other places than platform.nim that defines compile-time target specific constants?

@Araq
Copy link
Member

Araq commented Oct 14, 2018

@yglukhov knows more...

@narimiran
Copy link
Member

Pinging @yglukhov once more. (I would like to close this)

@yglukhov
Copy link
Member

yglukhov commented Feb 7, 2019

I use --os:macosx -d:ios to compile to ios.

@krux02
Copy link
Contributor

krux02 commented Feb 19, 2019

Well the question was answered.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants