From a41c767517fe0f6f3623c57ee5bc68f4873afd70 Mon Sep 17 00:00:00 2001 From: Steeve Morin Date: Mon, 16 Apr 2018 13:34:40 +0200 Subject: [PATCH] Add copts to cppopts, so that defines in copts work too Signed-off-by: Steeve Morin --- go/private/rules/cgo.bzl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/go/private/rules/cgo.bzl b/go/private/rules/cgo.bzl index 67409fafda..0a480bf01b 100644 --- a/go/private/rules/cgo.bzl +++ b/go/private/rules/cgo.bzl @@ -101,7 +101,7 @@ def _cgo_codegen_impl(ctx): if not go.cgo_tools: fail("Go toolchain does not support cgo") linkopts = ctx.attr.linkopts[:] - cppopts = go.cgo_tools.c_options + go.cgo_tools.compiler_options + ctx.attr.cppopts + cppopts = go.cgo_tools.c_options + go.cgo_tools.compiler_options + ctx.attr.copts + ctx.attr.cppopts deps = depset([], order="topological") cgo_export_h = go.declare_file(go, path="_cgo_export.h") cgo_export_c = go.declare_file(go, path="_cgo_export.c")