File
Blob: tools/windows/create-external.bat
| 1 | @ECHO off |
| 2 | SETLOCAL EnableDelayedExpansion |
| 3 | |
| 4 | @REM cmd.exe script to ensure external/ directory is present for clangd. |
| 5 | |
| 6 | FOR /f %%i IN ('bazel info output_path') do SET "output_path=%%i" |
| 7 | FOR /f %%i IN ('bazel info workspace') do SET "workspace=%%i" |
| 8 | SET "external=%output_path%\..\..\..\external" |
| 9 | |
| 10 | @REM Delete the convenience junction external if it exists (it maybe stale if it does). |
| 11 | rmdir "%workspace%\external" 2>NUL |
| 12 | |
| 13 | @REM Create the convenience junction external anew for easy access to sources and for |
| 14 | @REM VSCode to be able to open files at points of error when compilation fails. |
| 15 | MKLINK /J "%workspace%\external" "%external%" |
| 16 | |
| 17 | SET "compile_commands=%workspace%\compile_commands.json" |
| 18 | IF EXIST "%compile_commands%" ( |
| 19 | ECHO.WARNING: This workspace has a compile_commands.json file, but workerd |
| 20 | ECHO.has moved to using compile_flags.txt for clangd instead. To improve |
| 21 | ECHO.code completion and navigation in your editor, consider running: |
| 22 | ECHO. |
| 23 | ECHO. DEL /q "%compile_commands%" |
| 24 | ECHO. |
| 25 | ) |