Skip to content

Commit 8f03a9c

Browse files
authored
[SYCL] Fix build with non-standard GCC install directory (#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 4c03a9a commit 8f03a9c

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)
@@ -517,6 +517,10 @@ set(imf_host_cxx_flags -c
517517
-D__LIBDEVICE_HOST_IMPL__
518518
)
519519

520+
if (NOT SYCL_LIBDEVICE_GCC_TOOLCHAIN STREQUAL "")
521+
list(APPEND imf_host_cxx_flags "--gcc-install-dir=${SYCL_LIBDEVICE_GCC_TOOLCHAIN}")
522+
endif()
523+
520524
macro(mangle_name str output)
521525
string(STRIP "${str}" strippedStr)
522526
string(REGEX REPLACE "^/" "" strippedStr "${strippedStr}")

0 commit comments

Comments
 (0)