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 89D9D3858412 for ; Tue, 18 Jul 2023 20:52:50 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 89D9D3858412 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-28-NBSsj5KjPz6FHPHjol4g0Q-1; Tue, 18 Jul 2023 16:52:47 -0400 X-MC-Unique: NBSsj5KjPz6FHPHjol4g0Q-1 Received: by mail-qv1-f70.google.com with SMTP id 6a1803df08f44-635dd236b63so1137686d6.0 for ; Tue, 18 Jul 2023 13:52:47 -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=P21Vt+JRWZh4CwVI8CXQAYeU1Lh6rufn9AEqR1I4ZqMBQ7WYMYJ4M3tY4NLRF6OUi7 MAkNVeiyipHHXB2H3zepIg5pb/2iZ5N8p3PAW4jQJZTY6/LCXpk8bRHOvOU0TOfeGxqx hrQQ7MAiylfCAcq2/jTt7DjFqdgfPTsPzFAGgjF9+hcymodaJ+2mocRNjpOk8IEUzbpb V7C90eSyaVN6yqnNRmgX+GIswtI4wdMpaZV4xlOEsrywdU/zrdbOGKB/nGmZxHEYpS9A mlgb0IFtYV3awvMRu2/SQZ9WEtjOHELw1kjDV8EfzsanSepTDTjUmYal88RiYgCUGzLU kUiA== X-Gm-Message-State: ABy/qLY1BwB9UM239ZR9CDnyKem5k1fFaAYB5xKDluxDQHy7csNOuuWG osflAGAVv3cF/XlpgtKqKkez8TcfXo3cNQfS4R5sVzlf5Ldd0MHesHfyOs8/g+HMW5sE48qsSDK yo0slicRHbE3m X-Received: by 2002:a0c:8ccb:0:b0:63c:71bf:f5d1 with SMTP id q11-20020a0c8ccb000000b0063c71bff5d1mr267853qvb.25.1689713566540; 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