-
-
Notifications
You must be signed in to change notification settings - Fork 143
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
rdmd: Add --objdir option #350
base: master
Are you sure you want to change the base?
Conversation
Thanks for your pull request, @CyberShadow! Bugzilla referencesYour PR doesn't reference any Bugzilla issue. If your PR contains non-trivial changes, please reference a Bugzilla issue or create a manual changelog. Testing this PR locallyIf you don't have a local development environment setup, you can use Digger to test this PR: dub fetch digger
dub run digger -- build "master + tools#350" |
Looks like gdmd/gdc needs a patch for this:
|
No idea what's wrong, it works with both dmd and ldmd2 on my machine. gdmd fails with an unrelated error:
@WebDrake Any idea what's wrong? |
I suspect @ibuclaw could give you more insight ;-) Since |
BTW (... he said, merging into his suave work persona ...), why add a separate |
Sorry, I don't follow. How would you then tell rdmd to put the object files in one directory, and the final executable in another? |
Wouldn't |
I guess, but that will still break the existing meaning of
|
For rdmd or for dmd? I would suggest it is a bug if rdmd does not handle the |
I guess, but I don't think it's worth breaking things to fix it at this point. |
What do you fear will actually break? I know I'm usually the one pushing on no breaking change, but the practical upshot of the current behaviour is that one can't use So it should be innocuous to add the possibility of actually having |
OK, but what about the case of |
Doesn't that behave normally with |
There's no reason why the kind of change I'm proposing should affect that. |
Um, no?
Sorry, are you proposing that whether |
Well, I think that behaviour of Bear in mind that |
I don't think it's relevant at this point.
I wouldn't call that a subtlety. It's too obvious of a part of the interface to change at this point.
I think the proper course of action would be to improve the documentation at this point. If we wanted to fix |
Sometimes, when messing with various toolchains / debugging linking problems, it's useful to look at the object files generated by the compiler.
Currently, rdmd unconditionally places them in a temporary directory, and (also unconditionally) deletes them on exit.
-od
is never passed on to the compiler, instead it's usurped by rdmd to specify the location where to place the final executable.This introduces a new switch which allows specifying a custom directory to place object files in.
A check was already present to ensure we don't clean up a directory outside the temporary work directory (which might contain other files), which previously apparently only had an effect with
-lib
(due to a workaround for howdmd
parses-lib
paths).