vhost: fix missing guest pages table NUMA realloc
[dpdk.git] / lib / meson.build
index 3a9a6c3..4a64756 100644 (file)
@@ -81,6 +81,24 @@ if is_windows
     ] # only supported libraries for windows
 endif
 
+optional_libs = [
+        'kni',
+        'power',
+        'vhost',
+]
+
+disabled_libs = []
+opt_disabled_libs = run_command(list_dir_globs, get_option('disable_libs'),
+        check: true).stdout().split()
+foreach l:opt_disabled_libs
+    if not optional_libs.contains(l)
+        warning('Cannot disable mandatory library "@0@"'.format(l))
+        continue
+    endif
+    disabled_libs += l
+endforeach
+
+
 default_cflags = machine_args
 default_cflags += ['-DALLOW_EXPERIMENTAL_API']
 default_cflags += ['-DALLOW_INTERNAL_API']
@@ -114,7 +132,12 @@ foreach l:libraries
         deps += ['eal']
     endif
 
-    subdir(l)
+    if disabled_libs.contains(l)
+        build = false
+        reason = 'explicitly disabled via build config'
+    else
+        subdir(l)
+    endif
     if name != l
         warning('Library name, "@0@", and directory name, "@1@", do not match'.format(name, l))
     endif
@@ -148,13 +171,14 @@ foreach l:libraries
     libname = 'rte_' + name
     includes += include_directories(l)
 
-    if is_windows and use_function_versioning
+    if developer_mode and is_windows and use_function_versioning
         message('@0@: Function versioning is not supported by Windows.'.format(name))
     endif
 
     if use_function_versioning
         cflags += '-DRTE_USE_FUNCTION_VERSIONING'
     endif
+    cflags += '-DRTE_LOG_DEFAULT_LOGTYPE=lib.' + l
 
     # first build static lib
     static_lib = static_library(libname,
@@ -205,7 +229,7 @@ foreach l:libraries
     endif
 
     lk_deps = [version_map, def_file, mingw_map]
-    if not is_windows
+    if developer_mode and not is_windows
         # on unix systems check the output of the
         # check-symbols.sh script, using it as a
         # dependency of the .so build