From 76eea37ed02f653cc0ca786ece78c358e7544db2 Mon Sep 17 00:00:00 2001 From: Niklas Enbom Date: Fri, 19 Jun 2015 09:11:05 -0700 Subject: [PATCH] Workaround a (Windows) linker bug when doing a PGO build. It looks like having a function that ends with "FATAL()" but doesn't also have a return value (even if it's useless). This is causing a hang in link.exe when doing a PGO build (this has been blocking us from doing PGO builds for more than a month now). See https://connect.microsoft.com/VisualStudio/feedback/details/996802/link-exe-hang-during-the-pgo-optimization-step for more details. BUG=chromium:491914 R=turaj@webrtc.org Review URL: https://codereview.webrtc.org/1181033009. Cr-Commit-Position: refs/heads/master@{#9469} --- .../audio_coding/main/acm2/audio_coding_module_impl.cc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/webrtc/modules/audio_coding/main/acm2/audio_coding_module_impl.cc b/webrtc/modules/audio_coding/main/acm2/audio_coding_module_impl.cc index 4e665ea45..5536ea426 100644 --- a/webrtc/modules/audio_coding/main/acm2/audio_coding_module_impl.cc +++ b/webrtc/modules/audio_coding/main/acm2/audio_coding_module_impl.cc @@ -272,6 +272,11 @@ int AudioCodingModuleImpl::SendFrequency() const { // TODO(henrik.lundin): Remove; not used. int AudioCodingModuleImpl::SendBitrate() const { FATAL() << "Deprecated"; + // This return statement is required to workaround a bug in VS2013 Update 4 + // when turning on the whole program optimizations. Without hit the linker + // will hang because it doesn't seem to find an exit path for this function. + // This is likely a bug in link.exe and would probably be fixed in VS2015. + return -1; // CriticalSectionScoped lock(acm_crit_sect_); // // if (!codec_manager_.current_encoder()) {