Bug 1351803 - Statically link to avrt.lib on Windows, when compiling cubeb. r=glandium
authorPaul Adenot <paul@paul.cx>
Thu, 30 Mar 2017 06:26:19 -0700
changeset 351053 cd9eb22854c9f0608e12e3f96586db6bcf955142
parent 351052 b7a6ec5eb1e1ff88d9ebc278de9ea3cd761f763f
child 351054 7e09e95fef84b29b1c74f3b120fb19182c7da5a4
push id40045
push userpaul@paul.cx
push dateTue, 04 Apr 2017 10:05:35 +0000
treeherderautoland@cd9eb22854c9 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersglandium
bugs1351803
milestone55.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
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
media/libcubeb/src/moz.build
--- 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':