mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04: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
(cherry picked from commit 73ff7384e025033abc98fd5437a48beb8077a90b)
This commit is contained in:
parent
275aee513b
commit
c4149abc5d
11 changed files with 21 additions and 7 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
|
||||
.include <bsd.init.mk>
|
||||
.include "../clang.pre.mk"
|
||||
|
||||
.PATH: ${CLANG_SRCS}/lib/Headers
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
|
||||
.include <src.opts.mk>
|
||||
.include <bsd.init.mk>
|
||||
.include "../clang.pre.mk"
|
||||
|
||||
LIB= clang
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
|
||||
.include <bsd.init.mk>
|
||||
.include "../clang.pre.mk"
|
||||
|
||||
LIB= clangminimal
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
|
||||
.include <bsd.init.mk>
|
||||
.include "../lldb.pre.mk"
|
||||
|
||||
LIB= lldb
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
|
||||
.include <src.opts.mk>
|
||||
.include <bsd.init.mk>
|
||||
.include "../llvm.pre.mk"
|
||||
|
||||
LIB= llvm
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
|
||||
.include <bsd.init.mk>
|
||||
.include "../llvm.pre.mk"
|
||||
|
||||
LIB= llvmminimal
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
.\" DO NOT EDIT-- this file is @generated by tools/build/options/makeman.
|
||||
.Dd September 21, 2023
|
||||
.Dd March 8, 2024
|
||||
.Dt SRC.CONF 5
|
||||
.Os
|
||||
.Sh NAME
|
||||
|
|
@ -938,6 +938,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
|
||||
|
|
|
|||
|
|
@ -207,6 +207,7 @@ __DEFAULT_NO_OPTIONS = \
|
|||
LOADER_VERIEXEC_PASS_MANIFEST \
|
||||
LLVM_ASSERTIONS \
|
||||
LLVM_BINUTILS \
|
||||
LLVM_FULL_DEBUGINFO \
|
||||
MALLOC_PRODUCTION \
|
||||
OFED_EXTRA \
|
||||
OPENLDAP \
|
||||
|
|
|
|||
2
tools/build/options/WITH_LLVM_FULL_DEBUGINFO
Normal file
2
tools/build/options/WITH_LLVM_FULL_DEBUGINFO
Normal 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.
|
||||
|
|
@ -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"
|
||||
|
|
|
|||
Loading…
Reference in a new issue