Skip to content

Commit e49f6a7

Browse files
committed
Add copts
1 parent cfe6f62 commit e49f6a7

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

verilator/defs.bzl

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ def cc_compile_and_link_static_library(ctx, srcs, hdrs, deps, runfiles, includes
4747
actions = ctx.actions,
4848
feature_configuration = feature_configuration,
4949
cc_toolchain = cc_toolchain,
50+
user_compile_flags = ctx.attr.copts,
5051
srcs = srcs,
5152
includes = includes,
5253
defines = defines,
@@ -202,6 +203,10 @@ verilator_cc_library = rule(
202203
doc = "Additional command line options to pass to Verilator",
203204
default = ["-Wall"],
204205
),
206+
"copts": attr.string_list(
207+
doc = "List of additional compilation flags",
208+
default = [],
209+
),
205210
"_cc_toolchain": attr.label(
206211
doc = "CC compiler.",
207212
default = Label("@bazel_tools//tools/cpp:current_cc_toolchain"),

0 commit comments

Comments
 (0)