Don't track bridge files in `OUT_DIR` by phil-opp · Pull Request #1668 · dtolnay/cxx
Files in the `OUT_DIR` are likely generated by the very same build script. As such, they likely have a modification time that is after the build script's start time. This causes cargo to assume that the file has changed since the last run, thereby considering the build script dirty on every build. The result is that the build script and everything above in the dependency is recompiled on every build. This commit avoids that problem by emitting the `rerun-if-changed` command only for files that are not in the `OUT_DIR`.
This was referenced
Nov 12, 2025phil-opp added a commit to dora-rs/dora that referenced this pull request
Nov 12, 2025- Update `cxx` crate to 1.0.188 to include dtolnay/cxx#1668 - Remove `rerun-if-changed` for autogenerated file (which always caused rebuild) - Rerun build script if the `DORA_NODE_API_CXX_INSTALL` env variable changes Discovered in #1182 (comment)
This file contains hidden or 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