Skip to content

Commit 3cfc732

Browse files
committed
[SYCL] Fix build with non-standard GCC install directory (intel#18493)
Two problems: 1) The option was renamed to `--gcc-install-dir` 2) We forgot to pass the flag for the IMF build. --------- Signed-off-by: Sarnie, Nick <[email protected]>
1 parent b3ef39e commit 3cfc732

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

libdevice/cmake/modules/SYCLLibdevice.cmake

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ set(compile_opts
5555
set(SYCL_LIBDEVICE_GCC_TOOLCHAIN "" CACHE PATH "Path to GCC installation")
5656

5757
if (NOT SYCL_LIBDEVICE_GCC_TOOLCHAIN STREQUAL "")
58-
list(APPEND compile_opts "--gcc-toolchain=${SYCL_LIBDEVICE_GCC_TOOLCHAIN}")
58+
list(APPEND compile_opts "--gcc-install-dir=${SYCL_LIBDEVICE_GCC_TOOLCHAIN}")
5959
endif()
6060

6161
if (WIN32)
@@ -479,6 +479,10 @@ set(imf_host_cxx_flags -c
479479
-D__LIBDEVICE_HOST_IMPL__
480480
)
481481

482+
if (NOT SYCL_LIBDEVICE_GCC_TOOLCHAIN STREQUAL "")
483+
list(APPEND imf_host_cxx_flags "--gcc-install-dir=${SYCL_LIBDEVICE_GCC_TOOLCHAIN}")
484+
endif()
485+
482486
macro(mangle_name str output)
483487
string(STRIP "${str}" strippedStr)
484488
string(REGEX REPLACE "^/" "" strippedStr "${strippedStr}")

0 commit comments

Comments
 (0)