motiejus/zig

fork of https://codeberg.org/ziglang/zig
git clone https://git.jakstys.lt/motiejus/zig.git
Log | Tree | Refs | README | LICENSE

commit 327ad0ae89c168a5e035f92f86617a29697bf6d8 (tree)
parent 1f7babbc80211e12c9a38ff2196d6ff8c5a19302
Author: Andrew Kelley <andrew@ziglang.org>
Date:   Tue, 21 Jan 2020 03:05:56 -0500

target_triple_llvm: emit none instead of unknown

Diffstat:
Msrc/target.cpp | 5++++-
1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/target.cpp b/src/target.cpp @@ -831,11 +831,14 @@ void init_all_targets(void) { void target_triple_zig(Buf *triple, const ZigTarget *target) { buf_resize(triple, 0); + const char *abi_name = target->abi == ZigLLVM_UnknownEnvironment ? + "none" : ZigLLVMGetEnvironmentTypeName(target->abi); + buf_appendf(triple, "%s%s-%s-%s", ZigLLVMGetArchTypeName(target->arch), ZigLLVMGetSubArchTypeName(target->sub_arch), ZigLLVMGetOSTypeName(get_llvm_os_type(target->os)), - ZigLLVMGetEnvironmentTypeName(target->abi)); + abi_name); } void target_triple_llvm(Buf *triple, const ZigTarget *target) {