зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1737164 - Don't produce symlinks in Windows clang toolchains. r=glandium DONTBUILD CLOSED TREE
Original patch by Andi-Bogdan Postelnicu <andi@mozilla.com>. Differential Revision: https://phabricator.services.mozilla.com/D129222
This commit is contained in:
Родитель
081ed1abe8
Коммит
1582b8cfc3
|
@ -15,6 +15,7 @@
|
|||
"bug47258-extract-symbols-mbcs.patch",
|
||||
"Remove-FlushViewOfFile-when-unmaping-gcda-files.patch",
|
||||
"revert-llvmorg-13-init-7827-g2a078c307204.patch",
|
||||
"loosen-msvc-detection.patch"
|
||||
"loosen-msvc-detection.patch",
|
||||
"win64-no-symlink.patch"
|
||||
]
|
||||
}
|
||||
|
|
|
@ -0,0 +1,30 @@
|
|||
diff --git a/llvm/cmake/modules/LLVMInstallSymlink.cmake b/llvm/cmake/modules/LLVMInstallSymlink.cmake
|
||||
index 3e6a2c9a2648..09fed8085c23 100644
|
||||
--- a/llvm/cmake/modules/LLVMInstallSymlink.cmake
|
||||
+++ b/llvm/cmake/modules/LLVMInstallSymlink.cmake
|
||||
@@ -4,17 +4,18 @@
|
||||
|
||||
function(install_symlink name target outdir)
|
||||
set(DESTDIR $ENV{DESTDIR})
|
||||
+ if(CMAKE_HOST_UNIX)
|
||||
+ set(LINK_OR_COPY create_symlink)
|
||||
+ else()
|
||||
+ set(LINK_OR_COPY copy)
|
||||
+ endif()
|
||||
+
|
||||
set(bindir "${DESTDIR}${CMAKE_INSTALL_PREFIX}/${outdir}/")
|
||||
|
||||
message(STATUS "Creating ${name}")
|
||||
|
||||
execute_process(
|
||||
- COMMAND "${CMAKE_COMMAND}" -E create_symlink "${target}" "${name}"
|
||||
- WORKING_DIRECTORY "${bindir}" ERROR_VARIABLE has_err)
|
||||
- if(CMAKE_HOST_WIN32 AND has_err)
|
||||
- execute_process(
|
||||
- COMMAND "${CMAKE_COMMAND}" -E copy "${target}" "${name}"
|
||||
- WORKING_DIRECTORY "${bindir}")
|
||||
- endif()
|
||||
+ COMMAND "${CMAKE_COMMAND}" -E ${LINK_OR_COPY} "${target}" "${name}"
|
||||
+ WORKING_DIRECTORY "${bindir}")
|
||||
|
||||
endfunction()
|
Загрузка…
Ссылка в новой задаче