Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use getexepath in mono to deduplicate related code #60449

Merged
merged 3 commits into from
Oct 21, 2021
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/mono/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ endif()

project(mono)

include(../../eng/native/configurepaths.cmake)

set(CMAKE_C_FLAGS_CHECKED "")
set(CMAKE_CXX_FLAGS_CHECKED "")
set(CMAKE_EXE_LINKER_FLAGS_CHECKED "")
Expand Down Expand Up @@ -586,7 +588,7 @@ endif()
######################################
# ICU CHECKS
######################################
set(ICU_SHIM_PATH "../../../libraries/Native/Unix/System.Globalization.Native")
set(ICU_SHIM_PATH "${CLR_SRC_LIBS_NATIVE_DIR}/Unix/System.Globalization.Native")
if(MONO_CROSS_COMPILE)
elseif(HOST_OSX AND NOT HOST_MACCAT)
include(FindPkgConfig)
Expand Down Expand Up @@ -809,6 +811,7 @@ if (TARGET_BROWSER)
endif()
### End of OS specific checks

include_directories("${CLR_SRC_NATIVE_DIR}/common")
add_subdirectory(mono)
if (ENABLE_MSCORDBI AND NOT TARGET_ARCH STREQUAL "arm64" AND NOT CMAKE_CROSSCOMPILING AND NOT TARGET_IOS AND NOT TARGET_ANDROID AND NOT TARGET_BROWSER AND NOT HOST_MACCAT)
add_subdirectory(dlls/mscordbi)
Expand Down
2 changes: 2 additions & 0 deletions src/mono/cmake/config.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -595,6 +595,8 @@
/* Define to 1 if you have the `pthread_jit_write_protect_np' function. */
#cmakedefine HAVE_PTHREAD_JIT_WRITE_PROTECT_NP 1

#cmakedefine01 HAVE_GETAUXVAL

/* Define to 1 if you have the declaration of `pthread_mutexattr_setprotocol',
and to 0 if you don't. */
#cmakedefine HAVE_DECL_PTHREAD_MUTEXATTR_SETPROTOCOL 1
Expand Down
1 change: 1 addition & 0 deletions src/mono/cmake/configure.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ check_symbol_exists(CLOCK_MONOTONIC "time.h" HAVE_CLOCK_MONOTONIC)
check_symbol_exists(CLOCK_MONOTONIC_COARSE "time.h" HAVE_CLOCK_MONOTONIC_COARSE)
check_symbol_exists(sys_signame "signal.h" HAVE_SYSSIGNAME)
check_symbol_exists(pthread_jit_write_protect_np "pthread.h" HAVE_PTHREAD_JIT_WRITE_PROTECT_NP)
check_symbol_exists(getauxval sys/auxv.h HAVE_GETAUXVAL)

ac_check_type("struct sockaddr_in6" sockaddr_in6 "netinet/in.h")
ac_check_type("struct timeval" timeval "sys/time.h;sys/types.h;utime.h")
Expand Down
6 changes: 1 addition & 5 deletions src/mono/dlls/dbgshim/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,7 @@ if(HOST_WIN32)
endif()
endif()

include(${PROJECT_SOURCE_DIR}/../../../../eng/native/configuretools.cmake)
include(${PROJECT_SOURCE_DIR}/../../../../eng/native/configurepaths.cmake)
include(${PROJECT_SOURCE_DIR}/../../../../eng/native/configureplatform.cmake)
include(${PROJECT_SOURCE_DIR}/../../../../eng/native/configurecompiler.cmake)

include(${CLR_ENG_NATIVE_DIR}/configurecompiler.cmake)

add_definitions(-D_WIN32_WINNT=0x0602)

Expand Down
5 changes: 1 addition & 4 deletions src/mono/dlls/mscordbi/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -94,10 +94,7 @@ endif()

add_subdirectory(${PROJECT_SOURCE_DIR}/socket-dbi)

include(${PROJECT_SOURCE_DIR}/../../../../eng/native/configuretools.cmake)
include(${PROJECT_SOURCE_DIR}/../../../../eng/native/configurepaths.cmake)
include(${PROJECT_SOURCE_DIR}/../../../../eng/native/configureplatform.cmake)
include(${PROJECT_SOURCE_DIR}/../../../../eng/native/configurecompiler.cmake)
include(${CLR_ENG_NATIVE_DIR}/configurecompiler.cmake)
am11 marked this conversation as resolved.
Show resolved Hide resolved

if (CLR_CMAKE_HOST_UNIX)
# Add custom targets that the pal build expects.
Expand Down
Loading