diff options
| author | Arthur LAURENT <[email protected]> | 2025-05-11 22:04:11 +0200 |
|---|---|---|
| committer | Arthur LAURENT <[email protected]> | 2025-05-11 22:04:11 +0200 |
| commit | 406aa7ca454fad3ef8872070cbac6efdd7d440e7 (patch) | |
| tree | 981e5a93416263194a4a0f82ba7c35560adee57d /xmake/rules/c++/modules/gcc/builder.lua | |
| parent | 22fcfc64078f4ad04a9ecf5af30adaf7dae199e5 (diff) | |
(C++ modules support) make flag order coherent between different compilers
Diffstat (limited to 'xmake/rules/c++/modules/gcc/builder.lua')
| -rw-r--r-- | xmake/rules/c++/modules/gcc/builder.lua | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/xmake/rules/c++/modules/gcc/builder.lua b/xmake/rules/c++/modules/gcc/builder.lua index 15cd3a85b..0b3a50fd3 100644 --- a/xmake/rules/c++/modules/gcc/builder.lua +++ b/xmake/rules/c++/modules/gcc/builder.lua @@ -51,7 +51,7 @@ function _compile(target, flags, sourcefile, outputfile) local dryrun = option.get("dry-run") local compinst = target:compiler("cxx") local compflags = compinst:compflags({sourcefile = sourcefile, target = target, sourcekind = "cxx"}) - flags = table.join(compflags or {}, flags) + flags = table.join(compflags or {}, flags or {}) -- trace if option.get("verbose") then @@ -69,7 +69,7 @@ end function _batchcmds_compile(batchcmds, target, flags, sourcefile, outputfile) local compinst = target:compiler("cxx") local compflags = compinst:compflags({sourcefile = sourcefile, target = target, sourcekind = "cxx"}) - flags = table.join("-c", compflags or {}, flags, {"-o", outputfile, sourcefile}) + flags = table.join("-c", compflags or {}, flags or {}, {"-o", outputfile, sourcefile}) batchcmds:compilev(flags, {compiler = compinst, sourcekind = "cxx"}) end |
