Skip to content

Commit

Permalink
Merge pull request #1 from dfinity-lab/ali-merge-upstream-0.8.1
Browse files Browse the repository at this point in the history
Ali merge upstream 0.8.1
  • Loading branch information
Ali-Piccioni authored Aug 4, 2022
2 parents 0c6e451 + b1ac8fd commit 496ce1a
Show file tree
Hide file tree
Showing 960 changed files with 49,024 additions and 39,265 deletions.
16 changes: 4 additions & 12 deletions .bazelci/presubmit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ tasks:
ubuntu2004:
build_targets: *default_linux_targets
test_targets: *default_linux_targets
coverage_targets: *default_linux_targets
rbe_ubuntu1604:
shell_commands:
- sed -i 's/^# load("@bazelci_rules/load("@bazelci_rules/' WORKSPACE.bazel
Expand All @@ -39,6 +40,7 @@ tasks:
macos:
build_targets: *default_macos_targets
test_targets: *default_macos_targets
coverage_targets: *default_macos_targets
build_flags: *aspects_flags
windows:
build_flags:
Expand Down Expand Up @@ -149,13 +151,13 @@ tasks:
bazel: "rolling"
ubuntu1804:
name: "Min Bazel Version"
bazel: "4.0.0"
bazel: "5.0.0"
platform: ubuntu1804
build_targets: *default_linux_targets
test_targets: *default_linux_targets
ubuntu1804_with_aspects:
name: "Min Bazel Version With Aspects"
bazel: "4.0.0"
bazel: "5.0.0"
platform: ubuntu1804
build_targets: *default_linux_targets
test_targets: *default_linux_targets
Expand Down Expand Up @@ -329,18 +331,8 @@ tasks:
build_flags: *aspects_flags
build_targets:
- "//..."
# TODO: Temporarily disable this windows build as it recently started
# failing. This is likely an issue with the windows workers in CI.
- "-//vendor_local_pkgs/..."
- "-//vendor_remote_pkgs/..."
- "-//no_cargo_manifests/..."
test_targets:
- "//..."
# TODO: Temporarily disable this windows build as it recently started
# failing. This is likely an issue with the windows workers in CI.
- "-//vendor_local_pkgs/..."
- "-//vendor_remote_pkgs/..."
- "-//no_cargo_manifests/..."
buildifier:
version: latest
warnings: "all"
32 changes: 31 additions & 1 deletion BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
load("@bazel_skylib//:bzl_library.bzl", "bzl_library")
load("//rust:defs.bzl", "capture_clippy_output", "clippy_flags", "error_format", "extra_exec_rustc_flags", "extra_rustc_flags")
load("//rust:defs.bzl", "capture_clippy_output", "clippy_flags", "error_format", "extra_exec_rustc_flag", "extra_exec_rustc_flags", "extra_rustc_flag", "extra_rustc_flags", "is_proc_macro_dep", "is_proc_macro_dep_enabled")

exports_files(["LICENSE"])

Expand Down Expand Up @@ -45,6 +45,24 @@ clippy_flags(
visibility = ["//visibility:public"],
)

# This setting may be used to identify dependencies of proc-macro-s.
# This feature is only enabled if `is_proc_macro_dep_enabled` is true.
# Its value controls the BAZEL_RULES_RUST_IS_PROC_MACRO_DEP environment variable
# made available to the rustc invocation.
is_proc_macro_dep(
name = "is_proc_macro_dep",
build_setting_default = False,
visibility = ["//visibility:public"],
)

# This setting enables the feature to identify dependencies of proc-macro-s,
# see `is_proc_macro_dep`.
is_proc_macro_dep_enabled(
name = "is_proc_macro_dep_enabled",
build_setting_default = False,
visibility = ["//visibility:public"],
)

# This setting may be used to pass extra options to rustc from the command line
# in non-exec configuration.
# It applies across all targets whereas the rustc_flags option on targets applies only
Expand All @@ -55,6 +73,12 @@ extra_rustc_flags(
visibility = ["//visibility:public"],
)

extra_rustc_flag(
name = "extra_rustc_flag",
build_setting_default = "",
visibility = ["//visibility:public"],
)

# This setting may be used to pass extra options to rustc from the command line
# in exec configuration.
# It applies across all targets whereas the rustc_flags option on targets applies only
Expand All @@ -65,6 +89,12 @@ extra_exec_rustc_flags(
visibility = ["//visibility:public"],
)

extra_exec_rustc_flag(
name = "extra_exec_rustc_flag",
build_setting_default = "",
visibility = ["//visibility:public"],
)

# This setting is used by the clippy rules. See https://bazelbuild.github.io/rules_rust/rust_clippy.html
label_flag(
name = "clippy.toml",
Expand Down
6 changes: 3 additions & 3 deletions WORKSPACE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ load("@rules_rust//rust:repositories.bzl", "rules_rust_dependencies", "rust_regi

rules_rust_dependencies()

rust_register_toolchains(include_rustc_srcs = True)
rust_register_toolchains()

load("@rules_rust//crate_universe:repositories.bzl", "crate_universe_dependencies")

Expand All @@ -24,9 +24,9 @@ rust_bindgen_dependencies()

rust_bindgen_register_toolchains()

load("@rules_rust//tools/rust_analyzer:deps.bzl", "rust_analyzer_deps")
load("@rules_rust//tools/rust_analyzer:deps.bzl", "rust_analyzer_dependencies")

rust_analyzer_deps()
rust_analyzer_dependencies()

load("@rules_rust//util/import:deps.bzl", "import_deps")

Expand Down
64 changes: 64 additions & 0 deletions bindgen/3rdparty/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
load("@bazel_skylib//:bzl_library.bzl", "bzl_library")
load("//crate_universe:defs.bzl", "crate", "crates_vendor")

crates_vendor(
name = "crates_vendor",
annotations = {
"bindgen": [crate.annotation(
gen_build_script = True,
)],
"clang-sys": [crate.annotation(
gen_build_script = True,
)],
"indexmap": [crate.annotation(
gen_build_script = True,
)],
"libloading": [crate.annotation(
gen_build_script = True,
)],
"log": [crate.annotation(
rustc_flags = ["--cfg=atomic_cas"],
)],
},
cargo_lockfile = "Cargo.Bazel.lock",
generate_build_scripts = False,
mode = "remote",
packages = {
"bindgen": crate.spec(
version = "0.60.1",
),
"libloading": crate.spec(
version = "0.7.3",
),
},
repository_name = "rules_rust_bindgen",
tags = ["manual"],
)

alias(
name = "bindgen",
actual = "//bindgen/3rdparty/crates:bindgen__bindgen",
tags = ["manual"],
visibility = ["//visibility:public"],
)

bzl_library(
name = "bzl_lib",
srcs = glob(["**/*.bzl"]) + [
"//bindgen/3rdparty/crates:defs.bzl",
"//bindgen/3rdparty/crates:crates.bzl",
],
visibility = ["//bindgen:__pkg__"],
)

filegroup(
name = "distro",
srcs = glob([
"*.bzl",
"*.bazel",
]) + [
"//bindgen/3rdparty/crates:srcs",
"Cargo.Bazel.lock",
],
visibility = ["//bindgen:__pkg__"],
)
Loading

0 comments on commit 496ce1a

Please sign in to comment.