Skip to content

Commit

Permalink
Use Bazel Modules exclusively.
Browse files Browse the repository at this point in the history
  • Loading branch information
asoffer committed Jan 22, 2024
1 parent 5f15fa3 commit cc87a95
Show file tree
Hide file tree
Showing 11 changed files with 65 additions and 70 deletions.
4 changes: 3 additions & 1 deletion .bazelrc
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
common \
--color=yes \
--experimental_enable_bzlmod
--experimental_enable_bzlmod \
--registry=https://github.com/raw/asoffer/bazel-registry/main \
--registry=https://bcr.bazel.build
build \
--crosstool_top=//bazel:cc \
--host_crosstool_top=@bazel_tools//tools/cpp:toolchain \
Expand Down
1 change: 1 addition & 0 deletions MODULE.bazel
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
bazel_dep(name = "abseil-cpp", repo_name = "com_google_absl", version = "20230125.1")
bazel_dep(name = "bazel_skylib", repo_name = "bazel_skylib", version = "1.4.2")
bazel_dep(name = "nth-cc", repo_name = "nth_cc", version = "20240121.00")
8 changes: 0 additions & 8 deletions WORKSPACE.bazel
Original file line number Diff line number Diff line change
@@ -1,9 +1 @@
workspace(name = "asoffer_jasmin")
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

http_archive(
name = "asoffer_nth",
urls = ["https://github.com/asoffer/nth/archive/5235b77f7596c80f15a570366b737a5ec3f650b2.zip"],
strip_prefix = "nth-5235b77f7596c80f15a570366b737a5ec3f650b2",
sha256 = "020762632e7767ce7c83c6840357f94cef4640c1e32abbbbd103db77bc7b47e0",
)
16 changes: 8 additions & 8 deletions examples/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ cc_binary(
"//jasmin/core:function",
"//jasmin/core:program",
"//jasmin/instructions:common",
"@asoffer_nth//nth/container:stack",
"@nth_cc//nth/container:stack",
],
)

Expand All @@ -21,8 +21,8 @@ cc_binary(
"//jasmin/instructions:arithmetic",
"//jasmin/instructions:compare",
"//jasmin/instructions:common",
"@asoffer_nth//nth/container:interval",
"@asoffer_nth//nth/container:stack",
"@nth_cc//nth/container:interval",
"@nth_cc//nth/container:stack",
],
)

Expand All @@ -31,7 +31,7 @@ cc_binary(
srcs = ["function_state.cc"],
deps = [
"//jasmin/instructions:common",
"@asoffer_nth//nth/container:stack",
"@nth_cc//nth/container:stack",
],
)

Expand All @@ -42,8 +42,8 @@ cc_binary(
"//jasmin/core:instruction_index",
"//jasmin/instructions:compare",
"//jasmin/instructions:common",
"@asoffer_nth//nth/container:interval",
"@asoffer_nth//nth/container:stack",
"@nth_cc//nth/container:interval",
"@nth_cc//nth/container:stack",
],
)

Expand All @@ -59,8 +59,8 @@ cc_binary(
"//jasmin/serialize:serialize",
"//jasmin/serialize:string_reader",
"//jasmin/serialize:string_writer",
"@asoffer_nth//nth/debug",
"@asoffer_nth//nth/debug/log:stderr_log_sink",
"@nth_cc//nth/debug",
"@nth_cc//nth/debug/log:stderr_log_sink",
"@com_google_absl//absl/container:flat_hash_set",
],
)
2 changes: 1 addition & 1 deletion jasmin/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ cc_library(
"//jasmin/core:function",
"//jasmin/core:instruction",
"//jasmin/core:value",
"@asoffer_nth//nth/container:stack",
"@nth_cc//nth/container:stack",
],
)
2 changes: 1 addition & 1 deletion jasmin/configuration/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ cc_library(
name = "debug",
hdrs = ["debug.h"],
deps = [
"@asoffer_nth//nth/meta:type",
"@nth_cc//nth/meta:type",
],
)

Expand Down
38 changes: 19 additions & 19 deletions jasmin/core/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ cc_library(
":instruction",
":program",
":value",
"@asoffer_nth//nth/base:attributes",
"@asoffer_nth//nth/debug",
"@com_google_absl//absl/container:node_hash_map",
"@nth_cc//nth/base:attributes",
"@nth_cc//nth/debug",
],
)

