diff --git a/.bazelrc b/.bazelrc index feb6ecd6b9..39f2ffc240 100644 --- a/.bazelrc +++ b/.bazelrc @@ -20,7 +20,6 @@ test:windows --experimental_enable_runfiles # WIP: bazel 0.27 fixs build\ - --incompatible_disable_genrule_cc_toolchain_dependency=false\ --incompatible_no_transitive_loads=false\ --incompatible_disable_deprecated_attr_params=false\ --incompatible_new_actions_api=false\ @@ -30,7 +29,6 @@ build\ --incompatible_depset_union=false\ --incompatible_use_python_toolchains=false test\ - --incompatible_disable_genrule_cc_toolchain_dependency=false\ --incompatible_no_transitive_loads=false\ --incompatible_disable_deprecated_attr_params=false\ --incompatible_new_actions_api=false\ diff --git a/hazel/third_party/cabal2bazel/bzl/cabal_package.bzl b/hazel/third_party/cabal2bazel/bzl/cabal_package.bzl index 0ea02ed6be..99958db57e 100644 --- a/hazel/third_party/cabal2bazel/bzl/cabal_package.bzl +++ b/hazel/third_party/cabal2bazel/bzl/cabal_package.bzl @@ -36,6 +36,7 @@ load(":bzl/cabal_paths.bzl", "cabal_paths") load(":bzl/happy.bzl", "genhappy") load("//templates:templates.bzl", "templates") load("//tools:mangling.bzl", "hazel_cbits", "hazel_library") +load("@bazel_tools//tools/cpp:cc_flags_supplier.bzl", "cc_flags_supplier") _conditions_default = "//conditions:default" @@ -78,6 +79,7 @@ def _configure(desc): for f in desc.extraTmpFiles if f.split("/")[-1] not in _header_blacklist ] + cc_flags_supplier(name = "cc_flags") native.genrule( name = "run-configure", cmd = "\n".join([ @@ -94,7 +96,10 @@ def _configure(desc): for out in outputs ]), tools = ["configure"], - toolchains = ["@bazel_tools//tools/cpp:current_cc_toolchain"], + toolchains = [ + ":cc_flags", + "@bazel_tools//tools/cpp:current_cc_toolchain", + ], srcs = native.glob(["**"], exclude = outputs), outs = outputs, )