From 910a331f3e931d8b027ec12c9b85d219c25fb966 Mon Sep 17 00:00:00 2001 From: David Mulder Date: Tue, 27 Aug 2024 14:47:29 -0600 Subject: [PATCH] Disable the rust build by default Signed-off-by: David Mulder Reviewed-by: Alexander Bokovoy --- buildtools/wafsamba/samba_rust.py | 6 +++--- buildtools/wafsamba/wscript | 8 ++++---- script/autobuild.py | 4 ++-- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/buildtools/wafsamba/samba_rust.py b/buildtools/wafsamba/samba_rust.py index fc4094b530e..1b4fc1b97a5 100644 --- a/buildtools/wafsamba/samba_rust.py +++ b/buildtools/wafsamba/samba_rust.py @@ -5,12 +5,12 @@ import os @conf def SAMBA_CHECK_RUST(conf): conf.find_program('cargo', var='CARGO', - mandatory=not conf.env.disable_rust) + mandatory=conf.env.enable_rust) def vendor_sources(bld, enabled=True): # force-disable when we can't build rust modules, so # every single call doesn't need to pass this in. - if bld.env.disable_rust: + if not bld.env.enable_rust: enabled = False # Save time, no need to build rust when fuzzing @@ -48,7 +48,7 @@ def find_sources(source_dir, dep_crate): def SAMBA_RUST(bld, rust_subdir, target_name, dep_crates=[], enabled=True): # force-disable when we can't build rust modules, so # every single call doesn't need to pass this in. - if bld.env.disable_rust: + if not bld.env.enable_rust: enabled = False # Save time, no need to build rust when fuzzing diff --git a/buildtools/wafsamba/wscript b/buildtools/wafsamba/wscript index 505e77a5ca7..587bc6df8ac 100644 --- a/buildtools/wafsamba/wscript +++ b/buildtools/wafsamba/wscript @@ -288,9 +288,9 @@ Currently the only tested value is 'smbtorture,smbd/smbd' for Samba'''), opt.add_option('--disable-python', help='do not generate python modules', action='store_true', dest='disable_python', default=False) - opt.add_option('--disable-rust', - help='do not build rust modules', - action='store_true', dest='disable_rust', default=False) + opt.add_option('--enable-rust', + help='build rust modules', + action='store_true', dest='enable_rust', default=False) @Utils.run_once @@ -354,7 +354,7 @@ def configure(conf): conf.env.AUTOCONF_PROGRAM_PREFIX = Options.options.AUTOCONF_PROGRAM_PREFIX conf.env.disable_python = Options.options.disable_python - conf.env.disable_rust = Options.options.disable_rust + conf.env.enable_rust = Options.options.enable_rust if (conf.env.AUTOCONF_HOST and conf.env.AUTOCONF_BUILD and diff --git a/script/autobuild.py b/script/autobuild.py index fefefb5e36c..890bfc4e4fa 100755 --- a/script/autobuild.py +++ b/script/autobuild.py @@ -313,7 +313,7 @@ tasks = { "samba": { "sequence": [ ("random-sleep", random_sleep(300, 900)), - ("configure", "./configure.developer --with-himmelblau" + samba_configure_params), + ("configure", "./configure.developer --enable-rust --with-himmelblau" + samba_configure_params), ("make", "make -j"), ("test", make_test(exclude_envs=[ "none", @@ -818,7 +818,7 @@ tasks = { "samba-o3": { "sequence": [ ("random-sleep", random_sleep(300, 900)), - ("configure", "ADDITIONAL_CFLAGS='-O3 -Wp,-D_FORTIFY_SOURCE=2' ./configure.developer --abi-check-disable" + samba_configure_params), + ("configure", "ADDITIONAL_CFLAGS='-O3 -Wp,-D_FORTIFY_SOURCE=2' ./configure.developer --abi-check-disable --enable-rust" + samba_configure_params), ("make", "make -j"), ("test", make_test(cmd='make test', TESTS="--exclude=selftest/slow-none", include_envs=["none"])), ("quicktest", make_test(cmd='make quicktest', include_envs=["ad_dc", "ad_dc_smb1", "ad_dc_smb1_done"])), -- 2.47.3