File tree Expand file tree Collapse file tree 2 files changed +12
-7
lines changed Expand file tree Collapse file tree 2 files changed +12
-7
lines changed Original file line number Diff line number Diff line change @@ -15119,14 +15119,14 @@ def test_empath_split(self):
1511915119 void foo() { std::cout << "foo" << std::endl; }
1512015120 ''')
1512115121 create_file('path_list.txt', r'''
15122- myapp
15122+ myapp:
1512315123 main.cpp
1512415124 foo.cpp
1512515125
15126- lib1
15126+ lib1:
1512715127 /emsdk/emscripten/system
1512815128
15129- lib2
15129+ lib2:
1513015130 /emsdk/emscripten/system/lib/libc/musl
1513115131 /emsdk/emscripten/system/lib/libcxx
1513215132 ''')
Original file line number Diff line number Diff line change 2525to split modules. The format is similar to the manifest file for wasm-split, but
2626with paths instead of function names. A module is defined by a name on a line,
2727followed by paths on subsequent lines. Modules are separated by empty lines.
28+ Module names be written with a colon (:).
2829For example:
29- module1
30+ module1:
3031path/to/a
3132path/to/b
3233
33- module2
34+ module2:
3435path/to/c
3536
3637This will create two modules, 'module1' and 'module2'. 'module1' will contain
@@ -276,7 +277,11 @@ def parse_paths_file(paths_file_content):
276277 continue
277278
278279 if not cur_module :
279- cur_module = line
280+ if line [- 1 ] != ':' :
281+ exit_with_error (f'Module name should end with a colon: { line } ' )
282+ if len (line ) == 1 :
283+ exit_with_error ('Module name is empty' )
284+ cur_module = line [:- 1 ]
280285 else :
281286 path = normalize_path (line )
282287 if path in path_to_module :
@@ -337,7 +342,7 @@ def main():
337342 print (' ' + func )
338343 print ()
339344
340- f .write (f'{ module } \n ' )
345+ f .write (f'{ module } : \n ' )
341346 for func in funcs :
342347 f .write (func + '\n ' )
343348 f .close ()
You can’t perform that action at this time.
0 commit comments