From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qv1-xf30.google.com (mail-qv1-xf30.google.com [IPv6:2607:f8b0:4864:20::f30]) by sourceware.org (Postfix) with ESMTPS id 73A2A3858D32; Tue, 18 Jul 2023 21:12:35 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 73A2A3858D32 Authentication-Results: sourceware.org; dmarc=fail (p=none dis=none) header.from=acm.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-qv1-xf30.google.com with SMTP id 6a1803df08f44-63c70dc7ed2so34748786d6.0; Tue, 18 Jul 2023 14:12:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1689714754; x=1692306754; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :sender:from:to:cc:subject:date:message-id:reply-to; bh=1+Y51FGh8EmW/D1en6/6Cq1t2tYlgWh67K4C+Fc+DEQ=; b=HRn9jrBsGxsKq9RasZy1/GDMpuNgpXjcTO/tg7DL+eRQCGn9hWUn0Kwj15EK2+GquU 2vHJW8vyQb30fInuEVnrHeVS9nirJ2xQnXrs3t8ZrT5+R5KSWbgElEage/1fkgnjSEsn 2TAtEeDOeu9dSu4uaHbn06rtafrA4TXzZ9Nj/A/JuJqxA+565taA19WBjSrskxH5cbwh j8F5rC4K6quEOsxhOkvGs3jy1WSrrjNeew7bkWoSw4h2wbXu4dOWF5PgyIgMNsOZsp0a ZIWs9Hocod+4T5zplqW+CUkRd1Xsr5/FXjMSrXxTmWPAbJnNU5uDZN6T8P03Kzd2VWLc wJVQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689714754; x=1692306754; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :sender:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=1+Y51FGh8EmW/D1en6/6Cq1t2tYlgWh67K4C+Fc+DEQ=; b=ZhNhqsUWeNiL0LkscZhzJ2cKY1sIEtYBrVKWdln3t5Fbih/eQiehFsvWsklqEDjrBf EX4SiTItQ0R+Xbxfk90yeg2QusuO8hLjgkAZenmuV9/Y3Vki8M9lOTLM0Qk71suirZnw JJlgsJUICLL0aGZSlJjr6wMIj+KdIGGNfaB3iieN/4nHe5dYN/pyZuESgZeMTwnFMKQx mzdOWcH7aE7a1xqYr+moriIhm9wbQw1K04DwQEaiBi+ZNM15Xw//o8caToKZ77nSxrYK Wl6n/zT8vkzLt7E5DHLTL4R4+cw8rjOqclLJsayL69WmDsQ9j/9i39te5cWPlzFvX1kF WWWw== X-Gm-Message-State: ABy/qLYSv9fnAMQbz2HFgFY0G+5Lmt7Z1mS5y8hxIeRRLosEoy+15bb2 EJU7qVSX6aBddRkJENAwYj3rDPuWw2w= X-Google-Smtp-Source: APBJJlEEO6xkWY7QWYu5GDi/krCZ3PuH6U8zhHs4irM1C/tLfPwLsF9SxkxiWPW7jwoDezukdJk2XQ== X-Received: by 2002:a0c:b285:0:b0:635:ec47:bfa0 with SMTP id r5-20020a0cb285000000b00635ec47bfa0mr17157215qve.49.1689714754281; Tue, 18 Jul 2023 14:12:34 -0700 (PDT) Received: from ?IPV6:2601:19c:5282:9160::1? ([2601:19c:5282:9160::1]) by smtp.googlemail.com with ESMTPSA id g19-20020a0cdf13000000b00637615a1f33sm995215qvl.20.2023.07.18.14.12.33 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 18 Jul 2023 14:12:33 -0700 (PDT) Sender: Nathan Sidwell Message-ID: <256861aa-31fe-cce4-1bc2-17f14db5524e@acm.org> Date: Tue, 18 Jul 2023 17:12:32 -0400 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Subject: Re: [PATCH v5 4/5] c++modules: report imported CMI files as dependencies Content-Language: en-US To: Jason Merrill , Ben Boeckel Cc: gcc-patches@gcc.gnu.org, fortran@gcc.gnu.org, gcc@gcc.gnu.org, brad.king@kitware.com References: <20230125210636.2960049-1-ben.boeckel@kitware.com> <20230125210636.2960049-5-ben.boeckel@kitware.com> <734eef7c-f7c3-519c-e007-cb42f8dc8a82@redhat.com> <20230623024559.GA255658@farprobe> <541367ff-25da-9745-d768-c60f235cd5bc@acm.org> <20230625163610.GC270821@farprobe> <29600358-9421-cbe3-92b6-ab77a1a715d1@redhat.com> From: Nathan Sidwell In-Reply-To: <29600358-9421-cbe3-92b6-ab77a1a715d1@redhat.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3032.1 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On 7/18/23 16:52, Jason Merrill wrote: > On 6/25/23 12:36, Ben Boeckel wrote: >> On Fri, Jun 23, 2023 at 08:12:41 -0400, Nathan Sidwell wrote: >>> On 6/22/23 22:45, Ben Boeckel wrote: >>>> On Thu, Jun 22, 2023 at 17:21:42 -0400, Jason Merrill wrote: >>>>> On 1/25/23 16:06, Ben Boeckel wrote: >>>>>> They affect the build, so report them via `-MF` mechanisms. >>>>> >>>>> Why isn't this covered by the existing code in preprocessed_module? >>>> >>>> It appears as though it is neutered in patch 3 where >>>> `write_make_modules_deps` is used in `make_write` (or will use that name >>> >>> Why do you want to record the transitive modules? I would expect just noting the >>> ones with imports directly in the TU would suffice (i.e check the 'outermost' >>> arg) >> >> FWIW, only GCC has "fat" modules. MSVC and Clang both require the >> transitive closure to be passed. The idea there is to minimize the size >> of individual module files. >> >> If GCC only reads the "fat" modules, then only those should be recorded. >> If it reads other modules, they should be recorded as well. Please explain what you mean by fat modules. There seems to be confusion. > > But wouldn't the transitive modules be dependencies of the direct imports, so > (re)building the direct imports would first require building the transitive > modules anyway?  Expressing the transitive closure of dependencies for each > importer seems redundant when it can be easily derived from the direct > dependencies of each module. > > Jason > -- Nathan Sidwell