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 DE4963858D32 for ; Tue, 18 Jul 2023 20:52:48 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org DE4963858D32 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=1689713568; 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=aEBLdNoitOKnMtoDoP1lk2Jd6ZI2AixnrWcOQ62kVgX+j+AnjI8E29AAtT1WU4PFQoDJ8E yjg54NyYH7pmhFpGzfVBUNfv1cjWSBsIrEcEBMbg9FJYrb7nxv/c8V0Xa2ocV0Wg1uSBbJ K/B6K9iPK0DRGMeacmdGC1xIj0LP6UE= Received: from mail-qv1-f69.google.com (mail-qv1-f69.google.com [209.85.219.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-606-B21lrxz5NVCXMtm0iV35yA-1; Tue, 18 Jul 2023 16:52:46 -0400 X-MC-Unique: B21lrxz5NVCXMtm0iV35yA-1 Received: by mail-qv1-f69.google.com with SMTP id 6a1803df08f44-63c78bd1078so1051166d6.1 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=WuHF9EbCQe3lZYACUQz61Ox0p9Nso0IuySR/iNXcNKYptMAY51J95ETTxGI/lGS0bd WNpGhiyhVEeM3Y8+MGcrL6H2GrHxk0Tke8aNoLj7v99IMNum/hMGum7Mi0+AHYDmj0/e 67V+p2kNRCcesiZemcyHcfmxYxe/n3Y7srsQxN+OkTF/Lb7/WlPzMTH1NeQHX/NsIM3A MVcZ6qhQtpNbIZEkzq07rp2Ixjaivlt1xKjvGTRxEgHslP7fv1ttrf3fweQkEMiOi6Cd ODKqhElW9W28LOoz0lTBZ3WjGXhXmO9KLBaaIjdkMpm8IJ2jV6MufBa8b7rcaM4FRugd 8LPQ== X-Gm-Message-State: ABy/qLaQYgW7CKrsILCXwo3QNeE8MqUm5iyHxbMLbJKOmMVjD52FLaf5 ReOAJJScBTbw9cpEu7ve5cM+2/Bqa6/svaZEBLOua86PWJfrLe34bA2rYqmejKo6kWZD1tFj0xT QpWaT2Z0= X-Received: by 2002:a0c:8ccb:0:b0:63c:71bf:f5d1 with SMTP id q11-20020a0c8ccb000000b0063c71bff5d1mr267849qvb.25.1689713566524; 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=ham 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