Files
clang-r547379/lib/cmake/llvm/LLVMInstallSymlink.cmake
Ryan Prichard 6024e5c395 Update prebuilt Clang to r547379 (20.0.0).
clang 20.0.0 (based on r547379) from build 12806354.

Bug: http://b/379133546
Test: N/A
Change-Id: I2eb8938af55d809de674be63cb30cf27e801862b

Upstream-Commit: ad834e67b1105d15ef907f6255d4c96e8e733f57
2025-11-26 14:59:46 -05:00

27 lines
825 B
CMake

# We need to execute this script at installation time because the
# DESTDIR environment variable may be unset at configuration time.
# See PR8397.
# Set to an arbitrary directory to silence GNUInstallDirs warnings
# regarding being unable to determine libdir.
set(CMAKE_INSTALL_LIBDIR "lib")
include(GNUInstallDirs)
function(install_symlink name target outdir link_or_copy)
# link_or_copy is the "command" to pass to cmake -E.
# It should be either "create_symlink" or "copy".
set(DESTDIR $ENV{DESTDIR})
if(NOT IS_ABSOLUTE "${outdir}")
set(outdir "${CMAKE_INSTALL_PREFIX}/${outdir}")
endif()
set(outdir "${DESTDIR}${outdir}")
message(STATUS "Creating ${name}")
execute_process(
COMMAND "${CMAKE_COMMAND}" -E ${link_or_copy} "${target}" "${name}"
WORKING_DIRECTORY "${outdir}")
endfunction()