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

--nimargs: eg choosenim 1.2.0 --nimargs -d:danger -d:nimEmulateOverflowChecks #190

Closed
timotheecour opened this issue Apr 5, 2020 · 2 comments

Comments

@timotheecour
Copy link
Contributor

timotheecour commented Apr 5, 2020

example use case: for users who need custom build options, eg: -d:nimEmulateOverflowChecks

ref: https://irclogs.nim-lang.org/05-04-2020.html#21:18:19

If choosenim needs to compile Nim for you then you cannot pass that flag to it

proposal

chosenim option --nimargs [args...]
which forwards as is arguments to nim compilation commands

@dom96
Copy link
Owner

dom96 commented Apr 5, 2020

See my comments on IRC

@dom96 dom96 closed this as completed Apr 5, 2020
@timotheecour
Copy link
Contributor Author

timotheecour commented Apr 5, 2020

please explain:

yeah, actually you may be able to do that without involving choosenim at all
AFAIK there is a global cfg file that Nim will read

we should not have to set global state (that may impact other running processes etc) just to pass options to choosenim

that said, when compiling Nim you usually build C sources... which won't have the code that the -d flag enables

csources ships with its own nimbase.h (from v0.20) which doesn't need -d:nimEmulateOverflowChecks

so csources will build fine, building a working Nim/bin/nim

then the --nimargs options can be forwarded to the next boostrapping steps:

Nim/bin/nim c $(nim_args...) koch 
./koch boot $(nim_args...)

--nimargs could be anything user wants, eg --skipUserCfg, -d:danger, -d:nimEmulateOverflowChecks etc

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

2 participants