summaryrefslogtreecommitdiff
path: root/xmake/modules
diff options
context:
space:
mode:
authorruki <[email protected]>2022-02-17 23:32:17 +0800
committerruki <[email protected]>2022-02-17 23:32:17 +0800
commit4f95a3d8fbcbadabcecf71fb902c90c75693e433 (patch)
tree5e14c6766d503d9ee44ff66ea46f7ef06782bc6c /xmake/modules
parenta488013ba3fc29f9d368a10926640f58bfae7678 (diff)
fix pdb with spaces
Diffstat (limited to 'xmake/modules')
-rw-r--r--xmake/modules/core/tools/cl.lua9
1 files changed, 6 insertions, 3 deletions
diff --git a/xmake/modules/core/tools/cl.lua b/xmake/modules/core/tools/cl.lua
index b76061cd7..b499542e3 100644
--- a/xmake/modules/core/tools/cl.lua
+++ b/xmake/modules/core/tools/cl.lua
@@ -112,11 +112,14 @@ function nf_symbols(self, levels, target)
end
-- check and add symbol output file
- local pdbflags = "-Fd" .. (target:is_static() and symbolfile or path.join(symboldir, "compile." .. path.filename(symbolfile)))
+ --
+ -- @note we need use `{}` to wrap it to avoid expand it
+ -- https://github.com/xmake-io/xmake/issues/2061#issuecomment-1042590085
+ local pdbflags = {"-Fd" .. (target:is_static() and symbolfile or path.join(symboldir, "compile." .. path.filename(symbolfile)))}
if self:has_flags({"-FS", "-Fd" .. os.nuldev() .. ".pdb"}, "cxflags", { flagskey = "-FS -Fd" }) then
- pdbflags = {"-FS", pdbflags}
+ table.insert(pdbflags, 1, "-FS")
end
- table.join2(flags, pdbflags)
+ table.insert(flags, pdbflags)
end
end
return flags