From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qk1-x729.google.com (mail-qk1-x729.google.com [IPv6:2607:f8b0:4864:20::729]) by sourceware.org (Postfix) with ESMTPS id 584A43858C20 for ; Sun, 25 Jun 2023 16:42:10 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 584A43858C20 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-x729.google.com with SMTP id af79cd13be357-7656652da3cso71852885a.1 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=1687711329; x=1690303329; 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=QygDz0AI3EzELCkn7aw4gGK4Fyl82YR1xjop11PuZNiuczYuhQbh4Qqfh8uOX85WW0 8BOnRHm2s/fX8rtQTwc7bP5fKuL/Nt8COvYHIS8aUxiP4ZkXgqV30Kq8LPsNsNwX9cRp muhknKnC/iwHZ8OdkZhuxUl7Kh6q2HH7p/LnA= 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=L2JFBigM5e7g3+iqhL0tDTBV8bokg67PC7aGkT89lM6sBjSm8xMspL+00AHbesx0FW BsVWYSaGhZfFaPAk6RSPTQxMTZznBr2g3/7LukXzGhBZD36pTP2ZG/hOhfMOwbvo5Af7 ti6W/ZZ8BmMhYaFCWsgaQ6dqm/xK6V0edt2D2/CQr5xUvkznJ64qCg5ZnP6G7kPSIlZZ pRAlKIgGKaEqBbmHQgcYOhnf0Xfd+ph0nrsH/ixBUSlyHoHLveBXZDk/UpmBoSVrPvnO hMnODkwUAajJFkTdJ2IK3AHO+9lxJtKvRpfY7YYl9y9JNwfDwriggdnHwZw8p+6UwYPI 4L/Q== X-Gm-Message-State: AC+VfDxciDwO2SOr4BzA2TvbkkKlQEbXbiawxS4Ca85KNktJcczyAiXh LfRkRed976NlyZSto4KxAqWmDg== 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=-3.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=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 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