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

MSVC build, lots and lots of warnings #988

Closed
rikkimax opened this issue Jul 6, 2015 · 9 comments
Closed

MSVC build, lots and lots of warnings #988

rikkimax opened this issue Jul 6, 2015 · 9 comments
Labels

Comments

@rikkimax
Copy link
Contributor

rikkimax commented Jul 6, 2015

Compiler: 0.15.2 beta2 win64
Test program:

import std.stdio:writeln;
void main() {writeln("Hi!");}

Compiles + runs fine.
Only issue is well, umm https://gist.github.com/rikkimax/2db36ccd7ef65daeef84
Lots and lots of warnings.

So, given how simple that program is, any chance for a significant decrease in number of second definitions?
Or at the very least, make a note of it somewhere?

@redstar
Copy link
Member

redstar commented Jul 6, 2015

I noted this in the announcement: http://forum.dlang.org/post/ccuhfwbuzzqvpqpnhfhf@forum.dlang.org
I am investigating the issue.

@p0nce
Copy link
Contributor

p0nce commented Jul 6, 2015

I have the exact same problem with 0.15.2 beta2 win64 :), also compilation is very slow even in debug mode.

@redstar
Copy link
Member

redstar commented Sep 1, 2015

I am wondering if the root cause is this change mentioned in the LLVM release notes:

Comdats are now ortogonal to the linkage. LLVM will not create comdats for weak linkage globals and the frontends are responsible for explicitly adding them.

redstar added a commit to redstar/ldc that referenced this issue Sep 9, 2015
Starting with LLVM 3.7, linkage and COMDAT are 2 different concepts.
This means that LinkageODROnce does not put the object into a COMDAT.
On Windows this resulted in linker error messages.

This PR places all template functions, TypeInfo objects and other
objects into a COMDAT.
@redstar
Copy link
Member

redstar commented Sep 9, 2015

Fixed in merge-2.067 branch.

@redstar redstar closed this as completed Sep 9, 2015
@kinke
Copy link
Member

kinke commented Sep 14, 2015

The situation has improved a lot, thanks Kai @redstar, but it's still present - 460 warnings left, see
https://ci.appveyor.com/project/kinke/ldc/build/job/etqtastpn8ppi47c (lines 1001-1460).

@kinke kinke reopened this Sep 14, 2015
@redstar
Copy link
Member

redstar commented Sep 16, 2015

I see. I missed some enums or so.

redstar added a commit to redstar/ldc that referenced this issue Sep 16, 2015
Initializers and thunk code were still missing in COMDAT section.
dnadlinger added a commit that referenced this issue Sep 17, 2015
@kinke
Copy link
Member

kinke commented Sep 17, 2015

Perfect, thanks a lot Kai.

@kinke
Copy link
Member

kinke commented Sep 17, 2015

Damn, there are still some remains, I should have checked more carefully. :/
Only Phobos test runner fails to link, see https://ci.appveyor.com/project/kinke/ldc/build/job/1qmk2thhqxv5cdsf (https://ci.appveyor.com/project/kinke/ldc/build/1.0.138/job/1qmk2thhqxv5cdsf#L1355 till line 1561).

@kinke
Copy link
Member

kinke commented Sep 17, 2015

Finally fixed by #1087 - at least there are no more linking errors when building the runtimes and their test runners.

@kinke kinke closed this as completed Sep 18, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants