From owner-dev-commits-src-main@freebsd.org Mon Sep 6 09:25:35 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4DD8B671647; Mon, 6 Sep 2021 09:25:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4H330b1nnjz4Xh0; Mon, 6 Sep 2021 09:25:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1E6561C84F; Mon, 6 Sep 2021 09:25:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1869PZZt046105; Mon, 6 Sep 2021 09:25:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1869PZbC046104; Mon, 6 Sep 2021 09:25:35 GMT (envelope-from git) Date: Mon, 6 Sep 2021 09:25:35 GMT Message-Id: <202109060925.1869PZbC046104@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alex Richardson Subject: git: 24f586182ff4 - main - Enable MK_LLVM_BINUTILS if MK_ASAN is requested MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: arichardson X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 24f586182ff4d0e94a5c17cb542e0bffefb51fa7 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Sep 2021 09:25:35 -0000 The branch main has been updated by arichardson: URL: https://cgit.FreeBSD.org/src/commit/?id=24f586182ff4d0e94a5c17cb542e0bffefb51fa7 commit 24f586182ff4d0e94a5c17cb542e0bffefb51fa7 Author: Alex Richardson AuthorDate: 2021-09-06 09:24:33 +0000 Commit: Alex Richardson CommitDate: 2021-09-06 09:24:34 +0000 Enable MK_LLVM_BINUTILS if MK_ASAN is requested ASan will not be able to provide backtraces with symbol names with elftoolchain's addr2line. To fix this turn MK_LLVM_BINUTILS on by default when ASan instrumentation is requested. Reviewed By: emaste, markj Differential Revision: https://reviews.freebsd.org/D31061 --- share/mk/src.opts.mk | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/share/mk/src.opts.mk b/share/mk/src.opts.mk index 5363cb6e78f9..28e18260affd 100644 --- a/share/mk/src.opts.mk +++ b/share/mk/src.opts.mk @@ -470,6 +470,12 @@ MK_CLANG_FULL:= no MK_LLVM_COV:= no .endif +.if ${MK_ASAN} == "yes" +# In order to get sensible backtraces from ASAN we have to install +# llvm-symbolizer as /usr/bin/addr2line instead of the elftoolchain version. +MK_LLVM_BINUTILS:= yes +.endif + .if ${MK_LLVM_BINUTILS} == "yes" # MK_LLVM_CXXFILT is a subset of MK_LLVM_BINUTILS and should therefore be # enabled if MK_LLVM_BINUTILS is set.