diff options
| author | ruki <[email protected]> | 2024-04-03 00:44:55 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2024-04-03 00:44:55 +0800 |
| commit | 1cb62a5d466173ce4e8690eb320c44d5ddd6e1e2 (patch) | |
| tree | 8b573dd47167f04909784fac2b1bd58956ce9118 | |
| parent | 3099b75ce297e85be6c186f6ee1bf9fe644bdb95 (diff) | |
disable native shared module for luajit
| -rw-r--r-- | tests/projects/other/native_module/modules/shared/foo/xmake.lua | 6 | ||||
| -rw-r--r-- | tests/projects/other/native_module/test.lua | 4 | ||||
| -rw-r--r-- | xmake/rules/module/xmake.lua | 1 |
3 files changed, 5 insertions, 6 deletions
diff --git a/tests/projects/other/native_module/modules/shared/foo/xmake.lua b/tests/projects/other/native_module/modules/shared/foo/xmake.lua index 7d3899f95..ad4590ffa 100644 --- a/tests/projects/other/native_module/modules/shared/foo/xmake.lua +++ b/tests/projects/other/native_module/modules/shared/foo/xmake.lua @@ -1,10 +1,6 @@ add_rules("mode.debug", "mode.release") -if xmake.luajit() then - add_requires("luajit", {alias = "lua"}) -else - add_requires("lua 5.4") -end +add_requires("lua 5.4") target("foo") add_rules("module.shared") diff --git a/tests/projects/other/native_module/test.lua b/tests/projects/other/native_module/test.lua index b57362078..0c2735866 100644 --- a/tests/projects/other/native_module/test.lua +++ b/tests/projects/other/native_module/test.lua @@ -1,3 +1,5 @@ function main(t) - t:build() + if not xmake.luajit() then + t:build() + end end diff --git a/xmake/rules/module/xmake.lua b/xmake/rules/module/xmake.lua index 34b3110ec..f70c71d7e 100644 --- a/xmake/rules/module/xmake.lua +++ b/xmake/rules/module/xmake.lua @@ -29,6 +29,7 @@ rule("module.binary") rule("module.shared") add_deps("utils.symbols.export_all") on_load(function (target) + assert(not xmake.luajit(), "rule(module.shared) only support for lua54 runtime!") import("core.project.config") target:set("kind", "shared") target:set("basename", "module_" .. target:name()) |
