aboutsummaryrefslogtreecommitdiff
path: root/arch/i386/BUILD.bazel
diff options
context:
space:
mode:
authoraqua <aqua@iserlohn-fortress.net>2024-03-08 17:24:49 +0200
committeraqua <aqua@iserlohn-fortress.net>2024-03-08 22:00:07 +0200
commit20b97ea7c0dbbdc13800e12ff5c86c00c4a342ec (patch)
tree473281e5fc8b256827ce1a678573444e1aa5f669 /arch/i386/BUILD.bazel
parentGenerate src/conf.h (diff)
downloadkernel-20b97ea7c0dbbdc13800e12ff5c86c00c4a342ec.tar.xz
Bazel build
Diffstat (limited to 'arch/i386/BUILD.bazel')
-rw-r--r--arch/i386/BUILD.bazel44
1 files changed, 44 insertions, 0 deletions
diff --git a/arch/i386/BUILD.bazel b/arch/i386/BUILD.bazel
new file mode 100644
index 0000000..2842a5b
--- /dev/null
+++ b/arch/i386/BUILD.bazel
@@ -0,0 +1,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",
+ ],
+)