Why does Ada DLL get stuck at adainit when called from Rust over FFI interface?

Problem is the use of for Library_Standalone use "encapsulated"; in the main project configuration file, when this is replaced with the default value standard project compilation fails with the following error:

shared library project "my_ffi" cannot import static library project "b"

Once line for Library_Kind use "relocatable"; is added to library B project configuration, compilation error goes away and libmy_ffi.dll is compiled successfully. What is more, resulting DLL works as expected when its called from Rust.

Quirks that remain unanswered:

  • Why is this not a problem for Linux platforms
  • Why does gprbuild not enforce or warn about the only static policy when the project is compiled