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

ldc2 does not respect -of on Windows #1084

Closed
p0nce opened this issue Sep 17, 2015 · 5 comments
Closed

ldc2 does not respect -of on Windows #1084

p0nce opened this issue Sep 17, 2015 · 5 comments

Comments

@p0nce
Copy link
Contributor

p0nce commented Sep 17, 2015

Easy to see with a DUB project with one static dependency.
For example: https://github.com/p0nce/scheme-d/tree/master/examples/repl

OS: Win64
Compiler: Version: LDC 0.16.0-alpha3

To reproduce:
$ dub build --build=debug --arch=x86_64 --compiler=ldc2 --force -v

Here this produces the command:

ldc2 -march=x86-64 -lib -of..\..\.dub\build\library-debug-windows-x86_64-ldc_0-9D41B5ED4C8AD317C9307A7BAF5A80A1\libscheme-d.a -d-debug -g -w -oq -od=.dub/obj -d
-version=Have_scheme_d -I..\..\source ..\..\source\schemed\environment.d ..\..\source\schemed\eval.d ..\..\source\schemed\package.d ..\..\source\schemed\parser.d ..\..\source\schemed\types.d

However the file produced is named libscheme-d.a.liband not libscheme-d.a so DUB fails next.

@redstar
Copy link
Member

redstar commented Sep 17, 2015

.a is not a file extension which is recognized by the MS tool chain. I argue that this is a dub issue.

@p0nce
Copy link
Contributor Author

p0nce commented Sep 17, 2015

I'm completely OK for fixing this in DUB, but ldc takes a .a as -of parameter and silently renames it to .lib
I think it should instead do what it is told, and let the link fail.

@p0nce
Copy link
Contributor Author

p0nce commented Sep 17, 2015

If DUB pass a .lib path, will another .lib be appended?

@redstar
Copy link
Member

redstar commented Sep 17, 2015

Ok, I got it. This is a misunderstanding of dmd behaviour. I'll fix it.

redstar added a commit to redstar/ldc that referenced this issue Sep 17, 2015
@redstar
Copy link
Member

redstar commented Sep 18, 2015

The issue is fixed in master now. For the naming I have created a dub issue: dlang/dub#687

@redstar redstar closed this as completed Sep 19, 2015
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

No branches or pull requests

2 participants