Skip to content

Commit da87341

Browse files
committed
Remove the --explicit-src-files from recursive-lipo
This option has been subsumed by the improved semantics of `--copy-subdirs`.
1 parent c374fdd commit da87341

File tree

2 files changed

+4
-25
lines changed

2 files changed

+4
-25
lines changed

utils/build-script-impl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3579,7 +3579,7 @@ if [[ ${#LIPO_SRC_DIRS[@]} -gt 0 ]]; then
35793579
else
35803580
LIPO_PATH="${HOST_LIPO}"
35813581
fi
3582-
call "${SWIFT_SOURCE_DIR}"/utils/recursive-lipo --lipo=${LIPO_PATH} --copy-subdirs="$(get_host_install_prefix ${host})lib/swift $(get_host_install_prefix ${host})lib/swift_static" --explicit-src-files="$(get_host_install_prefix ${host})lib/swift/${host%%-*}/lib_InternalSwiftScan.dylib" --destination="$(get_host_install_destdir ${mergedHost})" ${LIPO_SRC_DIRS[@]}
3582+
call "${SWIFT_SOURCE_DIR}"/utils/recursive-lipo --lipo=${LIPO_PATH} --copy-subdirs="$(get_host_install_prefix ${host})lib/swift $(get_host_install_prefix ${host})lib/swift_static" --destination="$(get_host_install_destdir ${mergedHost})" ${LIPO_SRC_DIRS[@]}
35833583

35843584
if [[ $(should_execute_action "${mergedHost}-lipo") ]]; then
35853585
# Build and test the lipo-ed package.

utils/recursive-lipo

Lines changed: 3 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,10 @@ import shutil
99
from swift_build_support.swift_build_support import shell
1010

1111

12-
def merge_file_lists(src_root_dirs, explicit_src_files, skip_files,
13-
skip_subpaths):
12+
def merge_file_lists(src_root_dirs, skip_files):
1413
"""Merges the file lists recursively from all src_root_dirs supplied,
1514
returning the union of all file paths found.
1615
Files matching skip_files are ignored and skipped.
17-
Subpaths matching skip_subpaths are not recursed into.
1816
"""
1917
file_list = []
2018
for src_root_dir in src_root_dirs:
@@ -25,15 +23,7 @@ def merge_file_lists(src_root_dirs, explicit_src_files, skip_files,
2523
if file not in skip_files]
2624
file_list.extend(
2725
filter(lambda file: file not in file_list, rel_files))
28-
dirs[:] = filter(
29-
lambda dir: os.path.join(rel_dir, dir)
30-
not in skip_subpaths, dirs)
31-
32-
for file in explicit_src_files:
33-
# If this is an absolute installation path, e.g. /Applications/Xcode/...,
34-
# treat it as being relative to a built toolchain
35-
relative_path = file[1:] if file.startswith("/") else file
36-
file_list.append(relative_path) if relative_path not in file_list else file_list
26+
3727
return file_list
3828

3929

@@ -173,15 +163,6 @@ binaries.
173163
default=".DS_Store",
174164
help="Files to ignore and skip merge/copy, default " +
175165
"is \".DS_Store\"")
176-
# A list of files which this script will ensure are merged using lipo.
177-
# The intent is to allow for exceptions to binaries located under
178-
# `copy-subdirs` that are not built fat. However, if more such exceptions
179-
# are added, it would be better to re-think our approach to a more-general
180-
# solution.
181-
parser.add_argument("--explicit-src-files", metavar="<explicit-source-files>",
182-
default="",
183-
help="Optional list of files which should be merged to " +
184-
"be installed")
185166
parser.add_argument("--copy-subdirs", metavar="<subdirs-to-copy-verbatim>",
186167
default="",
187168
help="Optional list of subdirectory paths that " +
@@ -198,12 +179,10 @@ binaries.
198179
args = parser.parse_args()
199180

200181
skip_files = args.skip_files.split()
201-
explicit_sources = args.explicit_src_files.split()
202182
copy_verbatim_subpaths = [
203183
subdir.strip('/') for subdir in args.copy_subdirs.split()]
204184

205-
file_list = merge_file_lists(args.src_root_dirs, explicit_sources,
206-
skip_files, ())
185+
file_list = merge_file_lists(args.src_root_dirs, skip_files)
207186

208187
if args.verbose:
209188
print("Discovered files and dirs: %s" % file_list)

0 commit comments

Comments
 (0)