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

Still getting multiple -march with LDC #686

Closed
p0nce opened this issue Sep 16, 2015 · 4 comments
Closed

Still getting multiple -march with LDC #686

p0nce opened this issue Sep 16, 2015 · 4 comments

Comments

@p0nce
Copy link
Contributor

p0nce commented Sep 16, 2015

OS Mac OS X

Project to reproduce https://github.com/p0nce/dplug/blob/master/examples/distort/dub.json

DUB version master @ 548dc1b

Problem
$ dub build --compiler=ldc2 => OK

Performing "debug" build using ldc2 for x86_64.
gfm:core 3.0.4: target for configuration "library" is up to date.
dplug:core 1.1.28: target for configuration "library" is up to date.
gfm:math 3.0.4: target for configuration "library" is up to date.
dplug:dsp 1.1.28: target for configuration "library" is up to date.
ae-graphics 0.0.7: target for configuration "library" is up to date.
dplug:plugin 1.1.28: target for configuration "library" is up to date.
derelict-util 2.0.3: target for configuration "library" is up to date.
derelict-cocoa 0.0.25: target for configuration "library" is up to date.
x11 1.0.8: target for configuration "library" is up to date.
dplug:window 1.1.28: target for configuration "library" is up to date.
imageformats 4.2.2: target for configuration "library" is up to date.
gfm:image 3.0.4: target for configuration "library" is up to date.
dplug:gui 1.1.28: target for configuration "library" is up to date.
dplug:vst 1.1.28: target for configuration "library" is up to date.
distort ~master: target for configuration "library" is up to date.
To force a rebuild of up-to-date targets, run again with --force.

$ dub build --compiler=ldc2 -a x86 => FAIL

Performing "debug" build using ldc2 for x86.
gfm:core 3.0.4: target for configuration "library" is up to date.
dplug:core 1.1.28: target for configuration "library" is up to date.
gfm:math 3.0.4: target for configuration "library" is up to date.
dplug:dsp 1.1.28: target for configuration "library" is up to date.
ae-graphics 0.0.7: target for configuration "library" is up to date.
dplug:plugin 1.1.28: building configuration "library"...
ldc2: for the -march option: may only occur zero or one times!
ldc2 failed with exit code 1.

$ dub build --compiler=ldc2 -a x86_64 => FAIL

Performing "debug" build using ldc2 for x86_64.
gfm:core 3.0.4: target for configuration "library" is up to date.
dplug:core 1.1.28: target for configuration "library" is up to date.
gfm:math 3.0.4: target for configuration "library" is up to date.
dplug:dsp 1.1.28: target for configuration "library" is up to date.
ae-graphics 0.0.7: target for configuration "library" is up to date.
dplug:plugin 1.1.28: building configuration "library"...
ldc2: for the -march option: may only occur zero or one times!
ldc2 failed with exit code 1.

In other words, it generates multiple -march in non-trivial projects whenever the --arch switch is used.

@p0nce
Copy link
Contributor Author

p0nce commented Dec 2, 2015

Would you take BountySource donations? What would be the price for this item?

@tsbockman
Copy link

This affects me also (I'm on Linux x64).

tsbockman added a commit to tsbockman/dub that referenced this issue Jan 20, 2016
This fixes [Issue dlang#686](dlang#686), "multiple -march with LDC".

Note that I have not run this through the full DUB test suite, as it wasn't obvious to me how to use it.
s-ludwig added a commit that referenced this issue Jan 30, 2016
s-ludwig added a commit that referenced this issue Jan 30, 2016
Build type settings of dependencies used to accumulate in the dependent projects. This change now adds the build type settings only once after all targets have been collected.
s-ludwig added a commit that referenced this issue Jan 31, 2016
Build type settings of dependencies used to accumulate in the dependent projects. This change now adds the build type settings only once after all targets have been collected.
s-ludwig added a commit that referenced this issue Feb 10, 2016
s-ludwig added a commit that referenced this issue Feb 17, 2016
…-march

Fix duplicate compiler switches for nested dependencies. Fixes #686.
@p0nce
Copy link
Contributor Author

p0nce commented Feb 17, 2016

Whoa thanks @tsbockman 👍

@tsbockman
Copy link

@p0nce Don't thank me - my patch turned out not to be good.

@s-ludwig did all the work on the one he actually merged.

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 a pull request may close this issue.

2 participants