Skip to content

How do I install boost lib compiled with /guard:cf & /Qspectre flags #23388

@mattfjh

Description

@mattfjh

I added the following settings in my triplet files and hope b2 can use them when compiling boost lib. But the boost lib didn't pass the BinSkim check. How can I fix this?

set(VCPKG_CXX_FLAGS "/Qspectre /guard:cf")
set(VCPKG_LINKER_FLAGS "/guard:cf /DYNAMICBASE")
set(VCPKG_C_FLAGS "/Qspectre /guard:cf")

some logs in install-x64-windows-rel-out.log. it seems the flags in the jam file not correct.

notice: Searching 'xxxx\tools\vcpkg\buildtrees\boost-atomic\x64-windows-rel' for user-config configuration file 'user-config.jam'.
notice: Loading user-config configuration file 'user-config.jam' from 'C:/git/CMD-NativeThinClients/tools/vcpkg/buildtrees/boost-atomic/x64-windows-rel'.
xxxx\tools\vcpkg\buildtrees\boost-atomic\x64-windows-rel\user-config.jam:6: Unescaped special character in argument /guard:cf
xxxx\tools\vcpkg\buildtrees\boost-atomic\x64-windows-rel\user-config.jam:7: Unescaped special character in argument /guard:cf
xxxx\tools\vcpkg\buildtrees\boost-atomic\x64-windows-rel\user-config.jam:8: Unescaped special character in argument /machine:x64
xxxx\tools\vcpkg\buildtrees\boost-atomic\x64-windows-rel\user-config.jam:8: Unescaped special character in argument /INCREMENTAL:NO
xxxx\tools\vcpkg\buildtrees\boost-atomic\x64-windows-rel\user-config.jam:8: Unescaped special character in argument /OPT:REF
xxxx\tools\vcpkg\buildtrees\boost-atomic\x64-windows-rel\user-config.jam:8: Unescaped special character in argument /OPT:ICF
xxxx\tools\vcpkg\buildtrees\boost-atomic\x64-windows-rel\user-config.jam:8: Unescaped special character in argument /guard:cf

Metadata

Metadata

Labels

category:port-bugThe issue is with a library, which is something the port should already support

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions