Skip to content

Commit

Permalink
Merge branch 'minipal-objlib' of github.com:jkoritzinsky/runtime into…
Browse files Browse the repository at this point in the history
… minipal-objlib
  • Loading branch information
jkoritzinsky committed Sep 20, 2024
2 parents aca4b18 + 452c747 commit a719a4c
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/mono/mono/mini/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -335,9 +335,9 @@ if(NOT HOST_WIN32)
target_compile_definitions(monosgen-objects PRIVATE -DMONO_DLL_EXPORT)
endif()

add_library(monosgen-static STATIC $<TARGET_OBJECTS:eglib_objects> $<TARGET_OBJECTS:utils_objects> $<TARGET_OBJECTS:sgen_objects> $<TARGET_OBJECTS:metadata_objects> $<TARGET_OBJECTS:monosgen-objects>)
add_library(monosgen-static STATIC $<TARGET_OBJECTS:eglib_objects> $<TARGET_OBJECTS:utils_objects> $<TARGET_OBJECTS:sgen_objects> $<TARGET_OBJECTS:metadata_objects> $<TARGET_OBJECTS:monosgen-objects> $<TARGET_OBJECTS:minipal_objects>)
set_target_properties(monosgen-static PROPERTIES OUTPUT_NAME ${MONO_LIB_NAME})
target_link_libraries(monosgen-static PRIVATE dn-containers minipal)
target_link_libraries(monosgen-static PRIVATE dn-containers)

if(DISABLE_COMPONENTS OR AOT_COMPONENTS)
# add component fallback stubs into static mono library when components have been disabled.
Expand Down
1 change: 1 addition & 0 deletions src/native/minipal/configure.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ check_function_exists(sysctlbyname HAVE_SYSCTLBYNAME)

check_symbol_exists(arc4random_buf "stdlib.h" HAVE_ARC4RANDOM_BUF)
check_symbol_exists(O_CLOEXEC fcntl.h HAVE_O_CLOEXEC)
check_include_files("windows.h" HAVE_WINDOWS_H)
check_include_files("windows.h;bcrypt.h" HAVE_BCRYPT_H)

check_symbol_exists(
Expand Down
1 change: 1 addition & 0 deletions src/native/minipal/minipalconfig.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,6 @@
#cmakedefine01 HAVE_CLOCK_GETTIME_NSEC_NP
#cmakedefine01 BIGENDIAN
#cmakedefine01 HAVE_BCRYPT_H
#cmakedefine01 HAVE_WINDOWS_H

#endif
9 changes: 5 additions & 4 deletions src/native/minipal/time.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@

#include <assert.h>
#include <minipal/time.h>
#include "minipalconfig.h"

#ifdef HOST_WINDOWS
#if HAVE_WINDOWS_H

#include <Windows.h>

Expand All @@ -22,7 +23,7 @@ int64_t minipal_hires_tick_frequency()
return ts.QuadPart;
}

#else // HOST_WINDOWS
#else // HAVE_WINDOWS_H

#include "minipalconfig.h"

Expand Down Expand Up @@ -74,11 +75,11 @@ int64_t minipal_hires_ticks(void)
#endif
}

#endif // !HOST_WINDOWS
#endif // !HAVE_WINDOWS_H

void minipal_microdelay(uint32_t usecs, uint32_t* usecsSinceYield)
{
#ifdef HOST_WINDOWS
#if HAVE_WINDOWS_H
if (usecs > 1000)
{
SleepEx(usecs / 1000, FALSE);
Expand Down

0 comments on commit a719a4c

Please sign in to comment.