Eureka log link issue

TwineCompile - Cut C++Builder compile times by up to 50x!
jomitech
Site Admin
Posts: 2175
Joined: Wed Oct 08, 2008 12:23 am

Re: Eureka log link issue

Post by jomitech »

No, you'll have to do something different for 64-bit builds. Actually, I recommend this new approach for both 32-bit and 64-bit.

1. In TCTargetsXX.targets, locate the LinkDependsOnTargets at the top of the file and replace it with:

Code: Select all

    <LinkDependsOnTargets Condition="'$(Platform)'=='Win32'">
      _ResolveOutput;
      CreateDirectories;
      PreLinkEvent;
      TCPerformLink;
      TCPostLink
    </LinkDependsOnTargets>
	<LinkDependsOnTargets Condition="'$(Platform)'!='Win32'">
      _ResolveOutput;
      CreateDirectories;
      PreLinkEvent;
      _PerformLink;
      TCPostLink
    </LinkDependsOnTargets>

2. At the bottom of the file, add the following:

Code: Select all

  <Target Name="TCPostLink">
	<Exec
        Condition="'$(TLibLink)'!='true' And ('@(OutputOutOfDate)'!='' Or '$(ForceLink)'=='true')"
        Command="ecc32.exe --el_alter_exe=$(MSBuildProjectFullPath)"
        />
  </Target>
This will invoke the EurekaLog process after every link for all platforms.
Jon
zzattack
Posts: 22
Joined: Tue Feb 02, 2021 3:35 am

Re: Eureka log link issue

Post by zzattack »

Thanks, that is helpful. What is the difference between _PerformLink and TCPostLink? Is the former some internal method suitable only for 64-bit builds?

A slightl refinement in the <Exec> block allows the EurekaLog postprocessor only to be invoked when the EUREKALOG preprocessor symbol is defined. Additionally, we're supplying the target executable path on the command line since this isn't always found from the project file if we don't.

Code: Select all

  <Target Name="TCPostLink">
      <Exec
        Condition="'$(TLibLink)'!='true' And ('@(OutputOutOfDate)'!='' Or '$(ForceLink)'=='true') And $([System.Text.RegularExpressions.Regex]::IsMatch( $(BCC_Defines), '^(.*;)*EUREKALOG(;.*)*$')) "
        Command="ecc32speed.exe --el_profile=$(Configuration) --el_nostats --el_UnicodeOutput --el_alter_exe=$(MSBuildProjectFullPath);$(OUTPUTPATH)"
        />
  </Target>
jomitech
Site Admin
Posts: 2175
Joined: Wed Oct 08, 2008 12:23 am

Re: Eureka log link issue

Post by jomitech »

_PerformLink is the internal C++Builder link task. TCPerformLink is the TwineCompile-specific one that can be used to run a third-na linker (it's only used for 32-bit projects).
Jon
zzattack
Posts: 22
Joined: Tue Feb 02, 2021 3:35 am

Re: Eureka log link issue

Post by zzattack »

Makes sense.

I'm attaching my modified targets file for Alexandria, perhaps it's useful to someone.
Attachments
TCTargets110.zip
(7.98 KiB) Downloaded 1387 times
Post Reply