Skip to content
Open
Show file tree
Hide file tree
Changes from all 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
14 changes: 14 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,17 @@ if ((UNIX OR MINGW) AND NOT APPLE)
target_link_libraries(memory_agent PRIVATE -static-libstdc++ -static-libgcc)
set_target_properties(memory_agent PROPERTIES LINK_FLAGS "-Wl,--exclude-libs,ALL")
endif ()

if(WIN32)
include(CheckSymbolExists)
check_symbol_exists("_M_ARM64" "" TARGET_ARM64)
check_symbol_exists("_M_AMD64" "" TARGET_X64)
if(TARGET_ARM64)
set(FILE_NAME "memory_agent64a")
elseif(TARGET_X64)
set(FILE_NAME "memory_agent") # Consider using '64' suffix
else()
set(FILE_NAME "memory_agent32")
endif()
set_target_properties(memory_agent PROPERTIES OUTPUT_NAME ${FILE_NAME})
endif()
2 changes: 1 addition & 1 deletion publish/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def binariesPath = "$projectDir/../bin"
def libraryClassesPath = "$projectDir/../classes/"

static def checkBinaries(String binPath) {
def expectedFiles = ['libmemory_agent.dylib', 'libmemory_agent.so', 'memory_agent.dll', 'memory_agent32.dll']
def expectedFiles = ['libmemory_agent.dylib', 'libmemory_agent.so', 'memory_agent.dll', 'memory_agent64a.dll', 'memory_agent32.dll']
expectedFiles.collect { new File(binPath, it) }.each { file ->
if (!file.exists()) {
throw new GradleException("Binary dependency not found: ${file.path}")
Expand Down
2 changes: 2 additions & 0 deletions test_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ def dynamic_lib_format() -> str:
if os_type == "Windows":
if get_java_bitness() == 32:
return '{}32.dll'
elif os_arch == 'aarch64':
return '{}64a.dll'
else:
return '{}.dll'
if os_type == "Darwin":
Expand Down