mirror of
https://gitlab.com/sortix/sortix.git
synced 2023-02-13 20:55:38 -05:00
Decide tix build triplets on Sortix without running cc.
This commit is contained in:
parent
1080ffa5fb
commit
14a47ea15e
1 changed files with 7 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue