-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathxmake.lua
54 lines (47 loc) · 1.08 KB
/
xmake.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
add_rules(
"mode.tsan", "mode.ubsan", "mode.asan",
"mode.debug", "mode.release", "mode.valgrind"
)
add_requires(
"gflags",
"gtest",
"concurrentqueue master",
"magic_enum",
"fmt"
)
includes("toolpex")
set_languages("c++23", "c17")
set_policy("build.warning", true)
set_policy("build.optimization.lto", false)
set_toolset("cc", "mold", {force = true})
if not is_mode("release") then
add_defines("KOIOS_DEBUG", {force = true})
end
if is_mode("asan") then
add_cxxflags("-fno-inline", {force = true})
set_optimize("none", {force = true})
end
if is_mode("release") then
set_optimize("fastest", {force = true})
end
target("koios")
set_kind("shared")
add_deps("toolpex")
add_packages(
"gflags",
"concurrentqueue",
"spdlog",
"fmt",
"magic_enum",
{ public = true }
)
set_warnings("all", "error")
add_cxflags("-Wconversion", { force = true })
add_syslinks(
"uring"
)
add_files( "src/*.cc")
add_includedirs(
"include",
{ public = true }
)