Turn on __ANDROID_UNAVAILABLE_SYMBOLS_ARE_WEAK__ to allow weak API references
Categories
(Firefox Build System :: General, enhancement, P3)
Tracking
(Not tracked)
People
(Reporter: m_kato, Assigned: sergesanspaille)
References
(Blocks 5 open bugs)
Details
Attachments
(1 file)
We are using NDK r28 now. r28 allows weak API reference for bionic etc. Actually we are using dlopen and dlsym to call newer native APIs such as https://searchfox.org/mozilla-central/rev/aed442d01309eb6695c4ace1c4d8336e2d6cafc0/gfx/layers/AndroidHardwareBuffer.cpp#66. So if we allow weak API references, it makes simple.
Also, Android port of libcube already uses this.
Reporter | ||
Updated•21 days ago
|
Comment 1•20 days ago
|
||
This would make a lot of graphics code (both existing and stuff I'd like to write in the future) a. lot nicer. I am wholeheartedly in favour.
Chrome seems to build with this too, FWIW
Assignee | ||
Comment 2•19 days ago
|
||
The linked doc highlights the risk (runtime failure vs. link-time failure) but also suggests a flag to limit the impact.
To which directory of fx would we apply that flag? Would mobile/android
be enough?
Comment 3•19 days ago
|
||
I think we'd probably want to apply it more broadly than that. I'd want to use this feature in gfx/
.
Assignee | ||
Updated•19 days ago
|
Assignee | ||
Comment 4•19 days ago
|
||
Compiler support make it possible to detect missing checks at compile
time, so it's relatively safe.
Apply it to gfx/layers/AndroidHardwareBuffer.cpp as code simplification
and test bed.
Updated•19 days ago
|
Updated•5 days ago
|
Updated•10 hours ago
|
Updated•7 hours ago
|
Description
•