comparison dmd/mars.c @ 566:68d7df3f9b05

Added some sanity checks for target detection.
author Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
date Sun, 31 Aug 2008 18:51:14 +0200
parents cbe08531430f
children f75b16f1e405
comparison
equal deleted inserted replaced
565:3c07287765bc 566:68d7df3f9b05
338 #elif __APPLE__ 338 #elif __APPLE__
339 global.params.os = OSMacOSX; 339 global.params.os = OSMacOSX;
340 #else 340 #else
341 #error 341 #error
342 #endif /* linux */ 342 #endif /* linux */
343
344 assert(global.params.os != OSinvalid);
343 345
344 //VersionCondition::addPredefinedGlobalIdent("D_Bits"); 346 //VersionCondition::addPredefinedGlobalIdent("D_Bits");
345 VersionCondition::addPredefinedGlobalIdent("all"); 347 VersionCondition::addPredefinedGlobalIdent("all");
346 348
347 #if _WIN32 349 #if _WIN32
765 } 767 }
766 else { 768 else {
767 assert(0 && "Invalid arch"); 769 assert(0 && "Invalid arch");
768 } 770 }
769 771
772 assert(global.params.cpu != ARCHinvalid);
773
770 if (allowForceEndianness && global.params.forceBE) { 774 if (allowForceEndianness && global.params.forceBE) {
771 VersionCondition::addPredefinedGlobalIdent("BigEndian"); 775 VersionCondition::addPredefinedGlobalIdent("BigEndian");
772 global.params.isLE = false; 776 global.params.isLE = false;
773 } 777 }
774 else if (global.params.isLE) { 778 else if (global.params.isLE) {