Bug 1351803 - Statically link to avrt.lib on Windows, when compiling cubeb. r?glandium
We used to get the symbols we need using `LoadLibrary`, but now (since
https://github.com/kinetiknz/cubeb/commit/661c653c8650b2b1c485e86b5a5b4f6d0ed07d1b),
we can statically link to avrt.lib, because we only support Windows OSes that
have this library. For now, this works because avrt.lib is linked in
webrtc-land somewhere with a #pragma, but:
- We're going to stop using this bit of webrtc in the near future (around
Firefox 54)
- Not linking this explicitely where it's used breaks --disable-webrtc, that is
a popular option
MozReview-Commit-ID: 7b16Kdl3VUu
--- a/media/libcubeb/src/moz.build
+++ b/media/libcubeb/src/moz.build
@@ -63,16 +63,19 @@ if CONFIG['OS_TARGET'] == 'Darwin':
if CONFIG['OS_TARGET'] == 'WINNT':
SOURCES += [
'cubeb_resampler.cpp',
'cubeb_wasapi.cpp',
'cubeb_winmm.c',
]
DEFINES['USE_WINMM'] = True
DEFINES['USE_WASAPI'] = True
+ OS_LIBS += [
+ "avrt",
+ ]
if CONFIG['_MSC_VER']:
CXXFLAGS += ['-wd4005'] # C4005: '_USE_MATH_DEFINES' : macro redefinition
if CONFIG['OS_TARGET'] == 'Android':
SOURCES += ['cubeb_opensl.c']
SOURCES += ['cubeb_resampler.cpp']
DEFINES['USE_OPENSL'] = True
if CONFIG['MOZ_WIDGET_TOOLKIT'] != 'gonk':