Skip to content

Commit d62a135

Browse files
authored
Merge pull request #16 from rabbitmq/allow-duplicate-erlc-opts
Do not ignore duplicate erlc_opts
2 parents 050faed + 1597f68 commit d62a135

File tree

1 file changed

+4
-11
lines changed

1 file changed

+4
-11
lines changed

bazel_erlang_lib.bzl

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,7 @@ def erlang_lib(
320320
name = "first_beam_files",
321321
hdrs = native.glob(["include/**/*.hrl", "src/**/*.hrl"]),
322322
srcs = native.glob(first_srcs),
323-
erlc_opts = _unique(erlc_opts),
323+
erlc_opts = erlc_opts,
324324
dest = "ebin",
325325
deps = build_deps + deps,
326326
)
@@ -330,7 +330,7 @@ def erlang_lib(
330330
hdrs = native.glob(["include/**/*.hrl", "src/**/*.hrl"]),
331331
srcs = native.glob(["src/**/*.erl"], exclude = first_srcs),
332332
beam = all_beam,
333-
erlc_opts = _unique(erlc_opts),
333+
erlc_opts = erlc_opts,
334334
dest = "ebin",
335335
deps = build_deps + deps,
336336
)
@@ -368,13 +368,6 @@ def erlang_lib(
368368
visibility = ["//visibility:public"],
369369
)
370370

371-
def _unique(l):
372-
r = []
373-
for item in l:
374-
if item not in r:
375-
r.append(item)
376-
return r
377-
378371
def test_erlang_lib(
379372
app_name = "",
380373
app_version = "",
@@ -399,7 +392,7 @@ def test_erlang_lib(
399392
name = "first_test_beam_files",
400393
hdrs = native.glob(["include/**/*.hrl", "src/**/*.hrl"]),
401394
srcs = native.glob(first_srcs),
402-
erlc_opts = _unique(erlc_opts),
395+
erlc_opts = erlc_opts,
403396
dest = "test",
404397
deps = build_deps + deps,
405398
testonly = True,
@@ -410,7 +403,7 @@ def test_erlang_lib(
410403
hdrs = native.glob(["include/**/*.hrl", "src/**/*.hrl"]),
411404
srcs = native.glob(["src/**/*.erl"], exclude = first_srcs),
412405
beam = all_beam,
413-
erlc_opts = _unique(erlc_opts),
406+
erlc_opts = erlc_opts,
414407
dest = "test",
415408
deps = build_deps + deps,
416409
testonly = True,

0 commit comments

Comments
 (0)