Skip to content

Building a staticlib tells you *all* of the native artifacts you must link against in a non-optional way #33173

Closed
@strega-nil

Description

@strega-nil

I'm currently building a C library, and it gets really annoying when, every time I compile, I get

note: link against the following native artifacts when linking against this static library
note: the order and any duplication can be significant on some platforms, and so may need to be preserved
note: library: LLVMLTO
note: library: LLVMObjCARCOpts
note: library: LLVMSymbolize
note: library: LLVMDebugInfoPDB
note: library: LLVMDebugInfoDWARF
note: library: LLVMMIRParser
note: library: LLVMLibDriver
note: library: LLVMOption
note: library: LLVMTableGen
note: library: LLVMOrcJIT
note: library: LLVMPasses
note: library: LLVMipo
note: library: LLVMVectorize
note: library: LLVMLinker
note: library: LLVMIRReader
note: library: LLVMAsmParser
note: library: LLVMX86Disassembler
note: library: LLVMX86AsmParser
note: library: LLVMX86CodeGen
note: library: LLVMSelectionDAG
note: library: LLVMAsmPrinter
note: library: LLVMX86Desc
note: library: LLVMMCDisassembler
note: library: LLVMX86Info
note: library: LLVMX86AsmPrinter
note: library: LLVMX86Utils
note: library: LLVMMCJIT
note: library: LLVMLineEditor
note: library: LLVMDebugInfoCodeView
note: library: LLVMInterpreter
note: library: LLVMExecutionEngine
note: library: LLVMRuntimeDyld
note: library: LLVMCodeGen
note: library: LLVMTarget
note: library: LLVMScalarOpts
note: library: LLVMInstCombine
note: library: LLVMInstrumentation
note: library: LLVMProfileData
note: library: LLVMObject
note: library: LLVMMCParser
note: library: LLVMTransformUtils
note: library: LLVMMC
note: library: LLVMBitWriter
note: library: LLVMBitReader
note: library: LLVMAnalysis
note: library: LLVMCore
note: library: LLVMSupport
note: library: z
note: library: pthread
note: library: ffi
note: library: edit
note: library: curses
note: library: m
note: library: stdc++
note: library: System
note: library: c
note: library: m

First: it's not in a useful output format. It would be more useful if each of the note: library:s was replaced with -l, and it was moved to one line.

Second: It's not optional. I have to see this every time I compile. Which is a lot.

Third: It's to stderr. These are not errors. I can't even >/dev/null

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-frontendArea: Compiler frontend (errors, parsing and HIR)C-enhancementCategory: An issue proposing an enhancement or a PR with one.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions