mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-28 13:21:28 +00:00

When different translation units contain the same symbol name, all static, but one of them non-static, ld64 wrongfully link the references to the static data with the non-static data, or vice versa. With libaom and libvpx sharing data structures with the same name but different contents, that leads to interesting failures/crashes at runtime. This was apparently fixed in Apple ld64 from Xcode 9, but the last open sourced version is the one from Xcode 8, so I ended up digging in the ld64 source code and fixed the issue. This work was merged to cctools-port upstream in https://github.com/tpoechtrager/cctools-port/pull/59. For the same reason as invoked in bug 1478917, though, updating to cctools-port master is more involved than just changing a commit sha1 (as it requires building apple-libtapi, which in turn builds parts of LLVM, which should probably be avoided), so just cherry-pick the fix.