On Mon, 15 Aug 2011 15:23:27 +0200, Mafi <[email protected]> wrote:

While thinking about DIP11 I had an idea:
Couldn't the program output dmd flags to stdout. That way the library could be automatically build and there are many other possibilities:
- linking with something
- some needed compilation flags for the lib
etc
What do you think about this?


I think we should find a better way to support this scenario for binary distributions. With the current draft you would need to put pragma(lib, "mylib") into the remote sources and the package tool would need to make sure the library is in place before linking. So we should at least pass machine info and compilation flags to the package tool. Then it would have the possibility of downloading/building a platform specific library
and set everything up for linking.
A flag response of the tool on stdout could be useful, it would require
a widened interface between compiler/package tool.
But if there is too many information going back and forth it is a clear indication
that the tool should be the driver.

I don't think anything like that is good for source distributions because now the package tool would need to know how to build a specific library. Not capturing the knowledge of building in the source code would again require meta-data/source parsing. So it wouldn't be much better
than using a plain package tool.

martin

Reply via email to