diff options
| author | ruki <[email protected]> | 2022-10-30 21:33:24 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2022-10-30 21:33:24 +0800 |
| commit | 3cb975509bc43a5a92bc3033c11f407d15c98f5d (patch) | |
| tree | 9e0eab6e7fc27741e393e77720a7b5b91a6a68d2 /xmake/rules/c++/modules/modules_support/gcc.lua | |
| parent | b3f903777bfde99b9d69aaa2183175d3babe289b (diff) | |
save dependinfo for gcc/modules
Diffstat (limited to 'xmake/rules/c++/modules/modules_support/gcc.lua')
| -rw-r--r-- | xmake/rules/c++/modules/modules_support/gcc.lua | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/xmake/rules/c++/modules/modules_support/gcc.lua b/xmake/rules/c++/modules/modules_support/gcc.lua index 20a8437aa..23a63dee8 100644 --- a/xmake/rules/c++/modules/modules_support/gcc.lua +++ b/xmake/rules/c++/modules/modules_support/gcc.lua @@ -349,8 +349,13 @@ function build_modules_for_batchjobs(target, batchjobs, objectfiles, modules, op if not os.isdir(objectdir) then os.mkdir(objectdir) end - local args = {"-o", objectfile, "-c", provide.sourcefile} - os.vrunv(compinst:program(), table.join(compinst:compflags({target = target}), common_args, args)) + + -- do compile + local dependinfo = {} + local compflags = table.join(compinst:compflags({target = target}), common_args) + assert(compinst:compile(provide.sourcefile, objectfile, {dependinfo = dependinfo, compflags = compflags})) + return dependinfo + end, {dependfile = target:dependfile(bmifile), files = {provide.sourcefile}}) end) if m.requires then |
