From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=pass header.i=@linaro.org header.s=google header.b=Uktg8L0Y; spf=pass (domain: linaro.org, ip: 209.85.128.41, mailfrom: leif.lindholm@linaro.org) Received: from mail-wm1-f41.google.com (mail-wm1-f41.google.com [209.85.128.41]) by groups.io with SMTP; Tue, 23 Jul 2019 06:25:47 -0700 Received: by mail-wm1-f41.google.com with SMTP id x15so38550398wmj.3 for ; Tue, 23 Jul 2019 06:25:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=j92YGXRzrOFvZUkk7OmrdR9cr9gorQW6RxFr/i1K7oo=; b=Uktg8L0Y+/HhdOTF627KP1qaK4bxfxPfpvhWqar7R210mgge2yzlP9qjx5AzYKiYe/ IqBh8e6Dn3NpYEBVDGPnXFKuMSCdfRW4MpX09koag9Z3sPCPTyu7Qarz4c//ldTLz49b enRtWZty7qNpJ3Dk52OZuKO62XYWT3pfncrcICkpk+A1vz9gYY2DSLntyu/7LrVzxHr6 jIZn2WeDT8kggkcxIleNRNZm2lr+GK1XzTeFQ25uOTtjylhOhvvC6hGwga3v4obRwuDm ZDEc6sxWBVF48WeWReUNDSavd95ZYdadbg5RWkdVFGPCI150wDEQv2C+EUUBnAl0WyWi i8Cg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=j92YGXRzrOFvZUkk7OmrdR9cr9gorQW6RxFr/i1K7oo=; b=kqsKHmcQ6MFxq839vtiNemZp7b41TKfP6pxSPLDe4N/AxoTCfcuREK61fI5ObT0+0f hlFEUTPBeu8Pvnb/NzE7zy/AfLzjjstIYUIEQ1S5YdPrchqhzhEKL9W++lp+mcTCMvDK +onEXvJAoyGV6GitC8vpLTtdK11ylgunW1wdp9PG5D1sMi0yQVeEfGBMwBthDDjw0GEo n8vNSkoszsqUZeNeEgHeUd7zQiKd4u9nnJ6z7Ro46HNPi93pBB8oYNOxV3WyBrET0px3 vBRkR9ppKF13rf47OMDPEATxFY2i/EAl3ZDuzxNkMiUoJlDsH8aEFkMg4NdflfC0t+Rc Qr4w== X-Gm-Message-State: APjAAAUR0grBDVpp8ljTiAEtuqOQOYnAFpcvNJhQt6PpekOobIQWz1VF XoRU7/FALYMT+9LrjeOGCMOJIg== X-Google-Smtp-Source: APXvYqy5yNHNTPkgnkRYwAu86DaB6GrwLgG3nBeXEyIYfsvpTlQSVJ4h7869oGxY5ykgqanVVcz6Pw== X-Received: by 2002:a1c:a848:: with SMTP id r69mr67376341wme.12.1563888345315; Tue, 23 Jul 2019 06:25:45 -0700 (PDT) Return-Path: Received: from bivouac.eciton.net (bivouac.eciton.net. [2a00:1098:0:86:1000:23:0:2]) by smtp.gmail.com with ESMTPSA id x11sm30579541wmi.26.2019.07.23.06.25.44 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Tue, 23 Jul 2019 06:25:44 -0700 (PDT) Date: Tue, 23 Jul 2019 14:25:43 +0100 From: "Leif Lindholm" To: "Gao, Liming" Cc: "devel@edk2.groups.io" , Laszlo Ersek , "Kinney, Michael D" , Ard Biesheuvel , "Wang, Jian J" , "Ye, Ting" Subject: Re: [edk2-devel] [PATCH 0/4] Arm, ArmPlatform, Crypto, Embedded: list internal headers in [Sources] Message-ID: <20190723132543.GI11541@bivouac.eciton.net> References: <20190719164319.9070-1-lersek@redhat.com> <20190722103755.GA11541@bivouac.eciton.net> <591319a9-eceb-ab39-0ec0-ccd2530b0e58@redhat.com> <20190723090644.GD11541@bivouac.eciton.net> <20190723121940.GH11541@bivouac.eciton.net> <4A89E2EF3DFEDB4C8BFDE51014F606A14E4B11C4@SHSMSX104.ccr.corp.intel.com> MIME-Version: 1.0 In-Reply-To: <4A89E2EF3DFEDB4C8BFDE51014F606A14E4B11C4@SHSMSX104.ccr.corp.intel.com> User-Agent: Mutt/1.10.1 (2018-07-13) Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Tue, Jul 23, 2019 at 01:02:42PM +0000, Gao, Liming wrote: > > > > I am just not pleased with the issue > > > > bringing this to the fore is caused by the new caching feature using a > > > > different mechanism for tracking header file dependencies than the > > > > primary build process. > > > > > > Ugh... that's a lot of statements compressed into a single sentence. Can > > > you please break it down for me? (Yes, I remember the mailing list > > > reference you posted earlier, that discussion was too divergent for me.) > > > > The inclusion of .h files in .inf is not necessary for determining > > build-time dependencies on the Makefile level. > > Right. In fact, build tool will parse source file to find their dependent header files, > and list those header files as the dependency in Makefile. If Visual Studio does not have functionality similar to the GCC family's -M flag, then yeah, I can see why the tool needs to take care of this itself. Although it would be good if we could find a way to not fully maintain our own code for this. > > Thus, the warnings come out of a different and unrelated level of the > > build system, related to the recent build cache features. Which means > > we're checking header file build dependencies through two different > > mechanisms at two different points of the build. > > This is related to build feature --hash. When --hash option is enabled, build will calculate > the hash value of source files specified in INF file. If hash value is not changed, build tool > will not parse source files, and not regenerate Makefile again. So, --hash option > is the incremental way in the build parse phase. If some header files are not > specified in INF file, it will cause hash value inaccurate. Right - so we actually have two levels of dependency scanning in the build tool itself? One for the .inf file contents, and one for the source file contents. > Then, Makefile may not > be generated to match the real source code, and cause the incremental build failure. > So, the missing header files in INF file may bring the incremental build issue when --hash option. > If you don't enable --hash option, there is no problem even if the missing header files exist. Right, but we still see the warning messages without using --hash. Thank you very much for the summary - it clarifies the situation greatly. Would it be feasible to update the --hash functionality to make use of the include dependencies extracted from the source files? (Clearly, we know when the source files change, so we would also know when we would need to re-run the dependency search.) If not, I think we should make the explicit listing of .h files in .inf mandatory, triggering a build failure when not the case. If it is, then I think we should make it explicitly banned to list .h files in .inf. (If there is no other dependency, such as doxygen, also making use of .inf listings of .h files.) And this may well be a topic requiring much longer discussion. While undecided, I would definitely prefer if we could disable the warning when not actually building with --hash. Best Regards, Leif