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

Ensure LLVM LDFLAGS are placed after libraries in build commands. #452

Merged
merged 1 commit into from
Aug 20, 2013

Conversation

WebDrake
Copy link
Contributor

Some compilers require LDFLAGS to come after all other source/library files.

This should fix the issue described in the following discussion thread: http://forum.dlang.org/thread/kqvmreitlrmlegfthpgg@forum.dlang.org

@@ -429,7 +429,7 @@ set_target_properties(${LDMD_EXE} PROPERTIES
# use symbols from libdl, ..., so LLVM_LDFLAGS must come _after_ them in the
# command line. Maybe this could be improved using library groups, at least with
# GNU ld.
target_link_libraries(${LDMD_EXE} "${LLVM_LDFLAGS}" ${LLVM_LIBRARIES} "${LLVM_LDFLAGS}")
target_link_libraries(${LDMD_EXE} ${LLVM_LIBRARIES} "${LLVM_LDFLAGS}")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sigh, I can't recall right now why I left the LDFLAGS in there twice, but there certainly was a reason. I guess the best way is to pull in this change and see what breaks. Please also update the comment to match the change, though.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did wonder if this particular change was wise, but I considered it could have just been an oversight to leave in the first instance.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure I understand your issue with the comment ... ?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, I thought I had explicitly mentioned that the flags appear twice there. My mistake.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's actually why I thought the double occurrence was an oversight -- I assumed someone had copied them to the end, as per the comment, but just forgotten to delete the earlier one.

dnadlinger added a commit that referenced this pull request Aug 20, 2013
Ensure LLVM LDFLAGS are placed after libraries in build commands.

Let's try this – add the removal of the second LLVM_LDFLAGS instance in the LDMD_EXE libraries if new LDMD linker errors pop up.
@dnadlinger dnadlinger merged commit 6f5abdb into ldc-developers:master Aug 20, 2013
@WebDrake WebDrake deleted the ldflags branch August 20, 2013 21:51
redstar pushed a commit that referenced this pull request Sep 27, 2014
Remove unused Object.opEquals(Object, Object)
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