Skip to content

Commit 5c53756

Browse files
committed
[update-checkout] Remove the symlink from update-checkout because we are using llvm projects directly
1 parent 1ef9dff commit 5c53756

File tree

1 file changed

+0
-48
lines changed

1 file changed

+0
-48
lines changed

utils/update_checkout/update_checkout/update_checkout.py

Lines changed: 0 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -400,53 +400,6 @@ def skip_list_for_platform(config):
400400
return skip_list
401401

402402

403-
# Python 2.7 in Windows doesn't support os.symlink
404-
os_symlink = getattr(os, "symlink", None)
405-
if callable(os_symlink):
406-
pass
407-
else:
408-
def symlink_ms(source, link_name):
409-
source = os.path.normpath(source)
410-
link_name = os.path.normpath(link_name)
411-
if os.path.isdir(link_name):
412-
os.rmdir(link_name)
413-
elif os.exists(link_name):
414-
os.remove(link_name)
415-
import ctypes
416-
csl = ctypes.windll.kernel32.CreateSymbolicLinkW
417-
csl.argtypes = (ctypes.c_wchar_p, ctypes.c_wchar_p, ctypes.c_uint32)
418-
csl.restype = ctypes.c_ubyte
419-
flags = 1 if os.path.isdir(source) else 0
420-
if csl(link_name, source, flags) == 0:
421-
raise ctypes.WinError()
422-
os.symlink = symlink_ms
423-
424-
425-
def symlink_llvm_monorepo(args):
426-
print("Create symlink for LLVM Project")
427-
llvm_projects = ['clang',
428-
'llvm',
429-
'lldb',
430-
'compiler-rt',
431-
'libcxx',
432-
'clang-tools-extra']
433-
for project in llvm_projects:
434-
src_path = os.path.join(args.source_root,
435-
'llvm-project',
436-
project)
437-
dst_path = os.path.join(args.source_root, project)
438-
if not os.path.islink(dst_path):
439-
try:
440-
os.symlink(src_path, dst_path)
441-
except OSError as e:
442-
if e.errno == errno.EEXIST:
443-
print("File '%s' already exists. Remove it, so "
444-
"update-checkout can create the symlink to the "
445-
"llvm-monorepo." % dst_path)
446-
else:
447-
raise e
448-
449-
450403
def main():
451404
freeze_support()
452405
parser = argparse.ArgumentParser(
@@ -599,7 +552,6 @@ def main():
599552
if fail_count > 0:
600553
print("update-checkout failed, fix errors and try again")
601554
else:
602-
symlink_llvm_monorepo(args)
603555
print("update-checkout succeeded")
604556
print_repo_hashes(args, config)
605557
sys.exit(fail_count)

0 commit comments

Comments
 (0)