Skip to content

Commit

Permalink
buildenv/1.3.x: fix LNK4099 warning when linking to protobuf
Browse files Browse the repository at this point in the history
libprotobuf.lib(message_lite.cc.obj) : warning LNK4099: PDB 'vc140.pdb' was not found with 'libprotobuf.lib(message_lite.cc.obj)' or at 'D:\a\1\s\release\vc140.pdb'; linking object as if no debug info
LINK : error LNK1218: warning treated as error; no output file generated
  • Loading branch information
davidebeatrici committed Apr 27, 2020
1 parent 715a888 commit c02dbcf
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
11 changes: 11 additions & 0 deletions buildenv/1.3.x/win32-static/patches/protobuf-missing-pdb-fix.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
--- cmake/CMakeLists_txt
+++ cmake/CMakeLists.txt

This comment has been minimized.

Copy link
@davidebeatrici

davidebeatrici May 3, 2020

Author Member

Should be ./cmake/CMakeLists.txt instead.

This comment has been minimized.

Copy link
@davidebeatrici

davidebeatrici May 3, 2020

Author Member

Fixed in 26b0023.

@@ -133,6 +133,8 @@
endif (protobuf_BUILD_SHARED_LIBS)

if (MSVC)
+ # Bake debug info into the binaries
+ add_compile_options(/Z7)
# Build with multiple processes
add_definitions(/MP)
add_definitions(/wd4244 /wd4267 /wd4018 /wd4355 /wd4800 /wd4251 /wd4996 /wd4146 /wd4305)
6 changes: 5 additions & 1 deletion buildenv/1.3.x/win32-static/protobuf.build
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/usr/bin/env mumble-build
# Copyright 2013-2014 The 'mumble-releng' Authors. All rights reserved.
# Copyright 2013-2020 The 'mumble-releng' Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that
# can be found in the LICENSE file in the source tree or at
# <http://mumble.info/mumble-releng/LICENSE>.
Expand All @@ -19,6 +19,10 @@ function extract {
cd protobuf-3.2.0
}

function prepare {
patch -p1 < ${MUMBLE_BUILDENV_ROOT}/patches/protobuf-missing-pdb-fix.patch
}

function build {
if [ "${MUMBLE_BUILD_CONFIGURATION}" == "Release" ]; then
BUILD_TYPE="RelWithDebInfo"
Expand Down

0 comments on commit c02dbcf

Please sign in to comment.