forked from dtolnay/cxx
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Provide cfg option to disable use of cc.
In the Chromium build system, we automatically convert Cargo.toml rules into rules for our build system, gn. We also run build.rs files as part of the Chromium build (because it turns out that the vast majority of them just set some feature flags for feature detection). The build.rs for cxx does more sophisticated things - including building C++ code using cc. That's appropriate in a cargo context, but presents difficulty for our build system where C++ must be built using static build rules beyond the realm of cargo. At the moment we carry a patch for this, but it would be great not to have to do so. This patch would enable us to use the Cargo.toml and build.rs for cxx without change. It's only one out of four patches we currently carry for cxx, but it would be great to get rid of it! Obviously this may seem like a bit of a niche use-case, but hopefully this helps anyone else who builds cxx using non-Cargo build systems, but reusing the Cargo.toml and build.rs.
- Loading branch information
Showing
2 changed files
with
34 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters