Skip to content

Commit

Permalink
Segregated build files
Browse files Browse the repository at this point in the history
  • Loading branch information
daniel-romano-DD committed Nov 11, 2024
1 parent 4ffd760 commit 3d10c13
Show file tree
Hide file tree
Showing 7 changed files with 70 additions and 25 deletions.
1 change: 0 additions & 1 deletion tracer/build/_build/CodeGenerators/CallSitesGenerator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
using System.IO;
using System.Linq;
using System.Text;
using Datadog.Trace.ClrProfiler;
using Mono.Cecil;
using Nuke.Common.IO;

Expand Down
5 changes: 3 additions & 2 deletions tracer/build/_build/CodeGenerators/InstrumentationCategory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,13 @@

using System;

namespace Datadog.Trace.ClrProfiler;
namespace CodeGenerators;

[Flags]
internal enum InstrumentationCategory : uint
{
None = 0,
// NOTE : When modifying this file make sure to update the InstrumentationCategory enum in the ClrProfiler folder inside the Datadog.Trace project

Tracing = 1,
AppSec = 2,
Iast = 4,
Expand Down
34 changes: 18 additions & 16 deletions tracer/build/_build/CodeGenerators/TargetFrameworks.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,23 @@

using System;

namespace Datadog.Trace.ClrProfiler
namespace CodeGenerators;

[Flags]
internal enum TargetFrameworks : uint
{
[Flags]
internal enum TargetFrameworks : uint
{
None = 0,
NET461 = 1,
NET462 = 2,
NETSTANDARD2_0 = 4,
NETCOREAPP2_1 = 8,
NETCOREAPP3_0 = 16,
NETCOREAPP3_1 = 32,
NET5_0 = 64,
NET6_0 = 128,
NET7_0 = 256,
NET8_0 = 512
}
None = 0, // For CodeGenerator only

// NOTE : When modifying this file make sure to update the TargetFrameworks enum in the ClrProfiler folder inside the Datadog.Trace project

NET461 = 1,
NET462 = 2,
NETSTANDARD2_0 = 4,
NETCOREAPP2_1 = 8,
NETCOREAPP3_0 = 16,
NETCOREAPP3_1 = 32,
NET5_0 = 64,
NET6_0 = 128,
NET7_0 = 256,
NET8_0 = 512
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<PackageReference Include="System.Reflection.Emit.Lightweight" Version="4.3.0" />
</ItemGroup>
<ItemGroup>
<Compile Include="..\..\build\_build\CodeGenerators\InstrumentationCategory.cs" Link="InstrumentationDefinitions\InstrumentationCategory.cs" />
<Compile Include="..\Datadog.Trace\ClrProfiler\InstrumentationCategory.cs" Link="InstrumentationDefinitions\InstrumentationCategory.cs" />
<Compile Include="..\Datadog.Trace\Vendors\MessagePack\Attributes.cs">
<Link>MessagePack\Attributes.cs</Link>
</Compile>
Expand Down
22 changes: 22 additions & 0 deletions tracer/src/Datadog.Trace/ClrProfiler/InstrumentationCategory.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
// <copyright file="InstrumentationCategory.cs" company="Datadog">
// Unless explicitly stated otherwise all files in this repository are licensed under the Apache 2 License.
// This product includes software developed at Datadog (https://www.datadoghq.com/). Copyright 2017 Datadog, Inc.
// </copyright>
#nullable enable

using System;

namespace Datadog.Trace.ClrProfiler;

[Flags]
internal enum InstrumentationCategory : uint
{
// NOTE : When modifying this file make sure to update the InstrumentationCategory enum in the CodeGenerator folder inside the _build project

Tracing = 1,
AppSec = 2,
Iast = 4,
Rasp = 8,

IastRasp = Iast | Rasp,
}
26 changes: 26 additions & 0 deletions tracer/src/Datadog.Trace/ClrProfiler/TargetFrameworks.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
// <copyright file="TargetFrameworks.cs" company="Datadog">
// Unless explicitly stated otherwise all files in this repository are licensed under the Apache 2 License.
// This product includes software developed at Datadog (https://www.datadoghq.com/). Copyright 2017 Datadog, Inc.
// </copyright>
#nullable enable

using System;

namespace Datadog.Trace.ClrProfiler;

[Flags]
internal enum TargetFrameworks : uint
{
// NOTE : When modifying this file make sure to update the TargetFrameworks enum in the CodeGenerator folder inside the _build project

NET461 = 1,
NET462 = 2,
NETSTANDARD2_0 = 4,
NETCOREAPP2_1 = 8,
NETCOREAPP3_0 = 16,
NETCOREAPP3_1 = 32,
NET5_0 = 64,
NET6_0 = 128,
NET7_0 = 256,
NET8_0 = 512
}
5 changes: 0 additions & 5 deletions tracer/src/Datadog.Trace/Datadog.Trace.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,6 @@
<None Remove="AppSec\Waf\ConfigFiles\apisecurity-config.json" />
</ItemGroup>

<ItemGroup>
<Compile Include="..\..\build\_build\CodeGenerators\InstrumentationCategory.cs" Link="ClrProfiler\InstrumentationCategory.cs" />
<Compile Include="..\..\build\_build\CodeGenerators\TargetFrameworks.cs" Link="ClrProfiler\TargetFrameworks.cs" />
</ItemGroup>

<!-- Below this point is reserved for vendor items -->
<!--Newtonsoft.Json-->
<!-- Modifications: Original condition was only for net45, but we include net461 here so that net45 and net461 generate the same Newtonsoft.Json -->
Expand Down

0 comments on commit 3d10c13

Please sign in to comment.