Skip to content
File

Blob: tools/unix/create-external.sh

bash25 lines
1#!/bin/sh
2 
3# Create a symlink to Bazel's external/ directory. This simplifies the
4# paths provided to clangd in compile_flags.txt for language server
5# use.
6 
7output_path=$(bazel info output_path)
8workspace=$(bazel info workspace)
9external="${workspace}/external"
10ln -sfF "${output_path}/../../../external" "${external}"
11 
12# Temporary warning that compile_commands.json exists and will
13# interfere with the intended clangd setup.
14compile_commands="${workspace}/compile_commands.json"
15if [ -f "compile_commands.json" ] ; then
16 cat<<COMPILE_COMMANDS_WARNING
17WARNING: This workspace has a compile_commands.json file, but workerd
18has moved to using compile_flags.txt for clangd instead. To improve
19code completion and navigation in your editor, consider running:
20
21 rm "${compile_commands}"
22
23COMPILE_COMMANDS_WARNING
24fi