diff options
| author | Arthur LAURENT <[email protected]> | 2023-01-12 15:24:16 +0100 |
|---|---|---|
| committer | Arthur LAURENT <[email protected]> | 2023-01-12 16:11:42 +0100 |
| commit | ed3457f6d51305ab9a68494ab0051fad425bc271 (patch) | |
| tree | 956151abd8a3d40f4e23b767c8a26a39407005ba /xmake/rules/c++/modules/modules_support | |
| parent | edd02c990ac8ca4f3ff52c9e630b2f328ebd11b3 (diff) | |
implement suggestions
Diffstat (limited to 'xmake/rules/c++/modules/modules_support')
| -rw-r--r-- | xmake/rules/c++/modules/modules_support/clang.lua | 4 | ||||
| -rw-r--r-- | xmake/rules/c++/modules/modules_support/gcc.lua | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/xmake/rules/c++/modules/modules_support/clang.lua b/xmake/rules/c++/modules/modules_support/clang.lua index d0a60cb30..c50416b03 100644 --- a/xmake/rules/c++/modules/modules_support/clang.lua +++ b/xmake/rules/c++/modules/modules_support/clang.lua @@ -254,9 +254,9 @@ function generate_dependencies(target, sourcebatch, opt) local compinst = target:compiler("cxx") local compflags = compinst:compflags({sourcefile = file, target = target}) local flags = {} - for _, flag in pairs(compflags) do + for _, flag in ipairs(compflags) do if flag:startswith("-stdlib") or (flag:startswith("-f") and not flag:startswith("-fmodules")) or flag:startswith("-D") or flag:startswith("-U") or flag:startswith("-I") or flag:startswith("-isystem") then - table.append(flags, flag) + table.insert(flags, flag) end end local ifile = path.translate(path.join(outputdir, path.filename(file) .. ".i")) diff --git a/xmake/rules/c++/modules/modules_support/gcc.lua b/xmake/rules/c++/modules/modules_support/gcc.lua index 3d67e4483..1180fde19 100644 --- a/xmake/rules/c++/modules/modules_support/gcc.lua +++ b/xmake/rules/c++/modules/modules_support/gcc.lua @@ -206,9 +206,9 @@ function generate_dependencies(target, sourcebatch, opt) local compinst = target:compiler("cxx") local compflags = compinst:compflags({sourcefile = file, target = target}) local flags = {} - for _, flag in pairs(compflags) do + for _, flag in ipairs(compflags) do if flag:startswith("-std") or (flag:startswith("-f") and not flag:startswith("-fmodules")) or flag:startswith("-D") or flag:startswith("-U") or flag:startswith("-I") or flag:startswith("-isystem") then - table.append(flags, flag) + table.insert(flags, flag) end end local ifile = path.translate(path.join(outputdir, path.filename(file) .. ".i")) |
