bazelbuild / rules_cc

C++ Rules for Bazel
https://bazel.build
Apache License 2.0
182 stars 90 forks source link

No Support for -E to output header files based on different deps. #100

Open systemlogic opened 3 years ago

systemlogic commented 3 years ago

Description of the problem / feature request:

No support for -E for header/c file generation.

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

We use the Preprocessor heavily and pass it to other team

Bugs: what's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.

Something similar is required. cc -E xyz.h .

What operating system are you running Bazel on?

Linux

What's the output of bazel info release?

release 3.7.0

If bazel info release returns "development version" or "(@non-git)", tell us how you built Bazel.

NA

What version of rules_cc do you use? Can you paste the workspace rule used to fetch rules_cc? What other relevant dependencies does your project have?

NA

What Bazel options do you use to trigger the issue? What C++ toolchain do you use?

NA

Have you found anything relevant by searching the web?

NA

Any other information, logs, or outputs that you want to share?

NA

NovaNekmit commented 2 years ago

Bump.

Bazel has a nice system for managing includes and defines and currently it is not easy to use that existing infrastructure to preprocess files (ie ld scripts, config files, ...).

Rebuilding the whole thing via genrule and a whole bunch of -I $(execpath ...) / -D "works", but loses most of the flexibility.