mirror of
https://github.com/ziglang/zig.git
synced 2024-11-14 16:13:24 +00:00
fixed native target detection
This commit is contained in:
parent
1428ef3b07
commit
e6446dfc86
@ -211,6 +211,9 @@ else()
|
||||
set(ZIG_LLD_COMPILE_FLAGS "-std=c++11 -D_CRT_SECURE_NO_WARNINGS /w")
|
||||
else()
|
||||
set(ZIG_LLD_COMPILE_FLAGS "-std=c++11 -fno-exceptions -fno-rtti -Wno-comment")
|
||||
if(MINGW)
|
||||
set(ZIG_LLD_COMPILE_FLAGS "${ZIG_LLD_COMPILE_FLAGS} -D__STDC_FORMAT_MACROS -D__USE_MINGW_ANSI_STDIO -Wno-pedantic-ms-format")
|
||||
endif()
|
||||
endif()
|
||||
set_target_properties(embedded_lld_lib PROPERTIES
|
||||
COMPILE_FLAGS ${ZIG_LLD_COMPILE_FLAGS}
|
||||
|
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user