diff options
| author | ruki <[email protected]> | 2023-10-27 03:50:01 -0500 |
|---|---|---|
| committer | GitHub <[email protected]> | 2023-10-27 03:50:01 -0500 |
| commit | 6af4b8528bfae7536fc77a5e7fb4341b3f11bc9a (patch) | |
| tree | 45bb260efc422e8692fc664ed80d9ddc9b56cb3c /xmake/modules/core/tools/cl.lua | |
| parent | eeda646a4e32b3d672a8097fe995cbdcf101c7aa (diff) | |
| parent | 1cb74a5009d8fbcb792aa6cc787943453cc5234a (diff) | |
Merge pull request #4314 from xmake-io/package
Support linkgroups and linkorders for package
Diffstat (limited to 'xmake/modules/core/tools/cl.lua')
| -rw-r--r-- | xmake/modules/core/tools/cl.lua | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/xmake/modules/core/tools/cl.lua b/xmake/modules/core/tools/cl.lua index 607f0f4d9..34927d179 100644 --- a/xmake/modules/core/tools/cl.lua +++ b/xmake/modules/core/tools/cl.lua @@ -88,7 +88,7 @@ function init(self) end -- make the symbol flags -function nf_symbols(self, levels, target) +function nf_symbols(self, levels, opt) local flags = nil local values = hashset.from(levels) if values:has("debug") then @@ -103,6 +103,7 @@ function nf_symbols(self, levels, target) -- generate *.pdb file local symbolfile = nil + local target = opt.target if target and target.symbolfile and not values:has("embed") then symbolfile = target:symbolfile() end @@ -296,7 +297,8 @@ function nf_includedir(self, dir) end -- make the force include flag -function nf_forceinclude(self, headerfile, target) +function nf_forceinclude(self, headerfile, opt) + local target = opt.target local sourcekinds = target and target:extraconf("forceincludes", headerfile, "sourcekinds") if not sourcekinds or table.contains(table.wrap(sourcekinds), self:kind()) then return {"-FI", headerfile} @@ -377,8 +379,9 @@ function nf_encoding(self, encoding) end -- make the c precompiled header flag -function nf_pcheader(self, pcheaderfile, target) +function nf_pcheader(self, pcheaderfile, opt) if self:kind() == "cc" then + local target = opt.target local objectfiles = target:objectfiles() if objectfiles then table.insert(objectfiles, target:pcoutputfile("c") .. ".obj") @@ -388,8 +391,9 @@ function nf_pcheader(self, pcheaderfile, target) end -- make the c++ precompiled header flag -function nf_pcxxheader(self, pcheaderfile, target) +function nf_pcxxheader(self, pcheaderfile, opt) if self:kind() == "cxx" then + local target = opt.target local objectfiles = target:objectfiles() if objectfiles then table.insert(objectfiles, target:pcoutputfile("cxx") .. ".obj") |
