I have written a .cpp file in lib/Target/(some arch)/ and i want to use one of its function in a file in lib/ExecutionEngine/RuntimeDyld/. So is there any specific way to do that. This may be a general question for any one who writes a .cpp file in Target/(any arch)/ and tries to use it somewhere in ExecitionEngine/RuntimeDyld/. Please guide.
Maybe you can see how other targets under ExecitionEngine/RuntimeDyld/Targets do?
As far as I know this is not currently possible. Current RuntimeDyld implementations are all self-contained and do not reference code from their targets.
Having RuntimeDyld depend on code from a custom target seems reasonable though. It might be better in the long term if we moved all the target-specific code out of ExecutionEngine and just provided registration functions so that targets could register their respective RuntimeDyld implementations with ExecutionEngine. This would be a significant refactor though, and we’d want to sanity-check its impact on LLVM’s library layering.