diff options
| author | OpportunityLiu <[email protected]> | 2019-07-12 14:05:28 +0800 |
|---|---|---|
| committer | OpportunityLiu <[email protected]> | 2019-07-12 14:05:28 +0800 |
| commit | 741274711841086019bdafc3eacab0345eea789f (patch) | |
| tree | 0d05b03dce1d1dcb009b926e7c908358dbdfe71f | |
| parent | 97a44ac26e00bf98062cfb99ef203f960d8f6408 (diff) | |
use hashset
| -rw-r--r-- | xmake/modules/core/tools/cl.lua | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/xmake/modules/core/tools/cl.lua b/xmake/modules/core/tools/cl.lua index e0b6e3f57..abb3b4841 100644 --- a/xmake/modules/core/tools/cl.lua +++ b/xmake/modules/core/tools/cl.lua @@ -20,6 +20,7 @@ -- imports import("core.base.option") +import("core.base.hashset") import("core.project.project") import("core.language.language") @@ -323,11 +324,14 @@ function _patch_pdbflags(objectfile, flags) local compflags = flags + local _pdbflags = _g._pdbflags or hashset.of("-ZI", "-Zi", "/ZI", "/Zi") + _g._pdbflags = _pdbflags + -- check if we need -Fd flags local need_pdb = false local has_pdb = false for _, flag in ipairs(flags) do - if flag:find("-ZI", 1, true) or flag:find("-Zi", 1, true) or flag:find("/ZI", 1, true) or flag:find("/Zi", 1, true) then + if _pdbflags:has(flag) then need_pdb = true end if flag:find("-Fd", 1, true) or flag:find("/Fd", 1, true) then |
