Skip to content

Commit

Permalink
Remove crosstool_top option when using windows
Browse files Browse the repository at this point in the history
  • Loading branch information
ylecornec committed Jan 17, 2023
1 parent b7904c9 commit b23f83e
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 20 deletions.
8 changes: 2 additions & 6 deletions .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,6 @@ test --test_env=LANG=C.UTF-8 --test_env=LOCALE_ARCHIVE
build:linux-nixpkgs --config=nixpkgs
build:macos-nixpkgs --config=nixpkgs
build:nixpkgs --host_platform=@io_tweag_rules_nixpkgs//nixpkgs/platforms:host
# Use this configuration when targeting Windows. Eventually this will
# no longer be required:
# https://bazel.build/roadmaps/platforms.html#replace---cpu-and---host_cpu-flags.
build:windows-bindist --crosstool_top=@rules_haskell_ghc_windows_amd64//:cc_toolchain

# Build and Test Filters
# ----------------------
Expand Down Expand Up @@ -100,8 +96,8 @@ build:linux-bindist --incompatible_enable_cc_toolchain_resolution
build:macos-bindist --incompatible_enable_cc_toolchain_resolution
build:linux-nixpkgs --incompatible_enable_cc_toolchain_resolution
build:macos-nixpkgs --incompatible_enable_cc_toolchain_resolution
# Windows still uses --crosstool_top.
#build:ci-windows-bindist --incompatible_enable_cc_toolchain_resolution
build:ci-windows-bindist --incompatible_enable_cc_toolchain_resolution

# Blocked by https://github.com/bazelbuild/bazel/issues/11704
#build:ci --incompatible_load_cc_rules_from_bzl

Expand Down
5 changes: 3 additions & 2 deletions haskell/repositories.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,9 @@ def rules_haskell_dependencies():
maybe(
http_archive,
name = "rules_cc",
urls = ["https://github.com/bazelbuild/rules_cc/releases/download/0.0.1/rules_cc-0.0.1.tar.gz"],
sha256 = "4dccbfd22c0def164c8f47458bd50e0c7148f3d92002cdb459c2a96a68498241",
urls = ["https://github.com/bazelbuild/rules_cc/releases/download/0.0.4/rules_cc-0.0.4.tar.gz"],
sha256 = "af6cc82d87db94585bceeda2561cb8a9d55ad435318ccb4ddfee18a43580fb5d",
strip_prefix = "rules_cc-0.0.4",
)

maybe(
Expand Down
1 change: 0 additions & 1 deletion start
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,6 @@ build:ci --jobs=2
build:ci --verbose_failures
common:ci --color=no
test:ci --test_output=errors
build:ci-windows --crosstool_top=@rules_haskell_ghc_windows_amd64//:cc_toolchain
EOF

Expand Down
2 changes: 1 addition & 1 deletion tests/integration_testing/IntegrationTesting.hs
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ generateBazelRc dir = do
\ build:macos-nixpkgs --incompatible_enable_cc_toolchain_resolution \n\
\ build:linux-bindist --incompatible_enable_cc_toolchain_resolution \n\
\ build:macos-bindist --incompatible_enable_cc_toolchain_resolution \n\
\ build:windows-bindist --crosstool_top=@rules_haskell_ghc_windows_amd64//:cc_toolchain \n\
\ build:windows-bindist --incompatible_enable_cc_toolchain_resolution \n\
\ ")

setupWorkspace :: IO (String, String)
Expand Down
11 changes: 1 addition & 10 deletions tests/run-start-script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,8 @@ cd $workdir
# changes, then we need to adapt to those changes in the branch.
# Which in turn means the start script should pull in those changes too.

case "$OSTYPE" in
cygwin|msys)
OSCONFIG=("--config=ci-windows")
;;
*)
OSCONFIG=()
;;
esac

NIX_PATH=nixpkgs="$pwd/nixpkgs/default.nix" \
bazel run \
--config=ci "${OSCONFIG[@]}" \
--config=ci \
--override_repository=rules_haskell="$pwd" \
//:example

0 comments on commit b23f83e

Please sign in to comment.