diff options
| author | ruki <[email protected]> | 2022-10-10 23:52:50 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2022-10-10 23:52:50 +0800 |
| commit | a0e9f935de826a2050b056438e9c3cb521c8ddf2 (patch) | |
| tree | d9bd97fd0fc02f2cde39c9ddf264dd0e86c09c9f | |
| parent | ef9b5ca7c851e7c3ab53de53c669df621d02aff0 (diff) | |
fix rules cache
| -rw-r--r-- | xmake/core/project/target.lua | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/xmake/core/project/target.lua b/xmake/core/project/target.lua index 08fa6593c..f20d0e3f7 100644 --- a/xmake/core/project/target.lua +++ b/xmake/core/project/target.lua @@ -1286,7 +1286,7 @@ function _instance:filerules(sourcefile) end -- load all rules for this target with sourcekinds and extensions - local key2rules = self._KEY2RULES + local key2rules = self:_memcache():get("key2rules") if not key2rules then key2rules = {} for _, r in pairs(table.wrap(self:rules())) do @@ -1304,7 +1304,7 @@ function _instance:filerules(sourcefile) table.insert(key2rules[extension], r) end end - self._KEY2RULES = key2rules + self:_memcache():set("key2rules", key2rules) end -- get target rules from the given sourcekind or extension |
