Skip to content

Commit 54b4f94

Browse files
committed
bugfix: fix link issue, change moduleonly to static
1 parent 191ae30 commit 54b4f94

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

xmake.lua

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,18 @@ add_requires("libcurl 8.11.0")
77
set_languages("c++23")
88

99
target("llmapi")
10-
set_kind("moduleonly")
10+
--set_kind("moduleonly") -- link failed issue when other lib reference llmapi
11+
set_kind("static")
1112
add_files("src/*.cppm", { public = true, install = true })
12-
add_packages("libcurl", { public = true })
13+
add_packages("libcurl")
1314
--add_deps("__nlohmann_json")
1415
add_includedirs("src/json")
1516
add_headerfiles("src/json/json.hpp")
1617
add_files("src/json/json.cppm", { public = true })
1718
-- relocation R_X86_64_32 against `.rodata' can not be used when making a shared object; recompile with -fPIC
1819
-- ld: failed to set dynamic section sizes: bad value
1920
-- collect2: error: ld returned 1 exit status
20-
--add_cxxflags("-fPIC")
21+
add_cxxflags("-fPIC")
2122

2223
target("llmapi_c")
2324
--set_kind("shared")

0 commit comments

Comments
 (0)