summaryrefslogtreecommitdiff
path: root/xmake/rules/platform/linux/driver/driver_modules.lua
diff options
context:
space:
mode:
authorluna <[email protected]>2022-09-28 18:45:22 +0800
committerluna <[email protected]>2022-09-28 18:45:22 +0800
commit37ae24cdad9f7ab1b1af0f503ae7e3457d4b3a2b (patch)
tree07d8bab75acb8d28786c3abc5c193840e1c9f865 /xmake/rules/platform/linux/driver/driver_modules.lua
parent575706825c48cfb9af0d22cc88ff4f826a917455 (diff)
Fix Linux driver multi-target build error
Diffstat (limited to 'xmake/rules/platform/linux/driver/driver_modules.lua')
-rw-r--r--xmake/rules/platform/linux/driver/driver_modules.lua4
1 files changed, 3 insertions, 1 deletions
diff --git a/xmake/rules/platform/linux/driver/driver_modules.lua b/xmake/rules/platform/linux/driver/driver_modules.lua
index 3dae19523..45f77d3a0 100644
--- a/xmake/rules/platform/linux/driver/driver_modules.lua
+++ b/xmake/rules/platform/linux/driver/driver_modules.lua
@@ -53,7 +53,7 @@ end
-- get cflags from make
function _get_cflags_from_make(target, sdkdir)
- local key = target:plat() .. target:arch()
+ local key = sdkdir
local cflags = memcache.get2("linux.driver", key, "cflags")
local ldflags_o = memcache.get2("linux.driver", key, "ldflags_o")
local ldflags_ko = memcache.get2("linux.driver", key, "ldflags_ko")
@@ -179,6 +179,8 @@ module_exit(hello_exit);
end
os.tryrm(tmpdir)
memcache.set2("linux.driver", key, "cflags", cflags or false)
+ memcache.set2("linux.driver", key, "ldflags_o", ldflags_o or false)
+ memcache.set2("linux.driver", key, "ldflags_ko", ldflags_ko or false)
end
return cflags or nil, ldflags_o or nil, ldflags_ko or nil
end