summaryrefslogtreecommitdiff
path: root/xmake/scripts/platform/platform.lua
diff options
context:
space:
mode:
Diffstat (limited to 'xmake/scripts/platform/platform.lua')
-rw-r--r--xmake/scripts/platform/platform.lua63
1 files changed, 0 insertions, 63 deletions
diff --git a/xmake/scripts/platform/platform.lua b/xmake/scripts/platform/platform.lua
index bd1f79485..3f9d2feec 100644
--- a/xmake/scripts/platform/platform.lua
+++ b/xmake/scripts/platform/platform.lua
@@ -29,8 +29,6 @@ local path = require("base/path")
local utils = require("base/utils")
local config = require("base/config")
local global = require("base/global")
-local linker = require("linker/linker")
-local compiler = require("compiler/compiler")
-- load prober the given platform directory
function platform._load_prober(root)
@@ -205,67 +203,6 @@ function platform.format(kind)
end
--- get the linker from the given name
-function platform.linker(kind)
-
- -- check
- assert(kind)
-
- -- init linkers
- platform._LINKERS = platform._LINKERS or {}
- local linkers = platform._LINKERS
-
- -- return it directly if the linker has been cached
- local l = linkers[kind]
- if l then return l end
-
- -- get linker
- local c = platform.get("linker")
- assert(c)
-
- -- load linker
- c = c[kind]
- if c then return linker.load(c) end
-
- -- cache this linker
- linkers[kind] = l
-
- -- ok
- return l
-end
-
--- get the compiler from the given source file
-function platform.compiler(srcfile)
-
- -- get the source file type
- local filetype = compiler.filetype(srcfile)
- if not filetype then
- return
- end
-
- -- init compilers
- platform._COMPILERS = platform._COMPILERS or {}
- local compilers = platform._COMPILERS
-
- -- return it directly if the compiler has been cached
- local c = compilers[filetype]
- if c then return c, filetype end
-
- -- get compiler from the current platform
- c = platform.get("compiler")
- assert(c)
-
- -- load compiler
- c = c[filetype]
- if c then c = compiler.load(c) end
-
- -- cache this compiler
- compilers[filetype] = c
-
- -- ok
- return c, filetype
-end
-
-- dump the platform configure
function platform.dump()