object.di error

Johannes Pfau nospam at example.com
Fri Feb 10 02:36:43 PST 2012


When trying to add a --disable-libphobos switch to GCC I saw that GCC
already has code that makes it possible to --disable any target
library, although I think this is not documented in the configure --help
output.

Anyway, this means configure --disable-libphobos works fine and builds
a gdc without phobos. Obviously object.di isn't installed then and this
error pops up when trying to compile something:

object.d: Error: module object is in file 'object.d' which cannot be
read

However, for C-like code a completely empty object.di works fine, so
could we disable the object.di detection when -nostdlib or -nophoboslib
is passed, or at least make it a warning instead of an error?

Or add a new switch to ignore a missing object.di? It just doesn't seem
to make sense, that object.di must be there, but can be completely
empty.


More information about the D.gnu mailing list