dub
dub copied to clipboard
targetPath ignored when used with `platform` on Windows
System information
- dub version: 1.6.0
- OS Platform and distribution: Windows 10 64-bit
- compiler version dmd 2.077.1
Bug Description
dub build --arch=x86_mscoff ignores platform in targetPath and puts the binary in the wrong directory.
How to reproduce?
dub.sdl:
name "foo"
targetType "executable"
targetPath "bin\\32" platform="windows-x86_mscoff"
targetPath "bin\\64" platform="windows-x86_64"
souce/app.d:
void main() {}
Expected Behavior
The binary should be in bin\32
when built with --arch=x86_mscoff
, not bin\64
Any chance you could attach the output of dub build --arch=x86_mscoff --vverbose
?
The output is as expected, here's the end of it:
Performing "debug" build using dmd for x86, x86_mscoff.
foo ~master: target for configuration "application" is up to date.
Using existing build in C:\Users\atila\coding\d\experiments\dub_target_path\.dub\build\application-debug-windows-x86.x86_mscoff-dmd_2077-EE8ADD85F4F0CE5D50C99D8A255F6822\.
Copying target from C:\Users\atila\coding\d\experiments\dub_target_path\.dub\build\application-debug-windows-x86.x86_mscoff-dmd_2077-EE8ADD85F4F0CE5D50C99D8A255F6822\foo.exe to C:\Users\atila\coding\d\experiments\dub_target_path\bin\64
To force a rebuild of up-to-date targets, run again with --force.
It's working as specified, but I'm unsure why targetPath
doesn't support platform customization. So unless any unsolvable issue comes up, this definitely makes sense as an enhancement.
I have same problem on linux with x86
-arm
platform pair
targetPath "build/arm/bin" platform "arm"
targetPath "build/x86/bin" platform "x86"
always builds to build/x86/bin
dub version
DUB version 1.7.2, built on Feb 15 2018
Quick reading sources point me to packagerecipe.d
and BuildSettingsTemplate
I think all of those attributes doesn't accept platform
. All platform
-specificatable fields in BuildSettingsTemplate
is AA. Algorithms are corresponds.
Same problem 👍🏻