Target changes for Language Runtimes

Hey folks,

So I added the initial part of the RenderScript language plugin which went smoothly. In that review I stated it would be initialized along the same lines of ObjCLanguageRuntime. Now, my initial thought was along the lines of the attached patch - in Target::ModulesDidLoad, call a function to see if any modules match a renderscript pattern, if so, enable the languageruntime.

However, this then requires including the plugin headers within target.cpp, which isn't ideal. ObjC has a base class header actually in the target project space, so uses that. Are there any views on how to make this a bit more generic, to allow for other Language Runtimes to detect applicability on module-load?

Cheers,
Colin

rs_modules_load.patch (3.6 KB)

Would adding a ModulesDidLoad equivalent to the base of LanguageRuntime be acceptable, for instance?

Then It’s just a matter of looking up the respective language plugin and calling that, very similar to what’s there already for ObjC.

Colin