From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.3 required=3.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_IN_DEF_DKIM_WL autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DF2E2C2D0E4 for ; Fri, 20 Nov 2020 20:59:16 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 843DD22264 for ; Fri, 20 Nov 2020 20:59:16 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="n7Q8WZSH" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730470AbgKTU6z (ORCPT ); Fri, 20 Nov 2020 15:58:55 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36526 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728740AbgKTU6z (ORCPT ); Fri, 20 Nov 2020 15:58:55 -0500 Received: from mail-ua1-x942.google.com (mail-ua1-x942.google.com [IPv6:2607:f8b0:4864:20::942]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E29C7C061A04 for ; Fri, 20 Nov 2020 12:58:53 -0800 (PST) Received: by mail-ua1-x942.google.com with SMTP id q4so3568055ual.8 for ; Fri, 20 Nov 2020 12:58:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=JWd8Wn96hX4ViEXOk8cnBriUSzyNGlVdd9D7G7X9krM=; b=n7Q8WZSHAzqNmYrv9dNqZivuKsDeywwvO4kl1fLm8yAB9nz+k+3lzkHIC6URMndd9N ncfzYU53qrW6L7ktmuiCSCQkVZ/eP5JDWD7TMwJg8e5yVePPZIH2mL+P1inZGOs772ll a8QRES6vjPZ1qfhyKHcxA2SDzvnvBpk4g78r8aAZWi1llK+zb+YIfMZx34KzfOChRgPa 6pg4ojnEfHCIbmevi1eG30tobfXlx2k6qexNCevPM6lVr7/QqpezqSu6yAgpxx7oPbC8 wgUzxLS+Q8yRx5MTE+8rAH2p4+zi25RWg2L/DNevmi7STfpPOI63AYByOiSP7iPAbmY3 vTAw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=JWd8Wn96hX4ViEXOk8cnBriUSzyNGlVdd9D7G7X9krM=; b=GDa4aw3W/Xo3zLjgxNSx8LatMTyAHmXuKGg1v4kPJfwfP8qNinIAtDc+CDIK+w2q3C hS1qE8d5nkQK9kkwN3wSoi8/isl5x6/R8NrPNXQmlOjjNEi9wZn7AgVg20/7rpp/A4AC nVS6RAwaeV0RScojggXNl/5q0YvFCmQKD7dao1w1Gqs3U73w15AgeI1e2NKfvZWyRRze QmA4MI24Notldb+PbZmhfKpYy59aoeg26Yw+68m5KE1a9hEKcgDHjT1mWVgYVClOjHW8 cKPyqDB45ba/XOkTl8xuvVfik+0jYsV+fzimz8AxWgccE8PTkmsDaAwz3RngdbzMDtnh DtLw== X-Gm-Message-State: AOAM5318A9rMpozir1psSVSKzF34+Nt0/7nCTqhurfpPW7m4yQfP2fgN Noo5iKzxGGFoVx1OGq7He1Ay72rCu6IorhbopmbXJg== X-Google-Smtp-Source: ABdhPJwahvlnvpf0HHckrWnv4UpriDhIz+vSW2ABkfUPKok1Yyd5+VP5JP/VFRj6CCBwEc5NUFJu59Sg2jFzgZb6jlE= X-Received: by 2002:ab0:23cc:: with SMTP id c12mr12322573uan.89.1605905932783; Fri, 20 Nov 2020 12:58:52 -0800 (PST) MIME-Version: 1.0 References: <20201118220731.925424-1-samitolvanen@google.com> <20201118220731.925424-3-samitolvanen@google.com> <202011201144.3F2BB70C@keescook> <20201120202935.GA1220359@ubuntu-m3-large-x86> <202011201241.B159562D7@keescook> In-Reply-To: <202011201241.B159562D7@keescook> From: Sami Tolvanen Date: Fri, 20 Nov 2020 12:58:41 -0800 Message-ID: Subject: Re: [PATCH v7 02/17] kbuild: add support for Clang LTO To: Kees Cook Cc: Nathan Chancellor , Nick Desaulniers , Masahiro Yamada , Steven Rostedt , Will Deacon , Josh Poimboeuf , Peter Zijlstra , Greg Kroah-Hartman , "Paul E. McKenney" , clang-built-linux , Kernel Hardening , linux-arch , Linux ARM , Linux Kbuild mailing list , LKML , linux-pci@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Nov 20, 2020 at 12:43 PM Kees Cook wrote: > > On Fri, Nov 20, 2020 at 01:29:35PM -0700, Nathan Chancellor wrote: > > On Fri, Nov 20, 2020 at 11:47:21AM -0800, Kees Cook wrote: > > > On Fri, Nov 20, 2020 at 08:23:11AM -0800, Sami Tolvanen wrote: > > > > Changing the ThinLTO config to a choice and moving it after the main > > > > LTO config sounds like a good idea to me. I'll see if I can change > > > > this in v8. Thanks! > > > > > > Originally, I thought this might be a bit ugly once GCC LTO is added, > > > but this could be just a choice like we're done for the stack > > > initialization. Something like an "LTO" choice of NONE, CLANG_FULL, > > > CLANG_THIN, and in the future GCC, etc. > > > > Having two separate choices might be a little bit cleaner though? One > > for the compiler (LTO_CLANG versus LTO_GCC) and one for the type > > (THINLTO versus FULLLTO). The type one could just have a "depends on > > CC_IS_CLANG" to ensure it only showed up when needed. > > Right, that's how the stack init choice works. Kconfigs that aren't > supported by the compiler won't be shown. I.e. after Sami's future > patch, the only choice for GCC will be CONFIG_LTO_NONE. But building > under Clang, it would offer CONFIG_LTO_NONE, CONFIG_LTO_CLANG_FULL, > CONFIG_LTO_CLANG_THIN, or something. > > (and I assume CONFIG_LTO would be def_bool y, depends on !LTO_NONE) I'm fine with adding ThinLTO as another option to the LTO choice, but it would duplicate the dependencies and a lot of the help text. I suppose we could add another config for the dependencies and have both LTO options depend on that instead. Sami From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E93EFC56202 for ; Fri, 20 Nov 2020 20:59:31 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 72A2122264 for ; Fri, 20 Nov 2020 20:59:31 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="uqfLu4m4"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=google.com header.i=@google.com header.b="n7Q8WZSH" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 72A2122264 Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:To:Subject:Message-ID:Date:From:In-Reply-To: References:MIME-Version:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=rhL3xUr/rMTCP5HeK+PxVwdav7VIWeL+7YCleavojrw=; b=uqfLu4m4ULpRVrDmnKGumgB63 b+g1/zwGzpOOH1pvivKNBuXyZ5qnFyAb6dLU1BLnWsOKh4Bg05e9expLXXyOhefebB99jzNc4hiXf vYyLi/2ZQdoLFhDa9t3dknxEe0BhlWQXqUzIG574v42wt0Sj92JMdO653zoKZ/3dTbj2Qs8HS1n9j 3FvKEikru1BuYpXo8Iqz7rWn29QafYar9jDZjjVgL1ITop/JsoOmLW63t90Ln/paf1YNLFLLt7okU N7tYPCJQbh01fWv90oxWUnYlmCRLbwZyO7FU2ACSQy80nP5NwiwWFXSK0BWPIo26LgqglhJmhd96R x967Is3QQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kgDUf-0006Ol-BS; Fri, 20 Nov 2020 20:58:57 +0000 Received: from mail-ua1-x941.google.com ([2607:f8b0:4864:20::941]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kgDUc-0006O8-Ue for linux-arm-kernel@lists.infradead.org; Fri, 20 Nov 2020 20:58:55 +0000 Received: by mail-ua1-x941.google.com with SMTP id 103so249214uai.9 for ; Fri, 20 Nov 2020 12:58:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=JWd8Wn96hX4ViEXOk8cnBriUSzyNGlVdd9D7G7X9krM=; b=n7Q8WZSHAzqNmYrv9dNqZivuKsDeywwvO4kl1fLm8yAB9nz+k+3lzkHIC6URMndd9N ncfzYU53qrW6L7ktmuiCSCQkVZ/eP5JDWD7TMwJg8e5yVePPZIH2mL+P1inZGOs772ll a8QRES6vjPZ1qfhyKHcxA2SDzvnvBpk4g78r8aAZWi1llK+zb+YIfMZx34KzfOChRgPa 6pg4ojnEfHCIbmevi1eG30tobfXlx2k6qexNCevPM6lVr7/QqpezqSu6yAgpxx7oPbC8 wgUzxLS+Q8yRx5MTE+8rAH2p4+zi25RWg2L/DNevmi7STfpPOI63AYByOiSP7iPAbmY3 vTAw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=JWd8Wn96hX4ViEXOk8cnBriUSzyNGlVdd9D7G7X9krM=; b=hYMbf+1R/vwDIinkkJDBJoVtN/dsOAXZbMm7SZw8JCM+BE/ECzanSjGtdgkHOScOZ8 79UEv+x0MXohoEbv621iUerlsCsGMoggNqXnrWQEaRqYIf9CbTtn8H5scB84OiYNxxmj EULYQM3pQkLKyWlyyrEbCgA4fqr5Omq+CqyfyKKKGjXfBGqJAf7PylBElbstBEP+h6mk F6S+ow5vVnxdM6mB2kav6Ws5mkeHhDkd73eW97sOjNnSwKKBfCijmP7vfQ/BAKhh8OwK s2Z9weLitg6h4lXQNTUsdnc2mvPyln4jqdF0bCKgxC4FHQ60by+3h0XsSLJFpaQ4xaFq /hcQ== X-Gm-Message-State: AOAM530BHC5+Yn/4yewOvZgzf+FDTpf96wxjnoEEbWADZdhvNrQ3x8Pu QCZ6dSwTE6lAmRDWAP1JN2ieECxmg35oS/DpSS/9tg== X-Google-Smtp-Source: ABdhPJwahvlnvpf0HHckrWnv4UpriDhIz+vSW2ABkfUPKok1Yyd5+VP5JP/VFRj6CCBwEc5NUFJu59Sg2jFzgZb6jlE= X-Received: by 2002:ab0:23cc:: with SMTP id c12mr12322573uan.89.1605905932783; Fri, 20 Nov 2020 12:58:52 -0800 (PST) MIME-Version: 1.0 References: <20201118220731.925424-1-samitolvanen@google.com> <20201118220731.925424-3-samitolvanen@google.com> <202011201144.3F2BB70C@keescook> <20201120202935.GA1220359@ubuntu-m3-large-x86> <202011201241.B159562D7@keescook> In-Reply-To: <202011201241.B159562D7@keescook> From: Sami Tolvanen Date: Fri, 20 Nov 2020 12:58:41 -0800 Message-ID: Subject: Re: [PATCH v7 02/17] kbuild: add support for Clang LTO To: Kees Cook X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201120_155855_092238_6D9FEA68 X-CRM114-Status: GOOD ( 22.95 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-arch , "Paul E. McKenney" , Kernel Hardening , Peter Zijlstra , Greg Kroah-Hartman , Masahiro Yamada , Linux Kbuild mailing list , Nick Desaulniers , LKML , Steven Rostedt , clang-built-linux , linux-pci@vger.kernel.org, Josh Poimboeuf , Nathan Chancellor , Will Deacon , Linux ARM Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Fri, Nov 20, 2020 at 12:43 PM Kees Cook wrote: > > On Fri, Nov 20, 2020 at 01:29:35PM -0700, Nathan Chancellor wrote: > > On Fri, Nov 20, 2020 at 11:47:21AM -0800, Kees Cook wrote: > > > On Fri, Nov 20, 2020 at 08:23:11AM -0800, Sami Tolvanen wrote: > > > > Changing the ThinLTO config to a choice and moving it after the main > > > > LTO config sounds like a good idea to me. I'll see if I can change > > > > this in v8. Thanks! > > > > > > Originally, I thought this might be a bit ugly once GCC LTO is added, > > > but this could be just a choice like we're done for the stack > > > initialization. Something like an "LTO" choice of NONE, CLANG_FULL, > > > CLANG_THIN, and in the future GCC, etc. > > > > Having two separate choices might be a little bit cleaner though? One > > for the compiler (LTO_CLANG versus LTO_GCC) and one for the type > > (THINLTO versus FULLLTO). The type one could just have a "depends on > > CC_IS_CLANG" to ensure it only showed up when needed. > > Right, that's how the stack init choice works. Kconfigs that aren't > supported by the compiler won't be shown. I.e. after Sami's future > patch, the only choice for GCC will be CONFIG_LTO_NONE. But building > under Clang, it would offer CONFIG_LTO_NONE, CONFIG_LTO_CLANG_FULL, > CONFIG_LTO_CLANG_THIN, or something. > > (and I assume CONFIG_LTO would be def_bool y, depends on !LTO_NONE) I'm fine with adding ThinLTO as another option to the LTO choice, but it would duplicate the dependencies and a lot of the help text. I suppose we could add another config for the dependencies and have both LTO options depend on that instead. Sami _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.3 required=3.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_IN_DEF_DKIM_WL autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 05EADC56202 for ; Fri, 20 Nov 2020 20:59:14 +0000 (UTC) Received: from mother.openwall.net (mother.openwall.net [195.42.179.200]) by mail.kernel.org (Postfix) with SMTP id 0E5F122264 for ; Fri, 20 Nov 2020 20:59:12 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="n7Q8WZSH" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0E5F122264 Authentication-Results: mail.kernel.org; dmarc=fail (p=reject dis=none) header.from=google.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kernel-hardening-return-20437-kernel-hardening=archiver.kernel.org@lists.openwall.com Received: (qmail 12199 invoked by uid 550); 20 Nov 2020 20:59:05 -0000 Mailing-List: contact kernel-hardening-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Received: (qmail 12176 invoked from network); 20 Nov 2020 20:59:04 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=JWd8Wn96hX4ViEXOk8cnBriUSzyNGlVdd9D7G7X9krM=; b=n7Q8WZSHAzqNmYrv9dNqZivuKsDeywwvO4kl1fLm8yAB9nz+k+3lzkHIC6URMndd9N ncfzYU53qrW6L7ktmuiCSCQkVZ/eP5JDWD7TMwJg8e5yVePPZIH2mL+P1inZGOs772ll a8QRES6vjPZ1qfhyKHcxA2SDzvnvBpk4g78r8aAZWi1llK+zb+YIfMZx34KzfOChRgPa 6pg4ojnEfHCIbmevi1eG30tobfXlx2k6qexNCevPM6lVr7/QqpezqSu6yAgpxx7oPbC8 wgUzxLS+Q8yRx5MTE+8rAH2p4+zi25RWg2L/DNevmi7STfpPOI63AYByOiSP7iPAbmY3 vTAw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=JWd8Wn96hX4ViEXOk8cnBriUSzyNGlVdd9D7G7X9krM=; b=iCTGbq0blwjWmaAFXL8bSX48bD2b46ke7JeoJIqIVHNtIzkBDN/4ETftB6pXtC6xeO eeEF2evgiYRfXdz0htN1VqbBmvjyeFPAvq7CC4uJCZJQX+oiqfjbQ3bMJHQeuvYvbQip SWlNN2P23LbeFryYbDSn3ppycXzqLJt239pSvo6JPOZ5et5QLhk7pWENQ5zFMvXA7lJ1 cENZHkImT4YXPGdDjpc1YMcNXEk6IlB6Y6ZDL41AjNPldREXqBtLjuA9xX21LAfptpmY QyZQuGsT2wNX6AS1iMpfkZq6eTWBV6YcNjC8gplSSqTvnsZgBbobrSh2zqwDk7EYwDip BrOg== X-Gm-Message-State: AOAM5306ggHIjPw0DRivc3g7dG+s3A7OJMBIPfVOIUNs9utCXq1KQtcI bpwNltOEH7d88StxY0SrdY2drr6zjQouP7LCJaCUNw== X-Google-Smtp-Source: ABdhPJwahvlnvpf0HHckrWnv4UpriDhIz+vSW2ABkfUPKok1Yyd5+VP5JP/VFRj6CCBwEc5NUFJu59Sg2jFzgZb6jlE= X-Received: by 2002:ab0:23cc:: with SMTP id c12mr12322573uan.89.1605905932783; Fri, 20 Nov 2020 12:58:52 -0800 (PST) MIME-Version: 1.0 References: <20201118220731.925424-1-samitolvanen@google.com> <20201118220731.925424-3-samitolvanen@google.com> <202011201144.3F2BB70C@keescook> <20201120202935.GA1220359@ubuntu-m3-large-x86> <202011201241.B159562D7@keescook> In-Reply-To: <202011201241.B159562D7@keescook> From: Sami Tolvanen Date: Fri, 20 Nov 2020 12:58:41 -0800 Message-ID: Subject: Re: [PATCH v7 02/17] kbuild: add support for Clang LTO To: Kees Cook Cc: Nathan Chancellor , Nick Desaulniers , Masahiro Yamada , Steven Rostedt , Will Deacon , Josh Poimboeuf , Peter Zijlstra , Greg Kroah-Hartman , "Paul E. McKenney" , clang-built-linux , Kernel Hardening , linux-arch , Linux ARM , Linux Kbuild mailing list , LKML , linux-pci@vger.kernel.org Content-Type: text/plain; charset="UTF-8" On Fri, Nov 20, 2020 at 12:43 PM Kees Cook wrote: > > On Fri, Nov 20, 2020 at 01:29:35PM -0700, Nathan Chancellor wrote: > > On Fri, Nov 20, 2020 at 11:47:21AM -0800, Kees Cook wrote: > > > On Fri, Nov 20, 2020 at 08:23:11AM -0800, Sami Tolvanen wrote: > > > > Changing the ThinLTO config to a choice and moving it after the main > > > > LTO config sounds like a good idea to me. I'll see if I can change > > > > this in v8. Thanks! > > > > > > Originally, I thought this might be a bit ugly once GCC LTO is added, > > > but this could be just a choice like we're done for the stack > > > initialization. Something like an "LTO" choice of NONE, CLANG_FULL, > > > CLANG_THIN, and in the future GCC, etc. > > > > Having two separate choices might be a little bit cleaner though? One > > for the compiler (LTO_CLANG versus LTO_GCC) and one for the type > > (THINLTO versus FULLLTO). The type one could just have a "depends on > > CC_IS_CLANG" to ensure it only showed up when needed. > > Right, that's how the stack init choice works. Kconfigs that aren't > supported by the compiler won't be shown. I.e. after Sami's future > patch, the only choice for GCC will be CONFIG_LTO_NONE. But building > under Clang, it would offer CONFIG_LTO_NONE, CONFIG_LTO_CLANG_FULL, > CONFIG_LTO_CLANG_THIN, or something. > > (and I assume CONFIG_LTO would be def_bool y, depends on !LTO_NONE) I'm fine with adding ThinLTO as another option to the LTO choice, but it would duplicate the dependencies and a lot of the help text. I suppose we could add another config for the dependencies and have both LTO options depend on that instead. Sami