-
Notifications
You must be signed in to change notification settings - Fork 4.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
EventPipe CMake was causing issues when building CoreClr due to creating two versions of ep-shared-config.h with different set of variables when targeting iOS/tvOS/Android. Both include paths ended up being added and together with EventPipe's unity build, this caused issues since the wrong ep-shared-config.h was picked up, incorrect enabled default listeners as result of having wrong values for FEATURE_PERFTRACING_DISABLE_DEFAULT_LISTEN_PORT and FEATURE_PERFTRACING_PAL_TCP. Mono doesn't have this issue since it only creates one ep-shared-config.h. Commit makes sure we only setup on ep-shared-config.h and eventpipe libraries adds the include folder to its library targets. Commit also adds support to set DOTNET_DiagnosticPorts as part of building Android sample to simplify enable/disable diagnostics, similar to how Mono Android sample works. Couple of smaller adjustments to ApkBuilder.
- Loading branch information
1 parent
aee620d
commit 77b9c7a
Showing
5 changed files
with
55 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,26 @@ | ||
include(CheckSymbolExists) | ||
include(CheckIncludeFile) | ||
|
||
check_include_file( | ||
sys/socket.h | ||
HAVE_SYS_SOCKET_H | ||
) | ||
|
||
check_symbol_exists( | ||
accept4 | ||
sys/socket.h | ||
HAVE_ACCEPT4) | ||
|
||
# Use TCP for EventPipe on mobile platforms | ||
if (CLR_CMAKE_HOST_IOS OR CLR_CMAKE_HOST_TVOS OR CLR_CMAKE_HOST_ANDROID) | ||
set(FEATURE_PERFTRACING_PAL_TCP 1) | ||
set(FEATURE_PERFTRACING_DISABLE_DEFAULT_LISTEN_PORT 1) | ||
endif() | ||
|
||
if (NOT DEFINED EP_GENERATED_HEADER_PATH) | ||
message(FATAL_ERROR "Required configuration EP_GENERATED_HEADER_PATH not set.") | ||
endif (NOT DEFINED EP_GENERATED_HEADER_PATH) | ||
|
||
configure_file(${CLR_SRC_NATIVE_DIR}/eventpipe/ep-shared-config.h.in ${EP_GENERATED_HEADER_PATH}/ep-shared-config.h) | ||
|
||
set (SHARED_EVENTPIPE_CONFIG_HEADERS "${EP_GENERATED_HEADER_PATH}/ep-shared-config.h") | ||
set (SHARED_EVENTPIPE_CONFIG_HEADER_PATH "${EP_GENERATED_HEADER_PATH}") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters