[botan] Fix debug info (#22911)

* [botan] Fix debug info

- Embed debug info into object files.
- Enable debug info for release builds.
- Pass-through C++ build flags.

Fixes #12088

* Fix version database.

Co-authored-by: Billy Robert O'Neal III <bion@microsoft.com>
This commit is contained in:
Nico Rieck 2022-02-04 10:16:11 +01:00 committed by GitHub
parent 0e8ad3b3c6
commit e407f1b99e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 31 additions and 3 deletions

View File

@ -0,0 +1,17 @@
diff --git a/src/build-data/cc/msvc.txt b/src/build-data/cc/msvc.txt
index 2306a4485..977e2e958 100644
--- a/src/build-data/cc/msvc.txt
+++ b/src/build-data/cc/msvc.txt
@@ -17,10 +17,10 @@ optimization_flags "/O2 /Oi"
size_optimization_flags "/O1 /Os"
# for debug info in the object file:
-#debug_info_flags "/Z7"
+debug_info_flags "/Z7"
# for using a PDB file:
-debug_info_flags "/Zi /FS"
+#debug_info_flags "/Zi /FS"
preproc_flags "/nologo /EP"

View File

@ -6,6 +6,7 @@ vcpkg_from_github(
HEAD_REF master
PATCHES
fix-generate-build-path.patch
embed-debug-info.patch
)
if(CMAKE_HOST_WIN32)
@ -80,11 +81,16 @@ function(BOTAN_BUILD BOTAN_BUILD_TYPE)
"--distribution-info=vcpkg ${TARGET_TRIPLET}"
--prefix=${BOTAN_FLAG_PREFIX}
--with-pkg-config
--link-method=copy)
--link-method=copy
--with-debug-info)
if(CMAKE_HOST_WIN32)
list(APPEND configure_arguments ${BOTAN_MSVC_RUNTIME}${BOTAN_MSVC_RUNTIME_SUFFIX})
endif()
if(VCPKG_CXX_FLAGS)
list(APPEND configure_arguments --extra-cxxflags ${VCPKG_CXX_FLAGS})
endif()
if("-DBOTAN_AMALGAMATION=ON" IN_LIST FEATURE_OPTIONS)
list(APPEND configure_arguments --amalgamation)
endif()

View File

@ -1,7 +1,7 @@
{
"name": "botan",
"version": "2.18.1",
"port-version": 7,
"port-version": 8,
"description": "A cryptography library written in C++11",
"homepage": "https://botan.randombit.net",
"license": "BSD-2-Clause",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "267c31f3759881d233529d28ec78e2a0c8d1e9b4",
"version": "2.18.1",
"port-version": 8
},
{
"git-tree": "dfbd885e94b11d3b8074d96c92e810a0f1a7be7a",
"version": "2.18.1",

View File

@ -1126,7 +1126,7 @@
},
"botan": {
"baseline": "2.18.1",
"port-version": 7
"port-version": 8
},
"box2d": {
"baseline": "2.4.1",