mirror of
https://github.com/ziglang/zig.git
synced 2026-01-20 06:15:21 +00:00
Move/coalesce RcIncludes enum to std.zig.RcIncludes
This commit is contained in:
parent
f587209e04
commit
da77d306b6
@ -66,13 +66,12 @@ installed_headers: std.array_list.Managed(HeaderInstallation),
|
||||
/// created otherwise.
|
||||
installed_headers_include_tree: ?*Step.WriteFile = null,
|
||||
|
||||
// keep in sync with src/Compilation.zig:RcIncludes
|
||||
/// Behavior of automatic detection of include directories when compiling .rc files.
|
||||
/// any: Use MSVC if available, fall back to MinGW.
|
||||
/// msvc: Use MSVC include paths (must be present on the system).
|
||||
/// gnu: Use MinGW include paths (distributed with Zig).
|
||||
/// none: Do not use any autodetected include paths.
|
||||
rc_includes: enum { any, msvc, gnu, none } = .any,
|
||||
rc_includes: std.zig.RcIncludes = .any,
|
||||
|
||||
/// (Windows) .manifest file to embed in the compilation
|
||||
/// Set via options; intended to be read-only after that.
|
||||
|
||||
@ -379,6 +379,17 @@ pub const Subsystem = enum {
|
||||
|
||||
pub const CompressDebugSections = enum { none, zlib, zstd };
|
||||
|
||||
pub const RcIncludes = enum {
|
||||
/// Use MSVC if available, fall back to MinGW.
|
||||
any,
|
||||
/// Use MSVC include paths (MSVC install + Windows SDK, must be present on the system).
|
||||
msvc,
|
||||
/// Use MinGW include paths (distributed with Zig).
|
||||
gnu,
|
||||
/// Do not use any autodetected include paths.
|
||||
none,
|
||||
};
|
||||
|
||||
/// Renders a `std.Target.Cpu` value into a textual representation that can be parsed
|
||||
/// via the `-mcpu` flag passed to the Zig compiler.
|
||||
/// Appends the result to `buffer`.
|
||||
|
||||
@ -195,7 +195,7 @@ self_exe_path: ?[]const u8,
|
||||
dirs: Directories,
|
||||
libc_include_dir_list: []const []const u8,
|
||||
libc_framework_dir_list: []const []const u8,
|
||||
rc_includes: RcIncludes,
|
||||
rc_includes: std.zig.RcIncludes,
|
||||
mingw_unicode_entry_point: bool,
|
||||
thread_pool: *ThreadPool,
|
||||
|
||||
@ -954,17 +954,6 @@ pub const RcSourceFile = struct {
|
||||
extra_flags: []const []const u8 = &.{},
|
||||
};
|
||||
|
||||
pub const RcIncludes = enum {
|
||||
/// Use MSVC if available, fall back to MinGW.
|
||||
any,
|
||||
/// Use MSVC include paths (MSVC install + Windows SDK, must be present on the system).
|
||||
msvc,
|
||||
/// Use MinGW include paths (distributed with Zig).
|
||||
gnu,
|
||||
/// Do not use any autodetected include paths.
|
||||
none,
|
||||
};
|
||||
|
||||
const Job = union(enum) {
|
||||
/// Given the generated AIR for a function, put it onto the code generation queue.
|
||||
/// This `Job` exists (instead of the `link.ZcuTask` being directly queued) to ensure that
|
||||
@ -1680,7 +1669,7 @@ pub const CreateOptions = struct {
|
||||
c_source_files: []const CSourceFile = &.{},
|
||||
rc_source_files: []const RcSourceFile = &.{},
|
||||
manifest_file: ?[]const u8 = null,
|
||||
rc_includes: RcIncludes = .any,
|
||||
rc_includes: std.zig.RcIncludes = .any,
|
||||
link_inputs: []const link.Input = &.{},
|
||||
framework_dirs: []const []const u8 = &[0][]const u8{},
|
||||
frameworks: []const Framework = &.{},
|
||||
|
||||
@ -918,7 +918,7 @@ fn buildOutputType(
|
||||
var extra_cflags: std.ArrayListUnmanaged([]const u8) = .empty;
|
||||
var extra_rcflags: std.ArrayListUnmanaged([]const u8) = .empty;
|
||||
var symbol_wrap_set: std.StringArrayHashMapUnmanaged(void) = .empty;
|
||||
var rc_includes: Compilation.RcIncludes = .any;
|
||||
var rc_includes: std.zig.RcIncludes = .any;
|
||||
var manifest_file: ?[]const u8 = null;
|
||||
var linker_export_symbol_names: std.ArrayListUnmanaged([]const u8) = .empty;
|
||||
|
||||
@ -6787,8 +6787,8 @@ fn accessFrameworkPath(
|
||||
return false;
|
||||
}
|
||||
|
||||
fn parseRcIncludes(arg: []const u8) Compilation.RcIncludes {
|
||||
return std.meta.stringToEnum(Compilation.RcIncludes, arg) orelse
|
||||
fn parseRcIncludes(arg: []const u8) std.zig.RcIncludes {
|
||||
return std.meta.stringToEnum(std.zig.RcIncludes, arg) orelse
|
||||
fatal("unsupported rc includes type: '{s}'", .{arg});
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user