authorgravatar for squeek502@hotmail.comRyan Liptak <squeek502@hotmail.com> 2023-09-08 21:26:54-07:00
committergravatar for squeek502@hotmail.comRyan Liptak <squeek502@hotmail.com> 2023-09-17 03:09:45-07:00
log4fac7a5263b9b14f63d2459f795ac9d2eee51c85
tree88f9012d453abc1a278845ee134ce09cdddc7966
parenta94d830a48ce82ea3fdf29c6c604f0972f095e61

Only populate rc_include_dirs if there are .rc files in the compilation


1 files changed, 4 insertions(+), 2 deletions(-)

src/Compilation.zig+4-2
...@@ -1001,13 +1001,15 @@ pub fn create(gpa: Allocator, options: InitOptions) !*Compilation {...@@ -1001,13 +1001,15 @@ pub fn create(gpa: Allocator, options: InitOptions) !*Compilation {
1001 options.libc_installation,1001 options.libc_installation,
1002 );1002 );
10031003
1004 // .rc preprocessor needs to know the libc dirs even if we are not linking libc
1005 const rc_dirs = try detectLibCIncludeDirs(1004 const rc_dirs = try detectLibCIncludeDirs(
1006 arena,1005 arena,
1007 options.zig_lib_directory.path.?,1006 options.zig_lib_directory.path.?,
1008 options.target,1007 options.target,
1009 options.is_native_abi,1008 options.is_native_abi,
1010 true,1009 // Set "link libc" to true here whenever there are rc files to compile, since
1010 // the .rc preprocessor will need to know the libc include dirs even if we
1011 // are not linking libc
1012 options.rc_source_files.len > 0,
1011 options.libc_installation,1013 options.libc_installation,
1012 );1014 );
10131015