-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Closed
Labels
contributor friendlyThis issue is limited in scope and/or knowledge of Zig internals.This issue is limited in scope and/or knowledge of Zig internals.enhancementSolving this issue will likely involve adding new logic or components to the codebase.Solving this issue will likely involve adding new logic or components to the codebase.
Milestone
Description
This code converts mingw's .def.in files to .def files:
Lines 291 to 293 in 1c85b0a
// We need to invoke `zig clang` to use the preprocessor. | |
if (!build_options.have_llvm) return error.ZigCompilerNotBuiltWithLLVMExtensions; | |
const self_exe_path = comp.self_exe_path orelse return error.PreprocessorDisabled; |
Lines 348 to 375 in 1c85b0a
const args = [_][]const u8{ | |
self_exe_path, | |
"clang", | |
"-x", | |
"c", | |
def_file_path, | |
"-Wp,-w", | |
"-undef", | |
"-P", | |
"-I", | |
try comp.zig_lib_directory.join(arena, &[_][]const u8{ "libc", "mingw", "def-include" }), | |
target_def_arg, | |
"-E", | |
"-o", | |
def_final_path, | |
}; | |
if (comp.verbose_cc) { | |
Compilation.dump_argv(&args); | |
} | |
if (std.process.can_spawn) { | |
var child = std.ChildProcess.init(&args, arena); | |
child.stdin_behavior = .Ignore; | |
child.stdout_behavior = .Pipe; | |
child.stderr_behavior = .Pipe; | |
try child.spawn(); |
Instead of using clang's preprocessor, it should use Aro's.
Related:
Metadata
Metadata
Assignees
Labels
contributor friendlyThis issue is limited in scope and/or knowledge of Zig internals.This issue is limited in scope and/or knowledge of Zig internals.enhancementSolving this issue will likely involve adding new logic or components to the codebase.Solving this issue will likely involve adding new logic or components to the codebase.