mirror of
https://github.com/digital-asset/daml.git
synced 2024-09-19 08:48:21 +03:00
Use nix-provided gRPC on Unix-like OSs (#11031)
* Use nix-provided gRPC on Unix-like OSs This fixes the da-ghcid command on macOS and Linux. Unfortunately on macos at least on CI it still seems to segfault when trying to run damlc in ghci. However, at least typechecking works so this is clearly progress. changelog_begin changelog_end
This commit is contained in:
parent
578fe7f10b
commit
0de7b2eae5
104
WORKSPACE
104
WORKSPACE
@ -145,9 +145,6 @@ nixpkgs_package(
|
||||
attribute_path = "curl",
|
||||
nix_file = "//nix:bazel.nix",
|
||||
nix_file_deps = common_nix_file_deps,
|
||||
# Remove once we upgrade to Bazel >=3.0. Until then `nix-build` output
|
||||
# confuses the JAR query in `daml-sdk-head`.
|
||||
quiet = True,
|
||||
repositories = dev_env_nix_repos,
|
||||
)
|
||||
|
||||
@ -167,9 +164,6 @@ nixpkgs_package(
|
||||
fail_not_supported = False,
|
||||
nix_file = "//nix:bazel.nix",
|
||||
nix_file_deps = common_nix_file_deps,
|
||||
# Remove once we upgrade to Bazel >=3.0. Until then `nix-build` output
|
||||
# confuses the JAR query in `daml-sdk-head`.
|
||||
quiet = True,
|
||||
repositories = dev_env_nix_repos,
|
||||
)
|
||||
|
||||
@ -190,9 +184,6 @@ nixpkgs_package(
|
||||
attribute_path = "patchelf",
|
||||
nix_file = "//nix:bazel.nix",
|
||||
nix_file_deps = common_nix_file_deps,
|
||||
# Remove once we upgrade to Bazel >=3.0. Until then `nix-build` output
|
||||
# confuses the JAR query in `daml-sdk-head`.
|
||||
quiet = True,
|
||||
repositories = dev_env_nix_repos,
|
||||
)
|
||||
|
||||
@ -202,9 +193,6 @@ nixpkgs_package(
|
||||
attribute_path = "netcat-gnu",
|
||||
nix_file = "//nix:bazel.nix",
|
||||
nix_file_deps = common_nix_file_deps,
|
||||
# Remove once we upgrade to Bazel >=3.0. Until then `nix-build` output
|
||||
# confuses the JAR query in `daml-sdk-head`.
|
||||
quiet = True,
|
||||
repositories = dev_env_nix_repos,
|
||||
)
|
||||
|
||||
@ -225,9 +213,6 @@ nixpkgs_package(
|
||||
fail_not_supported = False,
|
||||
nix_file = "//nix:bazel.nix",
|
||||
nix_file_deps = common_nix_file_deps,
|
||||
# Remove once we upgrade to Bazel >=3.0. Until then `nix-build` output
|
||||
# confuses the JAR query in `daml-sdk-head`.
|
||||
quiet = True,
|
||||
repositories = dev_env_nix_repos,
|
||||
)
|
||||
|
||||
@ -292,9 +277,6 @@ nixpkgs_package(
|
||||
fail_not_supported = False,
|
||||
nix_file = "//nix:bazel.nix",
|
||||
nix_file_deps = common_nix_file_deps,
|
||||
# Remove once we upgrade to Bazel >=3.0. Until then `nix-build` output
|
||||
# confuses the JAR query in `daml-sdk-head`.
|
||||
quiet = True,
|
||||
repositories = dev_env_nix_repos,
|
||||
)
|
||||
|
||||
@ -330,9 +312,6 @@ nixpkgs_package(
|
||||
attribute_path = "gawk",
|
||||
nix_file = "//nix:bazel.nix",
|
||||
nix_file_deps = common_nix_file_deps,
|
||||
# Remove once we upgrade to Bazel >=3.0. Until then `nix-build` output
|
||||
# confuses the JAR query in `daml-sdk-head`.
|
||||
quiet = True,
|
||||
repositories = dev_env_nix_repos,
|
||||
)
|
||||
|
||||
@ -341,9 +320,6 @@ nixpkgs_package(
|
||||
attribute_path = "coreutils",
|
||||
nix_file = "//nix:bazel.nix",
|
||||
nix_file_deps = common_nix_file_deps,
|
||||
# Remove once we upgrade to Bazel >=3.0. Until then `nix-build` output
|
||||
# confuses the JAR query in `daml-sdk-head`.
|
||||
quiet = True,
|
||||
repositories = dev_env_nix_repos,
|
||||
)
|
||||
|
||||
@ -352,9 +328,6 @@ nixpkgs_package(
|
||||
attribute_path = "grpcurl",
|
||||
nix_file = "//nix:bazel.nix",
|
||||
nix_file_deps = common_nix_file_deps,
|
||||
# Remove once we upgrade to Bazel >=3.0. Until then `nix-build` output
|
||||
# confuses the JAR query in `daml-sdk-head`.
|
||||
quiet = True,
|
||||
repositories = dev_env_nix_repos,
|
||||
)
|
||||
|
||||
@ -363,9 +336,6 @@ nixpkgs_package(
|
||||
attribute_path = "hlint",
|
||||
nix_file = "//nix:bazel.nix",
|
||||
nix_file_deps = common_nix_file_deps,
|
||||
# Remove once we upgrade to Bazel >=3.0. Until then `nix-build` output
|
||||
# confuses the JAR query in `daml-sdk-head`.
|
||||
quiet = True,
|
||||
repositories = dev_env_nix_repos,
|
||||
)
|
||||
|
||||
@ -375,9 +345,6 @@ nixpkgs_package(
|
||||
fail_not_supported = False,
|
||||
nix_file = "//nix:bazel.nix",
|
||||
nix_file_deps = common_nix_file_deps,
|
||||
# Remove once we upgrade to Bazel >=3.0. Until then `nix-build` output
|
||||
# confuses the JAR query in `daml-sdk-head`.
|
||||
quiet = True,
|
||||
repositories = dev_env_nix_repos,
|
||||
)
|
||||
|
||||
@ -386,9 +353,6 @@ nixpkgs_package(
|
||||
attribute_path = "jekyll",
|
||||
nix_file = "//nix:bazel.nix",
|
||||
nix_file_deps = common_nix_file_deps,
|
||||
# Remove once we upgrade to Bazel >=3.0. Until then `nix-build` output
|
||||
# confuses the JAR query in `daml-sdk-head`.
|
||||
quiet = True,
|
||||
repositories = dev_env_nix_repos,
|
||||
)
|
||||
|
||||
@ -413,9 +377,6 @@ filegroup(
|
||||
""",
|
||||
nix_file = "//nix:bazel.nix",
|
||||
nix_file_deps = common_nix_file_deps,
|
||||
# Remove once we upgrade to Bazel >=3.0. Until then `nix-build` output
|
||||
# confuses the JAR query in `daml-sdk-head`.
|
||||
quiet = True,
|
||||
repositories = dev_env_nix_repos,
|
||||
) if is_linux else None
|
||||
|
||||
@ -429,9 +390,6 @@ exports_files(glob(["lib/**/*"]))
|
||||
""",
|
||||
nix_file = "//nix:bazel.nix",
|
||||
nix_file_deps = common_nix_file_deps,
|
||||
# Remove once we upgrade to Bazel >=3.0. Until then `nix-build` output
|
||||
# confuses the JAR query in `daml-sdk-head`.
|
||||
quiet = True,
|
||||
repositories = dev_env_nix_repos,
|
||||
) if not is_windows else None
|
||||
|
||||
@ -492,9 +450,6 @@ nixpkgs_package(
|
||||
fail_not_supported = False,
|
||||
nix_file = "//nix:bazel.nix",
|
||||
nix_file_deps = common_nix_file_deps,
|
||||
# Remove once we upgrade to Bazel >=3.0. Until then `nix-build` output
|
||||
# confuses the JAR query in `daml-sdk-head`.
|
||||
quiet = True,
|
||||
repositories = dev_env_nix_repos,
|
||||
)
|
||||
|
||||
@ -516,9 +471,6 @@ nixpkgs_package(
|
||||
fail_not_supported = False,
|
||||
nix_file = "//nix:bazel.nix",
|
||||
nix_file_deps = common_nix_file_deps,
|
||||
# Remove once we upgrade to Bazel >=3.0. Until then `nix-build` output
|
||||
# confuses the JAR query in `daml-sdk-head`.
|
||||
quiet = True,
|
||||
repositories = dev_env_nix_repos,
|
||||
)
|
||||
|
||||
@ -530,9 +482,6 @@ nixpkgs_package(
|
||||
fail_not_supported = False,
|
||||
nix_file = "//nix:bazel.nix",
|
||||
nix_file_deps = common_nix_file_deps,
|
||||
# Remove once we upgrade to Bazel >=3.0. Until then `nix-build` output
|
||||
# confuses the JAR query in `daml-sdk-head`.
|
||||
quiet = True,
|
||||
repositories = dev_env_nix_repos,
|
||||
)
|
||||
|
||||
@ -542,9 +491,6 @@ nixpkgs_package(
|
||||
attribute_path = "sass",
|
||||
nix_file = "//nix:bazel.nix",
|
||||
nix_file_deps = common_nix_file_deps,
|
||||
# Remove once we upgrade to Bazel >=3.0. Until then `nix-build` output
|
||||
# confuses the JAR query in `daml-sdk-head`.
|
||||
quiet = True,
|
||||
repositories = dev_env_nix_repos,
|
||||
)
|
||||
|
||||
@ -554,9 +500,6 @@ nixpkgs_package(
|
||||
attribute_path = "texlive",
|
||||
nix_file = "//nix:bazel.nix",
|
||||
nix_file_deps = common_nix_file_deps,
|
||||
# Remove once we upgrade to Bazel >=3.0. Until then `nix-build` output
|
||||
# confuses the JAR query in `daml-sdk-head`.
|
||||
quiet = True,
|
||||
repositories = dev_env_nix_repos,
|
||||
)
|
||||
|
||||
@ -566,9 +509,6 @@ nixpkgs_package(
|
||||
attribute_path = "sphinx183-exts",
|
||||
nix_file = "//nix:bazel.nix",
|
||||
nix_file_deps = common_nix_file_deps,
|
||||
# Remove once we upgrade to Bazel >=3.0. Until then `nix-build` output
|
||||
# confuses the JAR query in `daml-sdk-head`.
|
||||
quiet = True,
|
||||
repositories = dev_env_nix_repos,
|
||||
)
|
||||
|
||||
@ -578,9 +518,6 @@ nixpkgs_package(
|
||||
attribute_path = "imagemagick",
|
||||
nix_file = "//nix:bazel.nix",
|
||||
nix_file_deps = common_nix_file_deps,
|
||||
# Remove once we upgrade to Bazel >=3.0. Until then `nix-build` output
|
||||
# confuses the JAR query in `daml-sdk-head`.
|
||||
quiet = True,
|
||||
repositories = dev_env_nix_repos,
|
||||
)
|
||||
|
||||
@ -591,9 +528,6 @@ nixpkgs_package(
|
||||
fail_not_supported = False,
|
||||
nix_file = "//nix:bazel.nix",
|
||||
nix_file_deps = common_nix_file_deps,
|
||||
# Remove once we upgrade to Bazel >=3.0. Until then `nix-build` output
|
||||
# confuses the JAR query in `daml-sdk-head`.
|
||||
quiet = True,
|
||||
repositories = dev_env_nix_repos,
|
||||
)
|
||||
|
||||
@ -604,9 +538,6 @@ nixpkgs_package(
|
||||
fail_not_supported = False,
|
||||
nix_file = "//nix:bazel.nix",
|
||||
nix_file_deps = common_nix_file_deps,
|
||||
# Remove once we upgrade to Bazel >=3.0. Until then `nix-build` output
|
||||
# confuses the JAR query in `daml-sdk-head`.
|
||||
quiet = True,
|
||||
repositories = dev_env_nix_repos,
|
||||
)
|
||||
|
||||
@ -633,9 +564,6 @@ nixpkgs_package(
|
||||
attribute_path = "scala_{}".format(scala_major_version_suffix),
|
||||
nix_file = "//nix:bazel.nix",
|
||||
nix_file_deps = common_nix_file_deps,
|
||||
# Remove once we upgrade to Bazel >=3.0. Until then `nix-build` output
|
||||
# confuses the JAR query in `daml-sdk-head`.
|
||||
quiet = True,
|
||||
repositories = dev_env_nix_repos,
|
||||
)
|
||||
|
||||
@ -685,9 +613,6 @@ nixpkgs_package(
|
||||
""",
|
||||
nix_file = "//nix:bazel.nix",
|
||||
nix_file_deps = common_nix_file_deps,
|
||||
# Remove once we upgrade to Bazel >=3.0. Until then `nix-build` output
|
||||
# confuses the JAR query in `daml-sdk-head`.
|
||||
quiet = True,
|
||||
repositories = dev_env_nix_repos,
|
||||
)
|
||||
|
||||
@ -894,15 +819,35 @@ load("@com_github_bazelbuild_buildtools//buildifier:deps.bzl", "buildifier_depen
|
||||
|
||||
buildifier_dependencies()
|
||||
|
||||
nixpkgs_package(
|
||||
name = "grpc_nix",
|
||||
attribute_path = "grpc",
|
||||
build_file_content = """
|
||||
load("@os_info//:os_info.bzl", "is_linux")
|
||||
cc_library(
|
||||
name = "grpc_lib",
|
||||
srcs = [":lib/libgrpc.so", ":lib/libgrpc.so.18", ":lib/libgrpc.so.18.0.0", ":lib/libgpr.so", ":lib/libgpr.so.18", ":lib/libgpr.so.18.0.0"] if is_linux else [":lib/libgrpc.dylib", ":lib/libgpr.dylib"],
|
||||
visibility = ["//visibility:public"],
|
||||
hdrs = [":include"],
|
||||
includes = ["include"],
|
||||
)
|
||||
filegroup(
|
||||
name = "grpc_file",
|
||||
srcs = glob(["lib/*"]),
|
||||
visibility = ["//visibility:public"],
|
||||
)
|
||||
""",
|
||||
nix_file = "//nix:bazel.nix",
|
||||
nix_file_deps = common_nix_file_deps,
|
||||
repositories = dev_env_nix_repos,
|
||||
)
|
||||
|
||||
nixpkgs_package(
|
||||
name = "postgresql_nix",
|
||||
attribute_path = "postgresql_9_6",
|
||||
fail_not_supported = False,
|
||||
nix_file = "//nix:bazel.nix",
|
||||
nix_file_deps = common_nix_file_deps,
|
||||
# Remove once we upgrade to Bazel >=3.0. Until then `nix-build` output
|
||||
# confuses the JAR query in `daml-sdk-head`.
|
||||
quiet = True,
|
||||
repositories = dev_env_nix_repos,
|
||||
)
|
||||
|
||||
@ -912,9 +857,6 @@ nixpkgs_package(
|
||||
fail_not_supported = False,
|
||||
nix_file = "//nix:bazel.nix",
|
||||
nix_file_deps = common_nix_file_deps,
|
||||
# Remove once we upgrade to Bazel >=3.0. Until then `nix-build` output
|
||||
# confuses the JAR query in `daml-sdk-head`.
|
||||
quiet = True,
|
||||
repositories = dev_env_nix_repos,
|
||||
) if not is_windows else None
|
||||
|
||||
|
@ -13,7 +13,7 @@
|
||||
|
||||
load("@bazel_skylib//lib:dicts.bzl", "dicts")
|
||||
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
|
||||
load("@os_info//:os_info.bzl", "is_windows")
|
||||
load("@os_info//:os_info.bzl", "is_linux", "is_windows")
|
||||
load("@dadew//:dadew.bzl", "dadew_tool_home")
|
||||
load("@rules_haskell//haskell:cabal.bzl", "stack_snapshot")
|
||||
|
||||
@ -120,6 +120,9 @@ haskell_library(
|
||||
urls = ["https://github.com/digital-asset/daml-ghcide/archive/%s.tar.gz" % GHCIDE_REV],
|
||||
)
|
||||
|
||||
cbit_dep = ":fat_cbits" if is_windows else ":needed-cbits-clib" if is_linux else ":cbits"
|
||||
grpc_dep = "@com_github_grpc_grpc//:grpc" if is_windows else "@grpc_nix//:grpc_lib"
|
||||
|
||||
http_archive(
|
||||
name = "grpc_haskell_core",
|
||||
build_file_content = """
|
||||
@ -146,10 +149,40 @@ c2hs_suite(
|
||||
compiler_flags = ["-XCPP", "-Wno-unused-imports", "-Wno-unused-record-wildcards"],
|
||||
visibility = ["//visibility:public"],
|
||||
deps = [
|
||||
":fat_cbits",
|
||||
"{cbit_dep}",
|
||||
],
|
||||
)
|
||||
|
||||
cc_library(
|
||||
name = "needed-cbits-clib",
|
||||
srcs = [":libneeded-cbits.so"],
|
||||
deps = ["{grpc_dep}"],
|
||||
hdrs = glob(["include/*.h"]),
|
||||
includes = ["include/"],
|
||||
)
|
||||
|
||||
# Bazel produces cbits without NEEDED entries which makes
|
||||
# ghci unhappy. We cannot use fat_cbits on the nix-built grpc
|
||||
# since it lacks static libs but we can patchelf the cbits to add
|
||||
# the NEEDED entry.
|
||||
# Apparently this is not needed on macos for whatever reason and patchelf
|
||||
# doesn’t work there anyway so we only use it on Linux.
|
||||
genrule(
|
||||
name = "needed-cbits",
|
||||
srcs = [":cbits", "@grpc_nix//:grpc_file"],
|
||||
outs = ["libneeded-cbits.so"],
|
||||
tools = ["@patchelf_nix//:bin/patchelf"],
|
||||
cmd = '''
|
||||
set -eou pipefail
|
||||
# We get 3 libs. We want the shared lib which comes last.
|
||||
CBITS=$$(echo $(locations :cbits) | cut -f 3 -d ' ')
|
||||
OLD_RPATH=$$($(location @patchelf_nix//:bin/patchelf) --print-rpath $$CBITS)
|
||||
GRPC_RPATH=$$(dirname $$(readlink -f $$(echo $(locations @grpc_nix//:grpc_file) | cut -f 1 -d ' ')))
|
||||
$(location @patchelf_nix//:bin/patchelf) $$CBITS --add-needed libgrpc.so.18 --output $(location libneeded-cbits.so)
|
||||
$(location @patchelf_nix//:bin/patchelf) $(location libneeded-cbits.so) --set-rpath "$$OLD_RPATH:$$GRPC_RPATH"
|
||||
'''
|
||||
)
|
||||
|
||||
fat_cc_library(
|
||||
name = "fat_cbits",
|
||||
input_lib = "cbits",
|
||||
@ -160,10 +193,10 @@ cc_library(
|
||||
hdrs = glob(["include/*.h"]),
|
||||
includes = ["include/"],
|
||||
deps = [
|
||||
"@com_github_grpc_grpc//:grpc",
|
||||
"{grpc_dep}",
|
||||
]
|
||||
)
|
||||
""",
|
||||
""".format(cbit_dep = cbit_dep, grpc_dep = grpc_dep),
|
||||
patch_args = ["-p1"],
|
||||
patches = [
|
||||
"@com_github_digital_asset_daml//bazel_tools:grpc-haskell-core-cpp-options.patch",
|
||||
|
@ -1,183 +0,0 @@
|
||||
Taken from https://github.com/abseil/abseil-cpp/pull/884
|
||||
|
||||
From 8ef49c10f419ff8e6e3865c06ea6dfe36be642ff Mon Sep 17 00:00:00 2001
|
||||
From: Pascal Muetschard <pmuetschard@google.com>
|
||||
Date: Mon, 11 Jan 2021 15:17:06 -0800
|
||||
Subject: [PATCH] Don't assume Windows means MSVC in the bazel BUILD files.
|
||||
|
||||
When selecting the compiler flags, use the compiler setting, rather than
|
||||
the platform setting, to detect if MSVC flags are required.
|
||||
---
|
||||
absl/BUILD.bazel | 24 ++++++++++++++++++++++++
|
||||
absl/base/BUILD.bazel | 4 ++--
|
||||
absl/copts/configure_copts.bzl | 6 +++---
|
||||
absl/debugging/BUILD.bazel | 8 ++++----
|
||||
absl/random/internal/BUILD.bazel | 6 +++---
|
||||
absl/synchronization/BUILD.bazel | 2 +-
|
||||
6 files changed, 37 insertions(+), 13 deletions(-)
|
||||
diff --git a/absl/BUILD.bazel b/absl/BUILD.bazel
|
||||
index 0b772df..651b3f4 100644
|
||||
--- a/absl/BUILD.bazel
|
||||
+++ b/absl/BUILD.bazel
|
||||
@@ -28,6 +28,30 @@ create_llvm_config(
|
||||
visibility = [":__subpackages__"],
|
||||
)
|
||||
|
||||
+config_setting(
|
||||
+ name = "msvc_compiler",
|
||||
+ flag_values = {
|
||||
+ "@bazel_tools//tools/cpp:compiler": "msvc-cl",
|
||||
+ },
|
||||
+ visibility = [":__subpackages__"],
|
||||
+)
|
||||
+
|
||||
+config_setting(
|
||||
+ name = "clang_cl_compiler",
|
||||
+ flag_values = {
|
||||
+ "@bazel_tools//tools/cpp:compiler": "clang-cl",
|
||||
+ },
|
||||
+ visibility = [":__subpackages__"],
|
||||
+)
|
||||
+
|
||||
+alias(
|
||||
+ name = "msvc_compat_compiler",
|
||||
+ actual = select({
|
||||
+ ":clang_cl_compiler": ":clang_cl_compiler",
|
||||
+ "//conditions:default": ":msvc_compiler",
|
||||
+ })
|
||||
+)
|
||||
+
|
||||
config_setting(
|
||||
name = "osx",
|
||||
constraint_values = [
|
||||
diff --git a/absl/base/BUILD.bazel b/absl/base/BUILD.bazel
|
||||
index 9d96abe..817c06a 100644
|
||||
--- a/absl/base/BUILD.bazel
|
||||
+++ b/absl/base/BUILD.bazel
|
||||
@@ -160,7 +160,7 @@ cc_library(
|
||||
],
|
||||
copts = ABSL_DEFAULT_COPTS,
|
||||
linkopts = select({
|
||||
- "//absl:windows": [],
|
||||
+ "//absl:msvc_compat_compiler": [],
|
||||
"//absl:wasm": [],
|
||||
"//conditions:default": ["-pthread"],
|
||||
}) + ABSL_DEFAULT_LINKOPTS,
|
||||
@@ -220,7 +220,7 @@ cc_library(
|
||||
],
|
||||
copts = ABSL_DEFAULT_COPTS,
|
||||
linkopts = select({
|
||||
- "//absl:windows": [
|
||||
+ "//absl:msvc_compat_compiler": [
|
||||
"-DEFAULTLIB:advapi32.lib",
|
||||
],
|
||||
"//absl:wasm": [],
|
||||
diff --git a/absl/copts/configure_copts.bzl b/absl/copts/configure_copts.bzl
|
||||
index ff9a5ea..5d00332 100644
|
||||
--- a/absl/copts/configure_copts.bzl
|
||||
+++ b/absl/copts/configure_copts.bzl
|
||||
@@ -22,7 +22,7 @@ load(
|
||||
)
|
||||
|
||||
ABSL_DEFAULT_COPTS = select({
|
||||
- "//absl:windows": ABSL_MSVC_FLAGS,
|
||||
+ "//absl:msvc_compat_compiler": ABSL_MSVC_FLAGS,
|
||||
"//absl:llvm_compiler": ABSL_LLVM_FLAGS,
|
||||
"//conditions:default": ABSL_GCC_FLAGS,
|
||||
})
|
||||
@@ -30,13 +30,13 @@ ABSL_DEFAULT_COPTS = select({
|
||||
# in absence of modules (--compiler=gcc or -c opt), cc_tests leak their copts
|
||||
# to their (included header) dependencies and fail to build outside absl
|
||||
ABSL_TEST_COPTS = ABSL_DEFAULT_COPTS + select({
|
||||
- "//absl:windows": ABSL_MSVC_TEST_FLAGS,
|
||||
+ "//absl:msvc_compat_compiler": ABSL_MSVC_TEST_FLAGS,
|
||||
"//absl:llvm_compiler": ABSL_LLVM_TEST_FLAGS,
|
||||
"//conditions:default": ABSL_GCC_TEST_FLAGS,
|
||||
})
|
||||
|
||||
ABSL_DEFAULT_LINKOPTS = select({
|
||||
- "//absl:windows": ABSL_MSVC_LINKOPTS,
|
||||
+ "//absl:msvc_compat_compiler": ABSL_MSVC_LINKOPTS,
|
||||
"//conditions:default": [],
|
||||
})
|
||||
|
||||
diff --git a/absl/debugging/BUILD.bazel b/absl/debugging/BUILD.bazel
|
||||
index 86faac9..d0984b9 100644
|
||||
--- a/absl/debugging/BUILD.bazel
|
||||
+++ b/absl/debugging/BUILD.bazel
|
||||
@@ -66,7 +66,7 @@ cc_library(
|
||||
],
|
||||
copts = ABSL_DEFAULT_COPTS,
|
||||
linkopts = ABSL_DEFAULT_LINKOPTS + select({
|
||||
- "//absl:windows": ["-DEFAULTLIB:dbghelp.lib"],
|
||||
+ "//absl:msvc_compat_compiler": ["-DEFAULTLIB:dbghelp.lib"],
|
||||
"//conditions:default": [],
|
||||
}),
|
||||
deps = [
|
||||
@@ -86,11 +86,11 @@ cc_test(
|
||||
name = "symbolize_test",
|
||||
srcs = ["symbolize_test.cc"],
|
||||
copts = ABSL_TEST_COPTS + select({
|
||||
- "//absl:windows": ["/Z7"],
|
||||
+ "//absl:msvc_compat_compiler": ["/Z7"],
|
||||
"//conditions:default": [],
|
||||
}),
|
||||
linkopts = ABSL_DEFAULT_LINKOPTS + select({
|
||||
- "//absl:windows": ["/DEBUG"],
|
||||
+ "//absl:msvc_compat_compiler": ["/DEBUG"],
|
||||
"//conditions:default": [],
|
||||
}),
|
||||
deps = [
|
||||
@@ -148,7 +148,7 @@ cc_test(
|
||||
srcs = ["failure_signal_handler_test.cc"],
|
||||
copts = ABSL_TEST_COPTS,
|
||||
linkopts = select({
|
||||
- "//absl:windows": [],
|
||||
+ "//absl:msvc_compat_compiler": [],
|
||||
"//absl:wasm": [],
|
||||
"//conditions:default": ["-pthread"],
|
||||
}) + ABSL_DEFAULT_LINKOPTS,
|
||||
diff --git a/absl/random/internal/BUILD.bazel b/absl/random/internal/BUILD.bazel
|
||||
index 8485e28..944f512 100644
|
||||
--- a/absl/random/internal/BUILD.bazel
|
||||
+++ b/absl/random/internal/BUILD.bazel
|
||||
@@ -75,7 +75,7 @@ cc_library(
|
||||
],
|
||||
copts = ABSL_DEFAULT_COPTS,
|
||||
linkopts = ABSL_DEFAULT_LINKOPTS + select({
|
||||
- "//absl:windows": ["-DEFAULTLIB:bcrypt.lib"],
|
||||
+ "//absl:msvc_compat_compiler": ["-DEFAULTLIB:bcrypt.lib"],
|
||||
"//conditions:default": [],
|
||||
}),
|
||||
deps = [
|
||||
@@ -98,7 +98,7 @@ cc_library(
|
||||
],
|
||||
copts = ABSL_DEFAULT_COPTS,
|
||||
linkopts = select({
|
||||
- "//absl:windows": [],
|
||||
+ "//absl:msvc_compat_compiler": [],
|
||||
"//absl:wasm": [],
|
||||
"//conditions:default": ["-pthread"],
|
||||
}) + ABSL_DEFAULT_LINKOPTS,
|
||||
@@ -320,7 +320,7 @@ cc_library(
|
||||
"randen_hwaes.h",
|
||||
],
|
||||
copts = ABSL_DEFAULT_COPTS + ABSL_RANDOM_RANDEN_COPTS + select({
|
||||
- "//absl:windows": [],
|
||||
+ "//absl:msvc_compat_compiler": [],
|
||||
"//conditions:default": ["-Wno-pass-failed"],
|
||||
}),
|
||||
linkopts = ABSL_DEFAULT_LINKOPTS,
|
||||
diff --git a/absl/synchronization/BUILD.bazel b/absl/synchronization/BUILD.bazel
|
||||
index 4d4d680..b75bb42 100644
|
||||
--- a/absl/synchronization/BUILD.bazel
|
||||
+++ b/absl/synchronization/BUILD.bazel
|
||||
@@ -89,7 +89,7 @@ cc_library(
|
||||
],
|
||||
copts = ABSL_DEFAULT_COPTS,
|
||||
linkopts = select({
|
||||
- "//absl:windows": [],
|
||||
+ "//absl:msvc_compat_compiler": [],
|
||||
"//absl:wasm": [],
|
||||
"//conditions:default": ["-pthread"],
|
||||
}) + ABSL_DEFAULT_LINKOPTS,
|
18
deps.bzl
18
deps.bzl
@ -216,11 +216,12 @@ def daml_deps():
|
||||
)
|
||||
|
||||
if "com_github_grpc_grpc" not in native.existing_rules():
|
||||
# This should be kept in sync with the grpc version we get from Nix.
|
||||
http_archive(
|
||||
name = "com_github_grpc_grpc",
|
||||
strip_prefix = "grpc-1.36.0",
|
||||
urls = ["https://github.com/grpc/grpc/archive/v1.36.0.tar.gz"],
|
||||
sha256 = "1a5127c81487f4e3e57973bb332f04b9159f94d860c207e096d8a587d371edbd",
|
||||
strip_prefix = "grpc-1.39.0",
|
||||
urls = ["https://github.com/grpc/grpc/archive/v1.39.0.tar.gz"],
|
||||
sha256 = "b16992aa1c949c10d5d5ce2a62f9d99fa7de77da2943e643fb66dcaf075826d6",
|
||||
patches = [
|
||||
"@com_github_digital_asset_daml//bazel_tools:grpc-bazel-mingw.patch",
|
||||
],
|
||||
@ -230,14 +231,11 @@ def daml_deps():
|
||||
if "com_google_absl" not in native.existing_rules():
|
||||
http_archive(
|
||||
name = "com_google_absl",
|
||||
sha256 = "3d74cdc98b42fd4257d91f652575206de195e2c824fcd8d6e6d227f85cb143ef",
|
||||
strip_prefix = "abseil-cpp-0f3bb466b868b523cf1dc9b2aaaed65c77b28862",
|
||||
sha256 = "35f22ef5cb286f09954b7cc4c85b5a3f6221c9d4df6b8c4a1e9d399555b366ee",
|
||||
strip_prefix = "abseil-cpp-997aaf3a28308eba1b9156aa35ab7bca9688e9f6",
|
||||
urls = [
|
||||
"https://storage.googleapis.com/grpc-bazel-mirror/github.com/abseil/abseil-cpp/archive/0f3bb466b868b523cf1dc9b2aaaed65c77b28862.tar.gz",
|
||||
"https://github.com/abseil/abseil-cpp/archive/0f3bb466b868b523cf1dc9b2aaaed65c77b28862.tar.gz",
|
||||
],
|
||||
patches = [
|
||||
"@com_github_digital_asset_daml//bazel_tools:absl-mingw.patch",
|
||||
"https://storage.googleapis.com/grpc-bazel-mirror/github.com/abseil/abseil-cpp/archive/997aaf3a28308eba1b9156aa35ab7bca9688e9f6.tar.gz",
|
||||
"https://github.com/abseil/abseil-cpp/archive/997aaf3a28308eba1b9156aa35ab7bca9688e9f6.tar.gz",
|
||||
],
|
||||
patch_args = ["-p1"],
|
||||
)
|
||||
|
@ -11,6 +11,7 @@ let shared = rec {
|
||||
docker
|
||||
gawk
|
||||
gnutar
|
||||
grpc
|
||||
grpcurl
|
||||
gzip
|
||||
imagemagick
|
||||
|
Loading…
Reference in New Issue
Block a user