wasm: use .wasm ext for exe

This commit is contained in:
Shritesh Bhattarai
2019-04-12 10:54:15 -05:00
committed by Andrew Kelley
parent 6284a4c534
commit 63f2e96eea
3 changed files with 8 additions and 2 deletions

View File

@@ -965,6 +965,8 @@ const char *target_exe_file_ext(const ZigTarget *target) {
return ".exe";
} else if (target->os == OsUefi) {
return ".efi";
} else if (target_is_wasm(target)) {
return ".wasm";
} else {
return "";
}
@@ -1365,6 +1367,10 @@ bool target_is_musl(const ZigTarget *target) {
return target->os == OsLinux && target_abi_is_musl(target->abi);
}
bool target_is_wasm(const ZigTarget *target) {
return target->arch == ZigLLVM_wasm32 || target->arch == ZigLLVM_wasm64;
}
ZigLLVM_EnvironmentType target_default_abi(ZigLLVM_ArchType arch, Os os) {
switch (os) {
case OsFreestanding: