Fixed choosing default target machine without needing to link in targets.

This commit is contained in:
Tomas Lindquist Olsen
2008-09-07 17:44:25 -07:00
parent 88f9ca75ad
commit f411df11e3
3 changed files with 13 additions and 30 deletions

View File

@@ -41,9 +41,6 @@
void getenv_setargv(const char *envvar, int *pargc, char** *pargv);
// llvmdc
void findDefaultTarget();
Global global;
Global::Global()
@@ -753,7 +750,18 @@ int main(int argc, char *argv[])
bool allowForceEndianness = false;
if (global.params.llvmArch == 0) {
findDefaultTarget();
#if defined(__x86_64__) || defined(_M_X64)
global.params.llvmArch = "x86-64";
#elif defined(__i386__) || defined(_M_IX86)
global.params.llvmArch = "x86";
#elif defined(__ppc__) || defined(_M_PPC)
if (global.params.is64bit)
global.params.llvmArch = "ppc64";
else
global.params.llvmArch = "ppc32";
#else
#error
#endif
}
if (strcmp(global.params.llvmArch,"x86")==0) {