Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[SYCL][CMake][MSVC] Fix link.exe /OPT detection (#16811)
CMake's check_linker_flag does no split flags by spaces, so the current call passes the single option `"/OPT:REF LINKER:/OPT:ICF"` with a space in it to link.exe. (The first `LINKER:` prefix is parsed). This was also broken before ede906c ([CMake][MSVC] Wrap more Linker flags for ICX (#16284)), where it would pass `"/OPT:REF /OPT:ICF"` as a single option. This results in the check failing and so the build does not ever enable these flags, even though they would be supported if the check was correct. Use comma as the separator as supported by the `LINKER:` syntax to fix it.
- Loading branch information