diff options
| author | Kaoru <[email protected]> | 2024-04-27 15:22:31 +0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2024-04-27 15:22:31 +0800 |
| commit | 598eff281e20c79d231e59db2bd91497bfce520e (patch) | |
| tree | 9bde81ba505ca667646b2c962556eb10baa7c767 | |
| parent | 835f9195e1c528f2644b9ddd0f6b9c6def710f44 (diff) | |
| parent | eab39cddb2fef56e3c5e716ff0bcb9c9b3a5bc3a (diff) | |
Merge branch 'xmake-io:master' into master
| -rw-r--r-- | xmake/core/sandbox/modules/import/lib/luajit/bcsave.lua | 8 | ||||
| -rw-r--r-- | xmake/modules/detect/sdks/find_mingw.lua | 4 | ||||
| -rw-r--r-- | xmake/plugins/show/lists/apis.lua | 4 |
3 files changed, 11 insertions, 5 deletions
diff --git a/xmake/core/sandbox/modules/import/lib/luajit/bcsave.lua b/xmake/core/sandbox/modules/import/lib/luajit/bcsave.lua index 3f88155cc..a23523b4d 100644 --- a/xmake/core/sandbox/modules/import/lib/luajit/bcsave.lua +++ b/xmake/core/sandbox/modules/import/lib/luajit/bcsave.lua @@ -23,6 +23,10 @@ local io = require("base/io") local string = require("base/string") local raise = require("sandbox/modules/raise") +if not xmake._LUAJIT then + return +end + -- save lua file to bitcode file -- -- @param luafile the lua file @@ -45,6 +49,4 @@ function main(luafile, bcfile, opt) end end -if xmake._LUAJIT then - return main -end +return main diff --git a/xmake/modules/detect/sdks/find_mingw.lua b/xmake/modules/detect/sdks/find_mingw.lua index 69b6a1df9..4085a6cb8 100644 --- a/xmake/modules/detect/sdks/find_mingw.lua +++ b/xmake/modules/detect/sdks/find_mingw.lua @@ -34,7 +34,11 @@ function _find_mingwdir(sdkdir) if is_host("macosx", "linux") and os.isdir("/opt/llvm-mingw") then sdkdir = "/opt/llvm-mingw" elseif is_host("macosx") and os.isdir("/usr/local/opt/mingw-w64") then + -- for macOS Intel sdkdir = "/usr/local/opt/mingw-w64" + elseif is_host("macosx") and os.isdir("/opt/homebrew/opt/mingw-w64") then + -- for Apple Silicon + sdkdir = "/opt/homebrew/opt/mingw-w64" elseif is_host("linux") then sdkdir = "/usr" elseif is_subhost("msys") then diff --git a/xmake/plugins/show/lists/apis.lua b/xmake/plugins/show/lists/apis.lua index 7e481b206..6e74bb6a8 100644 --- a/xmake/plugins/show/lists/apis.lua +++ b/xmake/plugins/show/lists/apis.lua @@ -275,14 +275,14 @@ function script_extension_module_apis() local moduledirs = module.directories() for _, moduledir in ipairs(moduledirs) do moduledir = path.absolute(moduledir) - local modulefiles = os.files(path.join(moduledir, "**.lua|xmake.lua|private/**.lua|core/tools/**.lua|detect/tools/**.lua")) + local modulefiles = os.files(path.join(moduledir, "**.lua|**/xmake.lua|private/**.lua|core/tools/**.lua|detect/tools/**.lua")) if modulefiles then for _, modulefile in ipairs(modulefiles) do local modulename = path.relative(modulefile, moduledir) if path.filename(modulename) == "main.lua" then modulename = path.directory(modulename) end - modulename = modulename:gsub("/", "."):gsub("%.lua", "") + modulename = modulename:gsub("[\\/]", "."):gsub("%.lua", "") local instance = import(modulename, {try = true, anonymous = true}) if instance then if _is_callable(instance) then |
