diff options
| author | ruki <[email protected]> | 2023-09-15 11:09:16 +0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2023-09-15 11:09:16 +0800 |
| commit | 49955f31fb09851dd6619f67f70ecc6a0b067272 (patch) | |
| tree | 6648d06ec79cc93b6771ce7b31419673f14c7bff /xmake/rules/c++/modules/modules_support | |
| parent | 1a677008c229118aee6c5d7011d9999ecdbdaca5 (diff) | |
Update clang.lua
Diffstat (limited to 'xmake/rules/c++/modules/modules_support')
| -rw-r--r-- | xmake/rules/c++/modules/modules_support/clang.lua | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/xmake/rules/c++/modules/modules_support/clang.lua b/xmake/rules/c++/modules/modules_support/clang.lua index 1254aa29a..8bd94eb2b 100644 --- a/xmake/rules/c++/modules/modules_support/clang.lua +++ b/xmake/rules/c++/modules/modules_support/clang.lua @@ -235,7 +235,8 @@ end -- do compile for batchcmds -- @note we need to use batchcmds:compilev to translate paths in compflags for generator, e.g. -Ixx -function _batchcmds_compile(batchcmds, target, sourcefile, flags) +function _batchcmds_compile(batchcmds, target, flags, sourcefile) + opt = opt or {} local compinst = target:compiler("cxx") local compflags = compinst:compflags({sourcefile = sourcefile, target = target}) batchcmds:compilev(table.join(compflags or {}, flags), {compiler = compinst, sourcekind = "cxx"}) @@ -709,13 +710,13 @@ function build_modules_for_batchcmds(target, batchcmds, objectfiles, modules, op batchcmds:mkdir(path.directory(objectfile)) if provide then _batchcmds_compile(batchcmds, target, table.join(flags, - {"-x", "c++-module", "--precompile", "-c", path(cppfile), "-o", path(provide.bmi)})) + {"-x", "c++-module", "--precompile", "-c", path(cppfile), "-o", path(provide.bmi)}), cppfile) _add_module_to_mapper(target, name, provide.bmi, {namedmodule = true}) -- add requiresflags to module. it will be used for project generation target:fileconfig_add(cppfile, {force = {cxxflags = requiresflags}}) end - _batchcmds_compile(batchcmds, target, file, table.join(flags, - not provide and {"-x", "c++"} or {}, {"-c", file, "-o", path(objectfile)})) + _batchcmds_compile(batchcmds, target, table.join(flags, + not provide and {"-x", "c++"} or {}, {"-c", file, "-o", path(objectfile)}), file) target:add("objectfiles", objectfile) elseif requiresflags then local cxxflags = {} |
