dlang / dub

Package and build management system for D
MIT License
673 stars 230 forks source link

Platform filters may have a surprising behavior when cross compiling using --arch #2831

Open MrcSnm opened 8 months ago

MrcSnm commented 8 months ago

System information

Bug Description

This is related to how dub --arch works.

Think about how libs-windows works. They are not libraries to be included when your host OS is windows, but when your target is. This is an okay behavior when you're cross compiling, but it also generates a problem:

postBuildCommands, preGenerateCommands and other from commands family, since you're cross compiling, they should use the HOST as filter instead of target. This is important since when you're running on Windows, you won't magically get access to posix like commands.

How to reproduce?

Expected Behavior

commands family configuration should use host as platform filter instead of arch.

Logs