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

Add support for HOST_DMD_FLAGS to posix.mak. #5325

Closed
wants to merge 1 commit into from

Conversation

quickfur
Copy link
Member

Rationale: if dmd.conf exists in the source tree (e.g., when testing git HEAD dmd without installing it into system directories), then $HOST_DMD will incorrectly pick up ./dmd.conf, making it read the wrong version of druntime/phobos. This PR adds a way to specify custom flags when invoking $HOST_DMD so that the appropriate -conf flag can be added.

Tacking on the -conf flags to the end of $HOST_DMD does not work, because posix.mak assumes that $HOST_DMD is a pathname to an executable, and will wrongly think the host compiler doesn't exist if extra parameters are appended to $HOST_DMD.

See also: https://issues.dlang.org/show_bug.cgi?id=14255

@WalterBright
Copy link
Member

I find the explanation for what is happening, and what the fix does, to be completely baffling. In any case, the -conf=file has been added to DMD, where you get to select what configuration file to use. Using that should be explored before adding more complicated features.

Also, adding this to the makefile should come with comments in it explaining what is happening, just as one would when writing code.

@MartinNowak
Copy link
Member

You can already override HOST_DMD_RUN with dmd -conf=/path/to/my.conf.

@MartinNowak MartinNowak closed this Jan 3, 2016
@MartinNowak
Copy link
Member

Once again, we should switch the order of picking up a conf file, preferring the path where the dmd binary is located over using the current working dir.

@WalterBright
Copy link
Member

I'm afraid of breaking everyone's builds if we did that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants