Skip to content

Commit

Permalink
[SYCL] Add -fPIC for Intel math function host code (#13800)
Browse files Browse the repository at this point in the history
Add "-fPIC" for compiling Intel math function host code.

Signed-off-by: jinge90 <[email protected]>
  • Loading branch information
jinge90 authored May 16, 2024
1 parent 6c185e7 commit 6cb77fc
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions libdevice/cmake/modules/SYCLLibdevice.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,11 @@ set(imf_bf16_fallback_src ${imf_fallback_src_dir}/imf_bf16_fallback.cpp)
set(imf_host_cxx_flags -c
-D__LIBDEVICE_HOST_IMPL__
)

if (NOT WIN32)
list(APPEND imf_host_cxx_flags -fPIC)
endif()

add_custom_command(OUTPUT ${imf_fp32_fallback_src}
COMMAND ${CMAKE_COMMAND} -D SRC_DIR=${imf_src_dir}
-D DEST_DIR=${imf_fallback_src_dir}
Expand Down

0 comments on commit 6cb77fc

Please sign in to comment.