From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qk1-x734.google.com (mail-qk1-x734.google.com [IPv6:2607:f8b0:4864:20::734]) by sourceware.org (Postfix) with ESMTPS id 587783858C2A for ; Sun, 25 Jun 2023 16:42:10 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 587783858C2A 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-x734.google.com with SMTP id af79cd13be357-763bd31d223so186581485a.3 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=1687711329; x=1690303329; 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=gFxLCh+8m5qNuEv22ADyuO431B0uXAzizqIGEjGrMyZU0aKpbwyUeki0WYX6hi9w80 dDs6chFHYOimEfep6rbHL8nO+skL77agDXLfFWICSoA8PmMSPseoFjtolohiRDfkP+uO p1WOEAyF3TWQM8MQw6ESN2ssCKjcC+6KN5Zk6NNfq8Qb3S3kXYsZLF6tIR9GBOkZ7WXB 1Eep+JW8fV0dwO/d2NbTUR6DRpgErxaTcFeBc7GPA4TCdaaR0c3Hdvyv6ff2NGTew6qI sM5nXcmaYnNZZho9XfEpniVDcw/INmnKzSJzOJpHJUePznn5rV7YnjRyhQbsFdlclbHt VfAw== X-Gm-Message-State: AC+VfDxB0N89HsbJtOcnzkkEWXnqpv7MKdu/qGXmzbvHrDrQ2qRITPyJ JOju4Xnyv6jnWYZ3j96T226XEg== 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=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