Decide tix build triplets on Sortix without running cc.

This commit is contained in:
Jonas 'Sortie' Termansen 2015-07-25 22:53:05 +02:00
parent 1080ffa5fb
commit 14a47ea15e
1 changed files with 7 additions and 0 deletions

View File

@ -459,6 +459,13 @@ char* GetBuildTriplet()
const char* env_host = getenv("BUILD");
if ( env_host )
return strdup(env_host);
#if defined(__sortix__) && defined(__i386__)
return strdup("i486-sortix");
#elif defined(__sortix__) && defined(__x86_64__)
return strdup("x86_64-sortix");
#elif defined(__sortix__)
#warning "Add your build triplet here"
#endif
FILE* fp = popen("cc -dumpmachine", "r");
if ( !fp )
return NULL;