From 5eb26a745577e702d48c1cdebefec395ba67a5f6 Mon Sep 17 00:00:00 2001 From: Henri Chataing Date: Tue, 25 Apr 2023 15:44:01 +0000 Subject: floss: Remove rootcanal build rules build.py contains rules for building and testing the LMP code, that were added when it was discussed to build the LMP for the emulator. Now that the emulator by default builds the rust LMP using the Cargo.toml files, these rules are no longer necessary. Furthermore, they pull crate dependencies from the chrome directory, which is likely to cause issues in the future as all other build rules for LMP use the crate versionned from AOSP. Test: NA Bug: 238726856 Change-Id: I786f35939b707d5eecff4281be4fb7aee19e4e7b --- build.py | 14 -------------- 1 file changed, 14 deletions(-) (limited to 'build.py') diff --git a/build.py b/build.py index b73349382e..ac8d265868 100755 --- a/build.py +++ b/build.py @@ -70,7 +70,6 @@ VALID_TARGETS = [ 'hosttools', # Build the host tools (i.e. packetgen) 'main', # Build the main C++ codebase 'prepare', # Prepare the output directory (gn gen + rust setup) - 'rootcanal', # Build Rust targets for RootCanal 'rust', # Build only the rust components + copy artifacts to output dir 'test', # Run the unit tests 'utils', # Build Floss utils @@ -459,15 +458,6 @@ class HostBuild(): """ self._rust_build() - def _target_rootcanal(self): - """ Build rust artifacts for RootCanal in an already prepared environment. - """ - cmd = ['cargo', 'build'] - if not self.args.rust_debug: - cmd.append('--release') - - self.run_command('rust', cmd, cwd=os.path.join(self.platform_dir, 'bt/tools/rootcanal'), env=self.env) - def _target_main(self): """ Build the main GN artifacts in an already prepared environment. """ @@ -485,7 +475,6 @@ class HostBuild(): rust_test_cmd = rust_test_cmd + [self.args.test_name, "--", "--test-threads=1", "--nocapture"] self.run_command('test', rust_test_cmd, cwd=os.path.join(self.platform_dir, 'bt'), env=self.env) - self.run_command('test', rust_test_cmd, cwd=os.path.join(self.platform_dir, 'bt/tools/rootcanal'), env=self.env) # Host tests second based on host test list for t in HOST_TESTS: @@ -566,7 +555,6 @@ class HostBuild(): # Remove Cargo.lock that may have become generated cargo_lock_files = [ os.path.join(self.platform_dir, 'bt', 'Cargo.lock'), - os.path.join(self.platform_dir, 'bt', 'tools', 'rootcanal', 'Cargo.lock'), ] for lock_file in cargo_lock_files: try: @@ -597,8 +585,6 @@ class HostBuild(): self._target_prepare() elif self.target == 'hosttools': self._target_hosttools() - elif self.target == 'rootcanal': - self._target_rootcanal() elif self.target == 'rust': self._target_rust() elif self.target == 'docs': -- cgit v1.2.3-59-g8ed1b