Expand All @@ -25,7 +25,7 @@ cc_library(
":value",
"//jasmin/core/internal:function_base",
"//jasmin/core/internal:instruction_traits",
"@asoffer_nth//nth/container:interval",
"@nth_cc//nth/container:interval",
],
)

Expand All @@ -34,7 +34,7 @@ cc_test(
srcs = ["function_test.cc"],
deps = [
":function",
"@asoffer_nth//nth/test:main",
"@nth_cc//nth/test:main",
],
)

Expand All @@ -47,12 +47,12 @@ cc_library(
"//jasmin/core/internal:function_base",
"//jasmin/core/internal:function_state",
"//jasmin/core/internal:instruction_traits",
"@asoffer_nth//nth/base:attributes",
"@asoffer_nth//nth/base:pack",
"@asoffer_nth//nth/container:stack",
"@asoffer_nth//nth/debug",
"@asoffer_nth//nth/meta:sequence",
"@asoffer_nth//nth/meta:type",
"@nth_cc//nth/base:attributes",
"@nth_cc//nth/base:pack",
"@nth_cc//nth/container:stack",
"@nth_cc//nth/debug",
"@nth_cc//nth/meta:sequence",
"@nth_cc//nth/meta:type",
],
)

Expand All @@ -61,7 +61,7 @@ cc_test(
srcs = ["instruction_test.cc"],
deps = [
":instruction",
"@asoffer_nth//nth/test:main",
"@nth_cc//nth/test:main",
],
)

Expand All @@ -81,9 +81,9 @@ cc_library(
":instruction",
":value",
"//jasmin/core/internal:instruction_traits",
"@asoffer_nth//nth/debug",
"@asoffer_nth//nth/utility:no_destructor",
"@com_google_absl//absl/container:flat_hash_map",
"@nth_cc//nth/debug",
"@nth_cc//nth/utility:no_destructor",
],
)

Expand All @@ -93,7 +93,7 @@ cc_test(
visibility = ["//visibility:public"],
deps = [
":metadata",
"@asoffer_nth//nth/test:main",
"@nth_cc//nth/test:main",
],
)

Expand All @@ -105,8 +105,8 @@ cc_library(
":function",
":instruction",
":value",
"@asoffer_nth//nth/debug",
"@asoffer_nth//nth/utility:iterator_range",
"@nth_cc//nth/debug",
"@nth_cc//nth/utility:iterator_range",
],
)

Expand All @@ -116,8 +116,8 @@ cc_library(
visibility = ["//visibility:public"],
deps = [
"//jasmin/configuration:impl",
"@asoffer_nth//nth/debug",
"@asoffer_nth//nth/meta:type",
"@nth_cc//nth/debug",
"@nth_cc//nth/meta:type",
],
)

Expand All @@ -126,6 +126,6 @@ cc_test(
srcs = ["value_test.cc"],
deps = [
":value",
"@asoffer_nth//nth/test:main",
"@nth_cc//nth/test:main",
],
)
14 changes: 7 additions & 7 deletions jasmin/core/internal/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ cc_library(
":function_state",
"//jasmin/core:instruction_index",
"//jasmin/core:value",
"@asoffer_nth//nth/debug",
"@asoffer_nth//nth/container:interval",
"@asoffer_nth//nth/container:stack",
"@nth_cc//nth/debug",
"@nth_cc//nth/container:interval",
"@nth_cc//nth/container:stack",
],
)

Expand All @@ -27,7 +27,7 @@ cc_test(
srcs = ["function_base_test.cc"],
deps = [
":function_base",
"@asoffer_nth//nth/test:main",
"@nth_cc//nth/test:main",
],
)

Expand All @@ -43,8 +43,8 @@ cc_library(
deps = [
":function_state",
"//jasmin/core:value",
"@asoffer_nth//nth/meta:concepts",
"@asoffer_nth//nth/meta:type",
"@nth_cc//nth/meta:concepts",
"@nth_cc//nth/meta:type",
],
)

Expand All @@ -54,6 +54,6 @@ cc_test(
deps = [
":instruction_traits",
"//jasmin/core:instruction",
"@asoffer_nth//nth/test:main",
"@nth_cc//nth/test:main",
],
)
20 changes: 10 additions & 10 deletions jasmin/instructions/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ cc_test(
deps = [
":bool",
"//jasmin:testing",
"@asoffer_nth//nth/container:stack",
"@asoffer_nth//nth/test:main",
"@nth_cc//nth/container:stack",
"@nth_cc//nth/test:main",
]
)

