diff options
Diffstat (limited to 'xmake/modules/private/cache/build_cache.lua')
| -rw-r--r-- | xmake/modules/private/cache/build_cache.lua | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/xmake/modules/private/cache/build_cache.lua b/xmake/modules/private/cache/build_cache.lua index 882f50f9a..0d5dd02d4 100644 --- a/xmake/modules/private/cache/build_cache.lua +++ b/xmake/modules/private/cache/build_cache.lua @@ -68,10 +68,9 @@ end function cachekey(program, cppinfo, envs) local cppfile = cppinfo.cppfile local cppflags = cppinfo.cppflags - local directives_only = cppinfo.directives_only local items = {program} for _, cppflag in ipairs(cppflags) do - if not directives_only and (cppflag:startswith("-D") or cppflag:startswith("/D")) then + if cppflag:startswith("-D") or cppflag:startswith("/D") then -- ignore `-Dxx` to improve the cache hit rate, as some source files may not use the defined macros. -- @see https://github.com/xmake-io/xmake/issues/2425 else |
