Skip to content

Commit 6eaa7b5

Browse files
committed
remove code_format for linux-arm64
1 parent 4c81f03 commit 6eaa7b5

File tree

3 files changed

+13
-3
lines changed

3 files changed

+13
-3
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
matrix:
2222
include:
2323
- { os: ubuntu-18.04, target: linux, platform: linux-x64 }
24-
- { os: ubuntu-20.04, target: linux, platform: linux-arm64 }
24+
- { os: ubuntu-18.04, target: linux, platform: linux-arm64 }
2525
- { os: macos-11, target: darwin, platform: darwin-x64 }
2626
- { os: macos-11, target: darwin, platform: darwin-arm64 }
2727
- { os: windows-latest, target: windows, platform: win32-ia32 }

make.lua

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ lm.bindir = "bin"
77
---@diagnostic disable-next-line: codestyle-check
88
lm.EXE_DIR = ""
99

10+
local includeCodeFormat = true
11+
1012
if platform.OS == 'macOS' then
1113
if lm.platform == nil then
1214
elseif lm.platform == "darwin-arm64" then
@@ -30,13 +32,16 @@ elseif platform.OS == 'Linux' then
3032
elseif lm.platform == "linux-x64" then
3133
elseif lm.platform == "linux-arm64" then
3234
lm.cc = 'aarch64-linux-gnu-gcc'
35+
includeCodeFormat = false
3336
else
3437
error "unknown platform"
3538
end
3639
end
3740

3841
lm:import "3rd/bee.lua/make.lua"
39-
lm:import "make/code_format.lua"
42+
if includeCodeFormat then
43+
lm:import "make/code_format.lua"
44+
end
4045

4146
lm:source_set 'lpeglabel' {
4247
rootdir = '3rd',
@@ -51,7 +56,7 @@ lm:executable "lua-language-server" {
5156
deps = {
5257
"lpeglabel",
5358
"source_bootstrap",
54-
"code_format",
59+
includeCodeFormat and "code_format" or nil,
5560
},
5661
includes = {
5762
"3rd/bee.lua",
@@ -63,6 +68,9 @@ lm:executable "lua-language-server" {
6368
"make/lua-language-server.rc",
6469
}
6570
},
71+
defines = {
72+
includeCodeFormat and 'CODE_FORMAT' or nil,
73+
},
6674
linux = {
6775
crt = "static",
6876
}

make/modules.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
extern "C" int luaopen_lpeglabel (lua_State *L);
44
static ::bee::lua::callfunc _init(::bee::lua::register_module, "lpeglabel", luaopen_lpeglabel);
55

6+
#ifdef CODE_FORMAT
67
extern "C" int luaopen_code_format(lua_State *L);
78
static ::bee::lua::callfunc _init_code_format(::bee::lua::register_module, "code_format",
89
luaopen_code_format);
10+
#endif

0 commit comments

Comments
 (0)