forked from mirrors/nixpkgs
ec590fdd24
This is the supported way rocm is tested. It makes packaging in nix a *lot* easier (see the code size). An important change is the dontLink detection in the clang/clang++ wrapper script: When compiling with --cuda-device-only, the linker must not be set, otherwise e.g. the blender kernels fail to compile.
24 lines
911 B
Diff
24 lines
911 B
Diff
diff --git a/llvm/cmake/modules/LLVMInstallSymlink.cmake b/llvm/cmake/modules/LLVMInstallSymlink.cmake
|
|
index b5c35f706cb7..ac25e40b1436 100644
|
|
--- a/cmake/modules/LLVMInstallSymlink.cmake
|
|
+++ b/cmake/modules/LLVMInstallSymlink.cmake
|
|
@@ -4,11 +4,16 @@
|
|
|
|
include(GNUInstallDirs)
|
|
|
|
+set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/../../../cmake/Modules" ${CMAKE_MODULE_PATH})
|
|
+include(ExtendPath)
|
|
+
|
|
function(install_symlink name target outdir)
|
|
set(DESTDIR $ENV{DESTDIR})
|
|
- set(bindir "${DESTDIR}${CMAKE_INSTALL_PREFIX}/${outdir}")
|
|
+ message(STATUS "Creating ${name} at ${bindir} (${CMAKE_MODULE_PATH})")
|
|
+ extend_path(prefixed_outdir "${CMAKE_INSTALL_PREFIX}" "${outdir}")
|
|
+ set(bindir "${DESTDIR}${prefixed_outdir}")
|
|
|
|
- message(STATUS "Creating ${name}")
|
|
+ message(STATUS "Creating ${name} at ${bindir}")
|
|
|
|
execute_process(
|
|
COMMAND "${CMAKE_COMMAND}" -E create_symlink "${target}" "${name}"
|