Skip to content

Commit 51ca8b3

Browse files
authored
Support llvm-libc directory in push_llvm_changes.py (#24526)
Given that we use different names for the `libc` in our copy (`llvm-libc`), `copy_dirs` is now a list of tuples.
1 parent cc453b2 commit 51ca8b3

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

system/lib/push_llvm_changes.py

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,11 @@
1818
emscripten_root = os.path.dirname(os.path.dirname(script_dir))
1919
default_llvm_dir = os.path.join(os.path.dirname(emscripten_root), 'llvm-project')
2020
copy_dirs = [
21-
'compiler-rt',
22-
'libcxx',
23-
'libcxxabi',
24-
'libunwind',
21+
('compiler-rt', 'compiler-rt'),
22+
('libcxx', 'libcxx'),
23+
('libcxxabi', 'libcxxabi'),
24+
('libunwind', 'libunwind'),
25+
('llvm-libc', 'libc'),
2526
]
2627

2728

@@ -34,12 +35,12 @@ def main():
3435
print(f'llvm tree not found: {upstream_root}')
3536
return 1
3637

37-
for dir in copy_dirs:
38-
assert os.path.exists(os.path.join(upstream_root, dir))
38+
for _, upstream_name in copy_dirs:
39+
assert os.path.exists(os.path.join(upstream_root, upstream_name))
3940

40-
for dir in copy_dirs:
41-
local_dir = os.path.join(script_dir, dir)
42-
upstream_dir = os.path.join(upstream_root, dir)
41+
for local_name, upstream_name in copy_dirs:
42+
local_dir = os.path.join(script_dir, local_name)
43+
upstream_dir = os.path.join(upstream_root, upstream_name)
4344
print(f'copying {local_dir} -> {upstream_dir}')
4445
shutil.copytree(local_dir, upstream_dir, dirs_exist_ok=True)
4546

0 commit comments

Comments
 (0)