Skip to content

Commit e1f364f

Browse files
committed
Only populate rc_include_dirs if there are .rc files in the compilation
1 parent 4e02f4a commit e1f364f

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/Compilation.zig

+4-2
Original file line numberDiff line numberDiff line change
@@ -1001,13 +1001,15 @@ pub fn create(gpa: Allocator, options: InitOptions) !*Compilation {
10011001
options.libc_installation,
10021002
);
10031003

1004-
// .rc preprocessor needs to know the libc dirs even if we are not linking libc
10051004
const rc_dirs = try detectLibCIncludeDirs(
10061005
arena,
10071006
options.zig_lib_directory.path.?,
10081007
options.target,
10091008
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,
10111013
options.libc_installation,
10121014
);
10131015

0 commit comments

Comments
 (0)