Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use the cc tool for c2hs instead of cpp #1778

Merged
merged 3 commits into from
Jul 12, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion haskell/c2hs.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def _c2hs_library_impl(ctx):
args.add_all([chs_file.path, "-o", hs_file.path])

args.add("-C-E")
args.add_all(["--cpp", cc.tools.cpp])
args.add_all(["--cpp", cc.tools.cc])
args.add("-C-includeghcplatform.h")
args.add("-C-includeghcversion.h")
args.add_all(["-C" + x for x in cc.cpp_flags])
Expand Down
15 changes: 0 additions & 15 deletions tests/c2hs/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -10,22 +10,12 @@ c2hs_library(
name = "foo",
srcs = ["src/Foo/Foo.chs"],
src_strip_prefix = "src",
tags = [
# See https://github.com/tweag/rules_haskell/issues/1486
"dont_test_on_darwin_with_bindist",
"dont_test_on_windows",
],
deps = ["//tests:zlib"],
)

c2hs_library(
name = "bar",
srcs = ["Bar.chs"],
tags = [
# See https://github.com/tweag/rules_haskell/issues/1486
"dont_test_on_darwin_with_bindist",
"dont_test_on_windows",
],
deps = [":foo"],
)

Expand All @@ -36,11 +26,6 @@ haskell_library(
":foo",
"@c2hs_repo//:baz",
],
tags = [
# See https://github.com/tweag/rules_haskell/issues/1486
"dont_test_on_darwin_with_bindist",
"dont_test_on_windows",
],
deps = ["//tests/hackage:base"],
)

Expand Down
5 changes: 0 additions & 5 deletions tests/c2hs/repo/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,6 @@ package(default_testonly = 1)
c2hs_library(
name = "baz",
srcs = ["Baz.chs"],
tags = [
# See https://github.com/tweag/rules_haskell/issues/1486
"dont_test_on_darwin_with_bindist",
"dont_test_on_windows",
],
visibility = ["//visibility:public"],
deps = ["@rules_haskell//tests:zlib"],
)
10 changes: 0 additions & 10 deletions tests/haskell_module/repl/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,13 @@ rules_haskell_integration_test(
name = "haskell_module_repl_test",
size = "small",
srcs = ["HaskellModuleReplTest.hs"],
tags = [
# See https://github.com/tweag/rules_haskell/issues/1486
"dont_test_on_darwin_with_bindist",
"dont_test_on_windows",
],
workspace_path = "haskell_module_repl_test",
)

rules_haskell_integration_test(
name = "haskell_module_repl_cross_library_deps_test",
size = "small",
srcs = ["HaskellModuleReplCrossLibraryDepsTest.hs"],
tags = [
# See https://github.com/tweag/rules_haskell/issues/1486
"dont_test_on_darwin_with_bindist",
"dont_test_on_windows",
],
workspace_path = "haskell_module_repl_cross_library_deps_test",
)

Expand Down
13 changes: 1 addition & 12 deletions tests/repl-targets/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,6 @@ genrule(
c2hs_library(
name = "chs",
srcs = ["Chs.chs"],
tags = [
# See https://github.com/tweag/rules_haskell/issues/1486
"dont_test_on_darwin_with_bindist",
"dont_test_on_windows",
],
)

haskell_library(
Expand All @@ -39,11 +34,6 @@ haskell_library(
":chs",
":codegen",
],
tags = [
# See https://github.com/tweag/rules_haskell/issues/1486
"dont_test_on_darwin_with_bindist",
"dont_test_on_windows",
],
visibility = ["//visibility:public"],
deps = [
"//tests:zlib",
Expand Down Expand Up @@ -124,9 +114,8 @@ rules_haskell_integration_test(
name = "hs_lib_repl_test",
srcs = ["HsLibReplTest.hs"],
tags = [
# See https://github.com/tweag/rules_haskell/issues/1486
# See https://github.com/tweag/rules_haskell/issues/1779
"dont_test_on_darwin_with_bindist",
"dont_test_on_windows",
],
workspace_path = "hs_lib_repl_test",
)
Expand Down
10 changes: 0 additions & 10 deletions tests/version-macros/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,6 @@ haskell_module(
c2hs_library(
name = "c2hs-lib",
srcs = ["C2hsLib.chs"],
tags = [
# See https://github.com/tweag/rules_haskell/issues/1486
"dont_test_on_darwin_with_bindist",
"dont_test_on_windows",
],
version = "4.5.6.7",
deps = [
":versioned-lib",
Expand All @@ -90,11 +85,6 @@ haskell_test(
":c2hs-lib",
],
main_file = "MainC2hs.hs",
tags = [
# See https://github.com/tweag/rules_haskell/issues/1486
"dont_test_on_darwin_with_bindist",
"dont_test_on_windows",
],
version = "4.5.6.7",
visibility = ["//tests/asterius/version-macros:__pkg__"],
deps = [
Expand Down