The OpenD Programming Language

dynamicCompile

When applied to a function, marks this function for dynamic compilation. Calls to the function will be to the dynamically compiled function, instead of to the statically compiled function (the statically compiled function is still emitted into the object file). All functions marked with this attribute must be explicitly compiled in runtime via ldc.dynamic_compile api before usage.

This attribute has no effect if dynamic compilation wasn't enabled with -enable-dynamic-compile

immutable
auto dynamicCompile = _dynamicCompile();

Examples

import ldc.attributes;

@dynamicCompile int foo() { return 42; }

Meta