Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] Managed Build rebuilding whole folder when options of one file change
  • From: Torbjorn SVENSSON <torbjorn.svensson@xxxxxx>
  • Date: Wed, 17 Aug 2022 11:08:03 +0000
  • Accept-language: en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=st.com; dmarc=pass action=none header.from=st.com; dkim=pass header.d=st.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=+sGcElmgBiDJSbpP71qfrycgo1urdYbpiytu8MNurJc=; b=ZGdtVrSJoJlIP6ls1llsXHtD4T5kP7E6H858hy9qriMRvdui0HILy1Wob/e97XBgb3SM05/+w3vc2HKNPeRjd3BIpxEluxS0mOR4MMveNNXdzcWGU0/l0Y12b6UjAb9oXpvbbhq7C2sLYUVsGeQaLsjYZP2fOcb8OSevcO/8Y742ps4HcrdvKgQ1m3dHySn2uoPcl0Em8XwexPx/TnFM2h3G4hYX5slLaHce/kXax7IF1LSURID8Lefw0PEqy3YJaFXXjVb+PL0B777XRpL4rXgC531TFFEydqv9A9T7RBWEU0BJFk1FOMjuAUzTt8VUZqWm4ByGClUKEbDPFIOM4A==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mpOS8knXHw4OYV4ipJPWTDiGgHONEazW/0D6JzwQxM8ZRkLHjxAZqLPcdFiH3maD6D7oWIxR2BRGNZIkLSlGYd5vsSQXb8K0hUIJLa2HowMB/Nf4Vppm+L+lKZl6hF9wzzzaz51o8DWmXmNHeLAie4wCVpOzBcSH9G42qTOr8VgdyusMLn1xzhO36q5O1J4CvcYkDmXr7C9Gb36oCd9vUFRPlRRTRBo3acYBjuzRw6BTo3kmzjNmBua4wkxyV2ITmW6RUdVL9c2mYfA/LEqJ3lOs3t1FndHWvkVrL9bknkKk4oXAEdsc6KQLjQ6VsojiO7a5FJobmhxAogU6GD1L+A==
  • Delivered-to: cdt-dev@xxxxxxxxxxx
  • List-archive: <https://www.eclipse.org/mailman/private/cdt-dev/>
  • List-help: <mailto:cdt-dev-request@eclipse.org?subject=help>
  • List-subscribe: <https://www.eclipse.org/mailman/listinfo/cdt-dev>, <mailto:cdt-dev-request@eclipse.org?subject=subscribe>
  • List-unsubscribe: <https://www.eclipse.org/mailman/options/cdt-dev>, <mailto:cdt-dev-request@eclipse.org?subject=unsubscribe>
  • Msip_labels: MSIP_Label_cf8c7287-838c-46dd-b281-b1140229e67a_Enabled=true; MSIP_Label_cf8c7287-838c-46dd-b281-b1140229e67a_SetDate=2022-08-17T11:05:17Z; MSIP_Label_cf8c7287-838c-46dd-b281-b1140229e67a_Method=Privileged; MSIP_Label_cf8c7287-838c-46dd-b281-b1140229e67a_Name=cf8c7287-838c-46dd-b281-b1140229e67a; MSIP_Label_cf8c7287-838c-46dd-b281-b1140229e67a_SiteId=75e027c9-20d5-47d5-b82f-77d7cd041e8f; MSIP_Label_cf8c7287-838c-46dd-b281-b1140229e67a_ActionId=1b2eb328-8184-4498-b8c4-089bc86775da; MSIP_Label_cf8c7287-838c-46dd-b281-b1140229e67a_ContentBits=0
  • Thread-index: AQHYsht6EFaG6P2LEU2/+N1CoZFLcK2y67pQ
  • Thread-topic: Managed Build rebuilding whole folder when options of one file change

Hello Christian,

As far as I can remember, we had issues where changing the flags on project level did not actually rebuild the object files without the dependency on subdir.mk.
I can see the problem when changing optimization on a certain file would cause all files in that directory to be rebuilt, but on the other hand, there is no real way for make to know what was touch only affects that particular object file. Sure, there can be logic in the java code that would remove the file etc, but how would you handle the link step in that case?
Lets say that you have some flags on the toolchain level that have an impact on all the compiler invocations and the link step. Without the dependency on the subdir.mk, then it will be hard for make to know that all compile units needs to be rebuilt to get the correct result.
Maybe this is a corner case, maybe it's not, but if feels right to have a dependency on the set of flags in some way for the object file. If you have any other idea on how to solve this with make, then let me know.
I also have some vague memory that had something to do with changing the toolchain version should trigger everything to be rebuilt and not just re-linked, but I could be wrong on this point.

Sorry that I can't be to more help on the backstory of this change.

Kind regards,
Torbjörn

> -----Original Message-----
> From: Christian Walther <walther@xxxxxxxx>
> Sent: den 17 augusti 2022 11:27
> To: CDT General developers list. <cdt-dev@xxxxxxxxxxx>
> Cc: Torbjorn SVENSSON <torbjorn.svensson@xxxxxx>
> Subject: Managed Build rebuilding whole folder when options of one file
> change
> 
> In http://eclip.se/571384 (Feb 2021), the Managed Build makefile generation
> was changed to add subdir.mk as a prerequisite of all object files. That seems
> sensible, since subdir.mk contains the compiler options, and when these
> change, the affected object files should be rebuilt. However, it has the effect
> that changing the compiler options for a *single* file causes *all* files in the
> same folder to be unnecessarily rebuilt, since they all depend on the same
> subdir.mk that has changed. I am getting complaints from users about that,
> as it greatly increases the build time in our typical projects where most
> source files are in the same folder. Apparently changing the optimization
> settings of single files is often done during debugging.
> 
> Torbjörn, any thoughts about that?
> 
> Was there any actual problem that was solved by this change? The steps you
> list in Bugzilla also work for me without it. The internal
> rebuildState/CommonBuilder.performCleanning magic (despite all its flaws)
> seems to handle those cases correctly by deleting the affected object file
> (and only that one). (You list "steps to reproduce" and "expected result", but
> no "actual result" before the change.)
> 
> I am tempted to revert this change in our product and see if that results in
> different complaints from users (too few things being rebuilt in some cases).
> 
>  -Christian
> 
> 
> --
> Indel AG
> Christian Walther - Software
> Tuefiwis 26
> CH-8332 Russikon
> Switzerland
> 
> Tel.: +41 44 956 20 00
> www.indel.ch
> ------------------------------------------------------------------------------------------
> New product GIN-MAX4x4: The compact 4-axis motion board now also
> available as PRO version!
> https://www.indel.ch/en/products/drives/compact-motion-drives


Back to the top