Skip to content

Commit 4c35449

Browse files
authored
Fix local devx (#39)
1 parent bdd5b3a commit 4c35449

File tree

5 files changed

+16
-10
lines changed

5 files changed

+16
-10
lines changed

.clangd

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
CompileFlags:
2+
CompilationDatabase: build/dev
3+
Add: [-DVECTORLITE_CLANGD=1]

vectorlite/ops/ops.cpp

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,20 @@
1313
#undef HWY_TARGET_INCLUDE
1414
#define HWY_TARGET_INCLUDE "ops.cpp"
1515
// Generates code for each enabled target by re-including this source file.
16+
// VECTORLITE_CLANGD is defined via .clangd config. foreach_target.h re-includes
17+
// the main file, which breaks clangd's preamble builder.
18+
#ifdef VECTORLITE_CLANGD
19+
#include "hwy/detect_targets.h"
20+
#undef HWY_ONCE
21+
#define HWY_ONCE 1
22+
#undef HWY_TARGET
23+
#define HWY_TARGET HWY_STATIC_TARGET
24+
// Force HWY_IDE so highway.h uses simplified single-target HWY_EXPORT/DISPATCH.
25+
#undef HWY_IDE
26+
#define HWY_IDE 1
27+
#else
1628
#include "hwy/foreach_target.h" // IWYU pragma: keep
29+
#endif
1730

1831
// <<<< end of dynamic dispatch
1932

vectorlite/vector.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@
1111
#include "ops/ops.h"
1212
#include "rapidjson/document.h"
1313
#include "rapidjson/error/en.h"
14-
#include "rapidjson/stringbuffer.h"
15-
#include "rapidjson/writer.h"
1614
#include "util.h"
1715
#include "vector_space.h"
1816
#include "vector_view.h"

vectorlite/vector_view.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
#include "hwy/base.h"
99
#include "macros.h"
1010
#include "rapidjson/document.h"
11-
#include "rapidjson/error/en.h"
1211
#include "rapidjson/stringbuffer.h"
1312
#include "rapidjson/writer.h"
1413
#include "util.h"

vectorlite/vectorlite.cpp

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,6 @@
1-
#include <string>
2-
#include <string_view>
3-
4-
#include "absl/status/status.h"
5-
#include "absl/strings/str_format.h"
61
#include "macros.h"
72
#include "sqlite3ext.h"
83
#include "sqlite_functions.h"
9-
#include "util.h"
10-
#include "vector_space.h"
114
#include "virtual_table.h"
125

136
SQLITE_EXTENSION_INIT1;

0 commit comments

Comments
 (0)