From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id AFF7E3858C60 for ; Tue, 18 Jul 2023 20:52:49 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org AFF7E3858C60 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1689713569; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=lUpkyb3lpKJFbXk5hqIb9hKd0jf1ohjGoxeWAviy35w=; b=bfTg5CeNy7Hvnwh97oJOYTwEUnvwfLNuKQWBe2hc5AAc4VD0NhrHZSOYM6xVMaDntO7eIl PQWH+Qv8H8Qu4CfWcXWZnLeOcR9wEgYlX282XKKHQgqjez/IJtHS/n4hEXH1/QmkVVvr9s efKRmoj9Qe2hFzG0W4An1bHszVXaywI= Received: from mail-qv1-f70.google.com (mail-qv1-f70.google.com [209.85.219.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-38-E5aSIAtfMW2WT2Yf4CrENA-1; Tue, 18 Jul 2023 16:52:47 -0400 X-MC-Unique: E5aSIAtfMW2WT2Yf4CrENA-1 Received: by mail-qv1-f70.google.com with SMTP id 6a1803df08f44-6237c937691so1098196d6.0 for ; Tue, 18 Jul 2023 13:52:46 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689713566; x=1692305566; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=lUpkyb3lpKJFbXk5hqIb9hKd0jf1ohjGoxeWAviy35w=; b=US8TjUZpwoQCH+trrIq1D5op8yfIR7nXGsWD7IJ0xnIodO/4yZca/FK3njjiLw2SPS 3gn6YImoJxDPwJ1PIwVl8jmtpIasE0se6716gQIskHRa7GJrA03PVJwPezU6v3ZaFGI8 7H65KyFDDKwSo7Vu40onFgdqvWvDBuaomgjvJYZzsnJGudgBoE40cFOAEcW7vn/RyJKz JEMvlK8gM5KTIUfH3pwsCo21b7gs06xq3heUtN0NYaVtH5ixiUN18sIFnfxGtrvyM+4y 1NzsJJJuNWZn9F3m0NjegmQzrbSxf/MRAGZ7bk15BzQvY1xREtmQq5TbcyViq3SPIDMJ krsw== X-Gm-Message-State: ABy/qLYybn+w0bQzfqvfqpsoOeJZa3FsraVbxs9OAsbW2qcBkodR5tGs JDJFUavsqPfloxz0asA16I5DqB2Z6oU4tTq7Qc0F2DljuAcYVGS77KP0sWJeIHm0brtketpU4bM 8lL5MB4T8Fc6tqPJ1Ag== X-Received: by 2002:a0c:8ccb:0:b0:63c:71bf:f5d1 with SMTP id q11-20020a0c8ccb000000b0063c71bff5d1mr267856qvb.25.1689713566568; Tue, 18 Jul 2023 13:52:46 -0700 (PDT) X-Google-Smtp-Source: APBJJlGc9DDvUJJFWwynfUCTxAiV26JIlwRckj6M1aKfQdVxicx3T8qj687DWiVFu7OkkfIbBZnYHQ== X-Received: by 2002:a0c:8ccb:0:b0:63c:71bf:f5d1 with SMTP id q11-20020a0c8ccb000000b0063c71bff5d1mr267839qvb.25.1689713566299; Tue, 18 Jul 2023 13:52:46 -0700 (PDT) Received: from [192.168.1.108] (130-44-146-16.s12558.c3-0.arl-cbr1.sbo-arl.ma.cable.rcncustomer.com. [130.44.146.16]) by smtp.gmail.com with ESMTPSA id y16-20020a0ce050000000b006261e6a88c7sm998834qvk.36.2023.07.18.13.52.44 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 18 Jul 2023 13:52:45 -0700 (PDT) Message-ID: <29600358-9421-cbe3-92b6-ab77a1a715d1@redhat.com> Date: Tue, 18 Jul 2023 16:52:44 -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 To: Ben Boeckel , Nathan Sidwell 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> From: Jason Merrill In-Reply-To: <20230625163610.GC270821@farprobe> X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-6.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE,TXREP,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 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. 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