Build vitastor driver as part of the QEMU package by default

Old behaviour can be restored with cmake var WITH_QEMU=true
This commit is contained in:
Vitaliy Filippov
2021-11-29 02:05:26 +03:00
parent c4aeeda143
commit 92362027a8
6 changed files with 129 additions and 21 deletions
+2 -1
View File
@@ -4,7 +4,7 @@ project(vitastor)
include(GNUInstallDirs)
set(WITH_QEMU true CACHE BOOL "Build QEMU driver")
set(WITH_QEMU false CACHE BOOL "Build QEMU driver inside Vitastor source tree")
set(WITH_FIO true CACHE BOOL "Build FIO driver")
set(QEMU_PLUGINDIR qemu CACHE STRING "QEMU plugin directory suffix (qemu-kvm on RHEL)")
set(WITH_ASAN false CACHE BOOL "Build with AddressSanitizer")
@@ -171,6 +171,7 @@ if (${WITH_QEMU})
add_library(qemu_vitastor SHARED
qemu_driver.c
)
target_compile_options(qemu_vitastor PUBLIC -DVITASTOR_SOURCE_TREE)
target_include_directories(qemu_vitastor PUBLIC
../qemu/b/qemu
../qemu/include
+4
View File
@@ -3,8 +3,10 @@
// QEMU block driver
#ifdef VITASTOR_SOURCE_TREE
#define BUILD_DSO
#define _GNU_SOURCE
#endif
#include "qemu/osdep.h"
#include "block/block_int.h"
#include "qapi/error.h"
@@ -32,6 +34,7 @@
#include "vitastor_c.h"
#ifdef VITASTOR_SOURCE_TREE
void qemu_module_dummy(void)
{
}
@@ -39,6 +42,7 @@ void qemu_module_dummy(void)
void DSO_STAMP_FUN(void)
{
}
#endif
typedef struct VitastorClient
{