bazelbuild / bazelbuild/bazel

cc_proto_library should support cc_library parameters (like copts, linkopts, etc)

Open
#4,446 22 comments 10 reactions 0 assignees View on GitHub
P4 team-Rules-CPP type: feature request
Dominant language
Java
Stars
25.8k
Forks
4.6k
Avg merge
2d 20h
Merged PRs (30d)
72

Description

### Description of the problem / feature request:

The cc_proto_library is, in essence a cc_library rule and should thus honor the cc_library parameters, such as copts.

### Feature requests: what underlying problem are you trying to solve with this feature?

Large protos may require the `-Wa,-mbig-obj` copt on Windows, but it is not always possible to use that flag globally (e.g. if also compiling go code).

There are other reason why people may want to control the underlaying cc_library rule, of course.

### What operating system are you running Bazel on?

Linux, OSX, Windows

### What's the output of `bazel info release`?

0.9.0

Contributor guide

Open the contributing guide

Research direction

Start by locating the cc_proto_library and cc_library rule definitions and compare the supported parameters, especially copts and linkopts. Reproduce the large-proto Windows case involving -Wa,-mbig-obj, then verify that the requested parameters are honored without affecting unrelated Go compilation; the issue provides no test file or entry point.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
build-system, compilers
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.