Skip to content

Commit

Permalink
fix windows build with --free-up-disk
Browse files Browse the repository at this point in the history
Summary:
getdeps can generate a windows wrapper script that can be used to run build artifacts from build directory.

In github actions for large projects we set a getdeps option delete the build dir as soon as we've successfully installed artefacts to save disk space. This option was enabled for windows in D56165825.   Turns out that didn't work, this diff adds the missing conditional so that it should.

Reviewed By: vitaut

Differential Revision: D56930778

fbshipit-source-id: 0cb9ac94ef9b39f4e33af8fb91098dc0d833731b
  • Loading branch information
ahornby authored and facebook-github-bot committed May 3, 2024
1 parent 1876f15 commit c487ef9
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions build/fbcode_builder/getdeps/builder.py
Expand Up @@ -158,12 +158,11 @@ def build(self, install_dirs, reconfigure: bool) -> None:
os.remove(self.build_dir)
else:
shutil.rmtree(self.build_dir)

# On Windows, emit a wrapper script that can be used to run build artifacts
# directly from the build directory, without installing them. On Windows $PATH
# needs to be updated to include all of the directories containing the runtime
# library dependencies in order to run the binaries.
if self.build_opts.is_windows():
elif self.build_opts.is_windows():
# On Windows, emit a wrapper script that can be used to run build artifacts
# directly from the build directory, without installing them. On Windows $PATH
# needs to be updated to include all of the directories containing the runtime
# library dependencies in order to run the binaries.
script_path = self.get_dev_run_script_path()
dep_munger = create_dyn_dep_munger(self.build_opts, install_dirs)
dep_dirs = self.get_dev_run_extra_path_dirs(install_dirs, dep_munger)
Expand Down

0 comments on commit c487ef9

Please sign in to comment.