RejectedSoftware Forums

Sign up

Is it possible to conditionally include source for only 32bit DMD Windows compiler?

Is it possible to conditionally include source for only 32bit Windows compiler?

Currently my package.json file contains this:

"sourceFiles-windows-x86": ["lib/windows/x86/tcl86.lib", "lib/windows/x86/tk86.lib"],

This means link these omf format libs if this package is compiled on 32bit Windows and hence assuming the 32bit DMD compiler is used. There is a problem with this approach: is not robust enough!

What i really want this line to mean is that only include these omf format libs if i use the 32bit DMD compiler on 32 or 64bit Windows. For example, people might be using the 32bit DMD compiler on 64bit Windows.

Something like:

"sourceFiles-windows-dmd32": [...],

Is this possible with dub?

Re: Is it possible to conditionally include source for only 32bit DMD Windows compiler?

Am 12.01.2014 13:11, schrieb Gary Willoughby:

Is it possible to conditionally include source for only 32bit Windows compiler?

Currently my package.json file contains this:

 "sourceFiles-windows-x86": ["lib/windows/x86/tcl86.lib", "lib/windows/x86/tk86.lib"],

This means link these omf format libs if this package is compiled on 32bit Windows and hence assuming the 32bit DMD compiler is used. There is a problem with this approach: is not robust enough!

What i really want this line to mean is that only include these omf format libs if i use the 32bit DMD compiler on 32 or 64bit Windows. For example, people might be using the 32bit DMD compiler on 64bit Windows.

Something like:

 "sourceFiles-windows-dmd32": [...],

Is this possible with dub?

"sourceFiles-windows-x86-dmd" should do the trick. See also
http://code.dlang.org/package-format#build-settings (above the table).

Re: Is it possible to conditionally include source for only 32bit DMD Windows compiler?

On Sun, 12 Jan 2014 13:56:15 +0100, Sönke Ludwig wrote:

"sourceFiles-windows-x86-dmd" should do the trick. See also
http://code.dlang.org/package-format#build-settings (above the table).

Thanks what i was saying in my previous post was that this won't work if you are using a 32bit DMD compiler on 64bit Windows.

Re: Is it possible to conditionally include source for only 32bit DMD Windows compiler?

Am 12.01.2014 16:33, schrieb Gary Willoughby:

On Sun, 12 Jan 2014 13:56:15 +0100, Sönke Ludwig wrote:

"sourceFiles-windows-x86-dmd" should do the trick. See also
http://code.dlang.org/package-format#build-settings (above the table).

Thanks what i was saying in my previous post was that this won't work if you are using a 32bit DMD compiler on 64bit Windows.

I'm using that all the time, what doesn't work for you? What matters for
those suffixes isn't the system architecture, but the build architecture
(as specified with --arch=...).

Re: Is it possible to conditionally include source for only 32bit DMD Windows compiler?

On Sun, 12 Jan 2014 20:01:23 +0100, Sönke Ludwig wrote:

Am 12.01.2014 16:33, schrieb Gary Willoughby:

On Sun, 12 Jan 2014 13:56:15 +0100, Sönke Ludwig wrote:

"sourceFiles-windows-x86-dmd" should do the trick. See also
http://code.dlang.org/package-format#build-settings (above the table).

Thanks what i was saying in my previous post was that this won't work if you are using a 32bit DMD compiler on 64bit Windows.

I'm using that all the time, what doesn't work for you? What matters for
those suffixes isn't the system architecture, but the build architecture
(as specified with --arch=...).

Ah right, i didn't understand that i could force another architecture. That will work fine.