Author: Michael R. Crusoe <crusoe@debian.org>
Description: save resources by not making/testing the -fsantize variants
Forwarded: not-needed
Index: bowtie2/Makefile
===================================================================
--- bowtie2.orig/Makefile
+++ bowtie2/Makefile
@@ -343,13 +343,6 @@ DEFS := -fno-strict-aliasing \
   $(CPPFLAGS) \
   $(CFLAGS)
 
-# set compiler flags for all sanitized builds
-ifdef BOWTIE2_BIN_LIST_SAN
-$(BOWTIE2_BIN_LIST_SAN): CXXFLAGS+=$(SANITIZER_FLAGS)
-else
-$(BOWTIE2_BIN_LIST_SAN): $(error "Compiler does not support...")
-endif
-
 bowtie2-build-%: CXXFLAGS += $(BUILD_CXXFLAGS)
 bowtie2-build-%: LDFLAGS += $(BUILD_LDFLAGS)
 bowtie2-build-%: LDLIBS += $(BUILD_LDLIBS)
Index: bowtie2/bowtie2
===================================================================
--- bowtie2.orig/bowtie2
+++ bowtie2/bowtie2
@@ -122,7 +122,6 @@ getBt2Desc(\%desc);
 sub isWrapped($) { return defined($wrapped{$_[0]}); }
 
 my $debug = 0;
-my $sanitized = 0;
 my %read_fns = ();
 my %read_compress = ();
 my $cap_out = undef;       # Filename for passthrough
@@ -184,7 +183,6 @@ GetOptions(
         "keep"                          => \$keep,
         "verbose"                       => \$verbose,
         "debug"                         => \$debug,
-        "sanitized"                     => \$sanitized,
         "large-index"                   => \$large_idx,
         "no-unal"                       => \$no_unal,
         "un=s"                          => \&handle_un_or_al,
@@ -473,9 +471,6 @@ my $suffix = "";
 if ($debug) {
         $suffix = "-debug";
 }
-elsif($sanitized) {
-        $suffix = "-sanitized";
-}
 
 # Construct command invoking bowtie2-align
 quote_params(\@bt2_args);
Index: bowtie2/bowtie2-build
===================================================================
--- bowtie2.orig/bowtie2-build
+++ bowtie2/bowtie2-build
@@ -52,7 +52,6 @@ def main():
 
     group = parser.add_mutually_exclusive_group()
     group.add_argument('--debug', action='store_true')
-    group.add_argument('--sanitized', action='store_true')
 
     logging.basicConfig(level=logging.ERROR,
                         format='%(levelname)s: %(message)s'
@@ -78,9 +77,9 @@ def main():
         build_bin_spec += "-debug"
         build_bin_l += "-debug"
 
-    if script_options.sanitized:
-        build_bin_spec += "-sanitized"
-        build_bin_l += "-sanitized"
+#    if script_options.sanitized:
+#        build_bin_spec += "-sanitized"
+#        build_bin_l += "-sanitized"
 
     fastas = []
     if "-c" not in argv and len(argv) >= 2:
Index: bowtie2/bowtie2-inspect
===================================================================
--- bowtie2.orig/bowtie2-inspect
+++ bowtie2/bowtie2-inspect
@@ -34,7 +34,6 @@ def main():
 
     group = parser.add_mutually_exclusive_group()
     group.add_argument('--debug', action='store_true')
-    group.add_argument('--sanitized', action='store_true')
 
     parser.add_argument('--verbose', action='store_true')
     parser.add_argument('--large-index', action='store_true')
@@ -61,10 +60,6 @@ def main():
         inspect_bin_spec += '-debug'
         inspect_bin_l += '-debug'
 
-    if script_options.sanitized:
-        inspect_bin_spec += '-sanitized'
-        inspect_bin_l += '-sanitized'
-
     if script_options.large_index:
         inspect_bin_spec = os.path.join(ex_path,inspect_bin_l)
     elif len(argv) >= 1:
Index: bowtie2/scripts/test/simple_tests.pl
===================================================================
--- bowtie2.orig/scripts/test/simple_tests.pl
+++ bowtie2/scripts/test/simple_tests.pl
@@ -4605,7 +4605,7 @@ sub runbowtie2($$$$$$$$$$$$$$$$$$$$$$$$$
 	close(FA);
 	if($do_build) {
 		my $build_args = "";
-		my $cmd = "$bowtie2_build $idx_type --quiet --sanity $build_args $fa .simple_tests.tmp";
+		my $cmd = "$bowtie2_build $idx_type --quiet $build_args $fa .simple_tests.tmp";
 		print "$cmd\n";
 		system($cmd);
 		($? == 0) || die "Bad exitlevel from bowtie2-build: $?";
Index: bowtie2/scripts/test/simple_tests.sh
===================================================================
--- bowtie2.orig/scripts/test/simple_tests.sh
+++ bowtie2/scripts/test/simple_tests.sh
@@ -21,8 +21,8 @@
 
 #  simple_tests.sh
 
-export ASAN_OPTIONS=halt_on_error=1
-export UBSAN_OPTIONS=halt_on_error=1
+#export ASAN_OPTIONS=halt_on_error=1
+#export UBSAN_OPTIONS=halt_on_error=1
 
 #MAKE=`which gmake || which make`
 #$MAKE $* bowtie2-align-s \
Index: bowtie2/bt2_build.cpp
===================================================================
--- bowtie2.orig/bt2_build.cpp
+++ bowtie2/bt2_build.cpp
@@ -147,7 +147,6 @@ static void printUsage(ostream& out) {
 	out << "    --large-index           force generated index to be 'large', even if ref" << endl
 	    << "                            has fewer than 4 billion nucleotides" << endl
 	    << "    --debug                 use the debug binary; slower, assertions enabled" << endl
-	    << "    --sanitized             use sanitized binary; slower, uses ASan and/or UBSan" << endl
 	    << "    --verbose               log the issued command" << endl;
 	}
 	out << "    -a/--noauto             disable automatic -p/--bmax/--dcv memory-fitting" << endl
Index: bowtie2/bt2_inspect.cpp
===================================================================
--- bowtie2.orig/bt2_inspect.cpp
+++ bowtie2/bt2_inspect.cpp
@@ -81,7 +81,6 @@ static void printUsage(ostream& out) {
 		out << "  --large-index      force inspection of the 'large' index, even if a" << endl
 		    << "                     'small' one is present." << endl
 		    << "  --debug            use the debug binary; slower, assertions enabled" << endl
-		    << "  --sanitized        use sanitized binary; slower, uses ASan and/or UBSan" << endl
 		    << "  --verbose          log the issued command" << endl;
 	}
 	out << "  -a/--across <int>  Number of characters across in FASTA output (default: 60)" << endl
