From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qk1-x72d.google.com (mail-qk1-x72d.google.com [IPv6:2607:f8b0:4864:20::72d]) by sourceware.org (Postfix) with ESMTPS id 7991D3858C36 for ; Sun, 25 Jun 2023 16:42:10 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 7991D3858C36 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-x72d.google.com with SMTP id af79cd13be357-76595a7b111so23634585a.2 for ; Sun, 25 Jun 2023 09:42:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kitware.com; s=google; t=1687711330; x=1690303330; 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=uD3pvlnj/hmmafz3A88ous52FwOT1Mp8CJLUXlk2oL0=; b=D42zkJ/vCs3rbR4MdpDekXaWYk+meD3koRbqwdI3xEyO+ROmLIWVIA0x4leNY4swYP OJ008QA3DbjUW0VcUvGXUoIqcQ5kX0v33UJdzzm4k6mjnb7I5Iez7AVG3KVDdDF9zZch maZc0WcCSA730RuUbXCfZ/Gavnp9KQrwEirHE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687711330; x=1690303330; 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=uD3pvlnj/hmmafz3A88ous52FwOT1Mp8CJLUXlk2oL0=; b=jWu5oohxMq16ztk6mclNXf1M/1Kcrzuj2g7u7CTOTP/sV6F0uOBkG3wg7Vh6iHdt/T oauJ+l6vWgqtbJoZ4yIFSx/tUawO9DWRfzDGLaxf0FZVxbI/Ys6KwSrkhk7rH0x+d6ff bViaQrmlgyh1y5bptTnLLKdXxUj2nWwp5qnvfsB65DAwXwXlauyyJSnS8kBW7uNePUzY zsurhnZ1nRaCXougMHtA73SqO1vgCIkEJcyT35qbZWp7ON16RQDSRAkMI+3NO0jwVIM5 jZfa5ZNPRoyH+l5GJr8KBcS+r5Bx6JexHFCKuqp/QHhpMBSpgzt0d6koZLH+J/kjoqIV qs/Q== X-Gm-Message-State: AC+VfDwqCC9BcLdBhW6s38gu92AY+npXCn3Pn+/hIcM5pnw7rvi5IckP mOIFv+NqVwkyYzrgXoQqrUtDfQ== X-Google-Smtp-Source: ACHHUZ5kmHwiRFmZme3myuXSjEalqvd6S5ur9aPXOcFrWtnPxCvs/QuuKhskSLFXN/g41x+AGqLc6Q== X-Received: by 2002:a05:620a:468f:b0:765:38b7:83e3 with SMTP id bq15-20020a05620a468f00b0076538b783e3mr12865506qkb.58.1687711329761; Sun, 25 Jun 2023 09:42:09 -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 t29-20020a05620a005d00b0075f2c1afb7fsm1774154qkt.57.2023.06.25.09.42.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 25 Jun 2023 09:42:09 -0700 (PDT) Date: Sun, 25 Jun 2023 12:42:08 -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 5/5] c++modules: report module mapper files as a dependency Message-ID: <20230625164208.GD270821@farprobe> References: <20230125210636.2960049-1-ben.boeckel@kitware.com> <20230125210636.2960049-6-ben.boeckel@kitware.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/2.2.9 (2022-11-12) X-Spam-Status: No, score=-5.1 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 Fri, Jun 23, 2023 at 10:44:11 -0400, Jason Merrill wrote: > On 1/25/23 16:06, Ben Boeckel wrote: > > It affects the build, and if used as a static file, can reliably be > > tracked using the `-MF` mechanism. > > Hmm, this seems a bit like making all .o depend on the Makefile; it Technically this is true: the command line for the TU lives in said Makefile; if I updated it, a new TU would be really nice. This is a long-standing limitation of `make` though. FWIW, `ninja` fixes it by tracking the command line used and CMake's Makefiles generator handles it by storing TU flags in an included file and depending on that file from the TU output. > shouldn't be necessary to rebuild all TUs that use modules when we add > another module to the mapper file. If I change it from: ``` mod.a mod.a.cmi ``` to: ``` mod.a mod.a.replace.cmi ``` I'd expect a recompile. As with anything, this depends on the granularity of the mapper files. A global mapper file is very similar to a global response file and given that we don't have line-change granularity dependency tracking… > What is your expected use case for > this dependency? CMake, at least, uses a per-TU mapper file, so any build system using a similar strategy handling the above case would only affect TUs that actually list `mod.a`. --Ben