From c02dbcf02df6ce13f39243c020318bb7aa3e56ca Mon Sep 17 00:00:00 2001 From: Davide Beatrici Date: Sun, 26 Apr 2020 21:44:16 +0200 Subject: [PATCH] buildenv/1.3.x: fix LNK4099 warning when linking to protobuf 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 --- .../patches/protobuf-missing-pdb-fix.patch | 11 +++++++++++ buildenv/1.3.x/win32-static/protobuf.build | 6 +++++- 2 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 buildenv/1.3.x/win32-static/patches/protobuf-missing-pdb-fix.patch diff --git a/buildenv/1.3.x/win32-static/patches/protobuf-missing-pdb-fix.patch b/buildenv/1.3.x/win32-static/patches/protobuf-missing-pdb-fix.patch new file mode 100644 index 00000000..f621fd9b --- /dev/null +++ b/buildenv/1.3.x/win32-static/patches/protobuf-missing-pdb-fix.patch @@ -0,0 +1,11 @@ +--- cmake/CMakeLists_txt ++++ cmake/CMakeLists.txt +@@ -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) diff --git a/buildenv/1.3.x/win32-static/protobuf.build b/buildenv/1.3.x/win32-static/protobuf.build index 7bc72aec..6c5b03b4 100755 --- a/buildenv/1.3.x/win32-static/protobuf.build +++ b/buildenv/1.3.x/win32-static/protobuf.build @@ -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 # . @@ -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"