Fix build breakage on high-processsor machines (dotnet/coreclr#12114)
authorOmair Majid <omair.majid@gmail.com>
Wed, 7 Jun 2017 04:19:48 +0000 (00:19 -0400)
committerDan Moseley <danmose@microsoft.com>
Wed, 7 Jun 2017 04:19:48 +0000 (21:19 -0700)
commit36aa9e18e3bb0ef93b4f41203308fefd08f43e50
tree6e767b5db6eff0fd72b1bc3450b4dbaac9b2c567
parent91ec9be3208f6a331421eb29b616e2ac44786606
Fix build breakage on high-processsor machines (dotnet/coreclr#12114)

The build calls `make -j $NumProc`. This breaks on machines with a high
number of procesors (such as 25).

To reproduce this on any machine, edit build.sh and change

    buildTool install -j $NumProc

to

    buildTool install -j 100

The error trace looks like this:

    In file included from coreclr/bin/obj/Linux.x64.Debug/Generated/eventpipe/dotnetruntime.cpp:12:
    In file included from coreclr/src/vm/common.h:306:
    In file included from coreclr/src/vm/eepolicy.h:15:
    In file included from coreclr/src/vm/vars.hpp:70:
    In file included from coreclr/src/vm/eeprofinterfaces.h:19:
    In file included from coreclr/src/inc/profilepriv.h:128:
    In file included from coreclr/src/inc/profilepriv.inl:18:
    In file included from coreclr/src/vm/eetoprofinterfaceimpl.h:23:
    coreclr/src/inc/eventtracebase.h:306:10: fatal error: 'clretwallmain.h' file not found

It turns out that the eventpipe code has a dependency on
clretwallmain.h. src/CMakeLists.txt points out that clretwallmain.h is a
generated file. But there's no actual dependency between the eventpipe
target and the header file(s).

Fix that by fixing the generator script to insert an explicit dependency
between 'eventpipe' module and 'GeneratedEventingFiles' module.

Commit migrated from https://github.com/dotnet/coreclr/commit/f14cffc86b49cb803a6ed8e5a864f8c0c7b87f33
src/coreclr/src/scripts/genEventPipe.py