Skip to content

Commit 931580d

Browse files
committed
Add a simple test for importing headers
1 parent a8e2e5a commit 931580d

File tree

5 files changed

+15
-0
lines changed

5 files changed

+15
-0
lines changed

tests/core/go_library/BUILD.bazel

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,10 @@ go_library(
2828
srcs = [
2929
"inc.go",
3030
"inc_asmhdr.s",
31+
"inc_relative.s",
3132
],
3233
importpath = "asm_header",
34+
deps = ["//tests/core/headers"],
3335
)
3436

3537
go_library(
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
#include "../headers/hdr.h"

tests/core/headers/BUILD.bazel

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
load("@io_bazel_rules_go//go:def.bzl", "go_library")
2+
3+
go_library(
4+
name = "headers",
5+
srcs = [
6+
"hdr.go",
7+
"hdr.h",
8+
],
9+
importpath = "github.com/bazelbuild/rules_go/tests/core/headers",
10+
visibility = ["//visibility:public"],
11+
)

tests/core/headers/hdr.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
package headers

tests/core/headers/hdr.h

Whitespace-only changes.

0 commit comments

Comments
 (0)