Add `linkerSettings` to `.binaryTarget`
keith opened this issue · comments
Description
Would it be reasonable to add the linkerSettings
parameter to .binaryTarget
? It seems to me that you could be just as likely to want to add linker settings, like -dead_strip
or something, from a binary target as a normal target
Expected behavior
No response
Actual behavior
No response
Steps to reproduce
No response
Swift Package Manager version/commit hash
No response
Swift & OS version (output of swift --version && uname -a
)
No response
@neonichu @abertelrud wdyt?
I am not 100% sure what that would mean, could you elaborate? In principle, we are not running any commands for a binary target, so those settings wouldn't really go anywhere. Or do you mean in order to impart them to clients of the binary target?
Ah yes I mean that they would propagate up the dependency tree to the final consumer, but I see now that I wasn't clear enough about this, since it's more clear in the case of static binary targets than dynamic ones. But I imagine the semantics would be similar to the existing target types' as well.
Yah, I think that's reasonable. I am not 100% sure off hand if there are any existing linkerSettings
that we don't propagate that we should warn/error about in the special case of binary targets, but generally speaking this makes sense to me.