From patchwork Wed Jan 25 21:06:35 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ben Boeckel X-Patchwork-Id: 48346 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp488185wrn; Wed, 25 Jan 2023 13:13:32 -0800 (PST) X-Google-Smtp-Source: AMrXdXsdqESUu53vaGbN4qDjnmIESx0kC9Eg9bgMj/x42J4RR288Ws5qN4AXAXzTVLPyVd9U+Ji5 X-Received: by 2002:a50:ff08:0:b0:49b:7416:e3ff with SMTP id a8-20020a50ff08000000b0049b7416e3ffmr34654398edu.5.1674681212207; Wed, 25 Jan 2023 13:13:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674681212; cv=none; d=google.com; s=arc-20160816; b=JSOSHObGk9mhQI1BxuNc+JkEPWqLxt+y+2cFsIZDgnKTXZ5bH1MSjU0kQrzBGkNJQo q8Qv7dS667e/3UYimpsqbJHAIoR+gGlmxhr/YSlAFPSQXTfyecl0dd0Ur5r6y7tiY9za BIF8yFrQBojovtZl7HTTsh6lnLuNxEhJASTD2bBOxABRZw8bLC46iIY4fjRNenYl0b7m hqUG6JbyNl3Bo90+UrbzAr6yr7CnUcCIE802Ra+PGeLuioRy6ACg/K2286oyU1tWB5JS tdfKRrGKhAIJfVUfEdnV6xXkzkLYJon9STYJ/iN3SZua31dtw5Hq/t4NTJx0CT5qTCG4 eExQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:from:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence :content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:dmarc-filter:delivered-to :dkim-signature:dkim-filter; bh=lR2F06PJ2gLZr4ZqFEDl+Wb59mKqMF2JV32cxeIuAIk=; b=vF5uDeLfNbHAWsM4mvh9SR8SxSslb+WVfCg6Mv2wFWZl/jKPnvRVLj1pLN70eAl418 0ouGbZm3BNfzWg33F6LF09boBeYNrsO8IuoH/xMkp61ya0V1ZcW2vP5ETVHDU8KE++tE TmqZZ3hC9hvBuQqm9K4ylXWH/t3SFeE7uQtqCJ7Ex27XZBD/fnLybY1/fMNhIWMtJEUI 3oHK0Yc1FzgPBBoBVjZx9UvzcPEJ41vxdIaKLekfjJdONKG60Df5rsUtqPaeJxZYBZSF tIBEuHLuKMduXF+Bl/UJqA5Une4NA36iro2g7/hBVP+mQXx02RipyIyNnq1y4geSe2dV D31A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=c8N03MEl; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id v13-20020aa7d64d000000b0049e89e692e8si7632616edr.190.2023.01.25.13.13.31 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 Jan 2023 13:13:32 -0800 (PST) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=c8N03MEl; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id F2E99394343C for ; Wed, 25 Jan 2023 21:08:59 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org F2E99394343C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1674680940; bh=lR2F06PJ2gLZr4ZqFEDl+Wb59mKqMF2JV32cxeIuAIk=; h=To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=c8N03MElO6mTiuLtN1yP8oANaWO0Rix0u+uokPAtUyFG+jlkdfd18nlJikm3986g6 j5ePEm/xoJ/0HrVowh3k3D8wGi0ZXCtLZbZ8YfN5O93j6fLdVs8KHWkyjJKMkWQWcu k3smQIVWB/YyJm4Rif/6HGyplpVA8ZTnKcc6TZ9c= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mail-qt1-x834.google.com (mail-qt1-x834.google.com [IPv6:2607:f8b0:4864:20::834]) by sourceware.org (Postfix) with ESMTPS id B72533857C55 for ; Wed, 25 Jan 2023 21:06:58 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org B72533857C55 Received: by mail-qt1-x834.google.com with SMTP id x5so17201652qti.3 for ; Wed, 25 Jan 2023 13:06:58 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=lR2F06PJ2gLZr4ZqFEDl+Wb59mKqMF2JV32cxeIuAIk=; b=2a/rUvB2hKUzqfX5TJYhj1oP0rAfiyIr+UBJD0HdvPBoiVfR1PbQ1VZ7D5lF7yCwDQ HzlRZiPnBiLP3uKhra1vGjya0tWYmrmeLeJKVlvGGyCJoG/A2NHSXIrBlqr8ufugL5tM hhEPQe2e4ngP5rxKM4G5VhCvAyp59De1tLxx/qXvdA53XdVu4g9yWUNR7rhoSOIFsCM2 qN2xhIBxYxJgD+2bg73LJpNMaTvjCwWdRbKlclZjfdml9Zbj9c1EJJADLNl5eG33zBMs R5oNJhwORUd/pn4tr34AOhzCQrwSA3o37tEjQjnqpj0dXXfVTFa1Gqy7UETknVxb6bWx MFvw== X-Gm-Message-State: AFqh2kqvn8Ea4O4flDXPdQs2oqnbkJzzy8hLLrJlFmUOvnDUyOX9weNT t+ehiGBk7ZiZVHCwUwiDVP80MvKMA3kcvpNB8Fw= X-Received: by 2002:ac8:6643:0:b0:3b4:14c8:8e69 with SMTP id j3-20020ac86643000000b003b414c88e69mr43111068qtp.38.1674680818076; Wed, 25 Jan 2023 13:06:58 -0800 (PST) Received: from localhost (cpe-142-105-146-128.nycap.res.rr.com. [142.105.146.128]) by smtp.gmail.com with ESMTPSA id i7-20020ac84887000000b003b6a17e1996sm4026473qtq.83.2023.01.25.13.06.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 25 Jan 2023 13:06:57 -0800 (PST) To: gcc-patches@gcc.gnu.org Cc: Ben Boeckel , jason@redhat.com, nathan@acm.org, fortran@gcc.gnu.org, gcc@gcc.gnu.org, brad.king@kitware.com Subject: [PATCH v5 4/5] c++modules: report imported CMI files as dependencies Date: Wed, 25 Jan 2023 16:06:35 -0500 Message-Id: <20230125210636.2960049-5-ben.boeckel@kitware.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230125210636.2960049-1-ben.boeckel@kitware.com> References: <20230125210636.2960049-1-ben.boeckel@kitware.com> MIME-Version: 1.0 X-Spam-Status: No, score=-13.3 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Ben Boeckel via Gcc-patches From: Ben Boeckel Reply-To: Ben Boeckel Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1756030526809493788?= X-GMAIL-MSGID: =?utf-8?q?1756030526809493788?= They affect the build, so report them via `-MF` mechanisms. gcc/cp/ * module.cc (do_import): Report imported CMI files as dependencies. Signed-off-by: Ben Boeckel --- gcc/cp/module.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gcc/cp/module.cc b/gcc/cp/module.cc index ebd30f63d81..dbd1b721616 100644 --- a/gcc/cp/module.cc +++ b/gcc/cp/module.cc @@ -18966,6 +18966,8 @@ module_state::do_import (cpp_reader *reader, bool outermost) dump () && dump ("CMI is %s", file); if (note_module_cmi_yes || inform_cmi_p) inform (loc, "reading CMI %qs", file); + /* Add the CMI file to the dependency tracking. */ + deps_add_dep (cpp_get_deps (reader), file); fd = open (file, O_RDONLY | O_CLOEXEC | O_BINARY); e = errno; }