Skip to content

Commit

Permalink
Fix osx/freebsd build
Browse files Browse the repository at this point in the history
  • Loading branch information
davmason committed Jun 5, 2024
1 parent a7afd82 commit 43e2a66
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 19 deletions.
16 changes: 1 addition & 15 deletions src/coreclr/scripts/genUserEvents.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,6 @@ def generateUserEventHelperFile(etwmanifest, userevent_directory, target_cpp, ru
#include <common.h>
#include <configuration.h>
#ifdef TARGET_UNIX
bool s_userEventsEnabled = false;
void InitUserEvents()
Expand All @@ -228,20 +227,7 @@ def generateUserEventHelperFile(etwmanifest, userevent_directory, target_cpp, ru
{
return s_userEventsEnabled;
}
#else // TARGET_UNIX
void InitUserEvents()
{
}
bool IsUserEventsEnabled()
{
return false;
}
#endif // TARGET_UNIX
""")
""")

def getCoreCLRUserEventImplFilePrefix():
return """#include "common.h"
Expand Down
8 changes: 4 additions & 4 deletions src/coreclr/vm/ceemain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -197,9 +197,9 @@
#include "diagnosticserveradapter.h"
#include "eventpipeadapter.h"

#ifdef FEATURE_PERFTRACING
#if defined(FEATURE_PERFTRACING) && defined(TARGET_LINUX)
#include "user_events.h"
#endif // FEATURE_PERFTRACING
#endif // defined(FEATURE_PERFTRACING) && defined(TARGET_LINUX)

#ifndef TARGET_UNIX
// Included for referencing __security_cookie
Expand Down Expand Up @@ -665,9 +665,9 @@ void EEStartupHelper()
#ifdef FEATURE_PERFTRACING
// Initialize the event pipe.
EventPipeAdapter::Initialize();
#if defined(TARGET_UNIX)
#if defined(TARGET_LINUX)
InitUserEvents();
#endif // TARGET_UNIX
#endif // TARGET_LINUX
#endif // FEATURE_PERFTRACING

#ifdef TARGET_UNIX
Expand Down
1 change: 1 addition & 0 deletions src/coreclr/vm/eventing/userevents/user_events.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
#ifndef __USEREVENTS_H__
#define __USEREVENTS_H__


extern void InitUserEvents();
extern bool IsUserEventsEnabled();

Expand Down

0 comments on commit 43e2a66

Please sign in to comment.