|
@@ -70,6 +70,19 @@ if host_os == 'darwin' and \
|
|
|
all_languages += ['objc']
|
|
|
objc = meson.get_compiler('objc')
|
|
|
endif
|
|
|
+have_rust = false
|
|
|
+if not get_option('rust').disabled() and add_languages('rust', required: get_option('rust'), native: false)
|
|
|
+ rustc = meson.get_compiler('rust')
|
|
|
+ have_rust = true
|
|
|
+ if rustc.version().version_compare('<1.80.0')
|
|
|
+ if get_option('rust').enabled()
|
|
|
+ error('rustc version ' + rustc.version() + ' is unsupported: Please upgrade to at least 1.80.0')
|
|
|
+ else
|
|
|
+ warning('rustc version ' + rustc.version() + ' is unsupported: Disabling Rust compilation. Please upgrade to at least 1.80.0 to use Rust.')
|
|
|
+ have_rust = false
|
|
|
+ endif
|
|
|
+ endif
|
|
|
+endif
|
|
|
|
|
|
dtrace = not_found
|
|
|
stap = not_found
|
|
@@ -2158,6 +2171,7 @@ endif
|
|
|
|
|
|
config_host_data = configuration_data()
|
|
|
|
|
|
+config_host_data.set('CONFIG_HAVE_RUST', have_rust)
|
|
|
audio_drivers_selected = []
|
|
|
if have_system
|
|
|
audio_drivers_available = {
|
|
@@ -3097,7 +3111,8 @@ host_kconfig = \
|
|
|
(host_os == 'linux' ? ['CONFIG_LINUX=y'] : []) + \
|
|
|
(multiprocess_allowed ? ['CONFIG_MULTIPROCESS_ALLOWED=y'] : []) + \
|
|
|
(vfio_user_server_allowed ? ['CONFIG_VFIO_USER_SERVER_ALLOWED=y'] : []) + \
|
|
|
- (hv_balloon ? ['CONFIG_HV_BALLOON_POSSIBLE=y'] : [])
|
|
|
+ (hv_balloon ? ['CONFIG_HV_BALLOON_POSSIBLE=y'] : []) + \
|
|
|
+ (have_rust ? ['CONFIG_HAVE_RUST=y'] : [])
|
|
|
|
|
|
ignored = [ 'TARGET_XML_FILES', 'TARGET_ABI_DIR', 'TARGET_ARCH' ]
|
|
|
|
|
@@ -4308,6 +4323,11 @@ if 'objc' in all_languages
|
|
|
else
|
|
|
summary_info += {'Objective-C compiler': false}
|
|
|
endif
|
|
|
+summary_info += {'Rust support': have_rust}
|
|
|
+if have_rust
|
|
|
+ summary_info += {'rustc version': rustc.version()}
|
|
|
+ summary_info += {'rustc': ' '.join(rustc.cmd_array())}
|
|
|
+endif
|
|
|
option_cflags = (get_option('debug') ? ['-g'] : [])
|
|
|
if get_option('optimization') != 'plain'
|
|
|
option_cflags += ['-O' + get_option('optimization')]
|