Skip to content

Commit

Permalink
build: attempt to fix but still failed to link
Browse files Browse the repository at this point in the history
  • Loading branch information
Zijian Zhang committed Jan 22, 2024
1 parent ef7ec9a commit a6f3e22
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 39 deletions.
16 changes: 8 additions & 8 deletions .clangd
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
Diagnostics:
Suppress:
Suppress:
- "-Wmicrosoft-enum-forward-reference"
- "-Wc++11-narrowing"
- "-Wc++2b-extensions"
- "-Wmicrosoft-cast"
CompileFlags:
Add:
Add:
- "-ferror-limit=0"
- "-D__FUNCTION__=\"dummy\""
- "-Yumc/_HeaderOutputPredefine.h"
- "-FImc/_HeaderOutputPredefine.h" # clangd bug can't find pch file
Remove:
- "/Yu_HeaderOutputPredefine.h"
- "/FI_HeaderOutputPredefine.h"
- '-D__FUNCTION__="dummy"'
- "-Yusrc/ll/api/Global.h"
- "-FIsrc/ll/api/Global.h" # clangd bug can't find pch file
Remove:
- "/YuGlobal.h"
- "/FIGlobal.h"
53 changes: 22 additions & 31 deletions xmake.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,25 +2,21 @@ add_rules("mode.debug", "mode.release", "mode.releasedbg")

add_repositories("liteldev-repo https://github.com/LiteLDev/xmake-repo.git")
add_requires(
"simpleini v4.19",
"toml++ 3.4.0",
"sqlite3 3.43.0+200",
"mariadb-connector-c 3.3.4",
"demangler v2.0.0",
"dyncall 1.4",
"lightwebsocketclient 1.0.0",
"demangler 2.0.0",
"legacymoney 0.1.5",
"legacyparticleapi 0.1.1",
"levilamina 0.5.1",
"legacymoney",
"legacyparticleapi"
"lightwebsocketclient 1.0.0",
"mariadb-connector-c 3.3.4",
"simpleini v4.19",
"sqlite3 3.43.0+200",
"toml++ v3.4.0"
)
add_requires("cpp-httplib v0.14.0", {configs = {ssl=true, zlib=true}})
add_requires("scriptx", {configs={backend=get_config("backend")}})

if not has_config("vs_runtime") then
set_runtimes("MD")
end
add_requires("scriptx 0.1.0", {configs={backend=get_config("backend")}})

local LLSE_BACKEND = "LUA"
set_runtimes("MD") -- For compatibility with the /MT build configuration of ScriptX.

option("backend")
set_default("lua")
Expand Down Expand Up @@ -63,7 +59,7 @@ target("legacy-script-engine")
"/utf-8"
)
add_defines(
"_HAS_CXX23=1", -- To enable C++23 features
"_HAS_CXX23=1", -- To enable C++23 features.
"_WIN32_WINNT=0x0601",
"_AMD64_",
"_CONSOLE",
Expand All @@ -73,7 +69,7 @@ target("legacy-script-engine")
"NDEBUG",
"NOMINMAX",
"UNICODE",
"LLSE_BACKEND_" .. LLSE_BACKEND,
"LLSE_BACKEND_LUA",
"ENTT_PACKED_PAGE=128"
)
add_files(
Expand All @@ -83,28 +79,23 @@ target("legacy-script-engine")
"src"
)
add_packages(
"cpp-httplib",
"demangler",
"dyncall",
"legacymoney",
"legacyparticleapi",
"levilamina",
"lightwebsocketclient",
"mariadb-connector-c",
"scriptx",
"nlohmann_json",
"simpleini",
"toml++",
"magic_enum",
"leveldb",
"rapidjson",
"cpp-httplib",
"sqlite3",
"mariadb-connector-c",

"dyncall",
"lightwebsocketclient",
"demangler",
"legacymoney",
"legacyparticleapi"
"toml++"
)
add_shflags(
"/DELAYLOAD:bedrock_server.dll"
"/DELAYLOAD:bedrock_server.dll" -- To allow including Minecraft headers without linking.
)
set_basename("legacy-script-engine-$(backend)")
set_exceptions("none") -- To avoid conflicts with /EHa
set_exceptions("none") -- To avoid conflicts with /EHa.
set_kind("shared")
set_languages("cxx20")

0 comments on commit a6f3e22

Please sign in to comment.