allow tmakatos (a binary) emitter to be statically compiled
It is trivial to implement static compilation of the rest of the 3rd party emitters.
This commit is contained in:
22
thin-provisioning/static_library_emitter.cc
Normal file
22
thin-provisioning/static_library_emitter.cc
Normal file
@@ -0,0 +1,22 @@
|
||||
#include "thin-provisioning/shared_library_emitter.h"
|
||||
#include <stdexcept>
|
||||
#include "contrib/tmakatos_emitter.h"
|
||||
|
||||
using namespace std;
|
||||
using namespace thin_provisioning;
|
||||
|
||||
//----------------------------------------------------------------
|
||||
|
||||
emitter::ptr
|
||||
thin_provisioning::create_custom_emitter(string const &shared_lib, ostream &out)
|
||||
{
|
||||
if (shared_lib != "tmakatos_emitter.so")
|
||||
throw runtime_error(shared_lib + ": no such emitter");
|
||||
|
||||
cout << "XXX creating tmakatos_emitter" << endl;
|
||||
cout << flush;
|
||||
|
||||
return emitter::ptr(new tmakatos_emitter::binary_emitter(out));
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------
|
Reference in New Issue
Block a user