no engine anymore
This commit is contained in:
@@ -1,8 +1,10 @@
|
||||
#include "target.h"
|
||||
#include "tier1/commandline.h"
|
||||
#include "tier1/utlstring.h"
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Generates triplet suitable for most compilers.
|
||||
//-----------------------------------------------------------------------------
|
||||
CUtlString Target_t::GetTriplet()
|
||||
{
|
||||
CUtlString triplet = "";
|
||||
@@ -11,15 +13,25 @@ CUtlString Target_t::GetTriplet()
|
||||
triplet.AppendTail("x86_64");
|
||||
if ( cpu == TARGET_CPU_AARCH64 )
|
||||
triplet.AppendTail("aarch64");
|
||||
if ( cpu == TARGET_CPU_WASM32 )
|
||||
triplet.AppendTail("wasm32");
|
||||
triplet.AppendTail("-");
|
||||
if ( kernel == TARGET_KERNEL_WINDOWS )
|
||||
triplet.AppendTail("pc-windows-gnu");
|
||||
if ( kernel == TARGET_KERNEL_UNKNOWN )
|
||||
triplet.AppendTail("unknown-unknown");
|
||||
if ( kernel == TARGET_KERNEL_LINUX )
|
||||
triplet.AppendTail("unknown-linux-gnu");
|
||||
if ( kernel == TARGET_KERNEL_WINDOWS )
|
||||
triplet.AppendTail("pc-windows-gnu");
|
||||
if ( kernel == TARGET_KERNEL_DARWIN )
|
||||
triplet.AppendTail("apple-darwin");
|
||||
if ( kernel == TARGET_KERNEL_IOS )
|
||||
triplet.AppendTail("apple-ios");
|
||||
if ( kernel == TARGET_KERNEL_ANDROID )
|
||||
triplet.AppendTail("linux-android");
|
||||
if ( kernel == TARGET_KERNEL_WASI )
|
||||
triplet.AppendTail("unknown-wasi");
|
||||
if ( kernel == TARGET_KERNEL_EMSCRIPTEN )
|
||||
triplet.AppendTail("unknown-emscripten");
|
||||
|
||||
|
||||
return triplet;
|
||||
@@ -40,11 +52,15 @@ Target_t Target_t::HostTarget()
|
||||
.optimization = TARGET_DEBUG,
|
||||
};
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// Returns default target for build
|
||||
//-----------------------------------------------------------------------------
|
||||
Target_t Target_t::DefaultTarget()
|
||||
{
|
||||
CUtlString szDevice = ICommandLine::ParamValue("-device");
|
||||
CUtlString szOS = ICommandLine::ParamValue("-os");
|
||||
CUtlString szArch = ICommandLine::ParamValue("-arch");
|
||||
CUtlString szDevice = CommandLine()->ParamValue("-device");
|
||||
CUtlString szOS = CommandLine()->ParamValue("-os");
|
||||
CUtlString szArch = CommandLine()->ParamValue("-arch");
|
||||
|
||||
ETargetKernel kernel =
|
||||
#if defined(__linux__)
|
||||
@@ -58,8 +74,12 @@ Target_t Target_t::DefaultTarget()
|
||||
cpu = TARGET_CPU_AMD64;
|
||||
else if ( szArch == "aarch64" )
|
||||
cpu = TARGET_CPU_AARCH64;
|
||||
else if ( szArch == "wasm32" )
|
||||
cpu = TARGET_CPU_WASM32;
|
||||
|
||||
if ( szOS == "windows" )
|
||||
if ( szOS == "unknown" )
|
||||
kernel = TARGET_KERNEL_UNKNOWN;
|
||||
else if ( szOS == "windows" )
|
||||
kernel = TARGET_KERNEL_WINDOWS;
|
||||
else if ( szOS == "linux" )
|
||||
kernel = TARGET_KERNEL_LINUX;
|
||||
@@ -67,6 +87,8 @@ Target_t Target_t::DefaultTarget()
|
||||
kernel = TARGET_KERNEL_DARWIN;
|
||||
else if ( szOS == "ios" )
|
||||
kernel = TARGET_KERNEL_IOS;
|
||||
else if ( szOS == "android" )
|
||||
kernel = TARGET_KERNEL_ANDROID;
|
||||
else if ( szOS != 0 )
|
||||
V_printf("Unknown OS: %s\n", szOS.GetString());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user