spack/var/spack/repos/builtin/packages/hip/0004-Drop-clang-rt-builtins-linking-on-hip-host.3.7.0.patch
Harmen Stoppels 4a9c8ec1ad
HIP: document variables, apply patches to older versions, fix build issues (#21852)
Since there are many variables being set I thought it would be a good idea to document them better and slightly simplify the logic for external vs not-external.
2021-02-24 10:37:16 +01:00

36 lines
1.3 KiB
Diff

From 053bb794c57424fc47d53d8914bca1dc8d776a34 Mon Sep 17 00:00:00 2001
From: Harmen Stoppels <harmenstoppels@gmail.com>
Date: Tue, 12 Jan 2021 12:26:44 +0100
Subject: [PATCH 2/2] Drop clang rt builtins linking on hip::host
Ref this comment
https://github.com/ROCm-Developer-Tools/HIP/pull/2217#discussion_r555402581:
> Yea, this should only be linked on hip::device as I believe its needed
> for __fp16 support on the GPU. If users need this on the host-side,
> then they should explicitly add it.
---
hip-config.cmake.in | 6 ------
1 file changed, 6 deletions(-)
diff --git a/hip-config.cmake.in b/hip-config.cmake.in
index ba340134..4daff392 100644
--- a/hip-config.cmake.in
+++ b/hip-config.cmake.in
@@ -204,12 +204,6 @@ if(HIP_COMPILER STREQUAL "clang")
endif()
# Add support for __fp16 and _Float16, explicitly link with compiler-rt
- set_property(TARGET hip::host APPEND PROPERTY
- INTERFACE_COMPILE_OPTIONS -L${HIP_CLANG_INCLUDE_PATH}/../lib/linux -lclang_rt.builtins-x86_64
- )
- set_property(TARGET hip::host APPEND PROPERTY
- INTERFACE_LINK_LIBRARIES -L${HIP_CLANG_INCLUDE_PATH}/../lib/linux -lclang_rt.builtins-x86_64
- )
set_property(TARGET hip::device APPEND PROPERTY
INTERFACE_COMPILE_OPTIONS -L${HIP_CLANG_INCLUDE_PATH}/../lib/linux -lclang_rt.builtins-x86_64
)
--
2.25.1