Skip to content

Commit 5fdace7

Browse files
authored
Use glob for go_library srcs in BUILD.bazel (#278)
The srcs list was hand-maintained and fell out of sync when v43 split code into feature-gated files (config_feat_*.go, linker_feat_wasi.go, module_feat_cranelift.go, store_feat_wasi.go, etc.). This caused Bazel builds to fail with undefined symbol errors since the new files were never added to srcs. Switch to glob() to match the pattern already used for go_test srcs, so new source files are automatically picked up.
1 parent 351b754 commit 5fdace7

1 file changed

Lines changed: 8 additions & 32 deletions

File tree

BUILD.bazel

Lines changed: 8 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -16,38 +16,14 @@ cc_library(
1616

1717
go_library(
1818
name = "go_default_library",
19-
srcs = [
20-
"config.go",
21-
"doc.go",
22-
"engine.go",
23-
"error.go",
24-
"exporttype.go",
25-
"extern.go",
26-
"externtype.go",
27-
"ffi.go",
28-
"func.go",
29-
"functype.go",
30-
"global.go",
31-
"globaltype.go",
32-
"importtype.go",
33-
"instance.go",
34-
"linker.go",
35-
"maybe_gc_no.go",
36-
"memory.go",
37-
"memorytype.go",
38-
"module.go",
39-
"shims.c",
40-
"shims.h",
41-
"slab.go",
42-
"store.go",
43-
"table.go",
44-
"tabletype.go",
45-
"trap.go",
46-
"val.go",
47-
"valtype.go",
48-
"wasi.go",
49-
"wat2wasm.go",
50-
],
19+
srcs = glob(
20+
[
21+
"*.go",
22+
"*.c",
23+
"*.h",
24+
],
25+
exclude = ["*_test.go"],
26+
),
5127
cdeps = [":wasmtime"], # add wasmtime dep
5228
cgo = True,
5329
clinkopts = select({

0 commit comments

Comments
 (0)