fixed native target detection

This commit is contained in:
emekoi
2018-09-30 01:34:38 -05:00
committed by Andrew Kelley
parent 1428ef3b07
commit e6446dfc86
2 changed files with 4 additions and 1 deletions

View File

@@ -712,7 +712,7 @@ void ZigLLVMGetNativeTarget(ZigLLVM_ArchType *arch_type, ZigLLVM_SubArchType *su
ZigLLVM_ObjectFormatType *oformat)
{
char *native_triple = LLVMGetDefaultTargetTriple();
Triple triple(native_triple);
Triple triple(Triple::normalize(native_triple));
*arch_type = (ZigLLVM_ArchType)triple.getArch();
*sub_arch_type = (ZigLLVM_SubArchType)triple.getSubArch();