remove `-fbuiltin-module-map` in the (windows)mingw environment
There is no builtin module for clang in the mingw environment, so remove `-fbuiltin-module-map` in the mingw environment will make the compilation work.
@@ -489,8 +489,12 @@ function get_builtinmodulemapflag(target)
if builtinmodulemapflag == nil then
local compinst = target:compiler("cxx")
if compinst:has_flags("-fbuiltin-module-map", "cxxflags", {flagskey = "clang_builtin_module_map"}) then
+ if is_plat("windows", "mingw") then
+ builtinmodulemapflag = ""
+ else
builtinmodulemapflag = "-fbuiltin-module-map"
end
+ end
assert(builtinmodulemapflag, "compiler(clang): does not support c++ module!")
_g.builtinmodulemapflag = builtinmodulemapflag or false
end