Expand All @@ -35,8 +35,8 @@ cc_test(
deps = [
":common",
"//jasmin:testing",
"@asoffer_nth//nth/container:stack",
"@asoffer_nth//nth/test:main",
"@nth_cc//nth/container:stack",
"@nth_cc//nth/test:main",
]
)

Expand All @@ -54,8 +54,8 @@ cc_test(
deps = [
":arithmetic",
"//jasmin:testing",
"@asoffer_nth//nth/container:stack",
"@asoffer_nth//nth/test:main",
"@nth_cc//nth/container:stack",
"@nth_cc//nth/test:main",
]
)

Expand All @@ -73,8 +73,8 @@ cc_test(
deps = [
":compare",
"//jasmin:testing",
"@asoffer_nth//nth/container:stack",
"@asoffer_nth//nth/test:main",
"@nth_cc//nth/container:stack",
"@nth_cc//nth/test:main",
]
)

Expand All @@ -84,7 +84,7 @@ cc_library(
deps = [
"//jasmin/core:instruction",
"//jasmin/core:value",
"@asoffer_nth//nth/debug",
"@nth_cc//nth/debug",
],
)

Expand All @@ -94,6 +94,6 @@ cc_test(
deps = [
":stack",
"//jasmin:testing",
"@asoffer_nth//nth/test:main",
"@nth_cc//nth/test:main",
]
)
16 changes: 8 additions & 8 deletions jasmin/serialize/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ cc_library(
":reader",
"//jasmin/core:instruction",
"//jasmin/core:metadata",
"@asoffer_nth//nth/meta:type",
"@asoffer_nth//nth/meta:sequence",
"@nth_cc//nth/meta:type",
"@nth_cc//nth/meta:sequence",
],
)

Expand All @@ -29,7 +29,7 @@ cc_test(
":reader",
":writer",
"//jasmin/instructions:common",
"@asoffer_nth//nth/test:main",
"@nth_cc//nth/test:main",
],
)

Expand All @@ -43,8 +43,8 @@ cc_library(
"//jasmin/core:instruction",
"//jasmin/core:metadata",
"//jasmin/core:program",
"@asoffer_nth//nth/meta:type",
"@asoffer_nth//nth/meta:sequence",
"@nth_cc//nth/meta:type",
"@nth_cc//nth/meta:sequence",
],
)

Expand All @@ -65,7 +65,7 @@ cc_test(
srcs = ["string_reader_test.cc"],
deps = [
":string_reader",
"@asoffer_nth//nth/test:main",
"@nth_cc//nth/test:main",
],
)

Expand All @@ -86,7 +86,7 @@ cc_test(
srcs = ["string_writer_test.cc"],
deps = [
":string_writer",
"@asoffer_nth//nth/test:main",
"@nth_cc//nth/test:main",
],
)

Expand All @@ -102,6 +102,6 @@ cc_test(
deps = [
":string_writer",
":writer",
"@asoffer_nth//nth/test:main",
"@nth_cc//nth/test:main",
],
)
14 changes: 7 additions & 7 deletions jasmin/ssa/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ cc_library(
visibility = ["//visibility:public"],
deps = [
":ssa",
"@asoffer_nth//nth/debug",
"@asoffer_nth//nth/container:disjoint_set",
"@nth_cc//nth/debug",
"@nth_cc//nth/container:disjoint_set",
"@com_google_absl//absl/container:flat_hash_map",
],
)
Expand All @@ -22,9 +22,9 @@ cc_library(
"//jasmin/core:function",
"//jasmin/core:instruction",
"//jasmin/core:metadata",
"@asoffer_nth//nth/debug",
"@asoffer_nth//nth/container:disjoint_set",
"@asoffer_nth//nth/strings:interpolate",
"@nth_cc//nth/debug",
"@nth_cc//nth/container:disjoint_set",
"@nth_cc//nth/strings:interpolate",
"@com_google_absl//absl/synchronization",
],
)
Expand All @@ -39,8 +39,8 @@ cc_binary(
"//jasmin/instructions:arithmetic",
"//jasmin/instructions:compare",
"//jasmin/instructions:common",
"@asoffer_nth//nth/debug",
"@asoffer_nth//nth/debug/log:stderr_log_sink",
"@nth_cc//nth/debug",
"@nth_cc//nth/debug/log:stderr_log_sink",
"@com_google_absl//absl/container:flat_hash_set",
],
)

0 comments on commit cc87a95

Please sign in to comment.