From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qk1-x730.google.com (mail-qk1-x730.google.com [IPv6:2607:f8b0:4864:20::730]) by sourceware.org (Postfix) with ESMTPS id 28C113858D3C for ; Fri, 23 Jun 2023 02:46:02 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 28C113858D3C Authentication-Results: sourceware.org; dmarc=pass (p=reject dis=none) header.from=kitware.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=kitware.com Received: by mail-qk1-x730.google.com with SMTP id af79cd13be357-763dc87aac4so4771385a.2 for ; Thu, 22 Jun 2023 19:46:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kitware.com; s=google; t=1687488361; x=1690080361; h=user-agent:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=voT9+qzLLwj/sDUXbyMFdQ+4aqdJqH9dfRYlS/dQlE0=; b=i722JJBfdnBW3S114EInM0szZbrJ7TJyxH/TN5dFNMmIi2cyD5KdS7rCmUjJ0u8Omh QQ9XQDQNeC650W6gMQ69bxZlDtNzYX8xGhhD0euOZAd1rRLtfbigcEr8U2pA9gcEmAaL GrSkWGjKsSoiZiWU/0Mczp31Qu4ZBnr/OPO24= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687488361; x=1690080361; h=user-agent:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=voT9+qzLLwj/sDUXbyMFdQ+4aqdJqH9dfRYlS/dQlE0=; b=FkkjPn3Pnne6+U2PVRwr4eNs5igLGr2h2aKI+wRcMsTtYO/LgAzquiJuWyr6YUk001 WsGkN9I8hOHsO5G4IeTgChJXHF5VHUzyka1VFvV6RXevzY45Gzd3VwdfIB1ThEOG+c/Y xaZAY3HpnD4DKTy3BdcczQiFHk5dOP7IN2XdFGn54KRKM553uVpv7/wuLtYu7i9u1D6A YAmjlfeRzCbVikKZFCIEpqJMnGfqD48Tg34P+ZrdgUJIb9rJ43zT5zrtn/YxU9/GPFVM HgsHQGlU+/MIsiGpjP6dRLNOBsp3cNV8PJilM/xQs/zmeNhbOeggcBysfIYyGZF4STyL ffSw== X-Gm-Message-State: AC+VfDzYPYECzsQBdpjHvocrrOmjqLuuDjbnH91kRkOgOPAzKRyOgVLQ oUyCzaZHlYdsa6bz5kQ7jeWs6w== X-Google-Smtp-Source: ACHHUZ4ZQIjbwS4N0Ijh+emgHXBT9huatpOqO2SoADCrAOdwa4uOWBsdNp4rFi7Oei9Xr3NMyYhBcg== X-Received: by 2002:a05:620a:674c:b0:763:af8d:9932 with SMTP id rq12-20020a05620a674c00b00763af8d9932mr8547004qkn.30.1687488361473; Thu, 22 Jun 2023 19:46:01 -0700 (PDT) Received: from localhost (cpe-142-105-146-128.nycap.res.rr.com. [142.105.146.128]) by smtp.gmail.com with ESMTPSA id t26-20020a05620a005a00b0075ecdc937ffsm4083910qkt.41.2023.06.22.19.46.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Jun 2023 19:46:01 -0700 (PDT) Date: Thu, 22 Jun 2023 22:45:59 -0400 From: Ben Boeckel To: Jason Merrill Cc: gcc-patches@gcc.gnu.org, nathan@acm.org, fortran@gcc.gnu.org, gcc@gcc.gnu.org, brad.king@kitware.com Subject: Re: [PATCH v5 4/5] c++modules: report imported CMI files as dependencies Message-ID: <20230623024559.GA255658@farprobe> References: <20230125210636.2960049-1-ben.boeckel@kitware.com> <20230125210636.2960049-5-ben.boeckel@kitware.com> <734eef7c-f7c3-519c-e007-cb42f8dc8a82@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <734eef7c-f7c3-519c-e007-cb42f8dc8a82@redhat.com> User-Agent: Mutt/2.2.9 (2022-11-12) X-Spam-Status: No, score=-5.2 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,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 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 in v7 once I finish up testing). This logic cannot be used for p1689 output because it assumes the location and names of CMI files (`.c++m`) that will be necessary (it is related to the `CXX_IMPORTS +=` GNU make/libcody extensions that will, e.g., cause `ninja` to choke if it is read from `-MF` output as it uses "fancier" Makefile syntax than tools that are not actually `make` are going to be willing to support). This codepath is the *actual* filename being read at compile time and is relevant at all times; it may duplicate what `preprocessed_module` sets up. I'm also realizing that this is why I need to pass `-fdeps-format=p1689` when compiling…there may need to be another, more idiomatic, way to disable this additional syntax usage in `-MF` output. --Ben