diff options
Diffstat (limited to 'arch/i386/BUILD.bazel')
-rw-r--r-- | arch/i386/BUILD.bazel | 44 |
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", + ], +) |