diff options
| author | ruki <[email protected]> | 2018-02-13 22:19:55 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2018-02-13 07:59:33 +0800 |
| commit | 658c0ccdc65b63658a21735b21f806923f2fa70b (patch) | |
| tree | cd7c7cd2196c5e6c2cdad0bcaaae49c8e86093fc /xmake/modules/core/tools | |
| parent | cb8e49968ac0a6a602b9d3db74ecb01358ac2115 (diff) | |
fix pnd output directory bug
Diffstat (limited to 'xmake/modules/core/tools')
| -rw-r--r-- | xmake/modules/core/tools/cl.lua | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/xmake/modules/core/tools/cl.lua b/xmake/modules/core/tools/cl.lua index 91946eefb..c0f4b369c 100644 --- a/xmake/modules/core/tools/cl.lua +++ b/xmake/modules/core/tools/cl.lua @@ -97,7 +97,19 @@ function nf_symbol(self, level, target) -- debug? generate *.pdb file local flags = nil if level == "debug" then + local symbolfile = nil if target and target.symbolfile then + symbolfile = target:symbolfile() + end + if symbolfile then + + -- ensure the object directory + local symboldir = path.directory(symbolfile) + if not os.isdir(symboldir) then + os.mkdir(symboldir) + end + + -- check and add symbol output file flags = "-Zi -Fd" .. target:symbolfile() if self:has_flags({"-Zi", "-FS", "-Fd" .. os.tmpfile() .. ".pdb"}) then flags = "-FS " .. flags @@ -360,7 +372,10 @@ end function _compile1(self, sourcefile, objectfile, depinfo, flags) -- ensure the object directory - os.mkdir(path.directory(objectfile)) + local objectdir = path.directory(objectfile) + if not os.isdir(objectdir) then + os.mkdir(objectdir) + end -- compile it local outdata = try |
