Is there a way to use x86 and x86_mscoff with dub simultaneously.

ciechowoj via Digitalmars-d digitalmars-d at puremagic.com
Tue Jul 25 11:47:07 PDT 2017


As Jacob Carlborg said it's for the dstep.

On Tuesday, 25 July 2017 at 15:18:04 UTC, Mike Parker wrote:
> On Tuesday, 25 July 2017 at 14:17:54 UTC, ciechowoj wrote:
> What's wrong with the current error message? Doesn't it do that?

Nope, this message looks like intended for the library author 
rather than for a library user.

What I want is a message that signals that the compilation isn't 
possible with the default x86 arch and the user has to use 
x86_mscoff arch.

> That's precisely what --arch (or simply -a) is for. But you can 
> avoid passing it explicitly by setting the $DUB_ARCH 
> environment variable (as per the dub documentation).

To disable the warning I mentioned in the first post I needed to 
remove the `-m32mscoff` flag. Now the library can be compiled 
only with explicit specification of the architecture.

However the default arch is what the library's end user will 
select most likely.
And then they will receive unhelpful message about OPTLINK being 
unable to parse the VS linker command line.

Ideally I would like to be able to suppress m32mscoff warning and 
build for x86_mscoff by default (or amd64).

Setting $DUB_ARCH is unacceptable as well.




More information about the Digitalmars-d mailing list