summaryrefslogtreecommitdiff
path: root/make
diff options
context:
space:
mode:
authoractboy168 <actboy168@gmail.com>2022-06-27 15:37:09 +0800
committerGitHub <noreply@github.com>2022-06-27 15:37:09 +0800
commit8f820796f40ec260598fdb0ecf5329c2f89be900 (patch)
tree44d34344df9815e19472343c11adb05837d3e04c /make
parent0db0e59ea3649d5be702b977073b5418c1d3b8ce (diff)
downloadlua-language-server-8f820796f40ec260598fdb0ecf5329c2f89be900.zip
Create detect_platform.lua
Diffstat (limited to 'make')
-rw-r--r--make/detect_platform.lua9
1 files changed, 8 insertions, 1 deletions
diff --git a/make/detect_platform.lua b/make/detect_platform.lua
index 8dba298c..52207f95 100644
--- a/make/detect_platform.lua
+++ b/make/detect_platform.lua
@@ -45,11 +45,18 @@ local function detectPosixArch()
return f:read 'l':lower()
end
+local ARCH <const> = {
+ x86_64 = 'x64',
+ i686 = 'ia32',
+ arm64 = 'arm64',
+}
+
local function detectArch()
if platform.OS == 'Windows' then
return detectWindowsArch()
end
- return detectPosixArch()
+ local posixArch = detectPosixArch()
+ return ARCH[posixArch]
end
local function targetPlatformArch()