From 1bccfc273af2b1d579d033324bca481e15c58653 Mon Sep 17 00:00:00 2001 From: ruki Date: Sun, 29 Mar 2026 22:49:37 +0800 Subject: fix const limit on lua5.5 --- xmake/rules/platform/linux/module/driver_modules.lua | 3 +++ 1 file changed, 3 insertions(+) (limited to 'xmake/rules/platform/linux/module/driver_modules.lua') diff --git a/xmake/rules/platform/linux/module/driver_modules.lua b/xmake/rules/platform/linux/module/driver_modules.lua index 689e3d0c7..f7d90a781 100644 --- a/xmake/rules/platform/linux/module/driver_modules.lua +++ b/xmake/rules/platform/linux/module/driver_modules.lua @@ -117,10 +117,12 @@ module_exit(hello_exit); if result then -- we can also split ';' for the muliple commands for _, line in ipairs(result:split("[\n;]")) do + local line = line line = line:trim() if line:endswith("stub.c") then local include_cflag = false for _, cflag in ipairs(line:split("%s+")) do + local cflag = cflag local has_cflag = false if cflag:startswith("-fplugin=") then -- @see https://github.com/xmake-io/xmake/issues/3279 @@ -172,6 +174,7 @@ module_exit(hello_exit); if ldflags then local ko = ldflags:find("-T ", 1, true) for _, ldflag in ipairs(os.argv(ldflags)) do + local ldflag = ldflag if ldflag:endswith(".lds") then if not path.is_absolute(ldflag) then ldflag = path.absolute(ldflag, builddir or sdkdir) -- cgit v1.3.1