diff --git a/utils/swift_build_support/swift_build_support/products/indexstoredb.py b/utils/swift_build_support/swift_build_support/products/indexstoredb.py index af187e9e612ce..cd6fedcbb0334 100644 --- a/utils/swift_build_support/swift_build_support/products/indexstoredb.py +++ b/utils/swift_build_support/swift_build_support/products/indexstoredb.py @@ -76,7 +76,7 @@ def get_dependencies(cls): def run_build_script_helper(action, host_target, product, args, - sanitize_all=False): + sanitize_all=False, clean=True): script_path = os.path.join( product.source_dir, 'Utilities', 'build-script-helper.py') @@ -105,6 +105,9 @@ def run_build_script_helper(action, host_target, product, args, elif args.enable_tsan: helper_cmd.extend(['--sanitize', 'thread']) + if not clean: + helper_cmd.append('--no-clean') + if not product.is_darwin_host( host_target) and product.is_cross_compile_target(host_target): helper_cmd.extend(['--cross-compile-host', host_target]) diff --git a/utils/swift_build_support/swift_build_support/products/sourcekitlsp.py b/utils/swift_build_support/swift_build_support/products/sourcekitlsp.py index c7349ab7e60de..eae0165927069 100644 --- a/utils/swift_build_support/swift_build_support/products/sourcekitlsp.py +++ b/utils/swift_build_support/swift_build_support/products/sourcekitlsp.py @@ -50,14 +50,14 @@ def should_test(self, host_target): def test(self, host_target): indexstoredb.run_build_script_helper( 'test', host_target, self, self.args, - self.args.test_sourcekitlsp_sanitize_all) + self.args.test_sourcekitlsp_sanitize_all, clean=False) def should_install(self, host_target): return self.args.install_sourcekitlsp def install(self, host_target): indexstoredb.run_build_script_helper( - 'install', host_target, self, self.args) + 'install', host_target, self, self.args, clean=False) @classmethod def get_dependencies(cls):