File tree Expand file tree Collapse file tree
build_tools/packaging/python/templates/rocm/src/rocm_sdk Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -196,7 +196,7 @@ def _clean_dir(dir: Path):
196196 # size (empty)
197197 record_file .write (f"{ ti .name } ,,\n " )
198198 if ti .issym ():
199- # Convert symlinks into hardlinks on all platforms.
199+ # Convert file symlinks into hardlinks on all platforms.
200200 # This saves disk space while improving compatibility.
201201 # On Windows: symlinks require admin privileges.
202202 # On Linux: native binaries that use readlink(/proc/self/exe)
@@ -208,7 +208,12 @@ def _clean_dir(dir: Path):
208208 parent_path .mkdir (parents = True , exist_ok = True )
209209 symlink_target = ti .linkname
210210 hardlink_target = dest_path .parent / symlink_target
211- dest_path .hardlink_to (hardlink_target )
211+ # Only create hardlinks for files, not directories
212+ if hardlink_target .is_file ():
213+ dest_path .hardlink_to (hardlink_target )
214+ else :
215+ # For directory symlinks, extract as normal
216+ tf .extract (ti , path = site_lib_path )
212217 else :
213218 tf .extract (ti , path = site_lib_path )
214219 elif ti .isdir ():
You can’t perform that action at this time.
0 commit comments