Skip to content

Instead of using the C++-linker, use the D compiler to link LDC2 and LDMD#1361

Closed
JohanEngelen wants to merge 1 commit into
ldc-developers:masterfrom
JohanEngelen:dmdlink
Closed

Instead of using the C++-linker, use the D compiler to link LDC2 and LDMD#1361
JohanEngelen wants to merge 1 commit into
ldc-developers:masterfrom
JohanEngelen:dmdlink

Conversation

@JohanEngelen
Copy link
Copy Markdown
Member

This removes the need for the CMake logic to figure out what linker flags to pass the C++linker to link D code (50 lines of flaky cmake script).

This works on my Mac. Let's see what Travis and AppVeyor think of it.

@JohanEngelen
Copy link
Copy Markdown
Member Author

Fixes #1278

@kinke
Copy link
Copy Markdown
Member

kinke commented Mar 18, 2016

For AppVeyor, it somehow uses DMD's link.exe, although DMD's bin directory is the last entry in the PATH environment variable. In #1354, DMD isn't in PATH at all anymore.

@JohanEngelen JohanEngelen force-pushed the dmdlink branch 4 times, most recently from 9405d9c to 3a338b4 Compare March 18, 2016 17:00
…LDMD.

This removes the need for the CMake logic to figure out what linker flags to pass the C++linker to link D code (50 lines of flaky cmake script).
@JohanEngelen
Copy link
Copy Markdown
Member Author

I will quit the work on this.
I have not found a solution for making this work on Windows. DMD cannot link a D program when "main()" is in C++, because it will not link with phobos/druntime and will not add a few exception handling symbols. It then degrades into the same problem we have now where we have to manually specify these things on the commandline.

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

Successfully merging this pull request may close these issues.

2 participants