While some host includes may work, we can't assume they will. Additionally, they may interfere with the code being built. In my case, LLVM's libc++ build with winegcc was failing due to an [unexpected `__has_include`](https://github.com/llvm/llvm-project/blob/44607666b3429868bce9f0489715eb367d...).
From: Jacek Caban jacek@codeweavers.com
--- tools/winegcc/winegcc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/winegcc/winegcc.c b/tools/winegcc/winegcc.c index 600bd171b89..844bd3fd9ba 100644 --- a/tools/winegcc/winegcc.c +++ b/tools/winegcc/winegcc.c @@ -789,7 +789,7 @@ no_compat_defines: { if (j && !strcmp( incl_dirs[0], incl_dirs[j] )) continue; strarray_add(&comp_args, strmake( "%s%s%s/wine/windows", isystem, root, incl_dirs[j] )); - strarray_add(&comp_args, strmake( "%s%s%s", idirafter, root, incl_dirs[j] )); + if (!opts->use_msvcrt) strarray_add(&comp_args, strmake( "%s%s%s", idirafter, root, incl_dirs[j] )); } } else if (opts->wine_objdir)
Jinoh Kang (@iamahuman) commented about tools/winegcc/winegcc.c:
{ if (j && !strcmp( incl_dirs[0], incl_dirs[j] )) continue; strarray_add(&comp_args, strmake( "%s%s%s/wine/windows", isystem, root, incl_dirs[j] ));
strarray_add(&comp_args, strmake( "%s%s%s", idirafter, root, incl_dirs[j] ));
if (!opts->use_msvcrt) strarray_add(&comp_args, strmake( "%s%s%s", idirafter, root, incl_dirs[j] ));
Should line 786 (`includedir`) be patched as well?