188 lines
8.4 KiB
Plaintext
188 lines
8.4 KiB
Plaintext
|
<!--
|
||
|
##############################################################################
|
||
|
#
|
||
|
# Microsoft Research Singularity
|
||
|
#
|
||
|
# Copyright (c) Microsoft Corporation. All rights reserved.
|
||
|
#
|
||
|
# File: Kernel\GC.targets
|
||
|
#
|
||
|
# Note:
|
||
|
#
|
||
|
##############################################################################
|
||
|
|
||
|
This file contains the definitions for selecting the different GC implementations.
|
||
|
Projects that import this file must set the 'Collector' property to a valid collector
|
||
|
name before importing this file.
|
||
|
|
||
|
If the 'DefineGCCompileItems' property is set to true, then this target will define
|
||
|
'Compile' items for the C# source code for the specified GC implementation.
|
||
|
|
||
|
This file will always set the GCDefine name to be the name of the GC, as passed to
|
||
|
C#, Sing#, C/C++, and assembler files as a preprocessor directive. If the
|
||
|
DefineGCCompileItems property is 'true', then the DefineConstants property will be
|
||
|
updated to include this value. Other kinds of projects will need to handle
|
||
|
passing 'GCDefine' to the appropriate preprocessor.
|
||
|
|
||
|
-->
|
||
|
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||
|
|
||
|
|
||
|
<ItemGroup Condition="'$(DefineGCCompileItems)'=='true'">
|
||
|
<!-- BARTOK_SOURCES -->
|
||
|
<Compile Include="Bartok\ArrayHelper.cs" />
|
||
|
<Compile Include="Bartok\Headers.cs" />
|
||
|
<Compile Include="Bartok\Magic.cs" />
|
||
|
<Compile Include="Bartok\MultiUseWord.cs" />
|
||
|
<Compile Include="Bartok\Options.cs" />
|
||
|
<Compile Include="Bartok\Shared.cs" />
|
||
|
<Compile Include="Bartok\VTable.cs" />
|
||
|
<Compile Include="System\Runtime\CompilerServices\Attributes.cs" />
|
||
|
<Compile Include="System\Security\Attributes.cs" />
|
||
|
<Compile Include="System\Threading\SpinLock.cs" />
|
||
|
|
||
|
|
||
|
<!-- RUNTIME_SOURCES -->
|
||
|
<Compile Include="Bartok\Finalizer.cs" />
|
||
|
<Compile Include="Bartok\GC.cs" />
|
||
|
<Compile Include="Bartok\StackHeight.cs" />
|
||
|
<Compile Include="Bartok\TryAll.cs" />
|
||
|
<Compile Include="Bartok\TryAllAttributes.cs" />
|
||
|
<Compile Include="Bartok\TryAllException.cs" />
|
||
|
<Compile Include="Bartok\WeakReference.cs" />
|
||
|
|
||
|
<!-- COLLECTOR_SOURCES -->
|
||
|
<Compile Include="Bartok\GCs\Allocator.cs" />
|
||
|
<Compile Include="Bartok\GCs\BaseCollector.cs" />
|
||
|
<Compile Include="Bartok\GCs\BootstrapMemory.cs" />
|
||
|
<Compile Include="Bartok\GCs\BumpAllocator.cs" />
|
||
|
<Compile Include="Bartok\GCs\CallStack.cs" />
|
||
|
<Compile Include="Bartok\GCs\CentralPT.cs" />
|
||
|
<Compile Include="Bartok\GCs\Collector.cs" />
|
||
|
<Compile Include="Bartok\GCs\CollectorStatistics.cs" />
|
||
|
<Compile Include="Bartok\GCs\GCProfiler.cs" />
|
||
|
<Compile Include="Bartok\GCs\InteriorPtrTable.cs" />
|
||
|
<Compile Include="Bartok\GCs\MemoryAccounting.cs" />
|
||
|
<Compile Include="Bartok\GCs\MemoryManager.cs" />
|
||
|
<Compile Include="Bartok\GCs\ObjectLayout.cs" />
|
||
|
<Compile Include="Bartok\GCs\PageManager.cs" />
|
||
|
<Compile Include="Bartok\GCs\PageTable.cs" />
|
||
|
<Compile Include="Bartok\GCs\PageType.cs" />
|
||
|
<Compile Include="Bartok\GCs\ReferenceVisitor.cs" />
|
||
|
<Compile Include="Bartok\GCs\SegregatedFreeList.cs" />
|
||
|
<Compile Include="Bartok\GCs\StaticData.cs" />
|
||
|
<Compile Include="Bartok\GCs\Trace.cs" />
|
||
|
<Compile Include="Bartok\GCs\Transitions.cs" />
|
||
|
<Compile Include="Bartok\GCs\UIntPtrQueue.cs" />
|
||
|
<Compile Include="Bartok\GCs\UIntPtrStack.cs" />
|
||
|
<Compile Include="Bartok\GCs\UnmanagedPageList.cs" />
|
||
|
<Compile Include="Bartok\GCs\Util.cs" />
|
||
|
<Compile Include="Bartok\GCs\Verifier.cs" />
|
||
|
<Compile Include="Bartok\GCs\WriteBarrier.cs" />
|
||
|
</ItemGroup>
|
||
|
|
||
|
|
||
|
<Choose>
|
||
|
<When Condition="'$(Collector)'=='AdaptiveCopying'">
|
||
|
<PropertyGroup>
|
||
|
<GCDefine>ADAPTIVE_COPYING_COLLECTOR</GCDefine>
|
||
|
<BARTOK_COLLECTOR>/AdaptiveCopying</BARTOK_COLLECTOR>
|
||
|
<GC_CSC_DEFS>ADAPTIVE_COPYING_COLLECTOR</GC_CSC_DEFS>
|
||
|
<GC_ML_DEFS>/DWRITEBARRIER_SSB=1</GC_ML_DEFS>
|
||
|
</PropertyGroup>
|
||
|
<ItemGroup Condition="'$(DefineGCCompileItems)'=='true'">
|
||
|
<Compile Include="Bartok\GCs\AdaptiveCopyingCollector.cs" />
|
||
|
<Compile Include="Bartok\GCs\AllCardsWriteBarrier.cs" />
|
||
|
<Compile Include="Bartok\GCs\CardTable.cs" />
|
||
|
<Compile Include="Bartok\GCs\CopyScan.cs" />
|
||
|
<Compile Include="Bartok\GCs\GenerationalCollector.cs" />
|
||
|
<Compile Include="Bartok\GCs\GenerationalWriteBarrier.cs" />
|
||
|
<Compile Include="Bartok\GCs\OffsetTable.cs" />
|
||
|
<Compile Include="Bartok\GCs\RememberedSet.cs" />
|
||
|
<Compile Include="Bartok\GCs\SemiSpaceCollector.cs" />
|
||
|
<Compile Include="Bartok\GCs\SlidingCollector.cs" />
|
||
|
<Compile Include="Bartok\GCs\SequentialStoreBuffer.cs" />
|
||
|
<Compile Include="Bartok\GCs\StopTheWorldCollector.cs" />
|
||
|
</ItemGroup>
|
||
|
</When>
|
||
|
<When Condition="'$(Collector)'=='Concurrent'">
|
||
|
<PropertyGroup>
|
||
|
<GCDefine>CONCURRENT_MS_COLLECTOR</GCDefine>
|
||
|
<BARTOK_COLLECTOR>/ConcurrentMSGC</BARTOK_COLLECTOR>
|
||
|
<GC_CSC_DEFS>CONCURRENT_MS_COLLECTOR</GC_CSC_DEFS>
|
||
|
<GC_ML_DEFS>/DWRITEBARRIER_CMS=1</GC_ML_DEFS>
|
||
|
</PropertyGroup>
|
||
|
<ItemGroup Condition="'$(DefineGCCompileItems)'=='true'">
|
||
|
<Compile Include="Bartok\GCs\ConcurrentMSCollector.cs" />
|
||
|
<Compile Include="Bartok\GCs\ThreadHeaderQueue.cs" />
|
||
|
<Compile Include="Bartok\GCs\UniversalWriteBarrier.cs" />
|
||
|
<Compile Include="Bartok\GCs\WriteBarrierCMS.cs" />
|
||
|
</ItemGroup>
|
||
|
</When>
|
||
|
<When Condition="'$(Collector)'=='MarkSweep'">
|
||
|
<PropertyGroup>
|
||
|
<GCDefine>MARK_SWEEP_COLLECTOR</GCDefine>
|
||
|
<BARTOK_COLLECTOR>/MarkSweepGC</BARTOK_COLLECTOR>
|
||
|
<GC_CSC_DEFS>MARK_SWEEP_COLLECTOR</GC_CSC_DEFS>
|
||
|
<GC_ML_DEFS></GC_ML_DEFS>
|
||
|
</PropertyGroup>
|
||
|
<ItemGroup Condition="'$(DefineGCCompileItems)'=='true'">
|
||
|
<Compile Include="Bartok\GCs\EmptyWriteBarrier.cs" />
|
||
|
<Compile Include="Bartok\GCs\MarkSweepCollector.cs" />
|
||
|
<Compile Include="Bartok\GCs\StopTheWorldCollector.cs" />
|
||
|
</ItemGroup>
|
||
|
</When>
|
||
|
<When Condition="'$(Collector)'=='Semispace'">
|
||
|
<PropertyGroup>
|
||
|
<GCDefine>SEMISPACE_COLLECTOR</GCDefine>
|
||
|
<BARTOK_COLLECTOR>/SemispaceGC</BARTOK_COLLECTOR>
|
||
|
<GC_CSC_DEFS>SEMISPACE_COLLECTOR</GC_CSC_DEFS>
|
||
|
<GC_ML_DEFS>/DWRITEBARRIER_SSB=1</GC_ML_DEFS>
|
||
|
</PropertyGroup>
|
||
|
<ItemGroup Condition="'$(DefineGCCompileItems)'=='true'">
|
||
|
<Compile Include="Bartok\GCs\SemispaceCollector.cs" />
|
||
|
<Compile Include="Bartok\GCs\CardTable.cs" />
|
||
|
<Compile Include="Bartok\GCs\CopyScan.cs" />
|
||
|
<Compile Include="Bartok\GCs\OffsetTable.cs" />
|
||
|
<Compile Include="Bartok\GCs\GenerationalCollector.cs" />
|
||
|
<Compile Include="Bartok\GCs\GenerationalWriteBarrier.cs" />
|
||
|
<Compile Include="Bartok\GCs\AllCardsWriteBarrier.cs" />
|
||
|
<Compile Include="Bartok\GCs\RememberedSet.cs" />
|
||
|
<Compile Include="Bartok\GCs\StopTheWorldCollector.cs" />
|
||
|
<Compile Include="Bartok\GCs\SequentialStoreBuffer.cs" />
|
||
|
</ItemGroup>
|
||
|
</When>
|
||
|
<When Condition="'$(Collector)'=='Sliding'">
|
||
|
<PropertyGroup>
|
||
|
<GCDefine>SLIDING_COLLECTOR</GCDefine>
|
||
|
<BARTOK_COLLECTOR>/SlidingGC</BARTOK_COLLECTOR>
|
||
|
<GC_CSC_DEFS>SLIDING_COLLECTOR</GC_CSC_DEFS>
|
||
|
<GC_ML_DEFS>/DWRITEBARRIER_SSB=1</GC_ML_DEFS>
|
||
|
</PropertyGroup>
|
||
|
<ItemGroup Condition="'$(DefineGCCompileItems)'=='true'">
|
||
|
<Compile Include="Bartok\GCs\SlidingCollector.cs" />
|
||
|
<Compile Include="Bartok\GCs\CardTable.cs" />
|
||
|
<Compile Include="Bartok\GCs\OffsetTable.cs" />
|
||
|
<Compile Include="Bartok\GCs\GenerationalCollector.cs" />
|
||
|
<Compile Include="Bartok\GCs\GenerationalWriteBarrier.cs" />
|
||
|
<Compile Include="Bartok\GCs\AllCardsWriteBarrier.cs" />
|
||
|
<Compile Include="Bartok\GCs\RememberedSet.cs" />
|
||
|
<Compile Include="Bartok\GCs\StopTheWorldCollector.cs" />
|
||
|
<Compile Include="Bartok\GCs\SequentialStoreBuffer.cs" />
|
||
|
</ItemGroup>
|
||
|
</When>
|
||
|
<Otherwise>
|
||
|
<!-- 'Collector' not specified. -->
|
||
|
<PropertyGroup>
|
||
|
<ERROR>The 'Collector' property has not been specified, or is not a recognized value.</ERROR>
|
||
|
</PropertyGroup>
|
||
|
</Otherwise>
|
||
|
</Choose>
|
||
|
|
||
|
<PropertyGroup Condition="'$(GCDefine)'!=''">
|
||
|
<DefineConstants Condition="'$(DefineConstants)'!=''">$(DefineConstants);</DefineConstants>
|
||
|
<DefineConstants>$(DefineConstants)$(GCDefine)</DefineConstants>
|
||
|
</PropertyGroup>
|
||
|
|
||
|
</Project>
|