aboutsummaryrefslogtreecommitdiff
path: root/src/target.hpp
diff options
context:
space:
mode:
authorVexu <15308111+Vexu@users.noreply.github.com>2019-07-17 01:20:59 +0300
committerGitHub <noreply@github.com>2019-07-17 01:20:59 +0300
commitf8e753e19c013cc605a951e5038b4a26099aa135 (patch)
tree3cbb2ce1b8815bc565344e23a39e3d39505cfd31 /src/target.hpp
parent0063953d1634ce770ce88519c66e3956832ceb7e (diff)
parent158e2312ea5f680b7c8598ef578aefb6cbdd3372 (diff)
downloadzig-f8e753e19c013cc605a951e5038b4a26099aa135.tar.gz
zig-f8e753e19c013cc605a951e5038b4a26099aa135.zip
Merge branch 'master' into comment-in-array
Diffstat (limited to 'src/target.hpp')
-rw-r--r--src/target.hpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/target.hpp b/src/target.hpp
index 7fca430df6..e7e102a8ce 100644
--- a/src/target.hpp
+++ b/src/target.hpp
@@ -77,12 +77,19 @@ enum TargetSubsystem {
TargetSubsystemAuto
};
+struct ZigGLibCVersion {
+ uint32_t major; // always 2
+ uint32_t minor;
+ uint32_t patch;
+};
+
struct ZigTarget {
ZigLLVM_ArchType arch;
ZigLLVM_SubArchType sub_arch;
ZigLLVM_VendorType vendor;
Os os;
ZigLLVM_EnvironmentType abi;
+ ZigGLibCVersion *glibc_version; // null means default
bool is_native;
};
@@ -105,6 +112,8 @@ Error target_parse_archsub(ZigLLVM_ArchType *arch, ZigLLVM_SubArchType *sub,
Error target_parse_os(Os *os, const char *os_ptr, size_t os_len);
Error target_parse_abi(ZigLLVM_EnvironmentType *abi, const char *abi_ptr, size_t abi_len);
+Error target_parse_glibc_version(ZigGLibCVersion *out, const char *text);
+
size_t target_arch_count(void);
ZigLLVM_ArchType target_arch_enum(size_t index);
const char *target_arch_name(ZigLLVM_ArchType arch);
@@ -139,7 +148,8 @@ const char *target_oformat_name(ZigLLVM_ObjectFormatType oformat);
ZigLLVM_ObjectFormatType target_object_format(const ZigTarget *target);
void get_native_target(ZigTarget *target);
-void get_target_triple(Buf *triple, const ZigTarget *target);
+void target_triple_llvm(Buf *triple, const ZigTarget *target);
+void target_triple_zig(Buf *triple, const ZigTarget *target);
void init_all_targets(void);