From 4228f24a2edcbe54318142ebdc57c3f0ca015f0a Mon Sep 17 00:00:00 2001 From: kamil Date: Tue, 9 Jun 2020 21:50:32 +0000 Subject: [PATCH] Build and install llvm-symbolizer for MKLLVM=yes llvm-symbolizer is an alternative for GNU addr2line(1), heavily used by the LLVM sanitizers. Do not install it as tools as it is not necessary as of today in that stage. --- distrib/sets/lists/comp/mi | 3 ++- distrib/sets/lists/debug/mi | 3 ++- external/apache2/llvm/bin/Makefile | 6 +++--- external/apache2/llvm/bin/llvm-symbolizer/Makefile | 4 +++- external/apache2/llvm/lib/Makefile | 8 ++++---- 5 files changed, 14 insertions(+), 10 deletions(-) diff --git a/distrib/sets/lists/comp/mi b/distrib/sets/lists/comp/mi index 23f4c27cc5a3..588759b915a4 100644 --- a/distrib/sets/lists/comp/mi +++ b/distrib/sets/lists/comp/mi @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.2334 2020/06/08 16:36:18 maxv Exp $ +# $NetBSD: mi,v 1.2335 2020/06/09 21:50:32 kamil Exp $ # # Note: don't delete entries from here - mark them as "obsolete" instead. ./etc/mtree/set.comp comp-sys-root @@ -52,6 +52,7 @@ ./usr/bin/lint comp-c-bin ./usr/bin/lld comp-obsolete obsolete ./usr/bin/lldb comp-obsolete obsolete +./usr/bin/llvm-symbolizer comp-c-bin llvm ./usr/bin/llvm-tblgen comp-c-bin llvm ./usr/bin/lorder comp-util-bin ./usr/bin/luac comp-util-bin diff --git a/distrib/sets/lists/debug/mi b/distrib/sets/lists/debug/mi index 7571b85fc2a2..8e1b16548dc7 100644 --- a/distrib/sets/lists/debug/mi +++ b/distrib/sets/lists/debug/mi @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.314 2020/06/08 02:54:41 rin Exp $ +# $NetBSD: mi,v 1.315 2020/06/09 21:50:32 kamil Exp $ ./etc/mtree/set.debug comp-sys-root ./usr/lib comp-sys-usr compatdir ./usr/lib/i18n/libBIG5_g.a comp-c-debuglib debuglib,compatfile @@ -635,6 +635,7 @@ ./usr/libdata/debug/usr/bin/lex.debug comp-c-debug debug ./usr/libdata/debug/usr/bin/lint.debug comp-c-debug debug ./usr/libdata/debug/usr/bin/lkbib.debug comp-groff-debug groff,debug +./usr/libdata/debug/usr/bin/llvm-symbolizer.debug comp-c-debug llvm,debug ./usr/libdata/debug/usr/bin/llvm-tblgen.debug comp-c-debug llvm,debug ./usr/libdata/debug/usr/bin/locale.debug comp-locale-debug debug ./usr/libdata/debug/usr/bin/locate.debug comp-util-debug debug diff --git a/external/apache2/llvm/bin/Makefile b/external/apache2/llvm/bin/Makefile index 360fd0a4e82b..b3a5f944726d 100644 --- a/external/apache2/llvm/bin/Makefile +++ b/external/apache2/llvm/bin/Makefile @@ -1,10 +1,11 @@ -# $NetBSD: Makefile,v 1.1 2019/11/11 22:44:58 joerg Exp $ +# $NetBSD: Makefile,v 1.2 2020/06/09 21:50:32 kamil Exp $ .include SUBDIR= clang \ clang-tblgen \ - tblgen + tblgen \ + llvm-symbolizer .if defined(LLVM_DEVELOPER) SUBDIR+= \ @@ -32,7 +33,6 @@ SUBDIR+= \ llvm-readobj \ llvm-size \ llvm-strings \ - llvm-symbolizer \ llvm-xray \ opt \ sancov \ diff --git a/external/apache2/llvm/bin/llvm-symbolizer/Makefile b/external/apache2/llvm/bin/llvm-symbolizer/Makefile index 77f130794cb9..ae73e3d2309d 100644 --- a/external/apache2/llvm/bin/llvm-symbolizer/Makefile +++ b/external/apache2/llvm/bin/llvm-symbolizer/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.1 2019/11/11 22:45:01 joerg Exp $ +# $NetBSD: Makefile,v 1.2 2020/06/09 21:50:32 kamil Exp $ PROG_CXX= llvm-symbolizer NOMAN= yes @@ -21,6 +21,8 @@ LLVM_LIBS+= \ BitstreamReader \ IR \ BinaryFormat \ + ObjectYAML \ + TextAPI \ Support \ Demangle diff --git a/external/apache2/llvm/lib/Makefile b/external/apache2/llvm/lib/Makefile index c11d52017158..a86859d8f26d 100644 --- a/external/apache2/llvm/lib/Makefile +++ b/external/apache2/llvm/lib/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.2 2020/02/23 02:01:17 joerg Exp $ +# $NetBSD: Makefile,v 1.3 2020/06/09 21:50:32 kamil Exp $ .include @@ -116,11 +116,12 @@ SUBDIR+= \ libLLVMRuntimeDyld .endif -.if ${NO_LLVM_DEVELOPER:Uno} == "no" && ${LLVM_DEVELOPER:U} == "yes" +.if !defined(HOSTLIB) && !defined(_BSD_HOSTINIT_MK_) SUBDIR+= \ libLLVMDebugInfoPDB \ libLLVMDebugInfoPDBNative \ - libLLVMDebugInfoSymbolize + libLLVMDebugInfoSymbolize \ + libLLVMObjectYAML .endif .if ${NO_LLVM_DEVELOPER:Uno} == "no" && ${LLVM_DEVELOPER:U} == "yes" @@ -129,7 +130,6 @@ SUBDIR+= \ libLLVMHello \ libLLVMInterpreter \ libLLVMLineEditor \ - libLLVMObjectYAML \ libLLVMToolDrivers \ libLLVMToolDriversDlltool \ libLLVMXRay