fix invalid union access in build_runner.zig (#723)
This commit is contained in:
		
							parent
							
								
									13f3b200bc
								
							
						
					
					
						commit
						bca02bfde5
					
				@ -142,7 +142,11 @@ fn processStep(
 | 
			
		||||
) anyerror!void {
 | 
			
		||||
    if (step.cast(InstallArtifactStep)) |install_exe| {
 | 
			
		||||
        if (install_exe.artifact.root_src) |src| {
 | 
			
		||||
            try packages.append(allocator, .{ .name = "root", .path = src.path });
 | 
			
		||||
            const path = switch (src) {
 | 
			
		||||
                .path => |path| path,
 | 
			
		||||
                .generated => |generated| generated.path,
 | 
			
		||||
            };
 | 
			
		||||
            try packages.append(allocator, .{ .name = "root", .path = path });
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        try processIncludeDirs(allocator, include_dirs, install_exe.artifact.include_dirs.items);
 | 
			
		||||
@ -152,7 +156,11 @@ fn processStep(
 | 
			
		||||
        }
 | 
			
		||||
    } else if (step.cast(LibExeObjStep)) |exe| {
 | 
			
		||||
        if (exe.root_src) |src| {
 | 
			
		||||
            try packages.append(allocator, .{ .name = "root", .path = src.path });
 | 
			
		||||
            const path = switch (src) {
 | 
			
		||||
                .path => |path| path,
 | 
			
		||||
                .generated => |generated| generated.path,
 | 
			
		||||
            };
 | 
			
		||||
            try packages.append(allocator, .{ .name = "root", .path = path });
 | 
			
		||||
        }
 | 
			
		||||
        try processIncludeDirs(allocator, include_dirs, exe.include_dirs.items);
 | 
			
		||||
        try processPkgConfig(allocator, include_dirs, exe);
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user