mirror of
https://github.com/chromium/crashpad.git
synced 2025-03-09 22:26:06 +00:00
Linking crashpad (//third_party/crashpad/crashpad:util) target into a target built for a secondary toolchain could cause noop build failure because of an incorrect `include_dirs` directive. The library depends on a generated buildflag, which when in a secondary toolchain is generated to $root_gen_dir, a directory that includes the toolchain name (except for the primary one). The target added $root_build_dir/gen to its `include_dirs` which is equal to $root_gen_dir for the primary toolchain, but distinct for secondary toolchain. Moreover, `include_dirs` define directly in a `source_set` are placed before any `include_dirs` values inherited from configs. This means that $root_build_dir/gen was before $root_gen_dir in the list ($root_gen_dir is inherited from default config when building Chromium). The result is that building any crashpad files would result in them trying to first include the version of the buildflag that was generated for the primary toolchain, and if not found, using the correct one. This was then recorded in the depfile generated by the compiler. This meant that it was possible for the build to be incorrect (as the content of the buildflag may be different between the two toolchains) and cause flaky noop failures (as the buildlag generation for the primary toolchain and the compilation of the source file for the secondary toolchain are unordered, but a dependency was recorded via the depfile leading ninja to report a dirty build). The fix is simple, use the correct value $root_gen_dir in the `include_dirs` directive. Fixed: chromium:1314711 Change-Id: Icba521313e4105713e66fa576d730b00c7e74c21 Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/3579401 Reviewed-by: Mark Mentovai <mark@chromium.org> Commit-Queue: Justin Cohen <justincohen@chromium.org>
…
…
…
Crashpad
Crashpad is a crash-reporting system.
Documentation
- Project status
- Developing Crashpad: instructions for getting the source code, building, testing, and contributing to the project.
- Crashpad interface documentation
- Crashpad tool man pages
- Crashpad overview design
Source Code
Crashpad’s source code is hosted in a Git repository at https://chromium.googlesource.com/crashpad/crashpad.
Other Links
- Bugs can be reported at the Crashpad issue tracker.
- The Crashpad bots perform automated builds and tests.
- crashpad-dev is the Crashpad developers’ mailing list.
Description
Languages
C++
92.5%
Objective-C++
2.5%
C
2%
Python
1.8%
Assembly
0.9%
Other
0.3%