Skip to content
This repository has been archived by the owner on Jan 23, 2023. It is now read-only.

GcInfo: Add support for Standalone build #932

Merged
merged 1 commit into from
May 5, 2015

Conversation

swaroop-sridhar
Copy link

The STANDALONE_BUILD switch can be used to build the GcInfoEncoder library
independently by clients outside the CoreClr tree.

The GcInfo library uses some custom data-structures (ex: ArrayList)
and includes some utility libraries (ex: UtilCode) which pull in several other
headers with considerable unrelated content. Rather than porting all the
utility code to suite other clients, the STANDALONE_BUILD switch can be used
to include only the minimal set of headers specific to GcInfo encodings.

Clients of STANDALONE_BUILD will likely use standard library
implementations of data-structures like ArrayList, HashMap etc., in place
of the custom implementation currently used by GcInfoEncoder.

Rather than spew the GcInfoEnoder code with
#ifdef STANDALONE_BUILD ... #else .. #endif blocks, we include a special
header GcInfoUtil.h in STANDALONE_BUILD mode. GcInfoUtil.h is expected to
supply the interface/implementation for the data-structures and utilities
used by GcInfoEncoder. This header should be provided by the clients doing
the standalone build in their source tree.

The following additional files are exported to the build directory:

  1. GcInfoEncoder.h and GcInfoTypes.h, as part of extended EE interface.
  2. The GcInfoEncoder.cpp -- so that clients can build the library in their tree.

 The STANDALONE_BUILD switch can be used to build the GcInfoEncoder library
 independently by clients outside the CoreClr tree.

 The GcInfo library uses some custom data-structures (ex: ArrayList)
 and includes some utility libraries (ex: UtilCode) which pull in several other
 headers with considerable unrelated content. Rather than porting all the
 utility code to suite other clients, the  STANDALONE_BUILD switch can be used
 to include only the minimal set of headers specific to GcInfo encodings.

 Clients of STANDALONE_BUILD will likely use standard library
 implementations of data-structures like ArrayList, HashMap etc., in place
 of the custom implementation currently used by GcInfoEncoder.

 Rather than spew the GcInfoEnoder code with
 #ifdef STANDALONE_BUILD ... #else .. #endif blocks, we include a special
 header GcInfoUtil.h in STANDALONE_BUILD mode.  GcInfoUtil.h is expected to
 supply the interface/implementation for the data-structures and utilities
 used by GcInfoEncoder. This header should be provided by the clients doing
 the standalone build in their source tree.
@swaroop-sridhar
Copy link
Author

@jkotas: please review

@jkotas
Copy link
Member

jkotas commented May 5, 2015

LGTM

swaroop-sridhar added a commit that referenced this pull request May 5, 2015
GcInfo: Add support for Standalone build
@swaroop-sridhar swaroop-sridhar merged commit 5aff148 into dotnet:master May 5, 2015
@swaroop-sridhar swaroop-sridhar deleted the GcLib branch May 5, 2015 21:45
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants