-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Open
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.zig ccZig as a drop-in C compiler featureZig as a drop-in C compiler feature
Milestone
Description
Zig Version
0.12.0
Steps to Reproduce and Observed Behavior
I am using a toolchain in Bazel which uses Zig to compile Rust. I am running into a problem on MacOS Arm64 only. It works fine on Linux.
This is because Rust only adds that option on Darwin like systems:
https://github.com/rust-lang/rust/blob/c23f07d8c56c51b5e634bda55daca2b073306340/compiler/rustc_codegen_ssa/src/back/linker.rs#L811
From inspecting the command line generated by Bazel for the Rust compilation, these options are passed to Zig:
"-Wl,-exported_symbols_list"
"-Wl,/path/to/list"
Zig fails with the following error:
= note: error: unsupported linker arg: -exported_symbols_list
I checked main.zig and indeed it looks like the support for this option is missing.
Expected Behavior
Zig works without failing
henderkes, ArchangelX360 and anttiharju
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.zig ccZig as a drop-in C compiler featureZig as a drop-in C compiler feature