File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -40,6 +40,21 @@ PlatformVecT &Platforms() {
4040 return Platforms;
4141}
4242
43+ // TODO: Some plugins expect to be linked into libomptarget which defines these
44+ // symbols to implement ompt callbacks. The least invasive workaround here is to
45+ // define them in libLLVMOffload as false/null so they are never used. In future
46+ // it would be better to allow the plugins to implement callbacks without
47+ // pulling in details from libomptarget.
48+ #ifdef OMPT_SUPPORT
49+ namespace llvm ::omp::target {
50+ namespace ompt {
51+ bool Initialized = false ;
52+ ompt_get_callback_t lookupCallbackByCode = nullptr ;
53+ ompt_function_lookup_t lookupCallbackByName = nullptr ;
54+ } // namespace ompt
55+ } // namespace llvm::omp::target
56+ #endif
57+
4358// Every plugin exports this method to create an instance of the plugin type.
4459#define PLUGIN_TARGET (Name ) extern " C" GenericPluginTy *createPlugin_##Name();
4560#include " Shared/Targets.def"
You can’t perform that action at this time.
0 commit comments