AsmJit
Low-Latency Machine Code Generation
Build instructions, supported environments, and feature selection.
AsmJit is designed to be easy embeddable in any project. However, it depends on some compile-time definitions that can be used to enable or disable features to decrease the resulting binary size. A typical way of building AsmJit is to use cmake, but it's also possible to just include AsmJit source code in your project and to just build it. The easiest way to include AsmJit in your project is to just include src directory in your project and to define ASMJIT_STATIC. AsmJit can be just updated from time to time without any changes to this integration process. Do not embed AsmJit's test
files in such case as these are used exclusively for testing.
These definitions can be used to enable static library build. Embed is used when AsmJit's source code is embedded directly in another project, implies static build as well.
These definitions control whether asserts are active or not. By default AsmJit would autodetect build configuration from existing pre-processor definitions, but this behavior can be overridden, for example to enable debug asserts in release configuration.
NDEBUG
is defined and automatically defines ASMJIT_BUILD_RELEASE if configuration overrides were not used. We only recommend using build configuration overrides in special situations, like using AsmJit in release configuration with asserts enabled for whatever reason.AsmJit currently supports only X86/X64 backend, but the plan is to add more backends in the future. By default AsmJit builds only the host backend, which is auto-detected at compile-time, but this can be overridden.
shm_open()
.asmjit
namespace. This is only provided for users that control all the dependencies (even transitive ones) and that make sure that no two AsmJit versions are used at the same time. This option can be debugging a little simpler as there would not be ABI tag after asmjit::
namespace. Otherwise asmjit would look like asmjit::_abi_1_13::
, for example.AsmJit builds by defaults all supported features, which includes all emitters, logging, instruction validation and introspection, and JIT memory allocation. Features can be disabled at compile time by using ASMJIT_NO_...
definitions.
Asmjit is embedded, implies ASMJIT_STATIC.
Enables static-library build.
Defined when AsmJit's build configuration is 'Debug'.
Defined when AsmJit's build configuration is 'Debug'.
Defined when AsmJit's build configuration is 'Release'.
Disables X86/X64 backends.
Disables AArch64 backend.
Disables non-host backends entirely (useful for JIT compilers to minimize the library size).
Disables deprecated API at compile time (deprecated API won't be available).
Disables JIT memory management and asmjit::JitRuntime.
Disables asmjit::Logger and asmjit::Formatter.
Disables everything that contains text.
Disables instruction validation API.
Disables instruction introspection API.