From nobody Sat Dec 25 11:55:52 2021 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id EAC2318F360E; Sat, 25 Dec 2021 11:55:58 +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 4JLj7J10Sjz4lPN; Sat, 25 Dec 2021 11:55:55 +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 CD97216E89; Sat, 25 Dec 2021 11:55:52 +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 1BPBtqpt006919; Sat, 25 Dec 2021 11:55:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1BPBtqCm006918; Sat, 25 Dec 2021 11:55:52 GMT (envelope-from git) Date: Sat, 25 Dec 2021 11:55:52 GMT Message-Id: <202112251155.1BPBtqCm006918@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: 64d26775b37e - stable/12 - Fix bootstrapping to actually build lldb-tblgen for later use List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 64d26775b37ea9f0e1f9f664f6f59faff8e85d70 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1640433356; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lO8r1M1S4gqwWh0X/eDtlN5bbSR7c04+J9b/bOO8em8=; b=XGR+kLbtdk7YnWGX3kze+6JmaqTxvz3OcUhDjRdg7ZetGMyQp7mxhVtg5ejeY8rUkkdwHr ljXbnxJKFVnqbKXCQwhUBEfhBA3apo8phdj/1xodEiHtYZUXOFKFo4NIodV7FpEj6uH8TP q5z5CK29u1xyrwVDuY0buOzVQs4ORkKlrFtwHgWmlipTLoSyew4VTie3cRKXctc9NOQQ2h Z8VzLkCoA1DURsZAHE7lBf6xetgjuPHacvyW7ZLgnjeuuIdfKJ8HEGk7S+YZwSVOmaxU4g SgRN16sdYsszMdCkCmzKfl8HRBbN7/CWe/kUIF6HK/xCh5td6N1e5b9LfN5Bsg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1640433356; a=rsa-sha256; cv=none; b=G87Bkitag4YuIw1/gMn27h1TrwGvzZNAaVsRwNNScd/+disrnIqkXuMfNDLWlUrXrLNXLp SmEJQ83SaUkqo2CoXOLbprSSkw0ustQQ4tUFAzx4DihtVvIatE2zFtOubWWwUoXAjEW58u dO9/F1tiizqF1bQJ+GzNL1+Ptw6EGo8k2TGgam88ebVEB2cK+yy+q5XmfU/OaVFvG0rVU3 43GpXqFELDkyr061cPu/kw/r5LQcBax5HqGFBFzR+jRzY1KMs6Wjqid9Cdkcz5pHrPeMPZ 9CPRkeGIXoGAOQ66puqrVY4iaSD2FnMwl3mSIz0qBMr+dJCor5xrqFU0BPtcVw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=64d26775b37ea9f0e1f9f664f6f59faff8e85d70 commit 64d26775b37ea9f0e1f9f664f6f59faff8e85d70 Author: Jessica Clarke AuthorDate: 2021-08-24 13:59:04 +0000 Commit: Dimitry Andric CommitDate: 2021-12-25 11:51:23 +0000 Fix bootstrapping to actually build lldb-tblgen for later use Because MK_LLDB=no is in BSARGS, the bootstrap-tools recursive make does not add lldb-tblgen to _clang_tblgen, causing it to not be built. This means that the build currently always uses the host's lldb-tblgen (which, whilst currently it appears to work, could in future break if TableGen backends are added or altered) and, if it doesn't exist (either because the current FreeBSD system was built with it disabled, or you're building on macOS/Linux), fails. Linux and macOS cross-builds used to work simply because LLDB was previously in BROKEN_OPTIONS when building on non-FreeBSD. Instead, move MK_LLDB=no from BSARGS to XMAKE. This ensures that the lib/clang build in cross-tools continues to not build LLDB parts for the bootstrap toolchain (both to save time/space on FreeBSD, and because our vendored LLDB does not include the macOS and Linux host files so those would fail to build). The DIRDEPS target is updated to move MK_LLDB=no from the BSARGS block that mirrors Makefile.inc1 to the line that disables additional toolchain components. The DIRDEPS build likely suffers from the same issue currently, but having never used it and not being familiar with how it works I am leaving that as-is. If it does suffer from the same issue it should be easily reproducible by renaming /usr/bin/lldb-tblgen or moving it to a directory not in PATH. Fixes: 31ba4ce8898f ("Allow bootstrapping llvm-tblgen on macOS and Linux") MFC after: 1 week Reviewed by: dim, emaste, imp Differential Revision: https://reviews.freebsd.org/D31531 (cherry picked from commit 1e4c802913af619ac15741bbd276e1141ca17dc9) --- Makefile.inc1 | 5 +++-- targets/pseudo/bootstrap-tools/Makefile | 3 +-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Makefile.inc1 b/Makefile.inc1 index e4ccf47efe04..ce961bf9c396 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -664,7 +664,6 @@ BSARGS= DESTDIR= \ MK_CLANG_FORMAT=no \ MK_CLANG_FULL=no \ MK_HTML=no \ - MK_LLDB=no \ MK_MAN=no \ MK_PROFILE=no \ MK_RETPOLINE=no \ @@ -704,7 +703,9 @@ TMAKE= \ XMAKE= ${BMAKE} \ TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \ MK_CLANG_IS_CC=${MK_CLANG_BOOTSTRAP} \ - MK_GDB=no MK_TESTS=no + MK_GDB=no \ + MK_LLDB=no \ + MK_TESTS=no # kernel-tools stage KTMAKEENV= INSTALL="sh ${.CURDIR}/tools/install.sh" \ diff --git a/targets/pseudo/bootstrap-tools/Makefile b/targets/pseudo/bootstrap-tools/Makefile index 1a973dc7fc18..2262e269ff7e 100644 --- a/targets/pseudo/bootstrap-tools/Makefile +++ b/targets/pseudo/bootstrap-tools/Makefile @@ -48,7 +48,6 @@ BSARGS= DESTDIR= \ MK_CLANG_FORMAT=no \ MK_CLANG_FULL=no \ MK_HTML=no \ - MK_LLDB=no \ MK_MAN=no \ MK_PROFILE=no \ MK_SSP=no \ @@ -57,7 +56,7 @@ BSARGS= DESTDIR= \ MK_INCLUDES=yes # We will handle building the toolchain and cross-compiler. -BSARGS+= MK_CROSS_COMPILER=no MK_CLANG=no MK_GCC=no +BSARGS+= MK_CROSS_COMPILER=no MK_CLANG=no MK_GCC=no MK_LLDB=no DISTRIB_ENV= INSTALL="sh ${SRCTOP}/tools/install.sh" NO_FSCHG=1 MK_TESTS=no legacy: .MAKE ${META_DEPS}