How am I supposed to support multiple dedicated server archs for Linux with native plugins?

Now that support for targeting arm64 for Linux dedicated servers exists, I am trying to get that sorted out with our own build servers. I want to be able to support building both x86_64 and arm, but have encountered some challenges where native plugins are concerned.

Firstly, there does not seem to be a means of selecting the arm arch for Linux in the plugin import selector. I can understand the reasoning of not wanting to conflate building an arm linux client and dedicated server, and so I edited the metafile directly to change the target arch of the plugin to ARM64 which leads to the second complication.

When having a native plugin that is set to target arm64 and one set to target x86_64 that are named the same there is a collision when staging the native plugin library. It strikes me odd that building for arm attempts to pull in libraries built for x86_64. I could name the libs differently, but I am having difficulty finding anything that tells me how to select the library name by arch so I can provide the name to DLLImport.

I cannot find documentation on how to actually get arm Linux dedicated servers set up, so I would like to know what the expected workflow is. It seems like the correct approach would be to put the plugin in a arm/arm64 directory and be able to select arm64 as the library arch in the editor, but this is clearly not the case. Is it expected that I have the the two libs name differently, and as part of the build process I discard the unwanted lib and rename the remaining one? Is there a seemingly undocumented scripting symbol somewhere I am supposed to be using that allows for statically assigning the correct lib name? How am I supposed to utilize native plugins on Linux now that both arm and x86_64 is supported for dedicated servers?

I second that. No idea how to make that work out of the box.

It looks to me like the CPU architecture property is missing some entries like the macOS one has. And that property should then be respected during the build.

Thanks for reporting this. Looks like we indeed missed this. We opened a bug report a couple days ago, you can track it here: https://issuetracker.unity3d.com/product/unity/issues/guid/UUM-131765