Skip to content

Commit

Permalink
Take upstream swift_stdlib_tool directory fix (bazelbuild#1336)
Browse files Browse the repository at this point in the history
Co-authored-by: Kayla McArthur <[email protected]>
  • Loading branch information
keith and kaylathar authored Jan 27, 2022
1 parent e87a77e commit 9553507
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions tools/swift_stdlib_tool/swift_stdlib_tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,6 @@ def _lipo_exec_files(exec_files, target_archs, strip_bitcode, source_path,
[os.path.join(source_path, f) for f in exec_files]
)

# Ensure directory for remote execution
if not os.path.exists(destination_path):
os.makedirs(destination_path)

# Copy or lipo each file as needed, from source to destination.
for exec_file in exec_files:
exec_file_source_path = os.path.join(source_path, exec_file)
Expand Down Expand Up @@ -112,9 +108,13 @@ def main():
)
]

destination_path = args.output_path
# Ensure directory exists for remote execution.
os.makedirs(destination_path, exist_ok=True)

# Copy or use lipo to strip the executable Swift stdlibs to their destination.
_lipo_exec_files(stdlib_files, target_archs, args.strip_bitcode, temp_path,
args.output_path)
destination_path)

shutil.rmtree(temp_path)

Expand Down

0 comments on commit 9553507

Please sign in to comment.