diff options
| author | ruki <[email protected]> | 2022-06-20 23:17:10 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2022-06-20 23:17:10 +0800 |
| commit | cf2f731372623014772378fa95126e8b04806463 (patch) | |
| tree | 8800f3edae583701494581bba99013b5599dd31c /xmake/modules/private/cache/build_cache.lua | |
| parent | 01eeb3325c51d18f79b61303fb4d17af011b7dd0 (diff) | |
improve cachekey
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 |
