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

nim.cfg danger/release flags honored inconsistently #12349

Open
disruptek opened this issue Oct 3, 2019 · 4 comments
Open

nim.cfg danger/release flags honored inconsistently #12349

disruptek opened this issue Oct 3, 2019 · 4 comments

Comments

@disruptek
Copy link
Contributor

I'm writing a benchmark tool and I thought I would run it against the #12152 test. That code takes 13s without flags and 2.7s in -d:release and 2.0s in -d:danger.

When I set -d:danger in my nim.cfg, the compiler reports that it built a Dangerous Release Build but the code takes 13s. Indeed, the binary output is identical to that of a debug build.

I've verified that the define is actually set and may be acted upon in the code with a when.

Nim Compiler Version 1.0.99 [Linux: amd64]
Compiled at 2019-10-02
Copyright (c) 2006-2019 by Andreas Rumpf

git hash: 244657035050c2b513587de45bebfefa553d6456
active boot switches: -d:danger
@SolitudeSF
Copy link
Contributor

SolitudeSF commented Oct 3, 2019

nim's bundled cfg is evaluated before user/project one, so release and danger have no effect in them (compiler options are already set when user cfg is evaluated).

@disruptek
Copy link
Contributor Author

The issue is that the compiler shouldn't report that it created a danger build when it hasn't.

@ghost
Copy link

ghost commented Oct 22, 2020

Should this be closed and added to #14272 or something?

@disruptek
Copy link
Contributor Author

Perhaps we should wait until the problem is resolved to close the issue.

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