Skip to content

Commit

Permalink
Move version.h to the shared src so it can be used in the native loader
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewlock committed May 31, 2024
1 parent bf461d5 commit 9d35661
Show file tree
Hide file tree
Showing 9 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,7 @@
<ClInclude Include="..\..\..\shared\src\native-src\dynamic_library_base.h" />
<ClInclude Include="..\..\..\shared\src\native-src\miniutf.hpp" />
<ClInclude Include="..\..\..\shared\src\native-src\miniutfdata.h" />
<ClInclude Include="..\..\..\shared\src\native-src\version.h" />
<ClInclude Include="cor_profiler_class_factory.h" />
<ClInclude Include="cor_profiler.h" />
<ClInclude Include="dynamic_instance.h" />
Expand Down
File renamed without changes.
8 changes: 4 additions & 4 deletions tracer/build/_build/PrepareRelease/SetAllVersions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -331,10 +331,6 @@ public override void Run()
return text;
});

SynchronizeVersion(
"src/Datadog.Tracer.Native/version.h",
text => FullVersionReplace(text, "."));

// .NET profiler

SynchronizeVersion(
Expand Down Expand Up @@ -373,6 +369,10 @@ public override void Run()
"../shared/src/Datadog.Trace.ClrProfiler.Native/CMakeLists.txt",
text => FullVersionReplace(text, ".", prefix: "VERSION "));

SynchronizeVersion(
"../shared/src/native-src/version.h",
text => FullVersionReplace(text, "."));

// Misc

SynchronizeVersion(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,7 @@
<ClInclude Include="..\..\..\shared\src\native-src\miniutfdata.h" />
<ClInclude Include="..\..\..\shared\src\native-src\pal.h" />
<ClInclude Include="..\..\..\shared\src\native-src\string.h" />
<ClInclude Include="..\..\..\shared\src\native-src\version.h" />
<ClInclude Include="fault_tolerant_cor_profiler_function_control.h" />
<ClInclude Include="fault_tolerant_tokens.h" />
<ClInclude Include="fault_tolerant_envionrment_variables_util.h" />
Expand Down Expand Up @@ -334,7 +335,6 @@
<ClInclude Include="stats.h" />
<ClInclude Include="Synchronized.hpp" />
<ClInclude Include="tracer_tokens.h" />
<ClInclude Include="version.h" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\..\..\shared\src\native-src\miniutf.cpp" />
Expand Down
3 changes: 2 additions & 1 deletion tracer/src/Datadog.Tracer.Native/class_factory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@
// Licensed under the MIT license. See LICENSE file in the project root for full
// license information.

#include "../../../shared/src/native-src/version.h"

#include "class_factory.h"
#include "cor_profiler.h"
#include "logger.h"
#include "version.h"

ClassFactory::ClassFactory() : refCount(0)
{
Expand Down
2 changes: 1 addition & 1 deletion tracer/src/Datadog.Tracer.Native/cor_profiler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@
#include "module_metadata.h"
#include "resource.h"
#include "stats.h"
#include "version.h"

#include "../../../shared/src/native-src/pal.h"
#include "../../../shared/src/native-src/version.h"

#include "iast/dataflow.h"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
#include "il_rewriter_wrapper.h"
#include "logger.h"
#include "stats.h"
#include "version.h"
#include "environment_variables_util.h"
#include "debugger_probes_tracker.h"
#include "fault_tolerant_envionrment_variables_util.h"
Expand Down
2 changes: 1 addition & 1 deletion tracer/src/Datadog.Tracer.Native/iast/iast_util.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#include "iast_util.h"
#include "../../../../shared/src/native-src/pal.h"
#include "../../../../shared/src/native-src/version.h"

#include <cwctype>
#include <iterator>
Expand All @@ -9,7 +10,6 @@
#include <sys/stat.h>
#include <stdio.h>
#include "../logger.h"
#include "../version.h"

using namespace shared;

Expand Down
1 change: 0 additions & 1 deletion tracer/src/Datadog.Tracer.Native/method_rewriter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
#include "integration.h"
#include "logger.h"
#include "stats.h"
#include "version.h"
#include "environment_variables_util.h"
#include "dd_profiler_constants.h"

Expand Down

0 comments on commit 9d35661

Please sign in to comment.