Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
strega-nil opened this issue Apr 24, 2016 · 2 comments
Labels
A-frontend Area: Compiler frontend (errors, parsing and HIR) C-enhancement Category: An issue proposing an enhancement or a PR with one.

Comments

@strega-nil
Copy link
Contributor

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

@alexcrichton
Copy link
Member

cc #31471

@nrc
Copy link
Member

nrc commented Jul 10, 2017

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

We post everything to stderr - it is somewhat annoying to have output split between stdout and stderr

@Mark-Simulacrum Mark-Simulacrum added the C-enhancement Category: An issue proposing an enhancement or a PR with one. label Jul 25, 2017
bors added a commit that referenced this issue Sep 4, 2017
Compact display of static lib dependencies

Fixes #33173

Instead of displaying one dependency per line, I've changed the format to display them all in one line.

As a bonus they're in format of linker flags (`-lfoo`), so the output can be copy&pasted if one is actually going to link as suggested.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-frontend Area: Compiler frontend (errors, parsing and HIR) C-enhancement Category: An issue proposing an enhancement or a PR with one.
Projects
None yet
Development

No branches or pull requests

5 participants