diff options
| author | ruki <[email protected]> | 2023-02-22 22:36:46 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2023-02-22 22:36:46 +0800 |
| commit | 22b0536a5276dff8afca8f1f785521a6b88fece4 (patch) | |
| tree | 016780deb102b3a65bdd94433eb0cb9b3897b6bd | |
| parent | 182613fd26ca880aa925fc02541cbf7f51104dd4 (diff) | |
always use static library for wasm
| -rw-r--r-- | xmake/modules/private/action/require/impl/package.lua | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/xmake/modules/private/action/require/impl/package.lua b/xmake/modules/private/action/require/impl/package.lua index 9af8d6f3d..f85a0095c 100644 --- a/xmake/modules/private/action/require/impl/package.lua +++ b/xmake/modules/private/action/require/impl/package.lua @@ -306,7 +306,12 @@ function _add_package_configurations(package) package:add("configs", "debug", {builtin = true, description = "Enable debug symbols.", default = false, type = "boolean"}) end if package:extraconf("configs", "shared", "default") == nil then - package:add("configs", "shared", {builtin = true, description = "Build shared library.", default = false, type = "boolean"}) + -- we always use static library if it's for wasm platform + local readonly + if package:is_plat("wasm") then + readonly = true + end + package:add("configs", "shared", {builtin = true, description = "Build shared library.", default = false, readonly = readonly, type = "boolean"}) end if package:extraconf("configs", "pic", "default") == nil then package:add("configs", "pic", {builtin = true, description = "Enable the position independent code.", default = true, type = "boolean"}) |
