facebook / facebook/buck2

Precompiled headers don't seem to be working

Open
#368 7 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
4.4k
Forks
394
PR merge metrics
No merged PRs in 30d

Description

Found this in the prelude:

https://github.com/facebook/buck2/blob/776d355f7e6136de88fa3b7c28e775305826ac3f/prelude/cxx/compile.bzl#L471-L474

So it doesn't appear to actually be precompiling anything (even on Linux / Clang).

The prelude is pretty complicated, but I'm willing to take a stab at implementing this if someone can offer some pointers. I need:

1. To create the step that actually runs the compiler to generate the compiled PCH output file
2. To reference the generated PCH output artifact created in step 1.
3. To create a serialization point in the DAG from step 1 to step 2.

I also thought about implementing this by just making a genrule() target that outputs the PCH and referencing it from the `compiler_flags` argument as a workaround.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.