authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2026-01-28 16:41:08-08:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2026-01-28 16:41:08-08:00
loga6067c3821d5c7cba4010e1a69bb90570fff5327
tree21b041226b929585f72c1d270da7411aa39f95fd
parent757ec185f0eb91a15c4bdbe0201f0d998f30258c

compiler: delete dependency on LLVM ParseCommandLineOptions


3 files changed, 0 insertions(+), 13 deletions(-)

src/codegen/llvm/bindings.zig-3
...@@ -335,9 +335,6 @@ extern fn ZigLLVMWriteArchive(...@@ -335,9 +335,6 @@ extern fn ZigLLVMWriteArchive(
335 archive_kind: ArchiveKind,335 archive_kind: ArchiveKind,
336) bool;336) bool;
337337
338pub const ParseCommandLineOptions = ZigLLVMParseCommandLineOptions;
339extern fn ZigLLVMParseCommandLineOptions(argc: usize, argv: [*]const [*:0]const u8) void;
340
341pub const GetHostCPUName = LLVMGetHostCPUName;338pub const GetHostCPUName = LLVMGetHostCPUName;
342extern fn LLVMGetHostCPUName() ?[*:0]u8;339extern fn LLVMGetHostCPUName() ?[*:0]u8;
343340
src/main.zig-6
...@@ -3446,12 +3446,6 @@ fn buildOutputType(...@@ -3446,12 +3446,6 @@ fn buildOutputType(
3446 src.src_path = try dirs.local_cache.join(arena, &.{sub_path});3446 src.src_path = try dirs.local_cache.join(arena, &.{sub_path});
3447 }3447 }
34483448
3449 if (build_options.have_llvm and emit_asm_resolved != .no) {
3450 // LLVM has no way to set this non-globally.
3451 const argv = [_][*:0]const u8{ "zig (LLVM option parsing)", "--x86-asm-syntax=intel" };
3452 @import("codegen/llvm/bindings.zig").ParseCommandLineOptions(argv.len, &argv);
3453 }
3454
3455 const clang_passthrough_mode = switch (arg_mode) {3449 const clang_passthrough_mode = switch (arg_mode) {
3456 .cc, .cpp, .translate_c => true,3450 .cc, .cpp, .translate_c => true,
3457 else => false,3451 else => false,
src/zig_llvm.cpp-4
...@@ -468,10 +468,6 @@ bool ZigLLVMGetBrokenDebugInfo(LLVMContextRef context_ref) {...@@ -468,10 +468,6 @@ bool ZigLLVMGetBrokenDebugInfo(LLVMContextRef context_ref) {
468 unwrap(context_ref)->getDiagHandlerPtr())->BrokenDebugInfo;468 unwrap(context_ref)->getDiagHandlerPtr())->BrokenDebugInfo;
469}469}
470470
471void ZigLLVMParseCommandLineOptions(size_t argc, const char *const *argv) {
472 cl::ParseCommandLineOptions(argc, argv);
473}
474
475bool ZigLLVMWriteArchive(const char *archive_name, const char **file_names, size_t file_name_count,471bool ZigLLVMWriteArchive(const char *archive_name, const char **file_names, size_t file_name_count,
476 ZigLLVMArchiveKind archive_kind)472 ZigLLVMArchiveKind archive_kind)
477{473{