Linker error (MediaKeys::ResolvePromiseWithResult undefined) when building under higher optimization levels
Categories
(Firefox for Android Graveyard :: Audio/Video, defect, P3)
Tracking
(firefox72 fixed)
Tracking | Status | |
---|---|---|
firefox72 | --- | fixed |
People
(Reporter: acreskey, Assigned: acreskey)
References
Details
Attachments
(1 file)
In Bug 1591725 we're looking at building on Android with different optimization flags such as -O2
.
I noticed the following linker error when building with -Os
, -O2
, and -O3
:
/Users/acreskey/dev/firefox/src/mozilla-central/dom/media/eme/mediadrm/MediaDrmCDMProxy.cpp:297: error: undefined reference to 'void mozilla::dom::MediaKeys::ResolvePromiseWithResult<bool>(unsigned int, bool const&)'
It looks like this is failing because the template function is defined in the MediaKeys.cpp
and isn't visible to MediaDrmCDMProxy.cpp
's compilation unit.
I think a reasonable fix is to move the template definition from dom/media/eme/MediaKeys.cpp
to dom/media/eme/MediaKeys.h
(patch incoming).
An explicit definition of that specialization in the MediaKeys.cpp
works too.
Assignee | ||
Comment 1•5 years ago
|
||
Seeing this linker error when building with optimization flags -O2 and others:
.../mozilla-central/dom/media/eme/mediadrm/MediaDrmCDMProxy.cpp:297: error: undefined reference to 'void mozilla::dom::MediaKeys::ResolvePromiseWithResult<bool>(unsigned int, bool const&)'
This patch moves the template definition from dom/media/eme/MediaKeys.cpp to dom/media/eme/MediaKeys.h
Updated•5 years ago
|
Updated•5 years ago
|
Updated•5 years ago
|
Updated•5 years ago
|
Pushed by archaeopteryx@coole-files.de: https://hg.mozilla.org/integration/autoland/rev/5ee8c7c51c04 Fix MediaKeys linker error exposed with different optimization flags r=edgar
Comment 3•5 years ago
|
||
bugherder |
Updated•3 years ago
|
Description
•