Skip to content

Commit 857e40c

Browse files
committed
build: add simdutf dir to include path in GN build
The GN build defaults `node_simdutf_path` to `//third_party/simdutf`, the copy that ships in a Chromium checkout. That target doesn't put its own directory on the include path, so the unqualified `#include "simdutf.h"` in libnode, node_js2c and node_cctest doesn't resolve unless the embedder adds the directory themselves. Add `get_label_info(node_simdutf_path, "dir")` to `node_internal_config` (used by libnode and node_cctest) and to node_js2c's `include_dirs`. Signed-off-by: Shelley Vohr <shelley.vohr@gmail.com>
1 parent e2b33e2 commit 857e40c

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

unofficial.gni

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ template("node_gn_build") {
8181
"src/inspector:*",
8282
]
8383
configs = [ ":node_external_config" ]
84+
include_dirs = [ get_label_info(node_simdutf_path, "dir") ]
8485
libs = []
8586
cflags = [ "-Wno-microsoft-include" ]
8687
cflags_cc = [
@@ -337,7 +338,10 @@ template("node_gn_build") {
337338
"src/builtin_info.cc",
338339
"src/builtin_info.h",
339340
]
340-
include_dirs = [ "src" ]
341+
include_dirs = [
342+
"src",
343+
get_label_info(node_simdutf_path, "dir"),
344+
]
341345
}
342346

343347
action("run_node_js2c") {

0 commit comments

Comments
 (0)