]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
Disable the rust build by default
authorDavid Mulder <dmulder@samba.org>
Tue, 27 Aug 2024 20:47:29 +0000 (14:47 -0600)
committerDavid Mulder <dmulder@samba.org>
Wed, 23 Oct 2024 14:21:34 +0000 (14:21 +0000)
Signed-off-by: David Mulder <dmulder@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
buildtools/wafsamba/samba_rust.py
buildtools/wafsamba/wscript
script/autobuild.py

index fc4094b530e3eaf155aa2af9d6a1f529bb0b9b44..1b4fc1b97a55f6d2e4921b2cc3a431beb8f5ff92 100644 (file)
@@ -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
index 505e77a5ca7a142b20ca9fc5131d6b22bbef1706..587bc6df8acd3ddf657310c848d70beee558c9cb 100644 (file)
@@ -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
index fefefb5e36ce2a988d1e6706984fdbb658526e62..890bfc4e4fa508bcd206faa1bb218fc95bf3e6a3 100755 (executable)
@@ -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"])),