diff options
| author | ruki <[email protected]> | 2020-08-26 23:27:15 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2020-08-26 23:27:15 +0800 |
| commit | eec4437eeefde00f583a26eab860641975c5613b (patch) | |
| tree | c4d9412e4781350bfd8073d080bf034e09ff6019 | |
| parent | ac25a656e8bef9274a98f76c78626a2aeb514d33 (diff) | |
add winapi includes for tcc
| -rw-r--r-- | xmake/modules/core/tools/tcc.lua | 19 | ||||
| -rw-r--r-- | xmake/toolchains/tinyc/xmake.lua | 5 |
2 files changed, 5 insertions, 19 deletions
diff --git a/xmake/modules/core/tools/tcc.lua b/xmake/modules/core/tools/tcc.lua index 62a5f970c..8e1209465 100644 --- a/xmake/modules/core/tools/tcc.lua +++ b/xmake/modules/core/tools/tcc.lua @@ -28,13 +28,6 @@ import("private.tools.ccache") -- init it function init(self) - -- init mxflags - self:set("mxflags", "-fmessage-length=0" - , "-pipe" - , "-DIBOutlet=__attribute__((iboutlet))" - , "-DIBOutletCollection(ClassName)=__attribute__((iboutletcollection(ClassName)))" - , "-DIBAction=void)__attribute__((ibaction)") - -- init shflags self:set("shflags", "-shared", "-rdynamic") @@ -58,36 +51,26 @@ end -- make the strip flag function nf_strip(self, level) - - -- the maps local maps = { debug = "-S" , all = "-s" } - - -- make it return maps[level] end -- make the symbol flag function nf_symbol(self, level) - - -- the maps local maps = { debug = "-g" , hidden = "-fvisibility=hidden" } - - -- make it return maps[level] end -- make the warning flag function nf_warning(self, level) - - -- the maps local maps = { none = "-w" @@ -98,8 +81,6 @@ function nf_warning(self, level) , everything = "-Wall -Wunsupported -Wwrite-strings" , error = "-Werror" } - - -- make it return maps[level] end diff --git a/xmake/toolchains/tinyc/xmake.lua b/xmake/toolchains/tinyc/xmake.lua index 3ef83a678..66a0fffa5 100644 --- a/xmake/toolchains/tinyc/xmake.lua +++ b/xmake/toolchains/tinyc/xmake.lua @@ -83,6 +83,11 @@ toolchain("tinyc") if os.isdir(includedir) then toolchain:add("includedirs", includedir) end + local winenv_tcc_winapi = path.join(os.programdir(), "winenv", "tcc", "winapi", "include") + if is_host("windows") and os.isdir(winenv_tcc_winapi) then + toolchain:add("includedirs", winenv_tcc_winapi) + toolchain:add("includedirs", path.join(winenv_tcc_winapi, "winapi")) + end local linkdir = path.join(sdkdir, "lib") if os.isdir(linkdir) then toolchain:add("linkdirs", linkdir) |
