Skip to content

Commit 62704e1

Browse files
committed
fix(build): update link command to use absolute path for MSVC linker
1 parent afdae88 commit 62704e1

2 files changed

Lines changed: 12 additions & 14 deletions

File tree

.github/workflows/main.yml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -345,17 +345,17 @@ jobs:
345345
shell: cmd
346346
run: |
347347
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x64
348-
if "${{ matrix.name }}" == "windows-sycl" (
349-
if exist "%ONEAPI_ROOT%\setvars.bat" (
350-
call "%ONEAPI_ROOT%\setvars.bat"
351-
) else (
352-
echo OneAPI setvars.bat not found at %ONEAPI_ROOT%\setvars.bat
353-
dir "%ONEAPI_ROOT%"
354-
)
355-
where icx
356-
where dpcpp
357-
echo PATH=%PATH%
358-
)
348+
# if "${{ matrix.name }}" == "windows-sycl" (
349+
# if exist "%ONEAPI_ROOT%\setvars.bat" (
350+
# call "%ONEAPI_ROOT%\setvars.bat"
351+
# ) else (
352+
# echo OneAPI setvars.bat not found at %ONEAPI_ROOT%\setvars.bat
353+
# dir "%ONEAPI_ROOT%"
354+
# )
355+
# where icx
356+
# where dpcpp
357+
# echo PATH=%PATH%
358+
# )
359359
set "PATH=%VCToolsInstallDir%bin\Hostx64\x64;%WindowsSdkBinPath%x64;%PATH%"
360360
set "PATH=%PATH:C:\msys64\usr\bin;=%"
361361
set "PATH=%PATH:C:\msys64\mingw64\bin;=%"

Makefile

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -283,9 +283,7 @@ all: $(TARGET)
283283
# Loadable library
284284
$(TARGET): $(OBJ_FILES) $(DEF_FILE) $(LLAMA_LIBS) $(WHISPER_LIBS) $(MINIAUDIO_LIBS)
285285
ifeq ($(USE_MSVC),1)
286-
which link
287-
which link.exe
288-
link.exe /nologo $(LDFLAGS) /DEF:$(DEF_FILE) /OUT:$@ $(OBJ_FILES) $(LLAMA_LIBS) $(WHISPER_LIBS) $(MINIAUDIO_LIBS) $(MSVC_LIBS)
286+
"$(VCToolsInstallDir)bin\Hostx64\x64\link.exe" /nologo $(LDFLAGS) /DEF:$(DEF_FILE) /OUT:$@ $(OBJ_FILES) $(LLAMA_LIBS) $(WHISPER_LIBS) $(MINIAUDIO_LIBS) $(MSVC_LIBS)
289287
else
290288
$(CXX) $(OBJ_FILES) $(DEF_FILE) -o $@ $(LDFLAGS)
291289
ifeq ($(PLATFORM),windows)

0 commit comments

Comments
 (0)