From 535529d5e08cf8fc0f2d624508c4ef145bce12c3 Mon Sep 17 00:00:00 2001 From: ruki Date: Wed, 25 Jan 2023 00:34:04 +0800 Subject: format code --- core/src/tbox/tbox | 2 +- xmake/rules/c++/modules/modules_support/clang.lua | 4 +++- xmake/rules/c++/modules/modules_support/gcc.lua | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/core/src/tbox/tbox b/core/src/tbox/tbox index 5a19b3ec9..8dc4d836f 160000 --- a/core/src/tbox/tbox +++ b/core/src/tbox/tbox @@ -1 +1 @@ -Subproject commit 5a19b3ec9c527305f9f2bb75feb50d0a6ff5c90a +Subproject commit 8dc4d836f953c3d8f8eb4ab0bf6ba01509a13cce diff --git a/xmake/rules/c++/modules/modules_support/clang.lua b/xmake/rules/c++/modules/modules_support/clang.lua index 320061e1a..1078c4176 100644 --- a/xmake/rules/c++/modules/modules_support/clang.lua +++ b/xmake/rules/c++/modules/modules_support/clang.lua @@ -272,7 +272,9 @@ function generate_dependencies(target, sourcebatch, opt) local compinst = target:compiler("cxx") local compflags = compinst:compflags({sourcefile = file, target = target}) -- exclude -fmodule* and -std=c++/gnu++* flags because, when they are set clang try to find bmi of imported modules but they don't exists a this point of compilation - compflags = table.remove_if(compflags, function(_, flag) return flag:startswith("-fmodule") or flag:startswith("-std=c++") or flag:startswith("-std=gnu++") end) + table.remove_if(compflags, function(_, flag) + return flag:startswith("-fmodule") or flag:startswith("-std=c++") or flag:startswith("-std=gnu++") + end) local ifile = path.translate(path.join(outputdir, path.filename(file) .. ".i")) os.vrunv(compinst:program(), table.join(compflags, {"-E", "-x", "c++", file, "-o", ifile})) local content = io.readfile(ifile) diff --git a/xmake/rules/c++/modules/modules_support/gcc.lua b/xmake/rules/c++/modules/modules_support/gcc.lua index eb83ed96d..5ebcb1128 100644 --- a/xmake/rules/c++/modules/modules_support/gcc.lua +++ b/xmake/rules/c++/modules/modules_support/gcc.lua @@ -201,7 +201,7 @@ function generate_dependencies(target, sourcebatch, opt) local compinst = target:compiler("cxx") local compflags = compinst:compflags({sourcefile = file, target = target}) -- exclude -fmodule* flags because, when they are set gcc try to find bmi of imported modules but they don't exists a this point of compilation - compflags = table.remove_if(compflags, function(_, flag) return flag:startswith("-fmodule") end) + table.remove_if(compflags, function(_, flag) return flag:startswith("-fmodule") end) local ifile = path.translate(path.join(outputdir, path.filename(file) .. ".i")) os.vrunv(compinst:program(), table.join(common_args, compflags, {file, "-o", ifile})) local content = io.readfile(ifile) -- cgit v1.3.1