On Posix host,
- Hard links waste very little disk spaces.
- tar(1) can mark 2nd linked file as "hard linked". It can be
extracted by Win32 tar.exe.
On Win32 host,
- NTFS' Hard links behave like Posix, w/o any privileges.
- ln(1) creates actual hard link, like Windows' mklink.exe /H.
- tar(1) can extract hard links.
---
llvm/Makefile.rules | 13 ++++++++++---
1 files changed, 10 insertions(+), 3 deletions(-)
diff --git a/llvm/Makefile.rules b/llvm/Makefile.rules
index 5f8db57..7d620cd 100644
--- a/llvm/Makefile.rules
+++ b/llvm/Makefile.rules
@@ -780,7 +780,12 @@ else
Ranlib = ranlib
endif
-AliasTool = ln -s
+# To build mingw binaries, symlinks should not be used.
+ifeq ($(HOST_OS),MingW)
+ AliasTool = ln
+else
+ AliasTool = ln -s
+endif
#----------------------------------------------------------
# Get the list of source files and compute object file
@@ -1524,7 +1529,8 @@ ifneq ($(strip $(ToolAliasBuildPath)),)
$(ToolAliasBuildPath): $(ToolBuildPath)
$(Echo) Creating $(BuildMode) Alias $(TOOLALIAS) $(StripWarnMsg)
$(Verb) $(RM) -f $(ToolAliasBuildPath)
- $(Verb) $(AliasTool) $(TOOLEXENAME) $(ToolAliasBuildPath)
+ $(Verb) cd $(realpath $(dir $(ToolBuildPath))); \
+ $(AliasTool) $(TOOLEXENAME) $(ToolAliasBuildPath)
$(Echo) ======= Finished Creating $(BuildMode) Alias $(TOOLALIAS) \
$(StripWarnMsg)
endif
@@ -1563,7 +1569,8 @@ install-local:: $(DestToolAlias)
$(DestToolAlias): $(DestTool)
$(Echo) Installing $(BuildMode) $(DestToolAlias)
$(Verb) $(RM) -f $(DestToolAlias)
- $(Verb) $(AliasTool) $(TOOLEXENAME) $(DestToolAlias)
+ $(Verb) cd $(realpath $(ToolBinDir)); \
+ $(AliasTool) $(TOOLEXENAME) $(DestToolAlias)
uninstall-local::
$(Echo) Uninstalling $(BuildMode) $(DestToolAlias)
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits