@@ -9,12 +9,10 @@ import shutil
9
9
from swift_build_support .swift_build_support import shell
10
10
11
11
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 ):
14
13
"""Merges the file lists recursively from all src_root_dirs supplied,
15
14
returning the union of all file paths found.
16
15
Files matching skip_files are ignored and skipped.
17
- Subpaths matching skip_subpaths are not recursed into.
18
16
"""
19
17
file_list = []
20
18
for src_root_dir in src_root_dirs :
@@ -25,15 +23,7 @@ def merge_file_lists(src_root_dirs, explicit_src_files, skip_files,
25
23
if file not in skip_files ]
26
24
file_list .extend (
27
25
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
+
37
27
return file_list
38
28
39
29
@@ -173,15 +163,6 @@ binaries.
173
163
default = ".DS_Store" ,
174
164
help = "Files to ignore and skip merge/copy, default " +
175
165
"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" )
185
166
parser .add_argument ("--copy-subdirs" , metavar = "<subdirs-to-copy-verbatim>" ,
186
167
default = "" ,
187
168
help = "Optional list of subdirectory paths that " +
@@ -198,12 +179,10 @@ binaries.
198
179
args = parser .parse_args ()
199
180
200
181
skip_files = args .skip_files .split ()
201
- explicit_sources = args .explicit_src_files .split ()
202
182
copy_verbatim_subpaths = [
203
183
subdir .strip ('/' ) for subdir in args .copy_subdirs .split ()]
204
184
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 )
207
186
208
187
if args .verbose :
209
188
print ("Discovered files and dirs: %s" % file_list )
0 commit comments