1
0
mirror of https://git.FreeBSD.org/src.git synced 2025-01-05 12:56:08 +00:00

Optionally create full debuginfo for llvm-related executables

Commit de6feefdb7 limited the amount of debuginfo generated for clang
and other llvm-related executables. This was done to save disk space and
memory during building, but it makes debugging any of these executables
much harder.

Add a new src.conf(5) setting, WITH_LLVM_FULL_DEBUGINFO, to generate
full debuginfo instead. This is off by default, but could for example be
enabled for release builds or snapshots, so llvm executables are easier
to debug.

Reviewed by:	emaste
MFC after:	1 week
Differential Revision: https://reviews.freebsd.org/D43839
This commit is contained in:
Dimitry Andric 2024-02-11 20:02:51 +01:00
parent 5b5f7d0e77
commit 73ff7384e0
11 changed files with 21 additions and 7 deletions

View File

@ -1,13 +1,15 @@
.include <bsd.compiler.mk>
.include <src.opts.mk>
PACKAGE= clang
MK_PIE:= no # Explicit libXXX.a references
.if ${MK_LLVM_FULL_DEBUGINFO} == "no"
.if ${COMPILER_TYPE} == "clang"
DEBUG_FILES_CFLAGS= -gline-tables-only
.else
DEBUG_FILES_CFLAGS= -g1
.endif
.endif
WARNS?= 0

View File

@ -1,4 +1,5 @@
.include <bsd.init.mk>
.include "../clang.pre.mk"
.PATH: ${CLANG_SRCS}/lib/Headers

View File

@ -1,5 +1,5 @@
.include <src.opts.mk>
.include <bsd.init.mk>
.include "../clang.pre.mk"
LIB= clang

View File

@ -1,4 +1,5 @@
.include <bsd.init.mk>
.include "../clang.pre.mk"
LIB= clangminimal

View File

@ -1,4 +1,5 @@
.include <bsd.init.mk>
.include "../lldb.pre.mk"
LIB= lldb

View File

@ -1,5 +1,5 @@
.include <src.opts.mk>
.include <bsd.init.mk>
.include "../llvm.pre.mk"
LIB= llvm

View File

@ -1,4 +1,5 @@
.include <bsd.init.mk>
.include "../llvm.pre.mk"
LIB= llvmminimal

View File

@ -1,5 +1,5 @@
.\" DO NOT EDIT-- this file is @generated by tools/build/options/makeman.
.Dd November 13, 2023
.Dd February 16, 2024
.Dt SRC.CONF 5
.Os
.Sh NAME
@ -929,6 +929,9 @@ Do not build the
tool.
.It Va WITHOUT_LLVM_CXXFILT
Install ELF Tool Chain's cxxfilt as c++filt, instead of LLVM's llvm-cxxfilt.
.It Va WITH_LLVM_FULL_DEBUGINFO
Generate full debug information for LLVM libraries and tools, which uses
more disk space and build resources, but allows for easier debugging.
.It Va WITHOUT_LLVM_TARGET_AARCH64
Do not build LLVM target support for AArch64.
The

View File

@ -205,6 +205,7 @@ __DEFAULT_NO_OPTIONS = \
LOADER_VERBOSE \
LOADER_VERIEXEC_PASS_MANIFEST \
LLVM_BINUTILS \
LLVM_FULL_DEBUGINFO \
MALLOC_PRODUCTION \
OFED_EXTRA \
OPENLDAP \

View File

@ -0,0 +1,2 @@
Generate full debug information for LLVM libraries and tools, which uses
more disk space and build resources, but allows for easier debugging.

View File

@ -1,14 +1,16 @@
WARNS?= 0
.include <bsd.compiler.mk>
.include <src.opts.mk>
MK_PIE:= no # Explicit libXXX.a references
.if ${MK_LLVM_FULL_DEBUGINFO} == "no"
.if ${COMPILER_TYPE} == "clang"
DEBUG_FILES_CFLAGS= -gline-tables-only
.else
DEBUG_FILES_CFLAGS= -g1
.endif
.endif
WARNS?= 0
.include "../Makefile.inc"