diff options
| author | ruki <[email protected]> | 2025-06-07 22:05:11 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2025-06-07 22:05:11 +0800 |
| commit | 3f5424d4f6e54ad4749cfd13697bb27e9256b8b3 (patch) | |
| tree | dfbf0ceb2298dc721f1cee54925686e6f5733359 | |
| parent | 6989184ed0b7e61614d3f41bdbcdac4c6075ac77 (diff) | |
improve nasm files
| -rw-r--r-- | xmake/core/project/project.lua | 3 | ||||
| -rw-r--r-- | xmake/core/project/target.lua | 4 |
2 files changed, 5 insertions, 2 deletions
diff --git a/xmake/core/project/project.lua b/xmake/core/project/project.lua index 5a069f644..043ff3cfa 100644 --- a/xmake/core/project/project.lua +++ b/xmake/core/project/project.lua @@ -417,7 +417,8 @@ function project._load_targets() for _, sourcefile in ipairs(table.wrap(t:get("files"))) do local extension = path.extension((sourcefile:gsub("|.*$", ""))) if not extensions[extension] then - local lang = language.load_ex(extension) + local sourcekind = t:extraconf("files", sourcefile, "sourcekind") + local lang = sourcekind and language.load_sk(sourcekind) or language.load_ex(extension) if lang and lang:rules() then table.join2(rulenames, lang:rules()) end diff --git a/xmake/core/project/target.lua b/xmake/core/project/target.lua index 6f4ad4d89..cda2e612e 100644 --- a/xmake/core/project/target.lua +++ b/xmake/core/project/target.lua @@ -201,7 +201,8 @@ function _instance:_update_filerules() for _, sourcefile in ipairs(table.wrap(self:get("files"))) do local extension = path.extension((sourcefile:gsub("|.*$", ""))) if not extensions[extension] then - local lang = language.load_ex(extension) + local sourcekind = self:extraconf("files", sourcefile, "sourcekind") + local lang = sourcekind and language.load_sk(sourcekind) or language.load_ex(extension) if lang and lang:rules() then table.join2(rulenames, lang:rules()) end @@ -1809,6 +1810,7 @@ function _instance:filerules(sourcefile) local override = false local fileconfig = self:fileconfig(sourcefile) if fileconfig then + utils.dump(fileconfig) local filerules = fileconfig.rules or fileconfig.rule if filerules then override = filerules.override |
