Adding compiler and linker arguments

What do you all think about adding the ability to manually add compiler and linker flags in the package manifest? This can already done with the `-Xswiftc` and `-Xlinker` arguments on the command line, but I think it would nice to be able to set these a bit more permanently. A couple ways I figure this could be done are

1. Add the package directory to the pkg-config search path. Then the arguments can be set by a `.pc` file in the package

2. Add two arguments to the `Package` definition, one for the cc flags and one for the linker. Perhaps they'd just be named 'Xswiftc' and 'Xlinker', but other names may be better.

This maybe isn't very useful for package written in Swift, but for system modules and packages with C code I think it would be very helpful

1 Like