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...).
-- v2: winegcc: Don't include host include paths when compiling with MSVCRT.
From: Jacek Caban jacek@codeweavers.com
--- tools/winegcc/winegcc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/winegcc/winegcc.c b/tools/winegcc/winegcc.c index 600bd171b89..3c82bb4c601 100644 --- a/tools/winegcc/winegcc.c +++ b/tools/winegcc/winegcc.c @@ -783,13 +783,13 @@ no_compat_defines: if (includedir) { strarray_add( &comp_args, strmake( "%s%s/wine/windows", isystem, includedir )); - strarray_add( &comp_args, strmake( "%s%s", idirafter, includedir )); + if (!opts->use_msvcrt) strarray_add( &comp_args, strmake( "%s%s", idirafter, includedir )); } for (j = 0; j < ARRAY_SIZE(incl_dirs); j++) { 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)
On Mon Mar 3 15:28:09 2025 +0000, Jinoh Kang wrote:
Should line 786 (`includedir`) be patched as well?
Good point, I updated the patch, thanks.