@@ -400,53 +400,6 @@ def skip_list_for_platform(config):
400
400
return skip_list
401
401
402
402
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
-
450
403
def main ():
451
404
freeze_support ()
452
405
parser = argparse .ArgumentParser (
@@ -599,7 +552,6 @@ def main():
599
552
if fail_count > 0 :
600
553
print ("update-checkout failed, fix errors and try again" )
601
554
else :
602
- symlink_llvm_monorepo (args )
603
555
print ("update-checkout succeeded" )
604
556
print_repo_hashes (args , config )
605
557
sys .exit (fail_count )
0 commit comments