summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2021-05-17 23:09:05 +0800
committerruki <[email protected]>2021-05-17 23:09:05 +0800
commit8f1fe3d243962b85f54a678cb9304882571746a1 (patch)
tree0fdd9eca9a10034c00805d8a99a838cd9487ecea
parent643c90fa3575924e122275a49c9d851394a76d88 (diff)
improve tinycc toolchain
-rw-r--r--xmake/toolchains/tinycc/xmake.lua9
1 files changed, 9 insertions, 0 deletions
diff --git a/xmake/toolchains/tinycc/xmake.lua b/xmake/toolchains/tinycc/xmake.lua
index 905b3944f..21bb7be08 100644
--- a/xmake/toolchains/tinycc/xmake.lua
+++ b/xmake/toolchains/tinycc/xmake.lua
@@ -82,4 +82,13 @@ toolchain("tinycc")
toolchain:add("toolset", "ld", tcc)
toolchain:add("toolset", "sh", tcc)
toolchain:add("toolset", "ar", tcc)
+
+ -- add includedirs and linkdirs
+ for _, package in ipairs(toolchain:packages()) do
+ local installdir = package:installdir()
+ if installdir then
+ toolchain:add("sysincludedirs", path.join(installdir, "include"))
+ toolchain:add("linkdirs", path.join(installdir, "lib"))
+ end
+ end
end)