LinuxCommandLibrary

llvm-ar

archiver for creating and manipulating static library archives

TLDR

Create archive from object files

$ llvm-ar rcs [libname.a] [file1.o] [file2.o]
copy
List archive contents
$ llvm-ar t [archive.a]
copy
Extract files from archive
$ llvm-ar x [archive.a]
copy
Add files to archive
$ llvm-ar r [archive.a] [file.o]
copy
Delete file from archive
$ llvm-ar d [archive.a] [file.o]
copy

SYNOPSIS

llvm-ar [options] operation archive [files...]

DESCRIPTION

llvm-ar is the LLVM archiver for creating and manipulating static library archives. Drop-in replacement for GNU ar. Creates archives compatible with the system linker for static linking.

PARAMETERS

r

Replace or add files to archive.
c
Create archive without warning.
s
Create archive index.
t
List archive contents.
x
Extract files from archive.
d
Delete files from archive.
--format type
Archive format (gnu, darwin, bsd).

SEE ALSO

ar(1), llvm-ranlib(1)

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community