-
Notifications
You must be signed in to change notification settings - Fork 56
Description
Hey @stevenknown. I've been working on a Conan package for XOC.
One issue I see is that XOC builds with its targets at compile time (by default it supports DEX). This makes it hard to make a package because the XOC binary that gets installed by a package manager will only support DEX.
This design is ok for LLVM because it comes with many targets and most users won't make their own target. But XOC only supports DEX so most users will have to implement their own target, which means they cannot use a precompiled package.
I don't know much about the XOC design, but I'm wondering if it's possible to support something like this:
Library header in XOC
// A target interface that users can implement.
class XocTarget {
virtual void func1() = 0;
virtual void func2() = 0;
virtual void func3() = 0;
...
};Application code using XOC
// Implementing our own target.
class CustomTarget : public XocTarget {
void func1() override;
...
};
...
// Now passing it into XOC so the library can use it.
int main(int argc, char** argv) {
CustomTarget target;
xoc_register_target(&target);
REGION_MGR rm;
rm.init_var_mgr();
...
}If we can't support adding targets at runtime, then I don't think XOC can be packaged. I'm happy to help with the development work.