introduces ios support? still needs metal
This commit is contained in:
@@ -2,6 +2,44 @@
|
||||
#include "tier1/commandline.h"
|
||||
#include "tier1/utlstring.h"
|
||||
|
||||
|
||||
CUtlString Target_t::GetTriplet()
|
||||
{
|
||||
CUtlString triplet = "";
|
||||
|
||||
if ( cpu == TARGET_CPU_AMD64 )
|
||||
triplet.AppendTail("x86_64");
|
||||
if ( cpu == TARGET_CPU_AARCH64 )
|
||||
triplet.AppendTail("aarch64");
|
||||
triplet.AppendTail("-");
|
||||
if ( kernel == TARGET_KERNEL_WINDOWS )
|
||||
triplet.AppendTail("pc-windows-gnu");
|
||||
if ( kernel == TARGET_KERNEL_LINUX )
|
||||
triplet.AppendTail("unknown-linux-gnu");
|
||||
if ( kernel == TARGET_KERNEL_DARWIN )
|
||||
triplet.AppendTail("apple-darwin");
|
||||
if ( kernel == TARGET_KERNEL_IOS )
|
||||
triplet.AppendTail("apple-ios");
|
||||
|
||||
|
||||
return triplet;
|
||||
}
|
||||
Target_t Target_t::HostTarget()
|
||||
{
|
||||
ETargetKernel kernel =
|
||||
#if defined(__linux__)
|
||||
TARGET_KERNEL_LINUX
|
||||
#elif defined(__APPLE__)
|
||||
TARGET_KERNEL_DARWIN
|
||||
#endif
|
||||
;
|
||||
ETargetCPU cpu = TARGET_CPU_AMD64;
|
||||
return {
|
||||
.kernel = kernel,
|
||||
.cpu = cpu,
|
||||
.optimization = TARGET_DEBUG,
|
||||
};
|
||||
};
|
||||
Target_t Target_t::DefaultTarget()
|
||||
{
|
||||
CUtlString szDevice = ICommandLine::ParamValue("-device");
|
||||
@@ -16,6 +54,10 @@ Target_t Target_t::DefaultTarget()
|
||||
#endif
|
||||
;
|
||||
ETargetCPU cpu = TARGET_CPU_AMD64;
|
||||
if ( szArch == "x86_64" )
|
||||
cpu = TARGET_CPU_AMD64;
|
||||
else if ( szArch == "aarch64" )
|
||||
cpu = TARGET_CPU_AARCH64;
|
||||
|
||||
if ( szOS == "windows" )
|
||||
kernel = TARGET_KERNEL_WINDOWS;
|
||||
@@ -23,6 +65,8 @@ Target_t Target_t::DefaultTarget()
|
||||
kernel = TARGET_KERNEL_LINUX;
|
||||
else if ( szOS == "macos" )
|
||||
kernel = TARGET_KERNEL_DARWIN;
|
||||
else if ( szOS == "ios" )
|
||||
kernel = TARGET_KERNEL_IOS;
|
||||
else if ( szOS != 0 )
|
||||
V_printf("Unknown OS: %s\n", szOS.GetString());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user