-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Fix LTO issues on OSX by only passing -fuse-ld=lld on windows #15614
Conversation
Please keep the name. With 1.4 shipped these names are now canonical and should not be touched. |
@alaviss maybe we can add both? and somehow deprecate old ones |
Also IMO it's better to rename |
Build system flags should never be touched unless strictly necessary. Change a flag and someone build system breaks. I'd prefer that we leave the flags as is. |
rename strip to nimStrip, lto to nimLto, and keep the old names for compatibility reasons with a deprecation notice (the deprecation could be extended until whenever deemed reasonable, including indefinitely) |
Then what's the point of deprecating the names? Now you have 2 names per switch, doesn't sound like a good idea to me. Now that these names are canonical, everyone will know to avoid them if it conflicts with their project. Instead of bike shedding over an established name we could just layout some documentation to make sure newer names are scoped in the future. |
minimizing the amount of arbitrary historical baggage. Deprecation messages are here for helping you transition code.
documentation is already here: https://nim-lang.github.io/Nim/contributing.html#best-practices but having it in docs is never as good as enforcing it, see nim-lang/RFCs#269 for a proposal on how to enforce it. |
So what should I do then? |
It will still be 4 flags for the same 2 functions and we can never remove two of them. At one point I think we should just introduce flags like these into real configuration flags instead of the hackish |
same as for any feature, the deprecation cycle involves a (possibly indefinite, depending on use in projects) deprecation cycle followed by error. I'll defer to @Araq to make final call on this but I've explained my reasoning here #15614 (comment) and add this:
That's a good point:
I think that feature should be revisited to make it work like most all features, so that adding -d:lto in ~/.config/nim/config.nims would work. |
I agree with @timotheecour on this one, the name |
As a counterargument: We don't use |
how about: benefits:
the nim prefix indicates that nim package handles it
I'd argue we could even support it in meanwhile, -d:danger,-d:release could be deprecated yet indefinitely supported. |
I'm all for it as long as multiple The |
yes,
yes, via the existing
yes, -d:release would still be honored, in addition to --opts:release; whether -d:release triggers a warning or not, I don't care much (but note that --opts:release would not be subject to #14272 unlike -d:release) And a final benefit is that a misspelt |
@timotheecour maybe you can create a separate RFC for that idea? I'm all for it, and Araq roughly wanted the same thing to fix -d:release and -d:danger IIRC. |
How will |
@genotrance well, "opts" can't be an option in the nim config so it'll be defined in the compiler instead of the config |
will do today |
Oh god no... Not yet another switch that of course must be scriptable and checkable with something like |
that functionality already exists via |
If Next, all the logic's moved into Nim, so now as a user, you cannot really affect change in that logic. For example:
Additionally, it's just a mess - we already have Almost seems easier to solve this with multiple passes. |
there is, see
we can reuse
that's messier, you'd end up with a zig zag pattern
|
Why do we want users to have to learn some new UI/syntax with this new Nim already has |
can we use the same approach as in #18051 ? ie, the flag should have a side effect only once all the cmdline/configs have been processed (so that -d:nimLto works in your user config, and so that -d:nimLto followed by -u:nimLto (in an overriding config stage, eg in cmdline) would cancel out its effect, as with most other flags. (and it should still be renamed, -d:lto is not good, but can be kept for a transition period (which could be infinity)) |
This pull request has been automatically marked as stale because it has not had recent activity. If you think it is still a valid PR, please rebase it on the latest devel; otherwise it will be closed. Thank you for your contributions. |
Fixes #15578
I can't be completely sure that it will work because I don't have aMack for testing.
This PR also renames -d:lto to -d:nim_lto and -d:strip to -d:strip_debug_info