-
-
Notifications
You must be signed in to change notification settings - Fork 609
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 Issue 14305 - DMD incorrectly interprets -of and -od with -lib... #4753
Conversation
…lso fixes Issue 14296).
This is some odd logic... With |
Hmm, ok, I think I managed to have a bug and a misunderstanding of -od manage to cancel each other out. This does the right thing, but for the wrong reasons. Gonna revisit and reopen this after some sleep. |
Ok, I reworked it. |
What bothers me about this is now -od has a different meaning for .obj files and for .lib files. This is intensely confusing. If -od, -of, and -lib are all given, then the path should be stripped from the -of name, and the path from -od used. |
This also applies to the current situation (see description of issue 14305).
I think it would be better to ignore |
The only solution I can see is to define a new switch, and define some systematic and consistent behavior for it. Leave -od as it is. |
These are mutually exclusive as I understand |
Looking at the code, I think this patch is done in the wrong place, and should instead be done in They contains the following code: const char *arg = filename;
if (!arg || !*arg)
{ // Generate lib file name from first obj name
const char *n = (*global.params.objfiles)[0];
n = FileName::name(n);
arg = FileName::forceExt(n, global.lib_ext);
}
if (!FileName::absolute(arg))
arg = FileName::combine(dir, arg); The second |
What's the state of this? |
|
Again, I think it is a BAD idea to change the behavior of |
As per comments last comments, I will close this. @Abscissa - Please rebase and reopen if you think that this should be pursued in a new light. |
I've just ran into this behavior of I'd rather dlang make some people mad now rather than make every future user mad when they find out. |
…(also fixes Issue 14296).
https://issues.dlang.org/show_bug.cgi?id=14296
https://issues.dlang.org/show_bug.cgi?id=14305