diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2022-07-24 15:11:41 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2023-02-08 19:04:38 +0000 |
commit | fcaf7f8644a9988098ac6be2165bce3ea4786e91 (patch) | |
tree | 08a554363df16b968a623d651c09d82a5a0b1c65 /usr.bin/clang | |
parent | 753f127f3ace09432b2baeffd71a308760641a62 (diff) | |
parent | 4b4fe385e49bd883fd183b5f21c1ea486c722e61 (diff) | |
download | src-fcaf7f8644a9988098ac6be2165bce3ea4786e91.tar.gz src-fcaf7f8644a9988098ac6be2165bce3ea4786e91.zip |
Merge llvm-project main llvmorg-15-init-17485-ga3e38b4a206b
This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and
openmp to llvmorg-15-init-17485-ga3e38b4a206b.
PR: 265425
MFC after: 2 weeks
Diffstat (limited to 'usr.bin/clang')
-rw-r--r-- | usr.bin/clang/Makefile | 1 | ||||
-rw-r--r-- | usr.bin/clang/llvm-dwarfutil/Makefile | 27 | ||||
-rw-r--r-- | usr.bin/clang/llvm-dwarfutil/llvm-dwarfutil.1 | 168 |
3 files changed, 196 insertions, 0 deletions
diff --git a/usr.bin/clang/Makefile b/usr.bin/clang/Makefile index b7acb7e6c6db..45939bca7a16 100644 --- a/usr.bin/clang/Makefile +++ b/usr.bin/clang/Makefile @@ -35,6 +35,7 @@ SUBDIR+= llvm-cxxdump SUBDIR+= llvm-diff SUBDIR+= llvm-dis SUBDIR+= llvm-dwarfdump +SUBDIR+= llvm-dwarfutil SUBDIR+= llvm-dwp SUBDIR+= llvm-extract SUBDIR+= llvm-link diff --git a/usr.bin/clang/llvm-dwarfutil/Makefile b/usr.bin/clang/llvm-dwarfutil/Makefile new file mode 100644 index 000000000000..a436acf0e197 --- /dev/null +++ b/usr.bin/clang/llvm-dwarfutil/Makefile @@ -0,0 +1,27 @@ +# $FreeBSD$ + +PROG_CXX= llvm-dwarfutil + +SRCDIR= llvm/tools/llvm-dwarfutil +SRCS+= DebugInfoLinker.cpp +SRCS+= llvm-dwarfutil.cpp + +.include "${SRCTOP}/lib/clang/llvm.pre.mk" + +CFLAGS+= -I${.OBJDIR} + +INCFILE= Options.inc +TDFILE= ${LLVM_BASE}/${SRCDIR}/Options.td +GENOPT= -gen-opt-parser-defs +${INCFILE}: ${TDFILE} + ${LLVM_TBLGEN} ${GENOPT} -I ${LLVM_SRCS}/include -d ${.TARGET:C/$/.d/} \ + -o ${.TARGET} ${TDFILE} +TGHDRS+= ${INCFILE} + +DEPENDFILES+= ${TGHDRS:C/$/.d/} +DPSRCS+= ${TGHDRS} +CLEANFILES+= ${TGHDRS} ${TGHDRS:C/$/.d/} + +LIBADD+= z + +.include "../llvm.prog.mk" diff --git a/usr.bin/clang/llvm-dwarfutil/llvm-dwarfutil.1 b/usr.bin/clang/llvm-dwarfutil/llvm-dwarfutil.1 new file mode 100644 index 000000000000..1d14486b0d28 --- /dev/null +++ b/usr.bin/clang/llvm-dwarfutil/llvm-dwarfutil.1 @@ -0,0 +1,168 @@ +.\" Man page generated from reStructuredText. +. +. +.nr rst2man-indent-level 0 +. +.de1 rstReportMargin +\\$1 \\n[an-margin] +level \\n[rst2man-indent-level] +level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] +- +\\n[rst2man-indent0] +\\n[rst2man-indent1] +\\n[rst2man-indent2] +.. +.de1 INDENT +.\" .rstReportMargin pre: +. RS \\$1 +. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] +. nr rst2man-indent-level +1 +.\" .rstReportMargin post: +.. +.de UNINDENT +. RE +.\" indent \\n[an-margin] +.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] +.nr rst2man-indent-level -1 +.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] +.in \\n[rst2man-indent\\n[rst2man-indent-level]]u +.. +.TH "LLVM-DWARFUTIL" "1" "2022-07-24" "15" "LLVM" +.SH NAME +llvm-dwarfutil \- A tool to copy and manipulate debug info +.SH SYNOPSIS +.sp +\fBllvm\-dwarfutil\fP [\fIoptions\fP] \fIinput\fP \fIoutput\fP +.SH DESCRIPTION +.sp +\fBllvm\-dwarfutil\fP is a tool to copy and manipulate debug info. +.sp +In basic usage, it makes a semantic copy of the input to the output. If any +options are specified, the output may be modified along the way, e.g. +by removing unused debug info. +.sp +If "\-" is specified for the input file, the input is read from the program\(aqs +standard input stream. If "\-" is specified for the output file, the output +is written to the standard output stream of the program. +.sp +The tool is still in active development. +.SH COMMAND-LINE OPTIONS +.INDENT 0.0 +.TP +.B \-\-garbage\-collection +Removes pieces of debug information related to discarded sections. +When the linker does section garbage collection the abandoned debug info +is left behind. Such abandoned debug info references address ranges using +tombstone values. Thus, when this option is specified, the tool removes +debug info which is marked with the tombstone value. +.sp +That option is enabled by default. +.UNINDENT +.INDENT 0.0 +.TP +.B \-\-odr\-deduplication +Remove duplicated types (if "One Definition Rule" is supported by source +language). Keeps first type definition and removes other definitions, +potentially significantly reducing the size of output debug info. +.sp +That option is enabled by default. +.UNINDENT +.INDENT 0.0 +.TP +.B \-\-help, \-h +Print a summary of command line options. +.UNINDENT +.INDENT 0.0 +.TP +.B \-\-no\-garbage\-collection +Disable \fI\%\-\-garbage\-collection\fP\&. +.UNINDENT +.INDENT 0.0 +.TP +.B \-\-no\-odr\-deduplication +Disable \fI\%\-\-odr\-deduplication\fP\&. +.UNINDENT +.INDENT 0.0 +.TP +.B \-\-no\-separate\-debug\-file +Disable \fI\%\-\-separate\-debug\-file\fP\&. +.UNINDENT +.INDENT 0.0 +.TP +.B \-\-num\-threads=<n>, \-j +Specifies the maximum number (\fIn\fP) of simultaneous threads to use +for processing. +.UNINDENT +.INDENT 0.0 +.TP +.B \-\-separate\-debug\-file +Generate separate file containing output debug info. Using +\fBllvm\-dwarfutil\fP with that option equals to the +following set of commands: +.UNINDENT +.INDENT 0.0 +.INDENT 3.5 +.sp +.nf +.ft C +:program:\(gallvm\-objcopy\(ga \-\-only\-keep\-debug in\-file out\-file.debug +:program:\(gallvm\-objcopy\(ga \-\-strip\-debug in\-file out\-file +:program:\(gallvm\-objcopy\(ga \-\-add\-gnu\-debuglink=out\-file.debug out\-file +.ft P +.fi +.UNINDENT +.UNINDENT +.INDENT 0.0 +.TP +.B \-\-tombstone=<value> +<value> can be one of the following values: +.INDENT 7.0 +.INDENT 3.5 +.INDENT 0.0 +.IP \(bu 2 +\fIbfd\fP: zero for all addresses and [1,1] for DWARF v4 (or less) address ranges and exec. +.IP \(bu 2 +\fImaxpc\fP: \-1 for all addresses and \-2 for DWARF v4 (or less) address ranges. +.IP \(bu 2 +\fIuniversal\fP: both \fIbfd\fP and \fImaxpc\fP\&. +.IP \(bu 2 +\fIexec\fP: match with address ranges of executable sections. +.UNINDENT +.sp +The value \fIuniversal\fP is used by default. +.UNINDENT +.UNINDENT +.UNINDENT +.INDENT 0.0 +.TP +.B \-\-verbose +Enable verbose logging. This option disables multi\-thread mode. +.UNINDENT +.INDENT 0.0 +.TP +.B \-\-verify +Run the DWARF verifier on the output DWARF debug info. +.UNINDENT +.INDENT 0.0 +.TP +.B \-\-version +Print the version of this program. +.UNINDENT +.SH SUPPORTED FORMATS +.sp +The following formats are currently supported by \fBllvm\-dwarfutil\fP: +.sp +ELF +.SH EXIT STATUS +.sp +\fBllvm\-dwarfutil\fP exits with a non\-zero exit code if there is an error. +Otherwise, it exits with code 0. +.SH BUGS +.sp +To report bugs, please visit <\fI\%https://github.com/llvm/llvm\-project/labels/tools:llvm\-dwarfutil/\fP>. +.SH AUTHOR +Maintained by the LLVM Team (https://llvm.org/). +.SH COPYRIGHT +2003-2022, LLVM Project +.\" Generated by docutils manpage writer. +. |