Skip to content

LLD warning after the LLVM15 switchover about archives not being ET_REL or LLVM bitcode #13177

@mitchellh

Description

@mitchellh

Zig Version

0.10.0-dev.4333+f5f28e0d2

Steps to Reproduce

I don't have a minimal test case, so this is more of a question at the moment. Ever since the LLVM15 merge, my C libraries building and then linking is emitting the following (one for each C library):

ld.lld: warning: /home/mitchellh/code/go/src/github.com/mitchellh/testproj/zig-cache/o/e90400f9bbd68db8d2168fd678ecf358/liblibpng.a: archive member '/home/mitchellh/code/go/src/github.com/mitchellh/testproj/zig-cache/o/c964bc1bea30b7769c1a8503666d8876/libz.a' is neither ET_REL nor LLVM bitcode

This warning doesn't seem to affect the actual behavior of the program at all, but I'm unsure how to fix it, and googling this exact error turns up only the LLD source code and the Mach project (another Zig project) 😄 So this appears to also be effecting the Mach project, which also builds and links a lot of C libraries!

I apologize using issues as a sort of question, but I'm unsure if this is a bug in the way Zig builds things or not.

This happens with both -fstage1 and without.

Expected Behavior

No warning.

Actual Behavior

Warning.

Metadata

Metadata

Assignees

No one assigned

    Labels

    backend-llvmThe LLVM backend outputs an LLVM IR Module.bugObserved behavior contradicts documented or intended behavior

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions