Mercurial > projects > ldc
diff dmd/module.c @ 708:fd5665da3a27
Hopefully sensible command switch handling. Changed default ext to .o on Windows.
author | Christian Kamm <kamm incasoftware de> |
---|---|
date | Thu, 16 Oct 2008 22:07:02 +0200 |
parents | bfe5229f9d8e |
children | dc8b8b7ea0c1 |
line wrap: on
line diff
--- a/dmd/module.c Wed Oct 15 20:22:18 2008 +0200 +++ b/dmd/module.c Thu Oct 16 22:07:02 2008 +0200 @@ -166,10 +166,17 @@ FileName::ensurePathExists(FileName::path(argobj)); - if (forcename) +// always append the extension! otherwise hard to make output switches consistent +// if (forcename) +// return new File(argobj); +// else + // allow for .o and .obj on windows +#if _WIN32 + if (ext == global.params.objdir && FileName::ext(argobj) + && stricmp(FileName::ext(argobj), global.obj_ext_alt) == 0) return new File(argobj); - else - return new File(FileName::forceExt(argobj, ext)); +#endif + return new File(FileName::forceExt(argobj, ext)); } void Module::buildTargetFiles()