Skip to content

Commit 43e2a66

Browse files
committed
Fix osx/freebsd build
1 parent a7afd82 commit 43e2a66

File tree

3 files changed

+6
-19
lines changed

3 files changed

+6
-19
lines changed

src/coreclr/scripts/genUserEvents.py

+1-15
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,6 @@ def generateUserEventHelperFile(etwmanifest, userevent_directory, target_cpp, ru
209209
#include <common.h>
210210
#include <configuration.h>
211211
212-
#ifdef TARGET_UNIX
213212
bool s_userEventsEnabled = false;
214213
215214
void InitUserEvents()
@@ -228,20 +227,7 @@ def generateUserEventHelperFile(etwmanifest, userevent_directory, target_cpp, ru
228227
{
229228
return s_userEventsEnabled;
230229
}
231-
232-
#else // TARGET_UNIX
233-
void InitUserEvents()
234-
{
235-
236-
}
237-
238-
bool IsUserEventsEnabled()
239-
{
240-
return false;
241-
}
242-
243-
#endif // TARGET_UNIX
244-
""")
230+
""")
245231

246232
def getCoreCLRUserEventImplFilePrefix():
247233
return """#include "common.h"

src/coreclr/vm/ceemain.cpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -197,9 +197,9 @@
197197
#include "diagnosticserveradapter.h"
198198
#include "eventpipeadapter.h"
199199

200-
#ifdef FEATURE_PERFTRACING
200+
#if defined(FEATURE_PERFTRACING) && defined(TARGET_LINUX)
201201
#include "user_events.h"
202-
#endif // FEATURE_PERFTRACING
202+
#endif // defined(FEATURE_PERFTRACING) && defined(TARGET_LINUX)
203203

204204
#ifndef TARGET_UNIX
205205
// Included for referencing __security_cookie
@@ -665,9 +665,9 @@ void EEStartupHelper()
665665
#ifdef FEATURE_PERFTRACING
666666
// Initialize the event pipe.
667667
EventPipeAdapter::Initialize();
668-
#if defined(TARGET_UNIX)
668+
#if defined(TARGET_LINUX)
669669
InitUserEvents();
670-
#endif // TARGET_UNIX
670+
#endif // TARGET_LINUX
671671
#endif // FEATURE_PERFTRACING
672672

673673
#ifdef TARGET_UNIX

src/coreclr/vm/eventing/userevents/user_events.h

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
#ifndef __USEREVENTS_H__
55
#define __USEREVENTS_H__
66

7+
78
extern void InitUserEvents();
89
extern bool IsUserEventsEnabled();
910

0 commit comments

Comments
 (0)