├── BUILD.bazel ├── WORKSPACE.bazel ├── tools ├── BUILD.bazel ├── stage0 │ ├── BUILD.bazel │ ├── phase2 │ │ ├── tests │ │ │ ├── hello │ │ │ ├── world │ │ │ └── expected │ │ └── BUILD.bazel │ ├── providers.bzl │ ├── toolchains.bzl │ ├── phase1 │ │ └── BUILD.bazel │ ├── phase3 │ │ └── BUILD.bazel │ ├── phase4 │ │ └── BUILD.bazel │ ├── phase0 │ │ └── BUILD.bazel │ ├── cc.bzl │ ├── catm.bzl │ ├── phase6 │ │ └── BUILD.bazel │ ├── hex1.bzl │ ├── hex0.bzl │ ├── bloodelf.bzl │ ├── m1.bzl │ ├── phase7 │ │ └── BUILD.bazel │ ├── phase5 │ │ └── BUILD.bazel │ ├── m0.bzl │ ├── hex2_1.bzl │ ├── m2.bzl │ ├── phase8 │ │ └── BUILD.bazel │ ├── phase13 │ │ └── BUILD.bazel │ ├── phase14 │ │ └── BUILD.bazel │ ├── phase10 │ │ └── BUILD.bazel │ ├── phase9 │ │ └── BUILD.bazel │ ├── phase15 │ │ └── BUILD.bazel │ ├── phase12 │ │ └── BUILD.bazel │ └── hex2.bzl ├── defs.bzl └── mes │ └── BUILD.bazel ├── .gitignore ├── third_party ├── mes-m2.BUILD ├── BUILD.bazel ├── hex0-seeds.BUILD ├── M2-Mesoplanet.BUILD ├── M2-Planet.BUILD ├── mescc-tools.BUILD ├── stage0-x86.BUILD └── M2libc.BUILD ├── LICENSE ├── README.md ├── MODULE.bazel └── MODULE.bazel.lock /BUILD.bazel: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /WORKSPACE.bazel: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tools/BUILD.bazel: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | bazel-* 2 | -------------------------------------------------------------------------------- /tools/stage0/BUILD.bazel: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /tools/stage0/phase2/tests/hello: -------------------------------------------------------------------------------- 1 | hello -------------------------------------------------------------------------------- /tools/stage0/phase2/tests/world: -------------------------------------------------------------------------------- 1 | world -------------------------------------------------------------------------------- /tools/stage0/phase2/tests/expected: -------------------------------------------------------------------------------- 1 | helloworld -------------------------------------------------------------------------------- /third_party/mes-m2.BUILD: -------------------------------------------------------------------------------- 1 | exports_files(glob(["**"])) 2 | -------------------------------------------------------------------------------- /third_party/BUILD.bazel: -------------------------------------------------------------------------------- 1 | exports_files(["stage0.BUILD"]) 2 | -------------------------------------------------------------------------------- /tools/stage0/providers.bzl: -------------------------------------------------------------------------------- 1 | """Providers returned by stage0 rules. 2 | 3 | 4 | """ -------------------------------------------------------------------------------- /third_party/hex0-seeds.BUILD: -------------------------------------------------------------------------------- 1 | exports_files([ 2 | "POSIX/x86/hex0-seed", 3 | "POSIX/x86/hex0_x86.hex0" 4 | ]) -------------------------------------------------------------------------------- /tools/defs.bzl: -------------------------------------------------------------------------------- 1 | """def.bzl contains public definitions for stage0 rules. 2 | 3 | """ 4 | 5 | load( 6 | "//tools/internal:rules.bzl", 7 | _hex0_binary = "hex0_binary", 8 | ) 9 | 10 | hex0_binary = _hex0_binary -------------------------------------------------------------------------------- /third_party/M2-Mesoplanet.BUILD: -------------------------------------------------------------------------------- 1 | exports_files([ 2 | "cc.h", 3 | "cc_globals.c", 4 | "cc_env.c", 5 | "cc_reader.c", 6 | "cc_spawn.c", 7 | "cc_core.c", 8 | "cc_macro.c", 9 | "cc.c", 10 | ]) 11 | -------------------------------------------------------------------------------- /third_party/M2-Planet.BUILD: -------------------------------------------------------------------------------- 1 | exports_files([ 2 | "cc.h", 3 | "cc_globals.c", 4 | "cc_reader.c", 5 | "cc_strings.c", 6 | "cc_types.c", 7 | "cc_core.c", 8 | "cc_macro.c", 9 | "cc.c", 10 | ]) 11 | -------------------------------------------------------------------------------- /third_party/mescc-tools.BUILD: -------------------------------------------------------------------------------- 1 | exports_files([ 2 | "stringify.c", 3 | "blood-elf.c", 4 | "M1-macro.c", 5 | "hex2.c", 6 | "hex2.h", 7 | "hex2_linker.c", 8 | "hex2_word.c", 9 | "get_machine.c", 10 | ]) 11 | -------------------------------------------------------------------------------- /third_party/stage0-x86.BUILD: -------------------------------------------------------------------------------- 1 | exports_files([ 2 | "hex1_x86.hex0", 3 | "hex2_x86.hex1", 4 | "catm_x86.hex2", 5 | "ELF-i386.hex2", 6 | "M0_x86.hex2", 7 | "cc_x86.M1", 8 | "x86_defs.M1", 9 | 'libc-core.M1', 10 | ]) -------------------------------------------------------------------------------- /tools/stage0/toolchains.bzl: -------------------------------------------------------------------------------- 1 | """Toolchain for Stage0 2 | 3 | Provides all the necessary components needed to build up 4 | the stage0 toolset so that gcc or beyond can be created. 5 | 6 | For more information see https://github.com/oriansj/stage0 7 | """ -------------------------------------------------------------------------------- /third_party/M2libc.BUILD: -------------------------------------------------------------------------------- 1 | exports_files([ 2 | "x86/linux/bootstrap.c", 3 | "bootstrappable.c", 4 | "x86/x86_defs.M1", 5 | "x86/libc-core.M1", 6 | "x86/libc-full.M1", 7 | "x86/ELF-x86.hex2", 8 | "x86/linux/unistd.c", 9 | "x86/linux/fcntl.c", 10 | "x86/linux/sys/stat.c", 11 | "fcntl.c", 12 | "stddef.h", 13 | "stdio.c", 14 | "stdio.h", 15 | "stdlib.c", 16 | "sys/types.h", 17 | "sys/utsname.h", 18 | "string.c", 19 | ]) 20 | -------------------------------------------------------------------------------- /tools/stage0/phase1/BUILD.bazel: -------------------------------------------------------------------------------- 1 | """Phase 1 for Stage0: Build hex1 from hex0 2 | """ 3 | 4 | load("//tools/stage0:hex0.bzl", "hex0_binary") 5 | 6 | package( 7 | default_visibility = ["//visibility:public"], 8 | ) 9 | 10 | hex0_binary( 11 | name = "hex1", 12 | src = select( 13 | { 14 | "@bazel_tools//src/conditions:linux_x86_64": "@stage0-x86//:hex1_x86.hex0", 15 | }, 16 | ), 17 | assembler = select( 18 | { 19 | "@bazel_tools//src/conditions:linux_x86_64": "@hex0-seeds//:POSIX/x86/hex0-seed", 20 | }, 21 | ), 22 | ) -------------------------------------------------------------------------------- /tools/stage0/phase3/BUILD.bazel: -------------------------------------------------------------------------------- 1 | """Phase 3 for Stage0: Build M0 from hex2 2 | """ 3 | 4 | load("//tools/stage0:hex2.bzl", "hex2_binary") 5 | 6 | package( 7 | default_visibility = ["//visibility:public"], 8 | ) 9 | 10 | # M0 is the architecture specific version of M1 and is by design single 11 | # architecture only and will be replaced by the C code version of M1 12 | hex2_binary( 13 | name = "M0", 14 | srcs = select( 15 | { 16 | "@bazel_tools//src/conditions:linux_x86_64": [ 17 | # do not sort 18 | "@stage0-x86//:ELF-i386.hex2", 19 | "@stage0-x86//:M0_x86.hex2", 20 | ], 21 | }, 22 | ), 23 | ) -------------------------------------------------------------------------------- /tools/stage0/phase4/BUILD.bazel: -------------------------------------------------------------------------------- 1 | """Phase 4 for Stage0: Build cc_x86 from M0 2 | """ 3 | 4 | load("//tools/stage0:hex2.bzl", "hex2_binary") 5 | load("//tools/stage0:m0.bzl", "m0_expand") 6 | 7 | package( 8 | default_visibility = ["//visibility:public"], 9 | ) 10 | 11 | hex2_binary( 12 | name = "cc_arch", 13 | srcs = select( 14 | { 15 | "@bazel_tools//src/conditions:linux_x86_64": [ 16 | # do not sort 17 | "@stage0-x86//:ELF-i386.hex2", 18 | ":cc_arch-0.hex2", 19 | ], 20 | }, 21 | ), 22 | ) 23 | 24 | m0_expand( 25 | name = "cc_arch-0.hex2", 26 | srcs = select( 27 | { 28 | "@bazel_tools//src/conditions:linux_x86_64": ["@stage0-x86//:cc_x86.M1"], 29 | }, 30 | ), 31 | ) -------------------------------------------------------------------------------- /tools/stage0/phase0/BUILD.bazel: -------------------------------------------------------------------------------- 1 | """Phase 0 for Stage0: Build hex0 from hex0 2 | 3 | This serves to only validate that our seed is correct. 4 | """ 5 | 6 | load("@bazel_skylib//rules:diff_test.bzl", "diff_test") 7 | load("//tools/stage0:hex0.bzl", "hex0_binary") 8 | 9 | hex0_binary( 10 | name = "hex0", 11 | src = select({ 12 | "@bazel_tools//src/conditions:linux_x86_64": "@hex0-seeds//:POSIX/x86/hex0_x86.hex0", 13 | },), 14 | assembler = select( 15 | { 16 | "@bazel_tools//src/conditions:linux_x86_64": "@hex0-seeds//:POSIX/x86/hex0-seed", 17 | }, 18 | ), 19 | ) 20 | 21 | diff_test( 22 | name = "hex0-diff", 23 | failure_message = "The hex0 binary does not match the seed.", 24 | file1 = ":hex0", 25 | file2 = select( 26 | { 27 | "@bazel_tools//src/conditions:linux_x86_64": "@hex0-seeds//:POSIX/x86/hex0-seed", 28 | }, 29 | ), 30 | size="small", 31 | ) 32 | -------------------------------------------------------------------------------- /tools/stage0/phase2/BUILD.bazel: -------------------------------------------------------------------------------- 1 | """Phase 2 for Stage0: Build hex2 from hex1 & catm binary. 2 | """ 3 | 4 | load("//tools/stage0:hex1.bzl", "hex1_binary") 5 | load("//tools/stage0:hex2.bzl", "hex2_simple_binary") 6 | load("@bazel_skylib//rules:diff_test.bzl", "diff_test") 7 | load("//tools/stage0:catm.bzl", "cat_files") 8 | 9 | package( 10 | default_visibility = ["//visibility:public"], 11 | ) 12 | 13 | hex1_binary( 14 | name = "hex2-0", 15 | src = select( 16 | { 17 | "@bazel_tools//src/conditions:linux_x86_64": "@stage0-x86//:hex2_x86.hex1", 18 | }, 19 | ), 20 | ) 21 | 22 | hex2_simple_binary( 23 | name = "catm", 24 | src = select( 25 | { 26 | "@bazel_tools//src/conditions:linux_x86_64": "@stage0-x86//:catm_x86.hex2", 27 | }, 28 | ), 29 | ) 30 | 31 | cat_files( 32 | name = "catm-test-actual", 33 | srcs = [ 34 | # do not sort 35 | ":tests/hello", 36 | ":tests/world", 37 | ], 38 | ) 39 | 40 | diff_test( 41 | name = "catm-diff-test", 42 | file1 = ":catm-test-actual", 43 | file2 = ":tests/expected", 44 | ) -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2024 Farid Zakaria 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /tools/stage0/cc.bzl: -------------------------------------------------------------------------------- 1 | """Rules for building c programs using cc_$arch. 2 | """ 3 | 4 | def _cc_compile_impl(ctx): 5 | out = ctx.actions.declare_file(ctx.label.name) 6 | args = ctx.actions.args() 7 | args.add(ctx.file.src) 8 | args.add(out) 9 | 10 | ctx.actions.run( 11 | outputs = [out], 12 | inputs = [ctx.file.src], 13 | executable = ctx.executable._compiler, 14 | arguments = [args], 15 | mnemonic = "CCCompile", 16 | ) 17 | 18 | return [DefaultInfo( 19 | files = depset([out]), 20 | executable = out, 21 | )] 22 | 23 | cc_compile = rule( 24 | implementation = _cc_compile_impl, 25 | attrs = { 26 | "src": attr.label( 27 | allow_single_file = [".c"], 28 | mandatory = True, 29 | doc = "Source file (C) to compile.", 30 | ), 31 | "_compiler": attr.label( 32 | executable = True, 33 | cfg = "exec", 34 | doc = "C compiler to use.", 35 | default = "@//tools/stage0/phase4:cc_arch", 36 | ), 37 | }, 38 | doc = """Compiles a C program; turns it into M1 assembly.""", 39 | ) -------------------------------------------------------------------------------- /tools/stage0/catm.bzl: -------------------------------------------------------------------------------- 1 | """Rules for concatenating files via catm. 2 | """ 3 | 4 | def concatenate_files(ctx, srcs, tool, out): 5 | """Concatenate a series of files. 6 | 7 | Args: 8 | ctx: The context. 9 | srcs: The source files. 10 | tool: The catm tool, should be executable. 11 | out: The output file. 12 | """ 13 | args = ctx.actions.args() 14 | args.add(out) 15 | args.add_all(srcs) 16 | 17 | ctx.actions.run( 18 | outputs = [out], 19 | inputs = srcs, 20 | executable = tool, 21 | arguments = [args], 22 | mnemonic = "Concatenate", 23 | ) 24 | 25 | def _cat_files_impl(ctx): 26 | out = ctx.actions.declare_file("%s" % ctx.label.name) 27 | concatenate_files( 28 | ctx, 29 | srcs = ctx.files.srcs, 30 | tool = ctx.executable._tool, 31 | out = out, 32 | ) 33 | return [DefaultInfo( 34 | files = depset([out]), 35 | )] 36 | 37 | cat_files = rule( 38 | implementation = _cat_files_impl, 39 | attrs = { 40 | "srcs": attr.label_list( 41 | allow_files = True, 42 | mandatory = True, 43 | doc = "Sources to concatenate.", 44 | ), 45 | "_tool": attr.label( 46 | executable = True, 47 | cfg = "exec", 48 | doc = "The cat tool.", 49 | default = "@//tools/stage0/phase2:catm", 50 | ), 51 | }, 52 | doc = """Concatenate (cat) a series of files.""", 53 | ) -------------------------------------------------------------------------------- /tools/stage0/phase6/BUILD.bazel: -------------------------------------------------------------------------------- 1 | """Phase 6 for Stage0: Build blood-elf-0 from C sources 2 | 3 | """ 4 | 5 | load("//tools/stage0:m2.bzl", "m2_compile") 6 | load("//tools/stage0:catm.bzl", "cat_files") 7 | load("//tools/stage0:hex2.bzl", "hex2_binary") 8 | load("//tools/stage0:m0.bzl", "m0_expand") 9 | 10 | m2_compile( 11 | name = "blood-elf-0.M1", 12 | srcs = select( 13 | { 14 | "@bazel_tools//src/conditions:linux_x86_64": [ 15 | # do not sort 16 | "@M2libc//:x86/linux/bootstrap.c", 17 | ], 18 | }, 19 | ) + [ 20 | "@M2libc//:bootstrappable.c", 21 | "@mescc-tools//:blood-elf.c", 22 | "@mescc-tools//:stringify.c", 23 | ], 24 | architecture = select({ 25 | "@bazel_tools//src/conditions:linux_x86_64": "x86", 26 | }), 27 | is_bootstrap = True, 28 | ) 29 | 30 | m0_expand( 31 | name = "blood-elf-0.hex2", 32 | srcs = select( 33 | { 34 | "@bazel_tools//src/conditions:linux_x86_64": [ 35 | # do not sort 36 | "@stage0-x86//:x86_defs.M1", 37 | "@stage0-x86//:libc-core.M1", 38 | ], 39 | }) + [ 40 | ":blood-elf-0.M1", 41 | ], 42 | ) 43 | 44 | hex2_binary( 45 | name = "blood-elf-0", 46 | srcs = select( 47 | { 48 | "@bazel_tools//src/conditions:linux_x86_64": [ 49 | # do not sort 50 | "@M2libc//:x86/ELF-x86.hex2", 51 | ], 52 | }) + [ 53 | ":blood-elf-0.hex2", 54 | ], 55 | ) -------------------------------------------------------------------------------- /tools/stage0/hex1.bzl: -------------------------------------------------------------------------------- 1 | """Rules for building hex1 programs. 2 | """ 3 | 4 | def hex1_assemble(ctx, src, assembler, out): 5 | """ 6 | Compile a hex0 program. 7 | 8 | Args: 9 | ctx: The context. 10 | src: The source file. 11 | assembler: The assembler to use. 12 | out: The output file. 13 | """ 14 | args = ctx.actions.args() 15 | args.add(src) 16 | args.add(out) 17 | 18 | ctx.actions.run( 19 | outputs = [out], 20 | inputs = [src], 21 | executable = assembler, 22 | arguments = [args], 23 | mnemonic = "Hex2Assemble", 24 | ) 25 | 26 | def _hex1_binary_impl(ctx): 27 | src = ctx.file.src 28 | out = ctx.actions.declare_file("%s.bin" % ctx.label.name) 29 | hex1_assemble( 30 | ctx, 31 | src = src, 32 | assembler = ctx.executable._assembler, 33 | out = out, 34 | ) 35 | return [DefaultInfo( 36 | files = depset([out]), 37 | executable = out, 38 | )] 39 | 40 | hex1_binary = rule( 41 | implementation = _hex1_binary_impl, 42 | attrs = { 43 | "src": attr.label( 44 | allow_single_file = [".hex1"], 45 | mandatory = True, 46 | doc = "Source file (hex1) to compile.", 47 | ), 48 | "_assembler": attr.label( 49 | executable = True, 50 | cfg = "exec", 51 | doc = "hex1 assembler to use.", 52 | default = "@//tools/stage0/phase1:hex1", 53 | ), 54 | }, 55 | doc = """Compiles a hex1 program.""", 56 | executable = True, 57 | ) -------------------------------------------------------------------------------- /tools/stage0/hex0.bzl: -------------------------------------------------------------------------------- 1 | """Rules for building hex0 programs. 2 | """ 3 | 4 | def hex0_assemble(ctx, src, assembler, out): 5 | """ 6 | Compile a hex0 program. 7 | 8 | Args: 9 | ctx: The context. 10 | src: The source file. 11 | assembler: The assembler to use. 12 | out: The output file. 13 | """ 14 | args = ctx.actions.args() 15 | args.add(src) 16 | args.add(out) 17 | 18 | ctx.actions.run( 19 | outputs = [out], 20 | inputs = [src], 21 | executable = assembler, 22 | arguments = [args], 23 | mnemonic = "Hex0Assemble", 24 | ) 25 | 26 | def _hex0_binary_impl(ctx): 27 | src = ctx.file.src 28 | out = ctx.actions.declare_file("%s.bin" % ctx.label.name) 29 | hex0_assemble( 30 | ctx, 31 | src = src, 32 | assembler = ctx.executable.assembler, 33 | out = out, 34 | ) 35 | return [DefaultInfo( 36 | files = depset([out]), 37 | executable = out, 38 | )] 39 | 40 | hex0_binary = rule( 41 | implementation = _hex0_binary_impl, 42 | attrs = { 43 | "src": attr.label( 44 | allow_single_file = [".hex0"], 45 | mandatory = True, 46 | doc = "Source file (hex0) to compile.", 47 | ), 48 | "assembler": attr.label( 49 | allow_single_file = True, 50 | executable = True, 51 | mandatory = True, 52 | cfg = "exec", 53 | doc = "hex0 assembler to use.", 54 | ), 55 | }, 56 | doc = """Compiles a hex0 program.""", 57 | executable = True, 58 | ) -------------------------------------------------------------------------------- /tools/stage0/bloodelf.bzl: -------------------------------------------------------------------------------- 1 | """Rules for creating M1 debug footers. 2 | 3 | """ 4 | 5 | def _blood_elf_impl(ctx): 6 | out = ctx.actions.declare_file(ctx.label.name) 7 | 8 | args = ctx.actions.args() 9 | if (ctx.attr.is_little_endian): 10 | args.add("--little-endian") 11 | else: 12 | args.add("--big-endian") 13 | 14 | if (ctx.attr.is_64): 15 | args.add("--64") 16 | args.add("-f", ctx.file.src) 17 | args.add("-o", out) 18 | 19 | ctx.actions.run( 20 | outputs = [out], 21 | inputs = [ctx.file.src], 22 | executable = ctx.executable._bloodelf, 23 | arguments = [args], 24 | mnemonic = "BloodElf", 25 | ) 26 | 27 | return [DefaultInfo( 28 | files = depset([out]), 29 | )] 30 | 31 | blood_elf = rule( 32 | implementation = _blood_elf_impl, 33 | attrs = { 34 | "src": attr.label( 35 | allow_single_file = [".M1"], 36 | mandatory = True, 37 | doc = "Source files (M1) to generate debug information.", 38 | ), 39 | "is_little_endian": attr.bool( 40 | default = False, 41 | mandatory = True, 42 | doc = "Whether to expand in little endian mode.", 43 | ), 44 | "is_64": attr.bool( 45 | default = False, 46 | mandatory = False, 47 | doc = "Whether to expand in 64-bit mode.", 48 | ), 49 | "_bloodelf": attr.label( 50 | executable = True, 51 | cfg = "exec", 52 | doc = "Bloodelf tool to create M1 footer for debug", 53 | default = "@//tools/stage0/phase13:blood-elf" 54 | ) 55 | }, 56 | doc = """Compiles C files into a M1 program.""", 57 | ) -------------------------------------------------------------------------------- /tools/stage0/m1.bzl: -------------------------------------------------------------------------------- 1 | """Rules for expanding M0 files. 2 | 3 | This uses the M1 binary rather than M0 which is more capable. 4 | """ 5 | def _m1_expand_impl(ctx): 6 | out = ctx.actions.declare_file(ctx.label.name) 7 | args = ctx.actions.args() 8 | args.add("--architecture", ctx.attr.architecture) 9 | if (ctx.attr.is_little_endian): 10 | args.add("--little-endian") 11 | else: 12 | args.add("--big-endian") 13 | args.add_all(ctx.files.srcs, before_each = "-f") 14 | args.add("-o", out) 15 | 16 | ctx.actions.run( 17 | outputs = [out], 18 | inputs = ctx.files.srcs, 19 | executable = ctx.executable.tool, 20 | arguments = [args], 21 | mnemonic = "M1Expand", 22 | ) 23 | 24 | return [DefaultInfo( 25 | files = depset([out]), 26 | executable = out, 27 | )] 28 | 29 | m1_expand = rule( 30 | implementation = _m1_expand_impl, 31 | attrs = { 32 | "srcs": attr.label_list( 33 | allow_files = [".M1"], 34 | mandatory = True, 35 | doc = "Sources to expand macros. Will be concatenatd together first.", 36 | ), 37 | "architecture": attr.string( 38 | mandatory = True, 39 | doc = "The architectures to expand for.", 40 | ), 41 | "is_little_endian": attr.bool( 42 | default = False, 43 | mandatory = True, 44 | doc = "Whether to expand in little endian mode.", 45 | ), 46 | "tool": attr.label( 47 | executable = True, 48 | cfg = "exec", 49 | doc = "The M0 tool.", 50 | default = "@//tools/stage0/phase7:M1-0", 51 | ), 52 | }, 53 | doc = """Expand a M1 file to hex2.""", 54 | ) -------------------------------------------------------------------------------- /tools/stage0/phase7/BUILD.bazel: -------------------------------------------------------------------------------- 1 | """Phase 7 for Stage0: Build M1-0 from C sources 2 | 3 | This is the last stage where catm will need to be used and the last stage where 4 | M0 is used, as we will being using its much more powerful and cross-platform 5 | version with a bunch of extra goodies. 6 | """ 7 | 8 | load("//tools/stage0:m2.bzl", "m2_compile") 9 | load("//tools/stage0:hex2.bzl", "hex2_binary") 10 | load("//tools/stage0:m0.bzl", "m0_expand") 11 | 12 | package( 13 | default_visibility = ["//visibility:public"], 14 | ) 15 | 16 | m2_compile( 17 | name = "M1-macro-0.M1", 18 | srcs = select( 19 | { 20 | "@bazel_tools//src/conditions:linux_x86_64": [ 21 | # do not sort 22 | "@M2libc//:x86/linux/bootstrap.c", 23 | ], 24 | }, 25 | ) + [ 26 | "@M2libc//:bootstrappable.c", 27 | "@mescc-tools//:M1-macro.c", 28 | "@mescc-tools//:stringify.c", 29 | ], 30 | architecture = select({ 31 | "@bazel_tools//src/conditions:linux_x86_64": "x86", 32 | }), 33 | is_bootstrap = True, 34 | ) 35 | 36 | m0_expand( 37 | name = "M1-macro-0.hex2", 38 | srcs = select( 39 | { 40 | "@bazel_tools//src/conditions:linux_x86_64": [ 41 | # do not sort 42 | "@stage0-x86//:x86_defs.M1", 43 | "@stage0-x86//:libc-core.M1", 44 | ], 45 | }) + [ 46 | ":M1-macro-0.M1", 47 | ], 48 | ) 49 | 50 | hex2_binary( 51 | name = "M1-0", 52 | srcs = select( 53 | { 54 | "@bazel_tools//src/conditions:linux_x86_64": [ 55 | # do not sort 56 | "@M2libc//:x86/ELF-x86.hex2", 57 | ], 58 | }) + [ 59 | ":M1-macro-0.hex2", 60 | ], 61 | ) -------------------------------------------------------------------------------- /tools/stage0/phase5/BUILD.bazel: -------------------------------------------------------------------------------- 1 | """Phase 5 for Stage0: Build M2-Planet from cc_x86 2 | 3 | This toolchain is only used once, so we don't turn it 4 | into a full toolchain type 5 | """ 6 | 7 | load("//tools/stage0:hex2.bzl", "hex2_binary") 8 | load("//tools/stage0:m0.bzl", "m0_expand") 9 | load("//tools/stage0:catm.bzl", "cat_files") 10 | load("//tools/stage0:cc.bzl", "cc_compile") 11 | 12 | package( 13 | default_visibility = ["//visibility:public"], 14 | ) 15 | 16 | cat_files( 17 | name = "M2-0.c", 18 | srcs = select( 19 | { 20 | "@bazel_tools//src/conditions:linux_x86_64": [ 21 | "@M2libc//:x86/linux/bootstrap.c", 22 | ], 23 | }, 24 | ) + [ 25 | # do not sort 26 | "@M2-Planet//:cc.h", 27 | "@M2libc//:bootstrappable.c", 28 | "@M2-Planet//:cc_globals.c", 29 | "@M2-Planet//:cc_reader.c", 30 | "@M2-Planet//:cc_strings.c", 31 | "@M2-Planet//:cc_types.c", 32 | "@M2-Planet//:cc_core.c", 33 | "@M2-Planet//:cc_macro.c", 34 | "@M2-Planet//:cc.c", 35 | ], 36 | ) 37 | 38 | cc_compile( 39 | name = "M2-0.M1", 40 | src = ":M2-0.c", 41 | ) 42 | 43 | m0_expand( 44 | name = "M2-0.hex2", 45 | srcs = select( 46 | { 47 | "@bazel_tools//src/conditions:linux_x86_64": [ 48 | # do not sort 49 | "@stage0-x86//:x86_defs.M1", 50 | "@stage0-x86//:libc-core.M1", 51 | ], 52 | }) + [ 53 | ":M2-0.M1", 54 | ], 55 | ) 56 | 57 | hex2_binary( 58 | name = "M2", 59 | srcs = select( 60 | { 61 | "@bazel_tools//src/conditions:linux_x86_64": [ 62 | # do not sort 63 | "@stage0-x86//:ELF-i386.hex2", 64 | ], 65 | }, 66 | ) + [ 67 | ":M2-0.hex2", 68 | ], 69 | ) -------------------------------------------------------------------------------- /tools/stage0/m0.bzl: -------------------------------------------------------------------------------- 1 | """Rules for expanding M0 files. 2 | """ 3 | load("//tools/stage0:catm.bzl", "concatenate_files") 4 | 5 | def _m0_expand_impl(ctx): 6 | 7 | src = None 8 | # skip the concatenate step if there is only one source file 9 | if len(ctx.files.srcs) == 1: 10 | src = ctx.files.srcs[0] 11 | else: 12 | combined_src = ctx.actions.declare_file("%s_combined.hex2" % ctx.label.name) 13 | concatenate_files( 14 | ctx, 15 | srcs = ctx.files.srcs, 16 | tool = ctx.executable._catm, 17 | out = combined_src, 18 | ) 19 | src = combined_src 20 | 21 | out = ctx.actions.declare_file("%s" % ctx.label.name) 22 | args = ctx.actions.args() 23 | args.add(src) 24 | args.add(out) 25 | 26 | ctx.actions.run( 27 | outputs = [out], 28 | inputs = [src], 29 | executable = ctx.executable._tool, 30 | arguments = [args], 31 | mnemonic = "M0Expand", 32 | ) 33 | 34 | return [DefaultInfo( 35 | files = depset([out]), 36 | executable = out, 37 | )] 38 | 39 | m0_expand = rule( 40 | implementation = _m0_expand_impl, 41 | attrs = { 42 | "srcs": attr.label_list( 43 | allow_files = [".M1"], 44 | mandatory = True, 45 | doc = "Sources to expand macros. Will be concatenatd together first.", 46 | ), 47 | "_tool": attr.label( 48 | executable = True, 49 | cfg = "exec", 50 | doc = "The M0 tool.", 51 | default = "@//tools/stage0/phase3:M0", 52 | ), 53 | "_catm": attr.label( 54 | executable = True, 55 | cfg = "exec", 56 | doc = "catm tool to use.", 57 | default = "@//tools/stage0/phase2:catm", 58 | ), 59 | }, 60 | doc = """Expand a M1 file to hex2.""", 61 | ) -------------------------------------------------------------------------------- /tools/stage0/hex2_1.bzl: -------------------------------------------------------------------------------- 1 | """Rules for building hex2 programs. 2 | 3 | This uses the more advanced hex2 assembler. 4 | If you need the earlier stage checkout hex2.bzl 5 | """ 6 | 7 | def _hex2_binary_impl(ctx): 8 | out = ctx.actions.declare_file(ctx.label.name) 9 | args = ctx.actions.args() 10 | args.add("--architecture", ctx.attr.architecture) 11 | if (ctx.attr.is_little_endian): 12 | args.add("--little-endian") 13 | else: 14 | args.add("--big-endian") 15 | args.add("--base-address", ctx.attr.base_address) 16 | args.add_all(ctx.files.srcs, before_each = "-f") 17 | args.add("-o", out) 18 | 19 | ctx.actions.run( 20 | outputs = [out], 21 | inputs = ctx.files.srcs, 22 | executable = ctx.executable.tool, 23 | arguments = [args], 24 | mnemonic = "Hex2Assemble", 25 | ) 26 | 27 | return [DefaultInfo( 28 | files = depset([out]), 29 | executable = out, 30 | )] 31 | 32 | hex2_binary = rule( 33 | implementation = _hex2_binary_impl, 34 | attrs = { 35 | "srcs": attr.label_list( 36 | allow_files = [".hex2"], 37 | mandatory = True, 38 | doc = "Source files (hex2) to compile.", 39 | ), 40 | "architecture": attr.string( 41 | mandatory = True, 42 | doc = "The architectures to expand for.", 43 | ), 44 | "is_little_endian": attr.bool( 45 | default = False, 46 | mandatory = True, 47 | doc = "Whether to expand in little endian mode.", 48 | ), 49 | "base_address": attr.string( 50 | mandatory = True, 51 | doc = "The base address of the program (i.e. 0x8048000).", 52 | ), 53 | "tool": attr.label( 54 | executable = True, 55 | cfg = "exec", 56 | doc = "The hex2 assembler.", 57 | default = "@//tools/stage0/phase10:hex2", 58 | ), 59 | }, 60 | doc = """Compiles a hex2 program.""", 61 | executable = True, 62 | ) -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Stage0 in Bazel 2 | 3 | ## Introduction 4 | 5 | This project aims to reproduce the [Stage0](https://github.com/oriansj/stage0) compiler bootstrap process using [Bazel](https://bazel.build/) as the build system. The ultimate goal is to build a fully hermetic [GCC](https://gcc.gnu.org/) (GNU Compiler Collection) compiler starting from the minimal Stage0 hex2 seed and use that for a `cc_toolchain` 6 | 7 | ## What is Stage0? 8 | 9 | The **Stage0** project is an initiative to create a trustworthy and minimal compiler bootstrap path starting from virtually nothing—a tiny seed program represented in hexadecimal code (the **hex2 seed**). 10 | 11 | This seed is a simple, human-inspectable binary that serves as the foundational starting point for building up a complete compiler toolchain from scratch. 12 | 13 | ## How far am I ? 14 | 15 | I am at _mes_ compiler. 16 | 17 | ```console 18 | > MES_DEBUG=2 bazel run //tools/mes:mes-m2 -- --help 19 | INFO: Analyzed target //tools/mes:mes-m2 (0 packages loaded, 0 targets configured). 20 | INFO: Found 1 target... 21 | Target //tools/mes:mes-m2 up-to-date: 22 | bazel-bin/tools/mes/mes-m2 23 | INFO: Elapsed time: 0.054s, Critical Path: 0.00s 24 | INFO: 1 process: 1 internal. 25 | INFO: Build completed successfully, 1 total action 26 | INFO: Running command line: bazel-bin/tools/mes/mes-m2 --help 27 | mes: reading boot-0 [${srcdest}mes]: mes/module/mes/boot-0.scm 28 | mes: reading boot-0 []: boot-0.scm 29 | mes: boot failed: no such file: boot-0.scm 30 | ``` 31 | 32 | > GNU Mes is a Scheme interpreter and C compiler for bootstrapping the GNU System. It has helped to decimate the number and size of binary seeds that were used in the bootstrap of GNU Guix 1.0. Recently, version 0.24.2 has realized the first Full Source Bootstrap for Guix. The final goal is to help create a full source bootstrap as part of the bootstrappable builds effort for any UNIX-like operating system. 33 | 34 | A really good description of all the tools can be found [here](https://github.com/fosslinux/live-bootstrap/blob/1f272f90504871ed5b39af4ae2c7c9aed8a56dbb/parts.rst). -------------------------------------------------------------------------------- /tools/stage0/m2.bzl: -------------------------------------------------------------------------------- 1 | """Rules for compiling C files using the M2 Planet compiler. 2 | 3 | """ 4 | 5 | def _m2_compile_impl(ctx): 6 | out = ctx.actions.declare_file(ctx.label.name) 7 | args = ctx.actions.args() 8 | args.add("--architecture", ctx.attr.architecture) 9 | args.add_all(ctx.files.srcs, before_each = "-f") 10 | if (ctx.attr.is_bootstrap): 11 | args.add("--bootstrap-mode") 12 | if (ctx.attr.is_debug): 13 | args.add("--debug") 14 | args.add("-o", out) 15 | 16 | for key, value in ctx.attr.defines.items(): 17 | args.add("-D", "{}={}".format(key, value)) 18 | 19 | ctx.actions.run( 20 | outputs = [out], 21 | inputs = ctx.files.srcs, 22 | executable = ctx.executable.compiler, 23 | arguments = [args], 24 | mnemonic = "M2Compile", 25 | ) 26 | 27 | return [DefaultInfo( 28 | files = depset([out]), 29 | executable = out, 30 | )] 31 | 32 | m2_compile = rule( 33 | implementation = _m2_compile_impl, 34 | attrs = { 35 | "srcs": attr.label_list( 36 | allow_files = [".c", ".h"], 37 | mandatory = True, 38 | doc = "Source files (C) to compile.", 39 | ), 40 | "architecture": attr.string( 41 | mandatory = True, 42 | doc = "Architecture to compile for.", 43 | ), 44 | "is_bootstrap": attr.bool( 45 | default = False, 46 | doc = "Whether to compile in bootstrap mode.", 47 | ), 48 | "is_debug": attr.bool( 49 | default = False, 50 | doc = "Whether to compile in debug mode.", 51 | ), 52 | "compiler": attr.label( 53 | executable = True, 54 | cfg = "exec", 55 | doc = "M2 compiler to use.", 56 | default = "@//tools/stage0/phase5:M2", 57 | ), 58 | "defines": attr.string_dict( 59 | default = {}, 60 | doc = "Preprocessor definitions (key-value pairs) to pass to the compiler.", 61 | ), 62 | }, 63 | doc = """Compiles C files into a M1 program.""", 64 | ) -------------------------------------------------------------------------------- /tools/stage0/phase8/BUILD.bazel: -------------------------------------------------------------------------------- 1 | """Phase 8 for Stage0: Build hex2-1 from C sources 2 | 3 | This is the last stage where we will be using the handwritten hex2 and instead 4 | be using the far more powerful, cross-platform version with a bunch more goodies. 5 | """ 6 | 7 | load("//tools/stage0:hex2.bzl", "hex2_binary") 8 | load("//tools/stage0:m1.bzl", "m1_expand") 9 | load("//tools/stage0:m2.bzl", "m2_compile") 10 | 11 | package( 12 | default_visibility = ["//visibility:public"], 13 | ) 14 | 15 | m2_compile( 16 | name = "hex2_linker-0.M1", 17 | srcs = [ 18 | # do not sort 19 | "@M2libc//:sys/types.h", 20 | "@M2libc//:stddef.h", 21 | "@M2libc//:sys/utsname.h", 22 | ] + 23 | select( 24 | { 25 | "@bazel_tools//src/conditions:linux_x86_64": [ 26 | # do not sort 27 | "@M2libc//:x86/linux/unistd.c", 28 | "@M2libc//:x86/linux/fcntl.c", 29 | ], 30 | }, 31 | ) + [ 32 | "@M2libc//:fcntl.c", 33 | ] + select( 34 | { 35 | "@bazel_tools//src/conditions:linux_x86_64": [ 36 | # do not sort 37 | "@M2libc//:x86/linux/sys/stat.c", 38 | ], 39 | }, 40 | ) + [ 41 | # do not sort 42 | "@M2libc//:stdlib.c", 43 | "@M2libc//:stdio.h", 44 | "@M2libc//:stdio.c", 45 | "@M2libc//:bootstrappable.c", 46 | "@mescc-tools//:hex2.h", 47 | "@mescc-tools//:hex2_linker.c", 48 | "@mescc-tools//:hex2_word.c", 49 | "@mescc-tools//:hex2.c", 50 | ], 51 | architecture = select({ 52 | "@bazel_tools//src/conditions:linux_x86_64": "x86", 53 | }), 54 | ) 55 | 56 | m1_expand( 57 | name = "hex2_linker-0.hex2", 58 | srcs = select( 59 | { 60 | "@bazel_tools//src/conditions:linux_x86_64": [ 61 | # do not sort 62 | "@M2libc//:x86/x86_defs.M1", 63 | "@M2libc//:x86/libc-full.M1", 64 | ], 65 | }, 66 | ) + [ 67 | ":hex2_linker-0.M1", 68 | ], 69 | architecture = select({ 70 | "@bazel_tools//src/conditions:linux_x86_64": "x86", 71 | }), 72 | is_little_endian = select({ 73 | "@bazel_tools//src/conditions:linux_x86_64": True, 74 | }), 75 | ) 76 | 77 | hex2_binary( 78 | name = "hex2-1", 79 | srcs = select( 80 | { 81 | "@bazel_tools//src/conditions:linux_x86_64": [ 82 | # do not sort 83 | "@M2libc//:x86/ELF-x86.hex2", 84 | ], 85 | }, 86 | ) + [ 87 | ":hex2_linker-0.hex2", 88 | ], 89 | ) 90 | -------------------------------------------------------------------------------- /tools/stage0/phase13/BUILD.bazel: -------------------------------------------------------------------------------- 1 | """Phase 13 for Stage0: Build final blood-elf from C source 2 | 3 | """ 4 | 5 | load("//tools/stage0:hex2_1.bzl", "hex2_binary") 6 | load("//tools/stage0:m1.bzl", "m1_expand") 7 | load("//tools/stage0:m2.bzl", "m2_compile") 8 | 9 | package( 10 | default_visibility = ["//visibility:public"], 11 | ) 12 | 13 | m2_compile( 14 | name = "blood-elf-1.M1", 15 | srcs = [ 16 | # do not sort 17 | "@M2libc//:sys/types.h", 18 | "@M2libc//:stddef.h", 19 | ] + 20 | select( 21 | { 22 | "@bazel_tools//src/conditions:linux_x86_64": [ 23 | # do not sort 24 | "@M2libc//:x86/linux/fcntl.c", 25 | ], 26 | }, 27 | ) + [ 28 | "@M2libc//:fcntl.c", 29 | "@M2libc//:sys/utsname.h", 30 | ] + select( 31 | { 32 | "@bazel_tools//src/conditions:linux_x86_64": [ 33 | # do not sort 34 | "@M2libc//:x86/linux/unistd.c", 35 | ], 36 | }, 37 | ) + [ 38 | # do not sort 39 | "@M2libc//:stdlib.c", 40 | "@M2libc//:stdio.h", 41 | "@M2libc//:stdio.c", 42 | "@M2libc//:bootstrappable.c", 43 | "@mescc-tools//:stringify.c", 44 | "@mescc-tools//:blood-elf.c", 45 | ], 46 | architecture = select({ 47 | "@bazel_tools//src/conditions:linux_x86_64": "x86", 48 | }), 49 | ) 50 | 51 | m1_expand( 52 | name = "blood-elf-1.hex2", 53 | srcs = select( 54 | { 55 | "@bazel_tools//src/conditions:linux_x86_64": [ 56 | # do not sort 57 | "@M2libc//:x86/x86_defs.M1", 58 | "@M2libc//:x86/libc-full.M1", 59 | ], 60 | }, 61 | ) + [ 62 | ":blood-elf-1.M1", 63 | ], 64 | architecture = select({ 65 | "@bazel_tools//src/conditions:linux_x86_64": "x86", 66 | }), 67 | is_little_endian = select({ 68 | "@bazel_tools//src/conditions:linux_x86_64": True, 69 | }), 70 | tool = "//tools/stage0/phase9:M1" 71 | ) 72 | 73 | hex2_binary( 74 | name = "blood-elf", 75 | srcs = select( 76 | { 77 | "@bazel_tools//src/conditions:linux_x86_64": [ 78 | # do not sort 79 | "@M2libc//:x86/ELF-x86.hex2", 80 | ], 81 | }, 82 | ) + [ 83 | ":blood-elf-1.hex2", 84 | ], 85 | base_address = "0x8048000", 86 | architecture = select({ 87 | "@bazel_tools//src/conditions:linux_x86_64": "x86", 88 | }), 89 | is_little_endian = select({ 90 | "@bazel_tools//src/conditions:linux_x86_64": True, 91 | }), 92 | tool = "//tools/stage0/phase8:hex2-1" 93 | ) 94 | -------------------------------------------------------------------------------- /tools/stage0/phase14/BUILD.bazel: -------------------------------------------------------------------------------- 1 | """Phase 14 for Stage0: Build get_machine from C source 2 | 3 | """ 4 | 5 | load("//tools/stage0:hex2_1.bzl", "hex2_binary") 6 | load("//tools/stage0:m1.bzl", "m1_expand") 7 | load("//tools/stage0:m2.bzl", "m2_compile") 8 | load("//tools/stage0:bloodelf.bzl", "blood_elf") 9 | 10 | package( 11 | default_visibility = ["//visibility:public"], 12 | ) 13 | 14 | m2_compile( 15 | name = "get_machine.M1", 16 | srcs = [ 17 | # do not sort 18 | "@M2libc//:sys/types.h", 19 | "@M2libc//:stddef.h", 20 | "@M2libc//:sys/utsname.h", 21 | ] + 22 | select( 23 | { 24 | "@bazel_tools//src/conditions:linux_x86_64": [ 25 | # do not sort 26 | "@M2libc//:x86/linux/unistd.c", 27 | "@M2libc//:x86/linux/fcntl.c", 28 | ], 29 | }, 30 | ) + [ 31 | # do not sort 32 | "@M2libc//:fcntl.c", 33 | "@M2libc//:stdlib.c", 34 | "@M2libc//:stdio.h", 35 | "@M2libc//:stdio.c", 36 | "@M2libc//:bootstrappable.c", 37 | "@mescc-tools//:get_machine.c", 38 | ], 39 | architecture = select({ 40 | "@bazel_tools//src/conditions:linux_x86_64": "x86", 41 | }), 42 | is_debug = True, 43 | ) 44 | 45 | blood_elf( 46 | name = "get_machine-footer.M1", 47 | src = ":get_machine.M1", 48 | is_little_endian = select({ 49 | "@bazel_tools//src/conditions:linux_x86_64": True, 50 | }), 51 | ) 52 | 53 | m1_expand( 54 | name = "get_machine.hex2", 55 | srcs = select( 56 | { 57 | "@bazel_tools//src/conditions:linux_x86_64": [ 58 | # do not sort 59 | "@M2libc//:x86/x86_defs.M1", 60 | "@M2libc//:x86/libc-full.M1", 61 | ], 62 | }, 63 | ) + [ 64 | ":get_machine.M1", 65 | ":get_machine-footer.M1", 66 | ], 67 | architecture = select({ 68 | "@bazel_tools//src/conditions:linux_x86_64": "x86", 69 | }), 70 | is_little_endian = select({ 71 | "@bazel_tools//src/conditions:linux_x86_64": True, 72 | }), 73 | tool = "//tools/stage0/phase9:M1" 74 | ) 75 | 76 | hex2_binary( 77 | name = "get_machine", 78 | srcs = select( 79 | { 80 | "@bazel_tools//src/conditions:linux_x86_64": [ 81 | # do not sort 82 | "@M2libc//:x86/ELF-x86.hex2", 83 | ], 84 | }, 85 | ) + [ 86 | ":get_machine.hex2", 87 | ], 88 | base_address = "0x8048000", 89 | architecture = select({ 90 | "@bazel_tools//src/conditions:linux_x86_64": "x86", 91 | }), 92 | is_little_endian = select({ 93 | "@bazel_tools//src/conditions:linux_x86_64": True, 94 | }), 95 | tool = "//tools/stage0/phase8:hex2-1" 96 | ) 97 | -------------------------------------------------------------------------------- /MODULE.bazel: -------------------------------------------------------------------------------- 1 | "stage0-bazel" 2 | 3 | module(name = "stage0-bazel") 4 | 5 | bazel_dep(name = "bazel_skylib", version = "1.7.1") 6 | 7 | http_archive = use_repo_rule("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") 8 | 9 | http_archive( 10 | name = "hex0-seeds", 11 | sha256 = "cf38e87f847365d4ed1a1217a7505e007b0fc85933c01727d5d7462a58592d63", 12 | url = "https://github.com/oriansj/bootstrap-seeds/archive/f208be26d4d3c7f5ff42e8a43baf9cad04bdfddc.zip", 13 | strip_prefix = "bootstrap-seeds-f208be26d4d3c7f5ff42e8a43baf9cad04bdfddc", 14 | build_file = "//third_party:hex0-seeds.BUILD", 15 | ) 16 | 17 | http_archive( 18 | name = "stage0-x86", 19 | build_file = "//third_party:stage0-x86.BUILD", 20 | sha256 = "76e11def8aac9189678fea60ff6003e5a33e92531ac97fa1acce39d6c41b89c9", 21 | url = "https://github.com/oriansj/stage0-posix-x86/archive/105aebe1e5c38dcd5fd87723f7e49966ad6c436a.zip", 22 | strip_prefix = "stage0-posix-x86-105aebe1e5c38dcd5fd87723f7e49966ad6c436a", 23 | ) 24 | 25 | http_archive( 26 | name = "M2-Planet", 27 | build_file = "//third_party:M2-Planet.BUILD", 28 | sha256 = "d5eb4348c7952bd5f05921742dfa1b8135b43badbac52710935a6808e30c11f0", 29 | url = "https://github.com/oriansj/M2-Planet/archive/5c251e67e28e0a441589b9c3f5150758b8034998.zip", 30 | strip_prefix = "M2-Planet-5c251e67e28e0a441589b9c3f5150758b8034998", 31 | ) 32 | 33 | http_archive( 34 | name = "M2-Mesoplanet", 35 | build_file = "//third_party:M2-Mesoplanet.BUILD", 36 | sha256 = "0b217da99ab0b974a52ca63030b8dc3488ebad5f07cb64a794ad1cacfbba6b09", 37 | url = "https://github.com/oriansj/M2-Mesoplanet/archive/3dcbd0bc5f4d76d2c1cc8f6e5bafa4b214127b7d.zip", 38 | strip_prefix = "M2-Mesoplanet-3dcbd0bc5f4d76d2c1cc8f6e5bafa4b214127b7d", 39 | ) 40 | 41 | http_archive( 42 | name = "M2libc", 43 | build_file = "//third_party:M2libc.BUILD", 44 | sha256 = "53595a6683708e80d8c3ff0954e9e76d9ca9fefea28779873d89daf8ab00851c", 45 | url = "https://github.com/oriansj/M2libc/archive/3a700010872697c4be9e3fab3cf707fce706741e.zip", 46 | strip_prefix = "M2libc-3a700010872697c4be9e3fab3cf707fce706741e", 47 | ) 48 | 49 | http_archive( 50 | name = "mescc-tools", 51 | build_file = "//third_party:mescc-tools.BUILD", 52 | sha256 = "ad0db50e9725713e83a9c7f3e7825858e413f8bab44bebcf96a1b08904226155", 53 | url = "https://github.com/oriansj/mescc-tools/archive/08d5a0679fa4dc00babe02306f1bc50703083389.zip", 54 | strip_prefix = "mescc-tools-08d5a0679fa4dc00babe02306f1bc50703083389", 55 | ) 56 | 57 | 58 | http_archive( 59 | name = "mes-m2", 60 | build_file = "//third_party:mes-m2.BUILD", 61 | sha256 = "033ee656d98cfc04a826eab27eed6e6a276d15bbb980a7cd71d00f30227aaaa8", 62 | url = "https://mirror.team-cymru.com/gnu/mes/mes-0.27.tar.gz", 63 | strip_prefix = "mes-0.27", 64 | ) -------------------------------------------------------------------------------- /tools/stage0/phase10/BUILD.bazel: -------------------------------------------------------------------------------- 1 | """Phase 10 for Stage0: Build hex2 from C sources 2 | 3 | """ 4 | 5 | load("//tools/stage0:hex2_1.bzl", "hex2_binary") 6 | load("//tools/stage0:m1.bzl", "m1_expand") 7 | load("//tools/stage0:m2.bzl", "m2_compile") 8 | 9 | package( 10 | default_visibility = ["//visibility:public"], 11 | ) 12 | 13 | m2_compile( 14 | name = "hex2_linker-2.M1", 15 | srcs = [ 16 | # do not sort 17 | "@M2libc//:sys/types.h", 18 | "@M2libc//:stddef.h", 19 | "@M2libc//:sys/utsname.h", 20 | ] + 21 | select( 22 | { 23 | "@bazel_tools//src/conditions:linux_x86_64": [ 24 | # do not sort 25 | "@M2libc//:x86/linux/unistd.c", 26 | "@M2libc//:x86/linux/fcntl.c", 27 | ], 28 | }, 29 | ) + [ 30 | "@M2libc//:fcntl.c", 31 | ] + select( 32 | { 33 | "@bazel_tools//src/conditions:linux_x86_64": [ 34 | # do not sort 35 | "@M2libc//:x86/linux/sys/stat.c", 36 | ], 37 | }, 38 | ) + [ 39 | # do not sort 40 | "@M2libc//:stdlib.c", 41 | "@M2libc//:stdio.h", 42 | "@M2libc//:stdio.c", 43 | "@M2libc//:bootstrappable.c", 44 | "@mescc-tools//:hex2.h", 45 | "@mescc-tools//:hex2_linker.c", 46 | "@mescc-tools//:hex2_word.c", 47 | "@mescc-tools//:hex2.c", 48 | ], 49 | architecture = select({ 50 | "@bazel_tools//src/conditions:linux_x86_64": "x86", 51 | }), 52 | ) 53 | 54 | m1_expand( 55 | name = "hex2_linker-2.hex2", 56 | srcs = select( 57 | { 58 | "@bazel_tools//src/conditions:linux_x86_64": [ 59 | # do not sort 60 | "@M2libc//:x86/x86_defs.M1", 61 | "@M2libc//:x86/libc-full.M1", 62 | ], 63 | }, 64 | ) + [ 65 | ":hex2_linker-2.M1", 66 | ], 67 | architecture = select({ 68 | "@bazel_tools//src/conditions:linux_x86_64": "x86", 69 | }), 70 | is_little_endian = select({ 71 | "@bazel_tools//src/conditions:linux_x86_64": True, 72 | }), 73 | tool = "//tools/stage0/phase9:M1" 74 | ) 75 | 76 | hex2_binary( 77 | name = "hex2", 78 | srcs = select( 79 | { 80 | "@bazel_tools//src/conditions:linux_x86_64": [ 81 | # do not sort 82 | "@M2libc//:x86/ELF-x86.hex2", 83 | ], 84 | }, 85 | ) + [ 86 | ":hex2_linker-2.hex2", 87 | ], 88 | base_address = "0x8048000", 89 | architecture = select({ 90 | "@bazel_tools//src/conditions:linux_x86_64": "x86", 91 | }), 92 | is_little_endian = select({ 93 | "@bazel_tools//src/conditions:linux_x86_64": True, 94 | }), 95 | tool = "//tools/stage0/phase8:hex2-1" 96 | ) 97 | -------------------------------------------------------------------------------- /tools/stage0/phase9/BUILD.bazel: -------------------------------------------------------------------------------- 1 | """Phase 9 for Stage0: Build M1 from C sources 2 | 3 | This is the last stage where we will be using the handwritten hex2 and instead 4 | be using the far more powerful, cross-platform version with a bunch more goodies. 5 | """ 6 | 7 | load("//tools/stage0:hex2_1.bzl", "hex2_binary") 8 | load("//tools/stage0:m1.bzl", "m1_expand") 9 | load("//tools/stage0:m2.bzl", "m2_compile") 10 | 11 | package( 12 | default_visibility = ["//visibility:public"], 13 | ) 14 | 15 | m2_compile( 16 | name = "M1-macro-1.M1", 17 | srcs = [ 18 | # do not sort 19 | "@M2libc//:sys/types.h", 20 | "@M2libc//:stddef.h", 21 | ] + 22 | select( 23 | { 24 | "@bazel_tools//src/conditions:linux_x86_64": [ 25 | # do not sort 26 | "@M2libc//:x86/linux/fcntl.c", 27 | ], 28 | }, 29 | ) + [ 30 | "@M2libc//:fcntl.c", 31 | "@M2libc//:sys/utsname.h", 32 | ] + select( 33 | { 34 | "@bazel_tools//src/conditions:linux_x86_64": [ 35 | # do not sort 36 | "@M2libc//:x86/linux/unistd.c", 37 | ], 38 | }, 39 | ) + [ 40 | # do not sort 41 | "@M2libc//:string.c", 42 | "@M2libc//:stdlib.c", 43 | "@M2libc//:stdio.h", 44 | "@M2libc//:stdio.c", 45 | "@M2libc//:bootstrappable.c", 46 | "@mescc-tools//:stringify.c", 47 | "@mescc-tools//:M1-macro.c", 48 | ], 49 | architecture = select({ 50 | "@bazel_tools//src/conditions:linux_x86_64": "x86", 51 | }), 52 | ) 53 | 54 | m1_expand( 55 | name = "M1-macro-1.hex2", 56 | srcs = select( 57 | { 58 | "@bazel_tools//src/conditions:linux_x86_64": [ 59 | # do not sort 60 | "@M2libc//:x86/x86_defs.M1", 61 | "@M2libc//:x86/libc-full.M1", 62 | ], 63 | }, 64 | ) + [ 65 | ":M1-macro-1.M1", 66 | ], 67 | architecture = select({ 68 | "@bazel_tools//src/conditions:linux_x86_64": "x86", 69 | }), 70 | is_little_endian = select({ 71 | "@bazel_tools//src/conditions:linux_x86_64": True, 72 | }), 73 | ) 74 | 75 | hex2_binary( 76 | name = "M1", 77 | srcs = select( 78 | { 79 | "@bazel_tools//src/conditions:linux_x86_64": [ 80 | # do not sort 81 | "@M2libc//:x86/ELF-x86.hex2", 82 | ], 83 | }, 84 | ) + [ 85 | ":M1-macro-1.hex2", 86 | ], 87 | base_address = "0x8048000", 88 | architecture = select({ 89 | "@bazel_tools//src/conditions:linux_x86_64": "x86", 90 | }), 91 | is_little_endian = select({ 92 | "@bazel_tools//src/conditions:linux_x86_64": True, 93 | }), 94 | tool = "//tools/stage0/phase8:hex2-1" 95 | ) 96 | -------------------------------------------------------------------------------- /tools/stage0/phase15/BUILD.bazel: -------------------------------------------------------------------------------- 1 | """Phase 14 for Stage0: Build M2-Planet from M2-Planet 2 | 3 | """ 4 | 5 | load("//tools/stage0:hex2_1.bzl", "hex2_binary") 6 | load("//tools/stage0:m1.bzl", "m1_expand") 7 | load("//tools/stage0:m2.bzl", "m2_compile") 8 | load("//tools/stage0:bloodelf.bzl", "blood_elf") 9 | 10 | package( 11 | default_visibility = ["//visibility:public"], 12 | ) 13 | 14 | m2_compile( 15 | name = "M2-1.M1", 16 | srcs = [ 17 | # do not sort 18 | "@M2libc//:sys/types.h", 19 | "@M2libc//:stddef.h", 20 | "@M2libc//:sys/utsname.h", 21 | ] + 22 | select( 23 | { 24 | "@bazel_tools//src/conditions:linux_x86_64": [ 25 | # do not sort 26 | "@M2libc//:x86/linux/unistd.c", 27 | "@M2libc//:x86/linux/fcntl.c", 28 | ], 29 | }, 30 | ) + [ 31 | # do not sort 32 | "@M2libc//:fcntl.c", 33 | "@M2libc//:stdlib.c", 34 | "@M2libc//:stdio.h", 35 | "@M2libc//:stdio.c", 36 | "@M2libc//:bootstrappable.c", 37 | "@M2-Planet//:cc.h", 38 | "@M2-Planet//:cc_globals.c", 39 | "@M2-Planet//:cc_reader.c", 40 | "@M2-Planet//:cc_strings.c", 41 | "@M2-Planet//:cc_types.c", 42 | "@M2-Planet//:cc_core.c", 43 | "@M2-Planet//:cc_macro.c", 44 | "@M2-Planet//:cc.c", 45 | ], 46 | architecture = select({ 47 | "@bazel_tools//src/conditions:linux_x86_64": "x86", 48 | }), 49 | is_debug = True, 50 | ) 51 | 52 | blood_elf( 53 | name = "M2-1-footer.M1", 54 | src = ":M2-1.M1", 55 | is_little_endian = select({ 56 | "@bazel_tools//src/conditions:linux_x86_64": True, 57 | }), 58 | ) 59 | 60 | m1_expand( 61 | name = "M2-1.hex2", 62 | srcs = select( 63 | { 64 | "@bazel_tools//src/conditions:linux_x86_64": [ 65 | # do not sort 66 | "@M2libc//:x86/x86_defs.M1", 67 | "@M2libc//:x86/libc-full.M1", 68 | ], 69 | }, 70 | ) + [ 71 | ":M2-1.M1", 72 | ":M2-1-footer.M1", 73 | ], 74 | architecture = select({ 75 | "@bazel_tools//src/conditions:linux_x86_64": "x86", 76 | }), 77 | is_little_endian = select({ 78 | "@bazel_tools//src/conditions:linux_x86_64": True, 79 | }), 80 | tool = "//tools/stage0/phase9:M1" 81 | ) 82 | 83 | hex2_binary( 84 | name = "M2-Planet", 85 | srcs = select( 86 | { 87 | "@bazel_tools//src/conditions:linux_x86_64": [ 88 | # do not sort 89 | "@M2libc//:x86/ELF-x86.hex2", 90 | ], 91 | }, 92 | ) + [ 93 | ":M2-1.hex2", 94 | ], 95 | base_address = "0x8048000", 96 | architecture = select({ 97 | "@bazel_tools//src/conditions:linux_x86_64": "x86", 98 | }), 99 | is_little_endian = select({ 100 | "@bazel_tools//src/conditions:linux_x86_64": True, 101 | }), 102 | tool = "//tools/stage0/phase8:hex2-1" 103 | ) 104 | -------------------------------------------------------------------------------- /tools/stage0/phase12/BUILD.bazel: -------------------------------------------------------------------------------- 1 | """Phase 12 for Stage0: Build M2-Mesoplanet from M2-Planet 2 | 3 | """ 4 | 5 | load("//tools/stage0:hex2_1.bzl", "hex2_binary") 6 | load("//tools/stage0:m1.bzl", "m1_expand") 7 | load("//tools/stage0:m2.bzl", "m2_compile") 8 | 9 | package( 10 | default_visibility = ["//visibility:public"], 11 | ) 12 | 13 | m2_compile( 14 | name = "M2-Mesoplanet-1.M1", 15 | srcs = [ 16 | # do not sort 17 | "@M2libc//:sys/types.h", 18 | "@M2libc//:stddef.h", 19 | ] + 20 | select( 21 | { 22 | "@bazel_tools//src/conditions:linux_x86_64": [ 23 | # do not sort 24 | "@M2libc//:x86/linux/fcntl.c", 25 | ], 26 | }, 27 | ) + [ 28 | "@M2libc//:fcntl.c", 29 | "@M2libc//:sys/utsname.h", 30 | ] + select( 31 | { 32 | "@bazel_tools//src/conditions:linux_x86_64": [ 33 | # do not sort 34 | "@M2libc//:x86/linux/unistd.c", 35 | "@M2libc//:x86/linux/sys/stat.c", 36 | ], 37 | }, 38 | ) + [ 39 | # do not sort 40 | "@M2libc//:stdlib.c", 41 | "@M2libc//:stdio.h", 42 | "@M2libc//:stdio.c", 43 | "@M2libc//:string.c", 44 | "@M2libc//:bootstrappable.c", 45 | "@M2-Mesoplanet//:cc.h", 46 | "@M2-Mesoplanet//:cc_globals.c", 47 | "@M2-Mesoplanet//:cc_env.c", 48 | "@M2-Mesoplanet//:cc_reader.c", 49 | "@M2-Mesoplanet//:cc_spawn.c", 50 | "@M2-Mesoplanet//:cc_core.c", 51 | "@M2-Mesoplanet//:cc_macro.c", 52 | "@M2-Mesoplanet//:cc.c", 53 | 54 | ], 55 | architecture = select({ 56 | "@bazel_tools//src/conditions:linux_x86_64": "x86", 57 | }), 58 | ) 59 | 60 | m1_expand( 61 | name = "M2-Mesoplanet-1.hex2", 62 | srcs = select( 63 | { 64 | "@bazel_tools//src/conditions:linux_x86_64": [ 65 | # do not sort 66 | "@M2libc//:x86/x86_defs.M1", 67 | "@M2libc//:x86/libc-full.M1", 68 | ], 69 | }, 70 | ) + [ 71 | ":M2-Mesoplanet-1.M1", 72 | ], 73 | architecture = select({ 74 | "@bazel_tools//src/conditions:linux_x86_64": "x86", 75 | }), 76 | is_little_endian = select({ 77 | "@bazel_tools//src/conditions:linux_x86_64": True, 78 | }), 79 | tool = "//tools/stage0/phase9:M1" 80 | ) 81 | 82 | hex2_binary( 83 | name = "M2-Mesoplanet", 84 | srcs = select( 85 | { 86 | "@bazel_tools//src/conditions:linux_x86_64": [ 87 | # do not sort 88 | "@M2libc//:x86/ELF-x86.hex2", 89 | ], 90 | }, 91 | ) + [ 92 | ":M2-Mesoplanet-1.hex2", 93 | ], 94 | base_address = "0x8048000", 95 | architecture = select({ 96 | "@bazel_tools//src/conditions:linux_x86_64": "x86", 97 | }), 98 | is_little_endian = select({ 99 | "@bazel_tools//src/conditions:linux_x86_64": True, 100 | }), 101 | tool = "//tools/stage0/phase8:hex2-1" 102 | ) 103 | -------------------------------------------------------------------------------- /tools/stage0/hex2.bzl: -------------------------------------------------------------------------------- 1 | """Rules for building hex2 programs. 2 | """ 3 | 4 | load("//tools/stage0:catm.bzl", "concatenate_files") 5 | 6 | def hex2_assemble(ctx, src, assembler, out): 7 | """ 8 | Compile a hex2 program. 9 | 10 | Args: 11 | ctx: The context. 12 | src: The source file. 13 | assembler: The assembler to use. 14 | out: The output file. 15 | """ 16 | args = ctx.actions.args() 17 | args.add(src) 18 | args.add(out) 19 | 20 | ctx.actions.run( 21 | outputs = [out], 22 | inputs = [src], 23 | executable = assembler, 24 | arguments = [args], 25 | mnemonic = "Hex2Assemble", 26 | ) 27 | 28 | def _hex2_binary_impl(ctx): 29 | src = None 30 | # skip the concatenate step if there is only one source file 31 | if len(ctx.files.srcs) == 1: 32 | src = ctx.files.srcs[0] 33 | else: 34 | srcs = ctx.files.srcs 35 | combined_src = ctx.actions.declare_file("%s_combined.hex2" % ctx.label.name) 36 | concatenate_files( 37 | ctx, 38 | srcs = srcs, 39 | tool = ctx.executable._catm, 40 | out = combined_src, 41 | ) 42 | src = combined_src 43 | 44 | out = ctx.actions.declare_file("%s.bin" % ctx.label.name) 45 | hex2_assemble( 46 | ctx, 47 | src = src, 48 | assembler = ctx.executable.assembler, 49 | out = out, 50 | ) 51 | return [DefaultInfo( 52 | files = depset([out]), 53 | executable = out, 54 | )] 55 | 56 | hex2_binary = rule( 57 | implementation = _hex2_binary_impl, 58 | attrs = { 59 | "srcs": attr.label_list( 60 | allow_files = [".hex2"], 61 | mandatory = True, 62 | doc = "Source files (hex2) to compile.", 63 | ), 64 | "assembler": attr.label( 65 | executable = True, 66 | cfg = "exec", 67 | doc = "hex2 assembler to use.", 68 | default = "@//tools/stage0/phase2:hex2-0", 69 | ), 70 | "_catm": attr.label( 71 | executable = True, 72 | cfg = "exec", 73 | doc = "catm tool to use.", 74 | default = "@//tools/stage0/phase2:catm", 75 | ), 76 | }, 77 | doc = """Compiles a hex2 program.""", 78 | executable = True, 79 | ) 80 | 81 | def _hex2_simple_binary_impl(ctx): 82 | src = ctx.file.src 83 | out = ctx.actions.declare_file("%s.bin" % ctx.label.name) 84 | hex2_assemble( 85 | ctx, 86 | src = src, 87 | assembler = ctx.executable.assembler, 88 | out = out, 89 | ) 90 | return [DefaultInfo( 91 | files = depset([out]), 92 | executable = out, 93 | )] 94 | 95 | hex2_simple_binary = rule( 96 | implementation = _hex2_simple_binary_impl, 97 | attrs = { 98 | "src": attr.label( 99 | allow_single_file = [".hex2"], 100 | mandatory = True, 101 | doc = "Source file (hex2) to compile.", 102 | ), 103 | "assembler": attr.label( 104 | executable = True, 105 | cfg = "exec", 106 | doc = "hex2 assembler to use.", 107 | default = "@//tools/stage0/phase2:hex2-0", 108 | ), 109 | }, 110 | doc = """Compiles a hex2 program.""", 111 | executable = True, 112 | ) -------------------------------------------------------------------------------- /tools/mes/BUILD.bazel: -------------------------------------------------------------------------------- 1 | """Build mes from M2-Planet 2 | 3 | GNU Mes is a Scheme interpreter and C compiler for bootstrapping the GNU System. 4 | """ 5 | 6 | load("//tools/stage0:hex2_1.bzl", "hex2_binary") 7 | load("//tools/stage0:m1.bzl", "m1_expand") 8 | load("//tools/stage0:m2.bzl", "m2_compile") 9 | load("//tools/stage0:bloodelf.bzl", "blood_elf") 10 | 11 | package( 12 | default_visibility = ["//visibility:public"], 13 | ) 14 | 15 | m2_compile( 16 | name = "mes.M1", 17 | srcs = [ 18 | # do not sort 19 | "@mes-m2//:include/mes/config.h", 20 | "@mes-m2//:include/mes/lib-mini.h", 21 | "@mes-m2//:include/mes/lib.h", 22 | "@mes-m2//:lib/linux/x86_64-mes-m2/crt1.c", 23 | "@mes-m2//:lib/mes/__init_io.c", 24 | "@mes-m2//:lib/linux/x86_64-mes-m2/_exit.c", 25 | "@mes-m2//:lib/linux/x86_64-mes-m2/_write.c", 26 | "@mes-m2//:lib/mes/globals.c", 27 | "@mes-m2//:lib/m2/cast.c", 28 | "@mes-m2//:lib/stdlib/exit.c", 29 | "@mes-m2//:lib/mes/write.c", 30 | "@mes-m2//:include/linux/x86_64/syscall.h", 31 | "@mes-m2//:lib/linux/x86_64-mes-m2/syscall.c", 32 | "@mes-m2//:lib/stub/__raise.c", 33 | "@mes-m2//:lib/linux/brk.c", 34 | "@mes-m2//:lib/linux/malloc.c", 35 | "@mes-m2//:lib/string/memset.c", 36 | "@mes-m2//:lib/linux/read.c", 37 | "@mes-m2//:lib/mes/fdgetc.c", 38 | "@mes-m2//:lib/stdio/getchar.c", 39 | "@mes-m2//:lib/stdio/putchar.c", 40 | "@mes-m2//:lib/stub/__buffered_read.c", 41 | "@mes-m2//:include/errno.h", 42 | "@mes-m2//:include/fcntl.h", 43 | "@mes-m2//:lib/linux/_open3.c", 44 | "@mes-m2//:lib/linux/open.c", 45 | "@mes-m2//:lib/mes/mes_open.c", 46 | "@mes-m2//:lib/string/strlen.c", 47 | "@mes-m2//:lib/mes/eputs.c", 48 | "@mes-m2//:lib/mes/fdputc.c", 49 | "@mes-m2//:lib/mes/eputc.c", 50 | "@mes-m2//:include/time.h", 51 | "@mes-m2//:include/sys/time.h", 52 | "@mes-m2//:include/m2/types.h", 53 | "@mes-m2//:include/sys/types.h", 54 | "@mes-m2//:include/sys/utsname.h", 55 | "@mes-m2//:include/mes/mes.h", 56 | "@mes-m2//:include/mes/builtins.h", 57 | "@mes-m2//:include/mes/constants.h", 58 | "@mes-m2//:include/mes/symbols.h", 59 | "@mes-m2//:lib/mes/__assert_fail.c", 60 | "@mes-m2//:lib/mes/assert_msg.c", 61 | "@mes-m2//:lib/string/strncmp.c", 62 | "@mes-m2//:lib/posix/getenv.c", 63 | "@mes-m2//:lib/mes/fdputs.c", 64 | "@mes-m2//:lib/mes/ntoab.c", 65 | "@mes-m2//:lib/ctype/isdigit.c", 66 | "@mes-m2//:lib/ctype/isxdigit.c", 67 | "@mes-m2//:lib/ctype/isspace.c", 68 | "@mes-m2//:lib/ctype/isnumber.c", 69 | "@mes-m2//:lib/mes/abtol.c", 70 | "@mes-m2//:lib/stdlib/atoi.c", 71 | "@mes-m2//:lib/string/memcpy.c", 72 | "@mes-m2//:lib/stdlib/free.c", 73 | "@mes-m2//:lib/stdlib/realloc.c", 74 | "@mes-m2//:lib/string/strcpy.c", 75 | "@mes-m2//:lib/mes/itoa.c", 76 | "@mes-m2//:lib/mes/ltoa.c", 77 | "@mes-m2//:lib/mes/fdungetc.c", 78 | "@mes-m2//:lib/posix/setenv.c", 79 | "@mes-m2//:lib/linux/access.c", 80 | "@mes-m2//:include/linux/m2/kernel-stat.h", 81 | "@mes-m2//:include/sys/stat.h", 82 | "@mes-m2//:lib/linux/chmod.c", 83 | "@mes-m2//:lib/linux/ioctl3.c", 84 | "@mes-m2//:include/sys/ioctl.h", 85 | "@mes-m2//:lib/m2/isatty.c", 86 | "@mes-m2//:include/signal.h", 87 | "@mes-m2//:lib/linux/fork.c", 88 | "@mes-m2//:lib/m2/execve.c", 89 | "@mes-m2//:lib/m2/execv.c", 90 | "@mes-m2//:include/sys/resource.h", 91 | "@mes-m2//:lib/linux/wait4.c", 92 | "@mes-m2//:lib/linux/waitpid.c", 93 | "@mes-m2//:lib/linux/gettimeofday.c", 94 | "@mes-m2//:lib/linux/clock_gettime.c", 95 | "@mes-m2//:lib/m2/time.c", 96 | "@mes-m2//:lib/linux/_getcwd.c", 97 | "@mes-m2//:include/limits.h", 98 | "@mes-m2//:lib/m2/getcwd.c", 99 | "@mes-m2//:lib/linux/dup.c", 100 | "@mes-m2//:lib/linux/dup2.c", 101 | "@mes-m2//:lib/string/strcmp.c", 102 | "@mes-m2//:lib/string/memcmp.c", 103 | "@mes-m2//:lib/linux/uname.c", 104 | "@mes-m2//:lib/linux/unlink.c", 105 | "@mes-m2//:src/builtins.c", 106 | "@mes-m2//:src/core.c", 107 | "@mes-m2//:src/display.c", 108 | "@mes-m2//:src/eval-apply.c", 109 | "@mes-m2//:src/gc.c", 110 | "@mes-m2//:src/hash.c", 111 | "@mes-m2//:src/lib.c", 112 | "@mes-m2//:src/m2.c", 113 | "@mes-m2//:src/math.c", 114 | "@mes-m2//:src/mes.c", 115 | "@mes-m2//:src/module.c", 116 | "@mes-m2//:src/posix.c", 117 | "@mes-m2//:src/reader.c", 118 | "@mes-m2//:src/stack.c", 119 | "@mes-m2//:src/string.c", 120 | "@mes-m2//:src/struct.c", 121 | "@mes-m2//:src/symbol.c", 122 | "@mes-m2//:src/variable.c", 123 | "@mes-m2//:src/vector.c", 124 | ], 125 | architecture = select({ 126 | "@bazel_tools//src/conditions:linux_x86_64": "amd64", 127 | }), 128 | is_debug = True, 129 | compiler = "@//tools/stage0/phase15:M2-Planet", 130 | defines = { 131 | "__linux__" : "1", 132 | "__x86_64__" : "1", 133 | }, 134 | ) 135 | 136 | blood_elf( 137 | name = "mes-footer.M1", 138 | src = ":mes.M1", 139 | is_little_endian = select({ 140 | "@bazel_tools//src/conditions:linux_x86_64": True, 141 | }), 142 | is_64 = True, 143 | ) 144 | m1_expand( 145 | name = "mes.hex2", 146 | srcs = select( 147 | { 148 | "@bazel_tools//src/conditions:linux_x86_64": [ 149 | # do not sort 150 | "@mes-m2//:lib/m2/x86_64/x86_64_defs.M1", 151 | "@mes-m2//:lib/x86_64-mes/x86_64.M1", 152 | "@mes-m2//:lib/linux/x86_64-mes-m2/crt1.M1", 153 | ], 154 | }, 155 | ) + [ 156 | ":mes.M1", 157 | ":mes-footer.M1", 158 | ], 159 | architecture = select({ 160 | "@bazel_tools//src/conditions:linux_x86_64": "amd64", 161 | }), 162 | is_little_endian = select({ 163 | "@bazel_tools//src/conditions:linux_x86_64": True, 164 | }), 165 | tool = "//tools/stage0/phase9:M1" 166 | ) 167 | 168 | hex2_binary( 169 | name = "mes-m2", 170 | srcs = select( 171 | { 172 | "@bazel_tools//src/conditions:linux_x86_64": [ 173 | # do not sort 174 | "@mes-m2//:lib/m2/x86_64/ELF-x86_64.hex2", 175 | ], 176 | }, 177 | ) + [ 178 | ":mes.hex2", 179 | ], 180 | base_address = "0x1000000", 181 | architecture = select({ 182 | "@bazel_tools//src/conditions:linux_x86_64": "amd64", 183 | }), 184 | is_little_endian = select({ 185 | "@bazel_tools//src/conditions:linux_x86_64": True, 186 | }), 187 | tool = "//tools/stage0/phase8:hex2-1" 188 | ) 189 | -------------------------------------------------------------------------------- /MODULE.bazel.lock: -------------------------------------------------------------------------------- 1 | { 2 | "lockFileVersion": 6, 3 | "moduleFileHash": "0f5061685b1bcf5fb079150fac3cb77ea941e16290f08ad0a5cc597a144972e7", 4 | "flags": { 5 | "cmdRegistries": [ 6 | "https://bcr.bazel.build/" 7 | ], 8 | "cmdModuleOverrides": {}, 9 | "allowedYankedVersions": [], 10 | "envVarAllowedYankedVersions": "", 11 | "ignoreDevDependency": false, 12 | "directDependenciesMode": "WARNING", 13 | "compatibilityMode": "ERROR" 14 | }, 15 | "localOverrideHashes": { 16 | "bazel_tools": "1ae69322ac3823527337acf02016e8ee95813d8d356f47060255b8956fa642f0" 17 | }, 18 | "moduleDepGraph": { 19 | "": { 20 | "name": "stage0-bazel", 21 | "version": "", 22 | "key": "", 23 | "repoName": "stage0-bazel", 24 | "executionPlatformsToRegister": [], 25 | "toolchainsToRegister": [], 26 | "extensionUsages": [ 27 | { 28 | "extensionBzlFile": "//:MODULE.bazel", 29 | "extensionName": "_repo_rules", 30 | "usingModule": "", 31 | "location": { 32 | "file": "@@//:MODULE.bazel", 33 | "line": 0, 34 | "column": 0 35 | }, 36 | "imports": { 37 | "hex0-seeds": "hex0-seeds", 38 | "stage0-x86": "stage0-x86", 39 | "M2-Planet": "M2-Planet", 40 | "M2-Mesoplanet": "M2-Mesoplanet", 41 | "M2libc": "M2libc", 42 | "mescc-tools": "mescc-tools", 43 | "mes-m2": "mes-m2" 44 | }, 45 | "devImports": [], 46 | "tags": [ 47 | { 48 | "tagName": "@bazel_tools//tools/build_defs/repo:http.bzl%http_archive", 49 | "attributeValues": { 50 | "sha256": "cf38e87f847365d4ed1a1217a7505e007b0fc85933c01727d5d7462a58592d63", 51 | "url": "https://github.com/oriansj/bootstrap-seeds/archive/f208be26d4d3c7f5ff42e8a43baf9cad04bdfddc.zip", 52 | "strip_prefix": "bootstrap-seeds-f208be26d4d3c7f5ff42e8a43baf9cad04bdfddc", 53 | "build_file": "//third_party:hex0-seeds.BUILD", 54 | "name": "hex0-seeds" 55 | }, 56 | "devDependency": false, 57 | "location": { 58 | "file": "@@//:MODULE.bazel", 59 | "line": 9, 60 | "column": 13 61 | } 62 | }, 63 | { 64 | "tagName": "@bazel_tools//tools/build_defs/repo:http.bzl%http_archive", 65 | "attributeValues": { 66 | "build_file": "//third_party:stage0-x86.BUILD", 67 | "sha256": "76e11def8aac9189678fea60ff6003e5a33e92531ac97fa1acce39d6c41b89c9", 68 | "url": "https://github.com/oriansj/stage0-posix-x86/archive/105aebe1e5c38dcd5fd87723f7e49966ad6c436a.zip", 69 | "strip_prefix": "stage0-posix-x86-105aebe1e5c38dcd5fd87723f7e49966ad6c436a", 70 | "name": "stage0-x86" 71 | }, 72 | "devDependency": false, 73 | "location": { 74 | "file": "@@//:MODULE.bazel", 75 | "line": 17, 76 | "column": 13 77 | } 78 | }, 79 | { 80 | "tagName": "@bazel_tools//tools/build_defs/repo:http.bzl%http_archive", 81 | "attributeValues": { 82 | "build_file": "//third_party:M2-Planet.BUILD", 83 | "sha256": "d5eb4348c7952bd5f05921742dfa1b8135b43badbac52710935a6808e30c11f0", 84 | "url": "https://github.com/oriansj/M2-Planet/archive/5c251e67e28e0a441589b9c3f5150758b8034998.zip", 85 | "strip_prefix": "M2-Planet-5c251e67e28e0a441589b9c3f5150758b8034998", 86 | "name": "M2-Planet" 87 | }, 88 | "devDependency": false, 89 | "location": { 90 | "file": "@@//:MODULE.bazel", 91 | "line": 25, 92 | "column": 13 93 | } 94 | }, 95 | { 96 | "tagName": "@bazel_tools//tools/build_defs/repo:http.bzl%http_archive", 97 | "attributeValues": { 98 | "build_file": "//third_party:M2-Mesoplanet.BUILD", 99 | "sha256": "0b217da99ab0b974a52ca63030b8dc3488ebad5f07cb64a794ad1cacfbba6b09", 100 | "url": "https://github.com/oriansj/M2-Mesoplanet/archive/3dcbd0bc5f4d76d2c1cc8f6e5bafa4b214127b7d.zip", 101 | "strip_prefix": "M2-Mesoplanet-3dcbd0bc5f4d76d2c1cc8f6e5bafa4b214127b7d", 102 | "name": "M2-Mesoplanet" 103 | }, 104 | "devDependency": false, 105 | "location": { 106 | "file": "@@//:MODULE.bazel", 107 | "line": 33, 108 | "column": 13 109 | } 110 | }, 111 | { 112 | "tagName": "@bazel_tools//tools/build_defs/repo:http.bzl%http_archive", 113 | "attributeValues": { 114 | "build_file": "//third_party:M2libc.BUILD", 115 | "sha256": "53595a6683708e80d8c3ff0954e9e76d9ca9fefea28779873d89daf8ab00851c", 116 | "url": "https://github.com/oriansj/M2libc/archive/3a700010872697c4be9e3fab3cf707fce706741e.zip", 117 | "strip_prefix": "M2libc-3a700010872697c4be9e3fab3cf707fce706741e", 118 | "name": "M2libc" 119 | }, 120 | "devDependency": false, 121 | "location": { 122 | "file": "@@//:MODULE.bazel", 123 | "line": 41, 124 | "column": 13 125 | } 126 | }, 127 | { 128 | "tagName": "@bazel_tools//tools/build_defs/repo:http.bzl%http_archive", 129 | "attributeValues": { 130 | "build_file": "//third_party:mescc-tools.BUILD", 131 | "sha256": "ad0db50e9725713e83a9c7f3e7825858e413f8bab44bebcf96a1b08904226155", 132 | "url": "https://github.com/oriansj/mescc-tools/archive/08d5a0679fa4dc00babe02306f1bc50703083389.zip", 133 | "strip_prefix": "mescc-tools-08d5a0679fa4dc00babe02306f1bc50703083389", 134 | "name": "mescc-tools" 135 | }, 136 | "devDependency": false, 137 | "location": { 138 | "file": "@@//:MODULE.bazel", 139 | "line": 49, 140 | "column": 13 141 | } 142 | }, 143 | { 144 | "tagName": "@bazel_tools//tools/build_defs/repo:http.bzl%http_archive", 145 | "attributeValues": { 146 | "build_file": "//third_party:mes-m2.BUILD", 147 | "sha256": "033ee656d98cfc04a826eab27eed6e6a276d15bbb980a7cd71d00f30227aaaa8", 148 | "url": "https://mirror.team-cymru.com/gnu/mes/mes-0.27.tar.gz", 149 | "strip_prefix": "mes-0.27", 150 | "name": "mes-m2" 151 | }, 152 | "devDependency": false, 153 | "location": { 154 | "file": "@@//:MODULE.bazel", 155 | "line": 58, 156 | "column": 13 157 | } 158 | } 159 | ], 160 | "hasDevUseExtension": false, 161 | "hasNonDevUseExtension": true 162 | } 163 | ], 164 | "deps": { 165 | "bazel_skylib": "bazel_skylib@1.7.1", 166 | "bazel_tools": "bazel_tools@_", 167 | "local_config_platform": "local_config_platform@_" 168 | } 169 | }, 170 | "bazel_skylib@1.7.1": { 171 | "name": "bazel_skylib", 172 | "version": "1.7.1", 173 | "key": "bazel_skylib@1.7.1", 174 | "repoName": "bazel_skylib", 175 | "executionPlatformsToRegister": [], 176 | "toolchainsToRegister": [ 177 | "//toolchains/unittest:cmd_toolchain", 178 | "//toolchains/unittest:bash_toolchain" 179 | ], 180 | "extensionUsages": [], 181 | "deps": { 182 | "platforms": "platforms@0.0.7", 183 | "rules_license": "rules_license@0.0.7", 184 | "bazel_tools": "bazel_tools@_", 185 | "local_config_platform": "local_config_platform@_" 186 | }, 187 | "repoSpec": { 188 | "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl", 189 | "ruleClassName": "http_archive", 190 | "attributes": { 191 | "urls": [ 192 | "https://github.com/bazelbuild/bazel-skylib/releases/download/1.7.1/bazel-skylib-1.7.1.tar.gz" 193 | ], 194 | "integrity": "sha256-vCg8381SalLDIBJ5zaS8KYZS76iYsQtNsIN9xRZSdW8=", 195 | "strip_prefix": "", 196 | "remote_patches": {}, 197 | "remote_patch_strip": 0 198 | } 199 | } 200 | }, 201 | "bazel_tools@_": { 202 | "name": "bazel_tools", 203 | "version": "", 204 | "key": "bazel_tools@_", 205 | "repoName": "bazel_tools", 206 | "executionPlatformsToRegister": [], 207 | "toolchainsToRegister": [ 208 | "@local_config_cc_toolchains//:all", 209 | "@local_config_sh//:local_sh_toolchain" 210 | ], 211 | "extensionUsages": [ 212 | { 213 | "extensionBzlFile": "@bazel_tools//tools/cpp:cc_configure.bzl", 214 | "extensionName": "cc_configure_extension", 215 | "usingModule": "bazel_tools@_", 216 | "location": { 217 | "file": "@@bazel_tools//:MODULE.bazel", 218 | "line": 18, 219 | "column": 29 220 | }, 221 | "imports": { 222 | "local_config_cc": "local_config_cc", 223 | "local_config_cc_toolchains": "local_config_cc_toolchains" 224 | }, 225 | "devImports": [], 226 | "tags": [], 227 | "hasDevUseExtension": false, 228 | "hasNonDevUseExtension": true 229 | }, 230 | { 231 | "extensionBzlFile": "@bazel_tools//tools/osx:xcode_configure.bzl", 232 | "extensionName": "xcode_configure_extension", 233 | "usingModule": "bazel_tools@_", 234 | "location": { 235 | "file": "@@bazel_tools//:MODULE.bazel", 236 | "line": 22, 237 | "column": 32 238 | }, 239 | "imports": { 240 | "local_config_xcode": "local_config_xcode" 241 | }, 242 | "devImports": [], 243 | "tags": [], 244 | "hasDevUseExtension": false, 245 | "hasNonDevUseExtension": true 246 | }, 247 | { 248 | "extensionBzlFile": "@rules_java//java:extensions.bzl", 249 | "extensionName": "toolchains", 250 | "usingModule": "bazel_tools@_", 251 | "location": { 252 | "file": "@@bazel_tools//:MODULE.bazel", 253 | "line": 25, 254 | "column": 32 255 | }, 256 | "imports": { 257 | "local_jdk": "local_jdk", 258 | "remote_java_tools": "remote_java_tools", 259 | "remote_java_tools_linux": "remote_java_tools_linux", 260 | "remote_java_tools_windows": "remote_java_tools_windows", 261 | "remote_java_tools_darwin_x86_64": "remote_java_tools_darwin_x86_64", 262 | "remote_java_tools_darwin_arm64": "remote_java_tools_darwin_arm64" 263 | }, 264 | "devImports": [], 265 | "tags": [], 266 | "hasDevUseExtension": false, 267 | "hasNonDevUseExtension": true 268 | }, 269 | { 270 | "extensionBzlFile": "@bazel_tools//tools/sh:sh_configure.bzl", 271 | "extensionName": "sh_configure_extension", 272 | "usingModule": "bazel_tools@_", 273 | "location": { 274 | "file": "@@bazel_tools//:MODULE.bazel", 275 | "line": 36, 276 | "column": 39 277 | }, 278 | "imports": { 279 | "local_config_sh": "local_config_sh" 280 | }, 281 | "devImports": [], 282 | "tags": [], 283 | "hasDevUseExtension": false, 284 | "hasNonDevUseExtension": true 285 | }, 286 | { 287 | "extensionBzlFile": "@bazel_tools//tools/test:extensions.bzl", 288 | "extensionName": "remote_coverage_tools_extension", 289 | "usingModule": "bazel_tools@_", 290 | "location": { 291 | "file": "@@bazel_tools//:MODULE.bazel", 292 | "line": 40, 293 | "column": 48 294 | }, 295 | "imports": { 296 | "remote_coverage_tools": "remote_coverage_tools" 297 | }, 298 | "devImports": [], 299 | "tags": [], 300 | "hasDevUseExtension": false, 301 | "hasNonDevUseExtension": true 302 | }, 303 | { 304 | "extensionBzlFile": "@bazel_tools//tools/android:android_extensions.bzl", 305 | "extensionName": "remote_android_tools_extensions", 306 | "usingModule": "bazel_tools@_", 307 | "location": { 308 | "file": "@@bazel_tools//:MODULE.bazel", 309 | "line": 43, 310 | "column": 42 311 | }, 312 | "imports": { 313 | "android_gmaven_r8": "android_gmaven_r8", 314 | "android_tools": "android_tools" 315 | }, 316 | "devImports": [], 317 | "tags": [], 318 | "hasDevUseExtension": false, 319 | "hasNonDevUseExtension": true 320 | }, 321 | { 322 | "extensionBzlFile": "@buildozer//:buildozer_binary.bzl", 323 | "extensionName": "buildozer_binary", 324 | "usingModule": "bazel_tools@_", 325 | "location": { 326 | "file": "@@bazel_tools//:MODULE.bazel", 327 | "line": 47, 328 | "column": 33 329 | }, 330 | "imports": { 331 | "buildozer_binary": "buildozer_binary" 332 | }, 333 | "devImports": [], 334 | "tags": [], 335 | "hasDevUseExtension": false, 336 | "hasNonDevUseExtension": true 337 | } 338 | ], 339 | "deps": { 340 | "rules_cc": "rules_cc@0.0.9", 341 | "rules_java": "rules_java@7.4.0", 342 | "rules_license": "rules_license@0.0.7", 343 | "rules_proto": "rules_proto@5.3.0-21.7", 344 | "rules_python": "rules_python@0.22.1", 345 | "buildozer": "buildozer@6.4.0.2", 346 | "platforms": "platforms@0.0.7", 347 | "com_google_protobuf": "protobuf@21.7", 348 | "zlib": "zlib@1.3", 349 | "build_bazel_apple_support": "apple_support@1.5.0", 350 | "local_config_platform": "local_config_platform@_" 351 | } 352 | }, 353 | "local_config_platform@_": { 354 | "name": "local_config_platform", 355 | "version": "", 356 | "key": "local_config_platform@_", 357 | "repoName": "local_config_platform", 358 | "executionPlatformsToRegister": [], 359 | "toolchainsToRegister": [], 360 | "extensionUsages": [], 361 | "deps": { 362 | "platforms": "platforms@0.0.7", 363 | "bazel_tools": "bazel_tools@_" 364 | } 365 | }, 366 | "platforms@0.0.7": { 367 | "name": "platforms", 368 | "version": "0.0.7", 369 | "key": "platforms@0.0.7", 370 | "repoName": "platforms", 371 | "executionPlatformsToRegister": [], 372 | "toolchainsToRegister": [], 373 | "extensionUsages": [], 374 | "deps": { 375 | "rules_license": "rules_license@0.0.7", 376 | "bazel_tools": "bazel_tools@_", 377 | "local_config_platform": "local_config_platform@_" 378 | }, 379 | "repoSpec": { 380 | "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl", 381 | "ruleClassName": "http_archive", 382 | "attributes": { 383 | "urls": [ 384 | "https://github.com/bazelbuild/platforms/releases/download/0.0.7/platforms-0.0.7.tar.gz" 385 | ], 386 | "integrity": "sha256-OlYcmee9vpFzqmU/1Xn+hJ8djWc5V4CrR3Cx84FDHVE=", 387 | "strip_prefix": "", 388 | "remote_patches": {}, 389 | "remote_patch_strip": 0 390 | } 391 | } 392 | }, 393 | "rules_license@0.0.7": { 394 | "name": "rules_license", 395 | "version": "0.0.7", 396 | "key": "rules_license@0.0.7", 397 | "repoName": "rules_license", 398 | "executionPlatformsToRegister": [], 399 | "toolchainsToRegister": [], 400 | "extensionUsages": [], 401 | "deps": { 402 | "bazel_tools": "bazel_tools@_", 403 | "local_config_platform": "local_config_platform@_" 404 | }, 405 | "repoSpec": { 406 | "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl", 407 | "ruleClassName": "http_archive", 408 | "attributes": { 409 | "urls": [ 410 | "https://github.com/bazelbuild/rules_license/releases/download/0.0.7/rules_license-0.0.7.tar.gz" 411 | ], 412 | "integrity": "sha256-RTHezLkTY5ww5cdRKgVNXYdWmNrrddjPkPKEN1/nw2A=", 413 | "strip_prefix": "", 414 | "remote_patches": {}, 415 | "remote_patch_strip": 0 416 | } 417 | } 418 | }, 419 | "rules_cc@0.0.9": { 420 | "name": "rules_cc", 421 | "version": "0.0.9", 422 | "key": "rules_cc@0.0.9", 423 | "repoName": "rules_cc", 424 | "executionPlatformsToRegister": [], 425 | "toolchainsToRegister": [ 426 | "@local_config_cc_toolchains//:all" 427 | ], 428 | "extensionUsages": [ 429 | { 430 | "extensionBzlFile": "@bazel_tools//tools/cpp:cc_configure.bzl", 431 | "extensionName": "cc_configure_extension", 432 | "usingModule": "rules_cc@0.0.9", 433 | "location": { 434 | "file": "https://bcr.bazel.build/modules/rules_cc/0.0.9/MODULE.bazel", 435 | "line": 9, 436 | "column": 29 437 | }, 438 | "imports": { 439 | "local_config_cc_toolchains": "local_config_cc_toolchains" 440 | }, 441 | "devImports": [], 442 | "tags": [], 443 | "hasDevUseExtension": false, 444 | "hasNonDevUseExtension": true 445 | } 446 | ], 447 | "deps": { 448 | "platforms": "platforms@0.0.7", 449 | "bazel_tools": "bazel_tools@_", 450 | "local_config_platform": "local_config_platform@_" 451 | }, 452 | "repoSpec": { 453 | "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl", 454 | "ruleClassName": "http_archive", 455 | "attributes": { 456 | "urls": [ 457 | "https://github.com/bazelbuild/rules_cc/releases/download/0.0.9/rules_cc-0.0.9.tar.gz" 458 | ], 459 | "integrity": "sha256-IDeHW5pEVtzkp50RKorohbvEqtlo5lh9ym5k86CQDN8=", 460 | "strip_prefix": "rules_cc-0.0.9", 461 | "remote_patches": { 462 | "https://bcr.bazel.build/modules/rules_cc/0.0.9/patches/module_dot_bazel_version.patch": "sha256-mM+qzOI0SgAdaJBlWOSMwMPKpaA9b7R37Hj/tp5bb4g=" 463 | }, 464 | "remote_patch_strip": 0 465 | } 466 | } 467 | }, 468 | "rules_java@7.4.0": { 469 | "name": "rules_java", 470 | "version": "7.4.0", 471 | "key": "rules_java@7.4.0", 472 | "repoName": "rules_java", 473 | "executionPlatformsToRegister": [], 474 | "toolchainsToRegister": [ 475 | "//toolchains:all", 476 | "@local_jdk//:runtime_toolchain_definition", 477 | "@local_jdk//:bootstrap_runtime_toolchain_definition", 478 | "@remotejdk11_linux_toolchain_config_repo//:all", 479 | "@remotejdk11_linux_aarch64_toolchain_config_repo//:all", 480 | "@remotejdk11_linux_ppc64le_toolchain_config_repo//:all", 481 | "@remotejdk11_linux_s390x_toolchain_config_repo//:all", 482 | "@remotejdk11_macos_toolchain_config_repo//:all", 483 | "@remotejdk11_macos_aarch64_toolchain_config_repo//:all", 484 | "@remotejdk11_win_toolchain_config_repo//:all", 485 | "@remotejdk11_win_arm64_toolchain_config_repo//:all", 486 | "@remotejdk17_linux_toolchain_config_repo//:all", 487 | "@remotejdk17_linux_aarch64_toolchain_config_repo//:all", 488 | "@remotejdk17_linux_ppc64le_toolchain_config_repo//:all", 489 | "@remotejdk17_linux_s390x_toolchain_config_repo//:all", 490 | "@remotejdk17_macos_toolchain_config_repo//:all", 491 | "@remotejdk17_macos_aarch64_toolchain_config_repo//:all", 492 | "@remotejdk17_win_toolchain_config_repo//:all", 493 | "@remotejdk17_win_arm64_toolchain_config_repo//:all", 494 | "@remotejdk21_linux_toolchain_config_repo//:all", 495 | "@remotejdk21_linux_aarch64_toolchain_config_repo//:all", 496 | "@remotejdk21_macos_toolchain_config_repo//:all", 497 | "@remotejdk21_macos_aarch64_toolchain_config_repo//:all", 498 | "@remotejdk21_win_toolchain_config_repo//:all" 499 | ], 500 | "extensionUsages": [ 501 | { 502 | "extensionBzlFile": "@rules_java//java:extensions.bzl", 503 | "extensionName": "toolchains", 504 | "usingModule": "rules_java@7.4.0", 505 | "location": { 506 | "file": "https://bcr.bazel.build/modules/rules_java/7.4.0/MODULE.bazel", 507 | "line": 19, 508 | "column": 27 509 | }, 510 | "imports": { 511 | "remote_java_tools": "remote_java_tools", 512 | "remote_java_tools_linux": "remote_java_tools_linux", 513 | "remote_java_tools_windows": "remote_java_tools_windows", 514 | "remote_java_tools_darwin_x86_64": "remote_java_tools_darwin_x86_64", 515 | "remote_java_tools_darwin_arm64": "remote_java_tools_darwin_arm64", 516 | "local_jdk": "local_jdk", 517 | "remotejdk11_linux_toolchain_config_repo": "remotejdk11_linux_toolchain_config_repo", 518 | "remotejdk11_linux_aarch64_toolchain_config_repo": "remotejdk11_linux_aarch64_toolchain_config_repo", 519 | "remotejdk11_linux_ppc64le_toolchain_config_repo": "remotejdk11_linux_ppc64le_toolchain_config_repo", 520 | "remotejdk11_linux_s390x_toolchain_config_repo": "remotejdk11_linux_s390x_toolchain_config_repo", 521 | "remotejdk11_macos_toolchain_config_repo": "remotejdk11_macos_toolchain_config_repo", 522 | "remotejdk11_macos_aarch64_toolchain_config_repo": "remotejdk11_macos_aarch64_toolchain_config_repo", 523 | "remotejdk11_win_toolchain_config_repo": "remotejdk11_win_toolchain_config_repo", 524 | "remotejdk11_win_arm64_toolchain_config_repo": "remotejdk11_win_arm64_toolchain_config_repo", 525 | "remotejdk17_linux_toolchain_config_repo": "remotejdk17_linux_toolchain_config_repo", 526 | "remotejdk17_linux_aarch64_toolchain_config_repo": "remotejdk17_linux_aarch64_toolchain_config_repo", 527 | "remotejdk17_linux_ppc64le_toolchain_config_repo": "remotejdk17_linux_ppc64le_toolchain_config_repo", 528 | "remotejdk17_linux_s390x_toolchain_config_repo": "remotejdk17_linux_s390x_toolchain_config_repo", 529 | "remotejdk17_macos_toolchain_config_repo": "remotejdk17_macos_toolchain_config_repo", 530 | "remotejdk17_macos_aarch64_toolchain_config_repo": "remotejdk17_macos_aarch64_toolchain_config_repo", 531 | "remotejdk17_win_toolchain_config_repo": "remotejdk17_win_toolchain_config_repo", 532 | "remotejdk17_win_arm64_toolchain_config_repo": "remotejdk17_win_arm64_toolchain_config_repo", 533 | "remotejdk21_linux_toolchain_config_repo": "remotejdk21_linux_toolchain_config_repo", 534 | "remotejdk21_linux_aarch64_toolchain_config_repo": "remotejdk21_linux_aarch64_toolchain_config_repo", 535 | "remotejdk21_macos_toolchain_config_repo": "remotejdk21_macos_toolchain_config_repo", 536 | "remotejdk21_macos_aarch64_toolchain_config_repo": "remotejdk21_macos_aarch64_toolchain_config_repo", 537 | "remotejdk21_win_toolchain_config_repo": "remotejdk21_win_toolchain_config_repo" 538 | }, 539 | "devImports": [], 540 | "tags": [], 541 | "hasDevUseExtension": false, 542 | "hasNonDevUseExtension": true 543 | } 544 | ], 545 | "deps": { 546 | "platforms": "platforms@0.0.7", 547 | "rules_cc": "rules_cc@0.0.9", 548 | "bazel_skylib": "bazel_skylib@1.7.1", 549 | "rules_proto": "rules_proto@5.3.0-21.7", 550 | "rules_license": "rules_license@0.0.7", 551 | "bazel_tools": "bazel_tools@_", 552 | "local_config_platform": "local_config_platform@_" 553 | }, 554 | "repoSpec": { 555 | "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl", 556 | "ruleClassName": "http_archive", 557 | "attributes": { 558 | "urls": [ 559 | "https://github.com/bazelbuild/rules_java/releases/download/7.4.0/rules_java-7.4.0.tar.gz" 560 | ], 561 | "integrity": "sha256-l27wi0nJKXQfIBeQ5Z44B8cq2B9CjIvJU82+/1/tFes=", 562 | "strip_prefix": "", 563 | "remote_patches": {}, 564 | "remote_patch_strip": 0 565 | } 566 | } 567 | }, 568 | "rules_proto@5.3.0-21.7": { 569 | "name": "rules_proto", 570 | "version": "5.3.0-21.7", 571 | "key": "rules_proto@5.3.0-21.7", 572 | "repoName": "rules_proto", 573 | "executionPlatformsToRegister": [], 574 | "toolchainsToRegister": [], 575 | "extensionUsages": [], 576 | "deps": { 577 | "bazel_skylib": "bazel_skylib@1.7.1", 578 | "com_google_protobuf": "protobuf@21.7", 579 | "rules_cc": "rules_cc@0.0.9", 580 | "bazel_tools": "bazel_tools@_", 581 | "local_config_platform": "local_config_platform@_" 582 | }, 583 | "repoSpec": { 584 | "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl", 585 | "ruleClassName": "http_archive", 586 | "attributes": { 587 | "urls": [ 588 | "https://github.com/bazelbuild/rules_proto/archive/refs/tags/5.3.0-21.7.tar.gz" 589 | ], 590 | "integrity": "sha256-3D+yBqLLNEG0heseQjFlsjEjWh6psDG0Qzz3vB+kYN0=", 591 | "strip_prefix": "rules_proto-5.3.0-21.7", 592 | "remote_patches": {}, 593 | "remote_patch_strip": 0 594 | } 595 | } 596 | }, 597 | "rules_python@0.22.1": { 598 | "name": "rules_python", 599 | "version": "0.22.1", 600 | "key": "rules_python@0.22.1", 601 | "repoName": "rules_python", 602 | "executionPlatformsToRegister": [], 603 | "toolchainsToRegister": [ 604 | "@bazel_tools//tools/python:autodetecting_toolchain" 605 | ], 606 | "extensionUsages": [ 607 | { 608 | "extensionBzlFile": "@rules_python//python/extensions/private:internal_deps.bzl", 609 | "extensionName": "internal_deps", 610 | "usingModule": "rules_python@0.22.1", 611 | "location": { 612 | "file": "https://bcr.bazel.build/modules/rules_python/0.22.1/MODULE.bazel", 613 | "line": 14, 614 | "column": 30 615 | }, 616 | "imports": { 617 | "pypi__build": "pypi__build", 618 | "pypi__click": "pypi__click", 619 | "pypi__colorama": "pypi__colorama", 620 | "pypi__importlib_metadata": "pypi__importlib_metadata", 621 | "pypi__installer": "pypi__installer", 622 | "pypi__more_itertools": "pypi__more_itertools", 623 | "pypi__packaging": "pypi__packaging", 624 | "pypi__pep517": "pypi__pep517", 625 | "pypi__pip": "pypi__pip", 626 | "pypi__pip_tools": "pypi__pip_tools", 627 | "pypi__setuptools": "pypi__setuptools", 628 | "pypi__tomli": "pypi__tomli", 629 | "pypi__wheel": "pypi__wheel", 630 | "pypi__zipp": "pypi__zipp", 631 | "pypi__coverage_cp310_aarch64-apple-darwin": "pypi__coverage_cp310_aarch64-apple-darwin", 632 | "pypi__coverage_cp310_aarch64-unknown-linux-gnu": "pypi__coverage_cp310_aarch64-unknown-linux-gnu", 633 | "pypi__coverage_cp310_x86_64-apple-darwin": "pypi__coverage_cp310_x86_64-apple-darwin", 634 | "pypi__coverage_cp310_x86_64-unknown-linux-gnu": "pypi__coverage_cp310_x86_64-unknown-linux-gnu", 635 | "pypi__coverage_cp311_aarch64-unknown-linux-gnu": "pypi__coverage_cp311_aarch64-unknown-linux-gnu", 636 | "pypi__coverage_cp311_x86_64-apple-darwin": "pypi__coverage_cp311_x86_64-apple-darwin", 637 | "pypi__coverage_cp311_x86_64-unknown-linux-gnu": "pypi__coverage_cp311_x86_64-unknown-linux-gnu", 638 | "pypi__coverage_cp38_aarch64-apple-darwin": "pypi__coverage_cp38_aarch64-apple-darwin", 639 | "pypi__coverage_cp38_aarch64-unknown-linux-gnu": "pypi__coverage_cp38_aarch64-unknown-linux-gnu", 640 | "pypi__coverage_cp38_x86_64-apple-darwin": "pypi__coverage_cp38_x86_64-apple-darwin", 641 | "pypi__coverage_cp38_x86_64-unknown-linux-gnu": "pypi__coverage_cp38_x86_64-unknown-linux-gnu", 642 | "pypi__coverage_cp39_aarch64-apple-darwin": "pypi__coverage_cp39_aarch64-apple-darwin", 643 | "pypi__coverage_cp39_aarch64-unknown-linux-gnu": "pypi__coverage_cp39_aarch64-unknown-linux-gnu", 644 | "pypi__coverage_cp39_x86_64-apple-darwin": "pypi__coverage_cp39_x86_64-apple-darwin", 645 | "pypi__coverage_cp39_x86_64-unknown-linux-gnu": "pypi__coverage_cp39_x86_64-unknown-linux-gnu" 646 | }, 647 | "devImports": [], 648 | "tags": [ 649 | { 650 | "tagName": "install", 651 | "attributeValues": {}, 652 | "devDependency": false, 653 | "location": { 654 | "file": "https://bcr.bazel.build/modules/rules_python/0.22.1/MODULE.bazel", 655 | "line": 15, 656 | "column": 22 657 | } 658 | } 659 | ], 660 | "hasDevUseExtension": false, 661 | "hasNonDevUseExtension": true 662 | }, 663 | { 664 | "extensionBzlFile": "@rules_python//python/extensions:python.bzl", 665 | "extensionName": "python", 666 | "usingModule": "rules_python@0.22.1", 667 | "location": { 668 | "file": "https://bcr.bazel.build/modules/rules_python/0.22.1/MODULE.bazel", 669 | "line": 50, 670 | "column": 23 671 | }, 672 | "imports": { 673 | "pythons_hub": "pythons_hub" 674 | }, 675 | "devImports": [], 676 | "tags": [], 677 | "hasDevUseExtension": false, 678 | "hasNonDevUseExtension": true 679 | } 680 | ], 681 | "deps": { 682 | "platforms": "platforms@0.0.7", 683 | "bazel_skylib": "bazel_skylib@1.7.1", 684 | "rules_proto": "rules_proto@5.3.0-21.7", 685 | "com_google_protobuf": "protobuf@21.7", 686 | "bazel_tools": "bazel_tools@_", 687 | "local_config_platform": "local_config_platform@_" 688 | }, 689 | "repoSpec": { 690 | "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl", 691 | "ruleClassName": "http_archive", 692 | "attributes": { 693 | "urls": [ 694 | "https://github.com/bazelbuild/rules_python/releases/download/0.22.1/rules_python-0.22.1.tar.gz" 695 | ], 696 | "integrity": "sha256-pWQP3dS+sD6MH95e1xYMC6a9R359BIZhwwwGk2om/WM=", 697 | "strip_prefix": "rules_python-0.22.1", 698 | "remote_patches": { 699 | "https://bcr.bazel.build/modules/rules_python/0.22.1/patches/module_dot_bazel_version.patch": "sha256-3+VLDH9gYDzNI4eOW7mABC/LKxh1xqF6NhacLbNTucs=" 700 | }, 701 | "remote_patch_strip": 1 702 | } 703 | } 704 | }, 705 | "buildozer@6.4.0.2": { 706 | "name": "buildozer", 707 | "version": "6.4.0.2", 708 | "key": "buildozer@6.4.0.2", 709 | "repoName": "buildozer", 710 | "executionPlatformsToRegister": [], 711 | "toolchainsToRegister": [], 712 | "extensionUsages": [ 713 | { 714 | "extensionBzlFile": "@buildozer//:buildozer_binary.bzl", 715 | "extensionName": "buildozer_binary", 716 | "usingModule": "buildozer@6.4.0.2", 717 | "location": { 718 | "file": "https://bcr.bazel.build/modules/buildozer/6.4.0.2/MODULE.bazel", 719 | "line": 7, 720 | "column": 33 721 | }, 722 | "imports": { 723 | "buildozer_binary": "buildozer_binary" 724 | }, 725 | "devImports": [], 726 | "tags": [ 727 | { 728 | "tagName": "buildozer", 729 | "attributeValues": { 730 | "sha256": { 731 | "darwin-amd64": "d29e347ecd6b5673d72cb1a8de05bf1b06178dd229ff5eb67fad5100c840cc8e", 732 | "darwin-arm64": "9b9e71bdbec5e7223871e913b65d12f6d8fa026684daf991f00e52ed36a6978d", 733 | "linux-amd64": "8dfd6345da4e9042daa738d7fdf34f699c5dfce4632f7207956fceedd8494119", 734 | "linux-arm64": "6559558fded658c8fa7432a9d011f7c4dcbac6b738feae73d2d5c352e5f605fa", 735 | "windows-amd64": "e7f05bf847f7c3689dd28926460ce6e1097ae97380ac8e6ae7147b7b706ba19b" 736 | }, 737 | "version": "6.4.0" 738 | }, 739 | "devDependency": false, 740 | "location": { 741 | "file": "https://bcr.bazel.build/modules/buildozer/6.4.0.2/MODULE.bazel", 742 | "line": 8, 743 | "column": 27 744 | } 745 | } 746 | ], 747 | "hasDevUseExtension": false, 748 | "hasNonDevUseExtension": true 749 | } 750 | ], 751 | "deps": { 752 | "bazel_tools": "bazel_tools@_", 753 | "local_config_platform": "local_config_platform@_" 754 | }, 755 | "repoSpec": { 756 | "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl", 757 | "ruleClassName": "http_archive", 758 | "attributes": { 759 | "urls": [ 760 | "https://github.com/fmeum/buildozer/releases/download/v6.4.0.2/buildozer-v6.4.0.2.tar.gz" 761 | ], 762 | "integrity": "sha256-k7tFKQMR2AygxpmZfH0yEPnQmF3efFgD9rBPkj+Yz/8=", 763 | "strip_prefix": "buildozer-6.4.0.2", 764 | "remote_patches": { 765 | "https://bcr.bazel.build/modules/buildozer/6.4.0.2/patches/module_dot_bazel_version.patch": "sha256-gKANF2HMilj7bWmuXs4lbBIAAansuWC4IhWGB/CerjU=" 766 | }, 767 | "remote_patch_strip": 1 768 | } 769 | } 770 | }, 771 | "protobuf@21.7": { 772 | "name": "protobuf", 773 | "version": "21.7", 774 | "key": "protobuf@21.7", 775 | "repoName": "protobuf", 776 | "executionPlatformsToRegister": [], 777 | "toolchainsToRegister": [], 778 | "extensionUsages": [ 779 | { 780 | "extensionBzlFile": "@rules_jvm_external//:extensions.bzl", 781 | "extensionName": "maven", 782 | "usingModule": "protobuf@21.7", 783 | "location": { 784 | "file": "https://bcr.bazel.build/modules/protobuf/21.7/MODULE.bazel", 785 | "line": 22, 786 | "column": 22 787 | }, 788 | "imports": { 789 | "maven": "maven" 790 | }, 791 | "devImports": [], 792 | "tags": [ 793 | { 794 | "tagName": "install", 795 | "attributeValues": { 796 | "name": "maven", 797 | "artifacts": [ 798 | "com.google.code.findbugs:jsr305:3.0.2", 799 | "com.google.code.gson:gson:2.8.9", 800 | "com.google.errorprone:error_prone_annotations:2.3.2", 801 | "com.google.j2objc:j2objc-annotations:1.3", 802 | "com.google.guava:guava:31.1-jre", 803 | "com.google.guava:guava-testlib:31.1-jre", 804 | "com.google.truth:truth:1.1.2", 805 | "junit:junit:4.13.2", 806 | "org.mockito:mockito-core:4.3.1" 807 | ] 808 | }, 809 | "devDependency": false, 810 | "location": { 811 | "file": "https://bcr.bazel.build/modules/protobuf/21.7/MODULE.bazel", 812 | "line": 24, 813 | "column": 14 814 | } 815 | } 816 | ], 817 | "hasDevUseExtension": false, 818 | "hasNonDevUseExtension": true 819 | } 820 | ], 821 | "deps": { 822 | "bazel_skylib": "bazel_skylib@1.7.1", 823 | "rules_python": "rules_python@0.22.1", 824 | "rules_cc": "rules_cc@0.0.9", 825 | "rules_proto": "rules_proto@5.3.0-21.7", 826 | "rules_java": "rules_java@7.4.0", 827 | "rules_pkg": "rules_pkg@0.7.0", 828 | "com_google_abseil": "abseil-cpp@20211102.0", 829 | "zlib": "zlib@1.3", 830 | "upb": "upb@0.0.0-20220923-a547704", 831 | "rules_jvm_external": "rules_jvm_external@4.4.2", 832 | "com_google_googletest": "googletest@1.11.0", 833 | "bazel_tools": "bazel_tools@_", 834 | "local_config_platform": "local_config_platform@_" 835 | }, 836 | "repoSpec": { 837 | "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl", 838 | "ruleClassName": "http_archive", 839 | "attributes": { 840 | "urls": [ 841 | "https://github.com/protocolbuffers/protobuf/releases/download/v21.7/protobuf-all-21.7.zip" 842 | ], 843 | "integrity": "sha256-VJOiH17T/FAuZv7GuUScBqVRztYwAvpIkDxA36jeeko=", 844 | "strip_prefix": "protobuf-21.7", 845 | "remote_patches": { 846 | "https://bcr.bazel.build/modules/protobuf/21.7/patches/add_module_dot_bazel.patch": "sha256-q3V2+eq0v2XF0z8z+V+QF4cynD6JvHI1y3kI/+rzl5s=", 847 | "https://bcr.bazel.build/modules/protobuf/21.7/patches/add_module_dot_bazel_for_examples.patch": "sha256-O7YP6s3lo/1opUiO0jqXYORNHdZ/2q3hjz1QGy8QdIU=", 848 | "https://bcr.bazel.build/modules/protobuf/21.7/patches/relative_repo_names.patch": "sha256-RK9RjW8T5UJNG7flIrnFiNE9vKwWB+8uWWtJqXYT0w4=", 849 | "https://bcr.bazel.build/modules/protobuf/21.7/patches/add_missing_files.patch": "sha256-Hyne4DG2u5bXcWHNxNMirA2QFAe/2Cl8oMm1XJdkQIY=" 850 | }, 851 | "remote_patch_strip": 1 852 | } 853 | } 854 | }, 855 | "zlib@1.3": { 856 | "name": "zlib", 857 | "version": "1.3", 858 | "key": "zlib@1.3", 859 | "repoName": "zlib", 860 | "executionPlatformsToRegister": [], 861 | "toolchainsToRegister": [], 862 | "extensionUsages": [], 863 | "deps": { 864 | "platforms": "platforms@0.0.7", 865 | "rules_cc": "rules_cc@0.0.9", 866 | "bazel_tools": "bazel_tools@_", 867 | "local_config_platform": "local_config_platform@_" 868 | }, 869 | "repoSpec": { 870 | "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl", 871 | "ruleClassName": "http_archive", 872 | "attributes": { 873 | "urls": [ 874 | "https://github.com/madler/zlib/releases/download/v1.3/zlib-1.3.tar.gz" 875 | ], 876 | "integrity": "sha256-/wukwpIBPbwnUws6geH5qBPNOd4Byl4Pi/NVcC76WT4=", 877 | "strip_prefix": "zlib-1.3", 878 | "remote_patches": { 879 | "https://bcr.bazel.build/modules/zlib/1.3/patches/add_build_file.patch": "sha256-Ei+FYaaOo7A3jTKunMEodTI0Uw5NXQyZEcboMC8JskY=", 880 | "https://bcr.bazel.build/modules/zlib/1.3/patches/module_dot_bazel.patch": "sha256-fPWLM+2xaF/kuy+kZc1YTfW6hNjrkG400Ho7gckuyJk=" 881 | }, 882 | "remote_patch_strip": 0 883 | } 884 | } 885 | }, 886 | "apple_support@1.5.0": { 887 | "name": "apple_support", 888 | "version": "1.5.0", 889 | "key": "apple_support@1.5.0", 890 | "repoName": "build_bazel_apple_support", 891 | "executionPlatformsToRegister": [], 892 | "toolchainsToRegister": [ 893 | "@local_config_apple_cc_toolchains//:all" 894 | ], 895 | "extensionUsages": [ 896 | { 897 | "extensionBzlFile": "@build_bazel_apple_support//crosstool:setup.bzl", 898 | "extensionName": "apple_cc_configure_extension", 899 | "usingModule": "apple_support@1.5.0", 900 | "location": { 901 | "file": "https://bcr.bazel.build/modules/apple_support/1.5.0/MODULE.bazel", 902 | "line": 17, 903 | "column": 35 904 | }, 905 | "imports": { 906 | "local_config_apple_cc": "local_config_apple_cc", 907 | "local_config_apple_cc_toolchains": "local_config_apple_cc_toolchains" 908 | }, 909 | "devImports": [], 910 | "tags": [], 911 | "hasDevUseExtension": false, 912 | "hasNonDevUseExtension": true 913 | } 914 | ], 915 | "deps": { 916 | "bazel_skylib": "bazel_skylib@1.7.1", 917 | "platforms": "platforms@0.0.7", 918 | "bazel_tools": "bazel_tools@_", 919 | "local_config_platform": "local_config_platform@_" 920 | }, 921 | "repoSpec": { 922 | "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl", 923 | "ruleClassName": "http_archive", 924 | "attributes": { 925 | "urls": [ 926 | "https://github.com/bazelbuild/apple_support/releases/download/1.5.0/apple_support.1.5.0.tar.gz" 927 | ], 928 | "integrity": "sha256-miM41vja0yRPgj8txghKA+TQ+7J8qJLclw5okNW0gYQ=", 929 | "strip_prefix": "", 930 | "remote_patches": {}, 931 | "remote_patch_strip": 0 932 | } 933 | } 934 | }, 935 | "rules_pkg@0.7.0": { 936 | "name": "rules_pkg", 937 | "version": "0.7.0", 938 | "key": "rules_pkg@0.7.0", 939 | "repoName": "rules_pkg", 940 | "executionPlatformsToRegister": [], 941 | "toolchainsToRegister": [], 942 | "extensionUsages": [], 943 | "deps": { 944 | "rules_python": "rules_python@0.22.1", 945 | "bazel_skylib": "bazel_skylib@1.7.1", 946 | "rules_license": "rules_license@0.0.7", 947 | "bazel_tools": "bazel_tools@_", 948 | "local_config_platform": "local_config_platform@_" 949 | }, 950 | "repoSpec": { 951 | "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl", 952 | "ruleClassName": "http_archive", 953 | "attributes": { 954 | "urls": [ 955 | "https://github.com/bazelbuild/rules_pkg/releases/download/0.7.0/rules_pkg-0.7.0.tar.gz" 956 | ], 957 | "integrity": "sha256-iimOgydi7aGDBZfWT+fbWBeKqEzVkm121bdE1lWJQcI=", 958 | "strip_prefix": "", 959 | "remote_patches": { 960 | "https://bcr.bazel.build/modules/rules_pkg/0.7.0/patches/module_dot_bazel.patch": "sha256-4OaEPZwYF6iC71ZTDg6MJ7LLqX7ZA0/kK4mT+4xKqiE=" 961 | }, 962 | "remote_patch_strip": 0 963 | } 964 | } 965 | }, 966 | "abseil-cpp@20211102.0": { 967 | "name": "abseil-cpp", 968 | "version": "20211102.0", 969 | "key": "abseil-cpp@20211102.0", 970 | "repoName": "abseil-cpp", 971 | "executionPlatformsToRegister": [], 972 | "toolchainsToRegister": [], 973 | "extensionUsages": [], 974 | "deps": { 975 | "rules_cc": "rules_cc@0.0.9", 976 | "platforms": "platforms@0.0.7", 977 | "bazel_tools": "bazel_tools@_", 978 | "local_config_platform": "local_config_platform@_" 979 | }, 980 | "repoSpec": { 981 | "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl", 982 | "ruleClassName": "http_archive", 983 | "attributes": { 984 | "urls": [ 985 | "https://github.com/abseil/abseil-cpp/archive/refs/tags/20211102.0.tar.gz" 986 | ], 987 | "integrity": "sha256-3PcbnLqNwMqZQMSzFqDHlr6Pq0KwcLtrfKtitI8OZsQ=", 988 | "strip_prefix": "abseil-cpp-20211102.0", 989 | "remote_patches": { 990 | "https://bcr.bazel.build/modules/abseil-cpp/20211102.0/patches/module_dot_bazel.patch": "sha256-4izqopgGCey4jVZzl/w3M2GVPNohjh2B5TmbThZNvPY=" 991 | }, 992 | "remote_patch_strip": 0 993 | } 994 | } 995 | }, 996 | "upb@0.0.0-20220923-a547704": { 997 | "name": "upb", 998 | "version": "0.0.0-20220923-a547704", 999 | "key": "upb@0.0.0-20220923-a547704", 1000 | "repoName": "upb", 1001 | "executionPlatformsToRegister": [], 1002 | "toolchainsToRegister": [], 1003 | "extensionUsages": [], 1004 | "deps": { 1005 | "bazel_skylib": "bazel_skylib@1.7.1", 1006 | "rules_proto": "rules_proto@5.3.0-21.7", 1007 | "com_google_protobuf": "protobuf@21.7", 1008 | "com_google_absl": "abseil-cpp@20211102.0", 1009 | "platforms": "platforms@0.0.7", 1010 | "bazel_tools": "bazel_tools@_", 1011 | "local_config_platform": "local_config_platform@_" 1012 | }, 1013 | "repoSpec": { 1014 | "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl", 1015 | "ruleClassName": "http_archive", 1016 | "attributes": { 1017 | "urls": [ 1018 | "https://github.com/protocolbuffers/upb/archive/a5477045acaa34586420942098f5fecd3570f577.tar.gz" 1019 | ], 1020 | "integrity": "sha256-z39x6v+QskwaKLSWRan/A6mmwecTQpHOcJActj5zZLU=", 1021 | "strip_prefix": "upb-a5477045acaa34586420942098f5fecd3570f577", 1022 | "remote_patches": { 1023 | "https://bcr.bazel.build/modules/upb/0.0.0-20220923-a547704/patches/module_dot_bazel.patch": "sha256-wH4mNS6ZYy+8uC0HoAft/c7SDsq2Kxf+J8dUakXhaB0=" 1024 | }, 1025 | "remote_patch_strip": 0 1026 | } 1027 | } 1028 | }, 1029 | "rules_jvm_external@4.4.2": { 1030 | "name": "rules_jvm_external", 1031 | "version": "4.4.2", 1032 | "key": "rules_jvm_external@4.4.2", 1033 | "repoName": "rules_jvm_external", 1034 | "executionPlatformsToRegister": [], 1035 | "toolchainsToRegister": [], 1036 | "extensionUsages": [ 1037 | { 1038 | "extensionBzlFile": "@rules_jvm_external//:non-module-deps.bzl", 1039 | "extensionName": "non_module_deps", 1040 | "usingModule": "rules_jvm_external@4.4.2", 1041 | "location": { 1042 | "file": "https://bcr.bazel.build/modules/rules_jvm_external/4.4.2/MODULE.bazel", 1043 | "line": 9, 1044 | "column": 32 1045 | }, 1046 | "imports": { 1047 | "io_bazel_rules_kotlin": "io_bazel_rules_kotlin" 1048 | }, 1049 | "devImports": [], 1050 | "tags": [], 1051 | "hasDevUseExtension": false, 1052 | "hasNonDevUseExtension": true 1053 | }, 1054 | { 1055 | "extensionBzlFile": "@rules_jvm_external//:extensions.bzl", 1056 | "extensionName": "maven", 1057 | "usingModule": "rules_jvm_external@4.4.2", 1058 | "location": { 1059 | "file": "https://bcr.bazel.build/modules/rules_jvm_external/4.4.2/MODULE.bazel", 1060 | "line": 16, 1061 | "column": 22 1062 | }, 1063 | "imports": { 1064 | "rules_jvm_external_deps": "rules_jvm_external_deps" 1065 | }, 1066 | "devImports": [], 1067 | "tags": [ 1068 | { 1069 | "tagName": "install", 1070 | "attributeValues": { 1071 | "name": "rules_jvm_external_deps", 1072 | "artifacts": [ 1073 | "com.google.cloud:google-cloud-core:1.93.10", 1074 | "com.google.cloud:google-cloud-storage:1.113.4", 1075 | "com.google.code.gson:gson:2.9.0", 1076 | "org.apache.maven:maven-artifact:3.8.6", 1077 | "software.amazon.awssdk:s3:2.17.183" 1078 | ], 1079 | "lock_file": "@rules_jvm_external//:rules_jvm_external_deps_install.json" 1080 | }, 1081 | "devDependency": false, 1082 | "location": { 1083 | "file": "https://bcr.bazel.build/modules/rules_jvm_external/4.4.2/MODULE.bazel", 1084 | "line": 18, 1085 | "column": 14 1086 | } 1087 | } 1088 | ], 1089 | "hasDevUseExtension": false, 1090 | "hasNonDevUseExtension": true 1091 | } 1092 | ], 1093 | "deps": { 1094 | "bazel_skylib": "bazel_skylib@1.7.1", 1095 | "io_bazel_stardoc": "stardoc@0.5.1", 1096 | "bazel_tools": "bazel_tools@_", 1097 | "local_config_platform": "local_config_platform@_" 1098 | }, 1099 | "repoSpec": { 1100 | "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl", 1101 | "ruleClassName": "http_archive", 1102 | "attributes": { 1103 | "urls": [ 1104 | "https://github.com/bazelbuild/rules_jvm_external/archive/refs/tags/4.4.2.zip" 1105 | ], 1106 | "integrity": "sha256-c1YC9QgT6y6pPKP15DsZWb2AshO4NqB6YqKddXZwt3s=", 1107 | "strip_prefix": "rules_jvm_external-4.4.2", 1108 | "remote_patches": {}, 1109 | "remote_patch_strip": 0 1110 | } 1111 | } 1112 | }, 1113 | "googletest@1.11.0": { 1114 | "name": "googletest", 1115 | "version": "1.11.0", 1116 | "key": "googletest@1.11.0", 1117 | "repoName": "googletest", 1118 | "executionPlatformsToRegister": [], 1119 | "toolchainsToRegister": [], 1120 | "extensionUsages": [], 1121 | "deps": { 1122 | "com_google_absl": "abseil-cpp@20211102.0", 1123 | "platforms": "platforms@0.0.7", 1124 | "rules_cc": "rules_cc@0.0.9", 1125 | "bazel_tools": "bazel_tools@_", 1126 | "local_config_platform": "local_config_platform@_" 1127 | }, 1128 | "repoSpec": { 1129 | "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl", 1130 | "ruleClassName": "http_archive", 1131 | "attributes": { 1132 | "urls": [ 1133 | "https://github.com/google/googletest/archive/refs/tags/release-1.11.0.tar.gz" 1134 | ], 1135 | "integrity": "sha256-tIcL8SH/d5W6INILzdhie44Ijy0dqymaAxwQNO3ck9U=", 1136 | "strip_prefix": "googletest-release-1.11.0", 1137 | "remote_patches": { 1138 | "https://bcr.bazel.build/modules/googletest/1.11.0/patches/module_dot_bazel.patch": "sha256-HuahEdI/n8KCI071sN3CEziX+7qP/Ec77IWayYunLP0=" 1139 | }, 1140 | "remote_patch_strip": 0 1141 | } 1142 | } 1143 | }, 1144 | "stardoc@0.5.1": { 1145 | "name": "stardoc", 1146 | "version": "0.5.1", 1147 | "key": "stardoc@0.5.1", 1148 | "repoName": "stardoc", 1149 | "executionPlatformsToRegister": [], 1150 | "toolchainsToRegister": [], 1151 | "extensionUsages": [], 1152 | "deps": { 1153 | "bazel_skylib": "bazel_skylib@1.7.1", 1154 | "rules_java": "rules_java@7.4.0", 1155 | "bazel_tools": "bazel_tools@_", 1156 | "local_config_platform": "local_config_platform@_" 1157 | }, 1158 | "repoSpec": { 1159 | "bzlFile": "@@bazel_tools//tools/build_defs/repo:http.bzl", 1160 | "ruleClassName": "http_archive", 1161 | "attributes": { 1162 | "urls": [ 1163 | "https://github.com/bazelbuild/stardoc/releases/download/0.5.1/stardoc-0.5.1.tar.gz" 1164 | ], 1165 | "integrity": "sha256-qoFNrgrEALurLoiB+ZFcb0fElmS/CHxAmhX5BDjSwj4=", 1166 | "strip_prefix": "", 1167 | "remote_patches": { 1168 | "https://bcr.bazel.build/modules/stardoc/0.5.1/patches/module_dot_bazel.patch": "sha256-UAULCuTpJE7SG0YrR9XLjMfxMRmbP+za3uW9ONZ5rjI=" 1169 | }, 1170 | "remote_patch_strip": 0 1171 | } 1172 | } 1173 | } 1174 | }, 1175 | "moduleExtensions": {} 1176 | } 1177 | --------------------------------------------------------------------------------