Open Bug 1962300 Opened 21 days ago Updated 7 hours ago

Turn on __ANDROID_UNAVAILABLE_SYMBOLS_ARE_WEAK__ to allow weak API references

Categories

(Firefox Build System :: General, enhancement, P3)

Unspecified
Android
enhancement

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.

OS: Unspecified → Android

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

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?

I think we'd probably want to apply it more broadly than that. I'd want to use this feature in gfx/.

Assignee: nobody → sguelton
Severity: -- → S3

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.

Priority: -- → P3
Attachment #9481265 - Attachment description: Bug 1962300 - Provide support for unavailable symbols as weak symbols r=m_kato → Bug 1962300 - Provide support for unavailable symbols as weak symbols r=m_kato!
Blocks: 1966308
Blocks: 1966309
Blocks: 1966310
Blocks: 1966311
Blocks: 1966312
Attachment #9481265 - Attachment description: Bug 1962300 - Provide support for unavailable symbols as weak symbols r=m_kato! → Bug 1962300 - Provide support for unavailable symbols as weak symbols r=m_kato
Attachment #9481265 - Attachment description: Bug 1962300 - Provide support for unavailable symbols as weak symbols r=m_kato → Bug 1962300 - Provide support for unavailable symbols as weak symbols r=m_kato!
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: