mirror of
https://github.com/chromium/crashpad.git
synced 2024-12-29 08:39:44 +08:00
b9c828ea83
On Android, the compat library built compat/android/sys/mman.cc, which provides a fallback for mmap, and compat/linux/sys/mman.cc, which provides a fallback for memfd_create. This can result in two object files colliding in the library, which is flagged as a “gn analyze” error: > ERROR at //crashpad/compat/BUILD.gn:62:5: Duplicate object file > static_library(target_name) { > ^---------------------------- > The target //crashpad/compat:compat > generates two object files with the same name: > obj/crashpad/compat/compat/mman.o > > It could be you accidentally have a file listed twice in the > sources. Or, depending on how your toolchain maps sources to > object files, two source files with the same name in different > directories could map to the same object file. > > In the latter case, either rename one of the files or move one of > the sources to a separate source_set to avoid them both being in > the same target. The files are renamed to avoid this collision. The associated headers cannot be renamed because they need to shadow the SDK’s copies. There is no “gn analyze” conflict reported for headers with the same name. Change-Id: Ia49ef5ff8375673395597e96555f72f7c69e3564 Reviewed-on: https://chromium-review.googlesource.com/c/crashpad/crashpad/+/2285965 Commit-Queue: Mark Mentovai <mark@chromium.org> Reviewed-by: Robert Sesek <rsesek@chromium.org>