X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=lib%2Fmeson.build;h=5ddf1ca116e51211a0261aedeea9176adf54abd2;hb=d4c5136227ab12d0d4e2aa11387bf04bd353bd7c;hp=c3289f885dc2d7c7d74f3dfdad12eb019884b58b;hpb=fa647c5722b86cdabb1ed60701ef7eb6095bbd66;p=dpdk.git diff --git a/lib/meson.build b/lib/meson.build index c3289f885d..5ddf1ca116 100644 --- a/lib/meson.build +++ b/lib/meson.build @@ -22,7 +22,7 @@ libraries = [ 'gro', 'gso', 'ip_frag', 'jobstats', 'kni', 'latencystats', 'lpm', 'member', 'power', 'pdump', 'rawdev', - 'reorder', 'sched', 'security', 'vhost', + 'rcu', 'reorder', 'sched', 'security', 'stack', 'vhost', #ipsec lib depends on crypto and security 'ipsec', # add pkt framework libs which use other libs from above @@ -30,7 +30,7 @@ libraries = [ # flow_classify lib depends on pkt framework table lib 'flow_classify', 'bpf', 'telemetry'] -if host_machine.system() == 'windows' +if is_windows libraries = ['kvargs','eal'] # only supported libraries for windows endif @@ -41,11 +41,9 @@ endif enabled_libs = [] # used to print summary at the end -# -D_GNU_SOURCE unconditionally -default_cflags += '-D_GNU_SOURCE' - foreach l:libraries build = true + reason = '' # set if build == false to explain why name = l version = 1 allow_experimental_apis = false @@ -68,7 +66,10 @@ foreach l:libraries dir_name = 'librte_' + l subdir(dir_name) - if build + if not build + dpdk_libs_disabled += name + set_variable(name.underscorify() + '_disable_reason', reason) + else enabled_libs += name dpdk_conf.set('RTE_LIBRTE_' + name.to_upper(), 1) install_headers(headers) @@ -121,15 +122,19 @@ foreach l:libraries objs += static_lib.extract_all_objects(recursive: false) version_map = '@0@/@1@/rte_@2@_version.map'.format( meson.current_source_dir(), dir_name, name) - exports = [] implib = dir_name + '.dll.a' - if host_machine.system() == 'windows' - exports = '@0@/@1@/rte_@2@_exports.def'.format( - meson.current_source_dir(), dir_name, name) - lk_args = ['-Wl,/def:' + exports, '-Wl,/implib:lib\\' + implib] + + def_file = custom_target(name + '_def', + command: [map_to_def_cmd, '@INPUT@', '@OUTPUT@'], + input: version_map, + output: 'rte_@0@_exports.def'.format(name)) + if is_windows + lk_args = ['-Wl,/def:' + def_file.full_path(), + '-Wl,/implib:lib\\' + implib] else lk_args = ['-Wl,--version-script=' + version_map] endif + shared_lib = shared_library(libname, sources, objects: objs, @@ -137,7 +142,7 @@ foreach l:libraries dependencies: shared_deps, include_directories: includes, link_args: lk_args, - link_depends: [version_map, exports], + link_depends: [version_map, def_file], version: lib_version, soversion: so_version, install: true)