Skip to content

Commit a79780f

Browse files
authored
Merge pull request #1778 from tweag/try-build-c2hs
Use the `cc` tool for c2hs instead of `cpp`
2 parents 4d9d65f + ecab42b commit a79780f

File tree

6 files changed

+2
-53
lines changed

6 files changed

+2
-53
lines changed

haskell/c2hs.bzl

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ def _c2hs_library_impl(ctx):
4242
args.add_all([chs_file.path, "-o", hs_file.path])
4343

4444
args.add("-C-E")
45-
args.add_all(["--cpp", cc.tools.cpp])
45+
args.add_all(["--cpp", cc.tools.cc])
4646
args.add("-C-includeghcplatform.h")
4747
args.add("-C-includeghcversion.h")
4848
args.add_all(["-C" + x for x in cc.cpp_flags])

tests/c2hs/BUILD.bazel

-15
Original file line numberDiff line numberDiff line change
@@ -10,22 +10,12 @@ c2hs_library(
1010
name = "foo",
1111
srcs = ["src/Foo/Foo.chs"],
1212
src_strip_prefix = "src",
13-
tags = [
14-
# See https://github.com/tweag/rules_haskell/issues/1486
15-
"dont_test_on_darwin_with_bindist",
16-
"dont_test_on_windows",
17-
],
1813
deps = ["//tests:zlib"],
1914
)
2015

2116
c2hs_library(
2217
name = "bar",
2318
srcs = ["Bar.chs"],
24-
tags = [
25-
# See https://github.com/tweag/rules_haskell/issues/1486
26-
"dont_test_on_darwin_with_bindist",
27-
"dont_test_on_windows",
28-
],
2919
deps = [":foo"],
3020
)
3121

@@ -36,11 +26,6 @@ haskell_library(
3626
":foo",
3727
"@c2hs_repo//:baz",
3828
],
39-
tags = [
40-
# See https://github.com/tweag/rules_haskell/issues/1486
41-
"dont_test_on_darwin_with_bindist",
42-
"dont_test_on_windows",
43-
],
4429
deps = ["//tests/hackage:base"],
4530
)
4631

tests/c2hs/repo/BUILD.bazel

-5
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,6 @@ package(default_testonly = 1)
55
c2hs_library(
66
name = "baz",
77
srcs = ["Baz.chs"],
8-
tags = [
9-
# See https://github.com/tweag/rules_haskell/issues/1486
10-
"dont_test_on_darwin_with_bindist",
11-
"dont_test_on_windows",
12-
],
138
visibility = ["//visibility:public"],
149
deps = ["@rules_haskell//tests:zlib"],
1510
)

tests/haskell_module/repl/BUILD.bazel

-10
Original file line numberDiff line numberDiff line change
@@ -6,23 +6,13 @@ rules_haskell_integration_test(
66
name = "haskell_module_repl_test",
77
size = "small",
88
srcs = ["HaskellModuleReplTest.hs"],
9-
tags = [
10-
# See https://github.com/tweag/rules_haskell/issues/1486
11-
"dont_test_on_darwin_with_bindist",
12-
"dont_test_on_windows",
13-
],
149
workspace_path = "haskell_module_repl_test",
1510
)
1611

1712
rules_haskell_integration_test(
1813
name = "haskell_module_repl_cross_library_deps_test",
1914
size = "small",
2015
srcs = ["HaskellModuleReplCrossLibraryDepsTest.hs"],
21-
tags = [
22-
# See https://github.com/tweag/rules_haskell/issues/1486
23-
"dont_test_on_darwin_with_bindist",
24-
"dont_test_on_windows",
25-
],
2616
workspace_path = "haskell_module_repl_cross_library_deps_test",
2717
)
2818

tests/repl-targets/BUILD.bazel

+1-12
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,6 @@ genrule(
2424
c2hs_library(
2525
name = "chs",
2626
srcs = ["Chs.chs"],
27-
tags = [
28-
# See https://github.com/tweag/rules_haskell/issues/1486
29-
"dont_test_on_darwin_with_bindist",
30-
"dont_test_on_windows",
31-
],
3227
)
3328

3429
haskell_library(
@@ -39,11 +34,6 @@ haskell_library(
3934
":chs",
4035
":codegen",
4136
],
42-
tags = [
43-
# See https://github.com/tweag/rules_haskell/issues/1486
44-
"dont_test_on_darwin_with_bindist",
45-
"dont_test_on_windows",
46-
],
4737
visibility = ["//visibility:public"],
4838
deps = [
4939
"//tests:zlib",
@@ -124,9 +114,8 @@ rules_haskell_integration_test(
124114
name = "hs_lib_repl_test",
125115
srcs = ["HsLibReplTest.hs"],
126116
tags = [
127-
# See https://github.com/tweag/rules_haskell/issues/1486
117+
# See https://github.com/tweag/rules_haskell/issues/1779
128118
"dont_test_on_darwin_with_bindist",
129-
"dont_test_on_windows",
130119
],
131120
workspace_path = "hs_lib_repl_test",
132121
)

tests/version-macros/BUILD.bazel

-10
Original file line numberDiff line numberDiff line change
@@ -70,11 +70,6 @@ haskell_module(
7070
c2hs_library(
7171
name = "c2hs-lib",
7272
srcs = ["C2hsLib.chs"],
73-
tags = [
74-
# See https://github.com/tweag/rules_haskell/issues/1486
75-
"dont_test_on_darwin_with_bindist",
76-
"dont_test_on_windows",
77-
],
7873
version = "4.5.6.7",
7974
deps = [
8075
":versioned-lib",
@@ -90,11 +85,6 @@ haskell_test(
9085
":c2hs-lib",
9186
],
9287
main_file = "MainC2hs.hs",
93-
tags = [
94-
# See https://github.com/tweag/rules_haskell/issues/1486
95-
"dont_test_on_darwin_with_bindist",
96-
"dont_test_on_windows",
97-
],
9888
version = "4.5.6.7",
9989
visibility = ["//tests/asterius/version-macros:__pkg__"],
10090
deps = [

0 commit comments

Comments
 (0)