aboutsummaryrefslogtreecommitdiff
path: root/arch/i386/BUILD.bazel
blob: 2842a5bf55fb9047b03a2c1e5149844e79dc042a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
exports_files(
    ["linker.ld"],
    visibility = ["//visibility:public"],
)

cc_library(
    name = "arch",
    srcs = [
        "boot.s",
        "gdt.c",
        "init.s",
        "isr.c",
        "lgdt.c",
        "lidt.c",
    ],
    hdrs = [
        "gdt.h",
        "idt.h",
        "paging.h",
    ] + glob(["sys/*.h"]),
    includes = ["."],
    target_compatible_with = [
        "@platforms//os:none",
    ],
    visibility = ["//visibility:public"],
    deps = ["//lib/libk:k"],
)

# tests
cc_test(
    name = "test_gdt",
    srcs = [
        "gdt.c",
        "gdt.h",
        "test_gdt.cc",
    ],
    target_compatible_with = select({
        "@platforms//os:none": ["@platforms//:incompatible"],
        "//conditions:default": [],
    }),
    deps = [
        "@googletest//:gtest_main",
    ],
)