Skip to content

Conversation

@secnotes
Copy link

@secnotes secnotes commented Oct 13, 2025

This PR allows us to generate arm64 litecov in an x86 Linux environment using cross-compilation tools. The advantage of using cross-compilation is that you can generate Tinyinst binaries that can be used by Android or other arm64 systems without the need for Android NDK.

Tip: Of course, in this environment, when compiling, we often need to generate a statically linked binary. Therefore, please add the build option -DCMAKE_EXE_LINKER_FLAGS=-static

Copy link
Collaborator

@ifratric ifratric left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Some comments below.

bool operator< (LoadedModule const& lhs, LoadedModule const& rhs);

#ifdef ARM64
#include <asm/ptrace.h>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this needed given that we already include sys/ptrace.h from debugger.h. And if it's needed for cross-compiling, will it cause issues when building for Android using the Android NDK?

cmake --build . --config Release
```

#### Cross-compiling for Linux
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Cross-compiling for aarch64 Linux"?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants