diff --git a/cmake/vcpkg-triplets/asan/arm64-linux.cmake b/cmake/vcpkg-triplets/asan/arm64-linux.cmake index 6875a03064bfa..9f5c9997daedb 100644 --- a/cmake/vcpkg-triplets/asan/arm64-linux.cmake +++ b/cmake/vcpkg-triplets/asan/arm64-linux.cmake @@ -3,12 +3,15 @@ set(VCPKG_TARGET_ARCHITECTURE arm64) set(VCPKG_CRT_LINKAGE dynamic) set(VCPKG_LIBRARY_LINKAGE static) -set(VCPKG_C_FLAGS "-fsanitize=address") -set(VCPKG_CXX_FLAGS "-fsanitize=address") +set(VCPKG_C_FLAGS "-g -fsanitize=address") +set(VCPKG_CXX_FLAGS "-g -fsanitize=address") +set(VCPKG_C_FLAGS_RELEASE "-DNDEBUG -O3") +set(VCPKG_CXX_FLAGS_RELEASE "-DNDEBUG -O3") set(VCPKG_CMAKE_SYSTEM_NAME Linux) set(CMAKE_POSITION_INDEPENDENT_CODE ON) list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS --compile-no-warning-as-error -DBENCHMARK_ENABLE_WERROR=OFF) -set(VCPKG_LINKER_FLAGS "-fsanitize=address") +set(VCPKG_LINKER_FLAGS "-fsanitize=address -g") +list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS -DCMAKE_CXX_STANDARD=17) if(PORT MATCHES "onnx") list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS "-DONNX_DISABLE_STATIC_REGISTRATION=ON" diff --git a/cmake/vcpkg-triplets/asan/arm64-osx.cmake b/cmake/vcpkg-triplets/asan/arm64-osx.cmake index 4ac6bd8097de6..ba56684949836 100644 --- a/cmake/vcpkg-triplets/asan/arm64-osx.cmake +++ b/cmake/vcpkg-triplets/asan/arm64-osx.cmake @@ -3,13 +3,16 @@ set(VCPKG_TARGET_ARCHITECTURE arm64) set(VCPKG_CRT_LINKAGE dynamic) set(VCPKG_LIBRARY_LINKAGE static) -set(VCPKG_C_FLAGS "-fsanitize=address") -set(VCPKG_CXX_FLAGS "-fsanitize=address") +set(VCPKG_C_FLAGS "-g -fsanitize=address") +set(VCPKG_CXX_FLAGS "-g -fsanitize=address") +set(VCPKG_C_FLAGS_RELEASE "-DNDEBUG -O3") +set(VCPKG_CXX_FLAGS_RELEASE "-DNDEBUG -O3") set(VCPKG_CMAKE_SYSTEM_NAME Darwin) set(VCPKG_OSX_ARCHITECTURES "arm64") set(CMAKE_POSITION_INDEPENDENT_CODE ON) list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS --compile-no-warning-as-error -DBENCHMARK_ENABLE_WERROR=OFF) -set(VCPKG_LINKER_FLAGS "-fsanitize=address") +set(VCPKG_LINKER_FLAGS "-fsanitize=address -g") +list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS -DCMAKE_CXX_STANDARD=20) if(PORT MATCHES "onnx") list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS "-DONNX_DISABLE_STATIC_REGISTRATION=ON" diff --git a/cmake/vcpkg-triplets/asan/arm64-windows-static-md.cmake b/cmake/vcpkg-triplets/asan/arm64-windows-static-md.cmake index c03c9e718fc80..79e10ad9e4436 100644 --- a/cmake/vcpkg-triplets/asan/arm64-windows-static-md.cmake +++ b/cmake/vcpkg-triplets/asan/arm64-windows-static-md.cmake @@ -5,7 +5,7 @@ set(VCPKG_CRT_LINKAGE dynamic) set(VCPKG_LIBRARY_LINKAGE static) set(VCPKG_C_FLAGS "/MP /DWIN32 /D_WINDOWS /DWINAPI_FAMILY=100 /DWINVER=0x0A00 /D_WIN32_WINNT=0x0A00 /DNTDDI_VERSION=0x0A000000 /fsanitize=address") set(VCPKG_CXX_FLAGS "/MP /DWIN32 /D_WINDOWS /DWINAPI_FAMILY=100 /DWINVER=0x0A00 /D_WIN32_WINNT=0x0A00 /DNTDDI_VERSION=0x0A000000 /fsanitize=address /Zc:__cplusplus") -list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS --compile-no-warning-as-error) +list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS --compile-no-warning-as-error -DCMAKE_CXX_STANDARD=17) if(PORT MATCHES "onnx") list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS "-DONNX_DISABLE_STATIC_REGISTRATION=ON" diff --git a/cmake/vcpkg-triplets/asan/arm64-windows-static.cmake b/cmake/vcpkg-triplets/asan/arm64-windows-static.cmake index 184001d4238b0..d0a3305b1f74a 100644 --- a/cmake/vcpkg-triplets/asan/arm64-windows-static.cmake +++ b/cmake/vcpkg-triplets/asan/arm64-windows-static.cmake @@ -5,7 +5,7 @@ set(VCPKG_CRT_LINKAGE static) set(VCPKG_LIBRARY_LINKAGE static) set(VCPKG_C_FLAGS "/MP /DWIN32 /D_WINDOWS /DWINAPI_FAMILY=100 /DWINVER=0x0A00 /D_WIN32_WINNT=0x0A00 /DNTDDI_VERSION=0x0A000000 /fsanitize=address") set(VCPKG_CXX_FLAGS "/MP /DWIN32 /D_WINDOWS /DWINAPI_FAMILY=100 /DWINVER=0x0A00 /D_WIN32_WINNT=0x0A00 /DNTDDI_VERSION=0x0A000000 /fsanitize=address /Zc:__cplusplus") -list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS --compile-no-warning-as-error) +list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS --compile-no-warning-as-error -DCMAKE_CXX_STANDARD=17) if(PORT MATCHES "onnx") list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS "-DONNX_DISABLE_STATIC_REGISTRATION=ON" diff --git a/cmake/vcpkg-triplets/asan/arm64ec-windows-static-md.cmake b/cmake/vcpkg-triplets/asan/arm64ec-windows-static-md.cmake index 36176fe04033e..05a9718835ffb 100644 --- a/cmake/vcpkg-triplets/asan/arm64ec-windows-static-md.cmake +++ b/cmake/vcpkg-triplets/asan/arm64ec-windows-static-md.cmake @@ -5,7 +5,7 @@ set(VCPKG_CRT_LINKAGE dynamic) set(VCPKG_LIBRARY_LINKAGE static) set(VCPKG_C_FLAGS "/MP /DWIN32 /D_WINDOWS /DWINAPI_FAMILY=100 /DWINVER=0x0A00 /D_WIN32_WINNT=0x0A00 /DNTDDI_VERSION=0x0A000000 /fsanitize=address") set(VCPKG_CXX_FLAGS "/MP /DWIN32 /D_WINDOWS /DWINAPI_FAMILY=100 /DWINVER=0x0A00 /D_WIN32_WINNT=0x0A00 /DNTDDI_VERSION=0x0A000000 /fsanitize=address /Zc:__cplusplus") -list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS --compile-no-warning-as-error) +list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS --compile-no-warning-as-error -DCMAKE_CXX_STANDARD=17) if(PORT MATCHES "onnx") list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS "-DONNX_DISABLE_STATIC_REGISTRATION=ON" diff --git a/cmake/vcpkg-triplets/asan/arm64ec-windows-static.cmake b/cmake/vcpkg-triplets/asan/arm64ec-windows-static.cmake index aa086c1220dfb..e0f4b2e1e4183 100644 --- a/cmake/vcpkg-triplets/asan/arm64ec-windows-static.cmake +++ b/cmake/vcpkg-triplets/asan/arm64ec-windows-static.cmake @@ -5,7 +5,7 @@ set(VCPKG_CRT_LINKAGE static) set(VCPKG_LIBRARY_LINKAGE static) set(VCPKG_C_FLAGS "/MP /DWIN32 /D_WINDOWS /DWINAPI_FAMILY=100 /DWINVER=0x0A00 /D_WIN32_WINNT=0x0A00 /DNTDDI_VERSION=0x0A000000 /fsanitize=address") set(VCPKG_CXX_FLAGS "/MP /DWIN32 /D_WINDOWS /DWINAPI_FAMILY=100 /DWINVER=0x0A00 /D_WIN32_WINNT=0x0A00 /DNTDDI_VERSION=0x0A000000 /fsanitize=address /Zc:__cplusplus") -list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS --compile-no-warning-as-error) +list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS --compile-no-warning-as-error -DCMAKE_CXX_STANDARD=17) if(PORT MATCHES "onnx") list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS "-DONNX_DISABLE_STATIC_REGISTRATION=ON" diff --git a/cmake/vcpkg-triplets/asan/universal2-osx.cmake b/cmake/vcpkg-triplets/asan/universal2-osx.cmake index de2c8cee48ed5..d74494d578cd9 100644 --- a/cmake/vcpkg-triplets/asan/universal2-osx.cmake +++ b/cmake/vcpkg-triplets/asan/universal2-osx.cmake @@ -3,13 +3,16 @@ set(VCPKG_TARGET_ARCHITECTURE x64) set(VCPKG_CRT_LINKAGE dynamic) set(VCPKG_LIBRARY_LINKAGE static) -set(VCPKG_C_FLAGS "-fsanitize=address") -set(VCPKG_CXX_FLAGS "-fsanitize=address") +set(VCPKG_C_FLAGS "-g -fsanitize=address") +set(VCPKG_CXX_FLAGS "-g -fsanitize=address") +set(VCPKG_C_FLAGS_RELEASE "-DNDEBUG -O3") +set(VCPKG_CXX_FLAGS_RELEASE "-DNDEBUG -O3") set(VCPKG_CMAKE_SYSTEM_NAME Darwin) set(VCPKG_OSX_ARCHITECTURES "x86_64;arm64") set(CMAKE_POSITION_INDEPENDENT_CODE ON) list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS --compile-no-warning-as-error -DBENCHMARK_ENABLE_WERROR=OFF) -set(VCPKG_LINKER_FLAGS "-fsanitize=address") +set(VCPKG_LINKER_FLAGS "-fsanitize=address -g") +list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS -DCMAKE_CXX_STANDARD=20) if(PORT MATCHES "onnx") list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS "-DONNX_DISABLE_STATIC_REGISTRATION=ON" diff --git a/cmake/vcpkg-triplets/asan/x64-linux.cmake b/cmake/vcpkg-triplets/asan/x64-linux.cmake index dd1d066eb373a..64ba6b2216394 100644 --- a/cmake/vcpkg-triplets/asan/x64-linux.cmake +++ b/cmake/vcpkg-triplets/asan/x64-linux.cmake @@ -3,12 +3,15 @@ set(VCPKG_TARGET_ARCHITECTURE x64) set(VCPKG_CRT_LINKAGE dynamic) set(VCPKG_LIBRARY_LINKAGE static) -set(VCPKG_C_FLAGS "-fsanitize=address") -set(VCPKG_CXX_FLAGS "-fsanitize=address") +set(VCPKG_C_FLAGS "-g -fsanitize=address") +set(VCPKG_CXX_FLAGS "-g -fsanitize=address") +set(VCPKG_C_FLAGS_RELEASE "-DNDEBUG -O3") +set(VCPKG_CXX_FLAGS_RELEASE "-DNDEBUG -O3") set(VCPKG_CMAKE_SYSTEM_NAME Linux) set(CMAKE_POSITION_INDEPENDENT_CODE ON) list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS --compile-no-warning-as-error -DBENCHMARK_ENABLE_WERROR=OFF) -set(VCPKG_LINKER_FLAGS "-fsanitize=address") +set(VCPKG_LINKER_FLAGS "-fsanitize=address -g") +list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS -DCMAKE_CXX_STANDARD=17) if(PORT MATCHES "onnx") list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS "-DONNX_DISABLE_STATIC_REGISTRATION=ON" diff --git a/cmake/vcpkg-triplets/asan/x64-osx.cmake b/cmake/vcpkg-triplets/asan/x64-osx.cmake index 5f1442c1d5c4e..bbcaff4c39209 100644 --- a/cmake/vcpkg-triplets/asan/x64-osx.cmake +++ b/cmake/vcpkg-triplets/asan/x64-osx.cmake @@ -3,13 +3,16 @@ set(VCPKG_TARGET_ARCHITECTURE x64) set(VCPKG_CRT_LINKAGE dynamic) set(VCPKG_LIBRARY_LINKAGE static) -set(VCPKG_C_FLAGS "-fsanitize=address") -set(VCPKG_CXX_FLAGS "-fsanitize=address") +set(VCPKG_C_FLAGS "-g -fsanitize=address") +set(VCPKG_CXX_FLAGS "-g -fsanitize=address") +set(VCPKG_C_FLAGS_RELEASE "-DNDEBUG -O3") +set(VCPKG_CXX_FLAGS_RELEASE "-DNDEBUG -O3") set(VCPKG_CMAKE_SYSTEM_NAME Darwin) set(VCPKG_OSX_ARCHITECTURES "x86_64") set(CMAKE_POSITION_INDEPENDENT_CODE ON) list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS --compile-no-warning-as-error -DBENCHMARK_ENABLE_WERROR=OFF) -set(VCPKG_LINKER_FLAGS "-fsanitize=address") +set(VCPKG_LINKER_FLAGS "-fsanitize=address -g") +list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS -DCMAKE_CXX_STANDARD=20) if(PORT MATCHES "onnx") list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS "-DONNX_DISABLE_STATIC_REGISTRATION=ON" diff --git a/cmake/vcpkg-triplets/asan/x64-windows-static-md.cmake b/cmake/vcpkg-triplets/asan/x64-windows-static-md.cmake index 27f7a0190a33c..c0edb9ca31cb6 100644 --- a/cmake/vcpkg-triplets/asan/x64-windows-static-md.cmake +++ b/cmake/vcpkg-triplets/asan/x64-windows-static-md.cmake @@ -5,7 +5,7 @@ set(VCPKG_CRT_LINKAGE dynamic) set(VCPKG_LIBRARY_LINKAGE static) set(VCPKG_C_FLAGS "/MP /DWIN32 /D_WINDOWS /DWINAPI_FAMILY=100 /DWINVER=0x0A00 /D_WIN32_WINNT=0x0A00 /DNTDDI_VERSION=0x0A000000 /fsanitize=address") set(VCPKG_CXX_FLAGS "/MP /DWIN32 /D_WINDOWS /DWINAPI_FAMILY=100 /DWINVER=0x0A00 /D_WIN32_WINNT=0x0A00 /DNTDDI_VERSION=0x0A000000 /fsanitize=address /Zc:__cplusplus") -list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS --compile-no-warning-as-error) +list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS --compile-no-warning-as-error -DCMAKE_CXX_STANDARD=17) if(PORT MATCHES "onnx") list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS "-DONNX_DISABLE_STATIC_REGISTRATION=ON" diff --git a/cmake/vcpkg-triplets/asan/x64-windows-static.cmake b/cmake/vcpkg-triplets/asan/x64-windows-static.cmake index 23b8082fbd5a3..3370987c55a12 100644 --- a/cmake/vcpkg-triplets/asan/x64-windows-static.cmake +++ b/cmake/vcpkg-triplets/asan/x64-windows-static.cmake @@ -5,7 +5,7 @@ set(VCPKG_CRT_LINKAGE static) set(VCPKG_LIBRARY_LINKAGE static) set(VCPKG_C_FLAGS "/MP /DWIN32 /D_WINDOWS /DWINAPI_FAMILY=100 /DWINVER=0x0A00 /D_WIN32_WINNT=0x0A00 /DNTDDI_VERSION=0x0A000000 /fsanitize=address") set(VCPKG_CXX_FLAGS "/MP /DWIN32 /D_WINDOWS /DWINAPI_FAMILY=100 /DWINVER=0x0A00 /D_WIN32_WINNT=0x0A00 /DNTDDI_VERSION=0x0A000000 /fsanitize=address /Zc:__cplusplus") -list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS --compile-no-warning-as-error) +list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS --compile-no-warning-as-error -DCMAKE_CXX_STANDARD=17) if(PORT MATCHES "onnx") list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS "-DONNX_DISABLE_STATIC_REGISTRATION=ON" diff --git a/cmake/vcpkg-triplets/asan/x86-windows-static-md.cmake b/cmake/vcpkg-triplets/asan/x86-windows-static-md.cmake index cb9c639049936..429a4ac7cea36 100644 --- a/cmake/vcpkg-triplets/asan/x86-windows-static-md.cmake +++ b/cmake/vcpkg-triplets/asan/x86-windows-static-md.cmake @@ -5,7 +5,7 @@ set(VCPKG_CRT_LINKAGE dynamic) set(VCPKG_LIBRARY_LINKAGE static) set(VCPKG_C_FLAGS "/MP /DWIN32 /D_WINDOWS /DWINAPI_FAMILY=100 /DWINVER=0x0A00 /D_WIN32_WINNT=0x0A00 /DNTDDI_VERSION=0x0A000000 /fsanitize=address") set(VCPKG_CXX_FLAGS "/MP /DWIN32 /D_WINDOWS /DWINAPI_FAMILY=100 /DWINVER=0x0A00 /D_WIN32_WINNT=0x0A00 /DNTDDI_VERSION=0x0A000000 /fsanitize=address /Zc:__cplusplus") -list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS --compile-no-warning-as-error) +list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS --compile-no-warning-as-error -DCMAKE_CXX_STANDARD=17) if(PORT MATCHES "onnx") list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS "-DONNX_DISABLE_STATIC_REGISTRATION=ON" diff --git a/cmake/vcpkg-triplets/asan/x86-windows-static.cmake b/cmake/vcpkg-triplets/asan/x86-windows-static.cmake index 0667f5f0ea61e..404cb3fbd07fb 100644 --- a/cmake/vcpkg-triplets/asan/x86-windows-static.cmake +++ b/cmake/vcpkg-triplets/asan/x86-windows-static.cmake @@ -5,7 +5,7 @@ set(VCPKG_CRT_LINKAGE static) set(VCPKG_LIBRARY_LINKAGE static) set(VCPKG_C_FLAGS "/MP /DWIN32 /D_WINDOWS /DWINAPI_FAMILY=100 /DWINVER=0x0A00 /D_WIN32_WINNT=0x0A00 /DNTDDI_VERSION=0x0A000000 /fsanitize=address") set(VCPKG_CXX_FLAGS "/MP /DWIN32 /D_WINDOWS /DWINAPI_FAMILY=100 /DWINVER=0x0A00 /D_WIN32_WINNT=0x0A00 /DNTDDI_VERSION=0x0A000000 /fsanitize=address /Zc:__cplusplus") -list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS --compile-no-warning-as-error) +list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS --compile-no-warning-as-error -DCMAKE_CXX_STANDARD=17) if(PORT MATCHES "onnx") list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS "-DONNX_DISABLE_STATIC_REGISTRATION=ON" diff --git a/cmake/vcpkg-triplets/asan_nortti/arm64-linux.cmake b/cmake/vcpkg-triplets/asan_nortti/arm64-linux.cmake index 77f35ebada258..3d78741ebcf1d 100644 --- a/cmake/vcpkg-triplets/asan_nortti/arm64-linux.cmake +++ b/cmake/vcpkg-triplets/asan_nortti/arm64-linux.cmake @@ -3,12 +3,15 @@ set(VCPKG_TARGET_ARCHITECTURE arm64) set(VCPKG_CRT_LINKAGE dynamic) set(VCPKG_LIBRARY_LINKAGE static) -set(VCPKG_C_FLAGS "-fsanitize=address -DEMSCRIPTEN_HAS_UNBOUND_TYPE_NAMES=0") -set(VCPKG_CXX_FLAGS "-fsanitize=address -DEMSCRIPTEN_HAS_UNBOUND_TYPE_NAMES=0 -fno-rtti") +set(VCPKG_C_FLAGS "-g -fsanitize=address -DEMSCRIPTEN_HAS_UNBOUND_TYPE_NAMES=0") +set(VCPKG_CXX_FLAGS "-g -fsanitize=address -DEMSCRIPTEN_HAS_UNBOUND_TYPE_NAMES=0 -fno-rtti") +set(VCPKG_C_FLAGS_RELEASE "-DNDEBUG -O3") +set(VCPKG_CXX_FLAGS_RELEASE "-DNDEBUG -O3") set(VCPKG_CMAKE_SYSTEM_NAME Linux) set(CMAKE_POSITION_INDEPENDENT_CODE ON) list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS --compile-no-warning-as-error -DBENCHMARK_ENABLE_WERROR=OFF) -set(VCPKG_LINKER_FLAGS "-fsanitize=address") +set(VCPKG_LINKER_FLAGS "-fsanitize=address -g") +list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS -DCMAKE_CXX_STANDARD=17) if(PORT MATCHES "onnx") list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS "-DONNX_DISABLE_STATIC_REGISTRATION=ON" diff --git a/cmake/vcpkg-triplets/asan_nortti/arm64-osx.cmake b/cmake/vcpkg-triplets/asan_nortti/arm64-osx.cmake index 5cc70905e6e24..b25f8f8ebb8d1 100644 --- a/cmake/vcpkg-triplets/asan_nortti/arm64-osx.cmake +++ b/cmake/vcpkg-triplets/asan_nortti/arm64-osx.cmake @@ -3,13 +3,16 @@ set(VCPKG_TARGET_ARCHITECTURE arm64) set(VCPKG_CRT_LINKAGE dynamic) set(VCPKG_LIBRARY_LINKAGE static) -set(VCPKG_C_FLAGS "-fsanitize=address -DEMSCRIPTEN_HAS_UNBOUND_TYPE_NAMES=0") -set(VCPKG_CXX_FLAGS "-fsanitize=address -DEMSCRIPTEN_HAS_UNBOUND_TYPE_NAMES=0 -fno-rtti") +set(VCPKG_C_FLAGS "-g -fsanitize=address -DEMSCRIPTEN_HAS_UNBOUND_TYPE_NAMES=0") +set(VCPKG_CXX_FLAGS "-g -fsanitize=address -DEMSCRIPTEN_HAS_UNBOUND_TYPE_NAMES=0 -fno-rtti") +set(VCPKG_C_FLAGS_RELEASE "-DNDEBUG -O3") +set(VCPKG_CXX_FLAGS_RELEASE "-DNDEBUG -O3") set(VCPKG_CMAKE_SYSTEM_NAME Darwin) set(VCPKG_OSX_ARCHITECTURES "arm64") set(CMAKE_POSITION_INDEPENDENT_CODE ON) list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS --compile-no-warning-as-error -DBENCHMARK_ENABLE_WERROR=OFF) -set(VCPKG_LINKER_FLAGS "-fsanitize=address") +set(VCPKG_LINKER_FLAGS "-fsanitize=address -g") +list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS -DCMAKE_CXX_STANDARD=20) if(PORT MATCHES "onnx") list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS "-DONNX_DISABLE_STATIC_REGISTRATION=ON" diff --git a/cmake/vcpkg-triplets/asan_nortti/arm64-windows-static-md.cmake b/cmake/vcpkg-triplets/asan_nortti/arm64-windows-static-md.cmake index cb0957791f432..c4ba82b7cac2a 100644 --- a/cmake/vcpkg-triplets/asan_nortti/arm64-windows-static-md.cmake +++ b/cmake/vcpkg-triplets/asan_nortti/arm64-windows-static-md.cmake @@ -5,7 +5,7 @@ set(VCPKG_CRT_LINKAGE dynamic) set(VCPKG_LIBRARY_LINKAGE static) set(VCPKG_C_FLAGS "/MP /DWIN32 /D_WINDOWS /DWINAPI_FAMILY=100 /DWINVER=0x0A00 /D_WIN32_WINNT=0x0A00 /DNTDDI_VERSION=0x0A000000 /fsanitize=address") set(VCPKG_CXX_FLAGS "/MP /DWIN32 /D_WINDOWS /DWINAPI_FAMILY=100 /DWINVER=0x0A00 /D_WIN32_WINNT=0x0A00 /DNTDDI_VERSION=0x0A000000 /fsanitize=address /Zc:__cplusplus /GR- /we4541") -list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS --compile-no-warning-as-error) +list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS --compile-no-warning-as-error -DCMAKE_CXX_STANDARD=17) if(PORT MATCHES "onnx") list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS "-DONNX_DISABLE_STATIC_REGISTRATION=ON" diff --git a/cmake/vcpkg-triplets/asan_nortti/arm64-windows-static.cmake b/cmake/vcpkg-triplets/asan_nortti/arm64-windows-static.cmake index 2d38883062bb1..3b028c4e40bcc 100644 --- a/cmake/vcpkg-triplets/asan_nortti/arm64-windows-static.cmake +++ b/cmake/vcpkg-triplets/asan_nortti/arm64-windows-static.cmake @@ -5,7 +5,7 @@ set(VCPKG_CRT_LINKAGE static) set(VCPKG_LIBRARY_LINKAGE static) set(VCPKG_C_FLAGS "/MP /DWIN32 /D_WINDOWS /DWINAPI_FAMILY=100 /DWINVER=0x0A00 /D_WIN32_WINNT=0x0A00 /DNTDDI_VERSION=0x0A000000 /fsanitize=address") set(VCPKG_CXX_FLAGS "/MP /DWIN32 /D_WINDOWS /DWINAPI_FAMILY=100 /DWINVER=0x0A00 /D_WIN32_WINNT=0x0A00 /DNTDDI_VERSION=0x0A000000 /fsanitize=address /Zc:__cplusplus /GR- /we4541") -list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS --compile-no-warning-as-error) +list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS --compile-no-warning-as-error -DCMAKE_CXX_STANDARD=17) if(PORT MATCHES "onnx") list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS "-DONNX_DISABLE_STATIC_REGISTRATION=ON" diff --git a/cmake/vcpkg-triplets/asan_nortti/arm64ec-windows-static-md.cmake b/cmake/vcpkg-triplets/asan_nortti/arm64ec-windows-static-md.cmake index 4cc7102bf3b1c..d2d4bda334e38 100644 --- a/cmake/vcpkg-triplets/asan_nortti/arm64ec-windows-static-md.cmake +++ b/cmake/vcpkg-triplets/asan_nortti/arm64ec-windows-static-md.cmake @@ -5,7 +5,7 @@ set(VCPKG_CRT_LINKAGE dynamic) set(VCPKG_LIBRARY_LINKAGE static) set(VCPKG_C_FLAGS "/MP /DWIN32 /D_WINDOWS /DWINAPI_FAMILY=100 /DWINVER=0x0A00 /D_WIN32_WINNT=0x0A00 /DNTDDI_VERSION=0x0A000000 /fsanitize=address") set(VCPKG_CXX_FLAGS "/MP /DWIN32 /D_WINDOWS /DWINAPI_FAMILY=100 /DWINVER=0x0A00 /D_WIN32_WINNT=0x0A00 /DNTDDI_VERSION=0x0A000000 /fsanitize=address /Zc:__cplusplus /GR- /we4541") -list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS --compile-no-warning-as-error) +list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS --compile-no-warning-as-error -DCMAKE_CXX_STANDARD=17) if(PORT MATCHES "onnx") list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS "-DONNX_DISABLE_STATIC_REGISTRATION=ON" diff --git a/cmake/vcpkg-triplets/asan_nortti/arm64ec-windows-static.cmake b/cmake/vcpkg-triplets/asan_nortti/arm64ec-windows-static.cmake index d84533c8de35c..8e986eb139862 100644 --- a/cmake/vcpkg-triplets/asan_nortti/arm64ec-windows-static.cmake +++ b/cmake/vcpkg-triplets/asan_nortti/arm64ec-windows-static.cmake @@ -5,7 +5,7 @@ set(VCPKG_CRT_LINKAGE static) set(VCPKG_LIBRARY_LINKAGE static) set(VCPKG_C_FLAGS "/MP /DWIN32 /D_WINDOWS /DWINAPI_FAMILY=100 /DWINVER=0x0A00 /D_WIN32_WINNT=0x0A00 /DNTDDI_VERSION=0x0A000000 /fsanitize=address") set(VCPKG_CXX_FLAGS "/MP /DWIN32 /D_WINDOWS /DWINAPI_FAMILY=100 /DWINVER=0x0A00 /D_WIN32_WINNT=0x0A00 /DNTDDI_VERSION=0x0A000000 /fsanitize=address /Zc:__cplusplus /GR- /we4541") -list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS --compile-no-warning-as-error) +list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS --compile-no-warning-as-error -DCMAKE_CXX_STANDARD=17) if(PORT MATCHES "onnx") list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS "-DONNX_DISABLE_STATIC_REGISTRATION=ON" diff --git a/cmake/vcpkg-triplets/asan_nortti/universal2-osx.cmake b/cmake/vcpkg-triplets/asan_nortti/universal2-osx.cmake index cacbfa751677d..6181e6d1c161b 100644 --- a/cmake/vcpkg-triplets/asan_nortti/universal2-osx.cmake +++ b/cmake/vcpkg-triplets/asan_nortti/universal2-osx.cmake @@ -3,13 +3,16 @@ set(VCPKG_TARGET_ARCHITECTURE x64) set(VCPKG_CRT_LINKAGE dynamic) set(VCPKG_LIBRARY_LINKAGE static) -set(VCPKG_C_FLAGS "-fsanitize=address -DEMSCRIPTEN_HAS_UNBOUND_TYPE_NAMES=0") -set(VCPKG_CXX_FLAGS "-fsanitize=address -DEMSCRIPTEN_HAS_UNBOUND_TYPE_NAMES=0 -fno-rtti") +set(VCPKG_C_FLAGS "-g -fsanitize=address -DEMSCRIPTEN_HAS_UNBOUND_TYPE_NAMES=0") +set(VCPKG_CXX_FLAGS "-g -fsanitize=address -DEMSCRIPTEN_HAS_UNBOUND_TYPE_NAMES=0 -fno-rtti") +set(VCPKG_C_FLAGS_RELEASE "-DNDEBUG -O3") +set(VCPKG_CXX_FLAGS_RELEASE "-DNDEBUG -O3") set(VCPKG_CMAKE_SYSTEM_NAME Darwin) set(VCPKG_OSX_ARCHITECTURES "x86_64;arm64") set(CMAKE_POSITION_INDEPENDENT_CODE ON) list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS --compile-no-warning-as-error -DBENCHMARK_ENABLE_WERROR=OFF) -set(VCPKG_LINKER_FLAGS "-fsanitize=address") +set(VCPKG_LINKER_FLAGS "-fsanitize=address -g") +list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS -DCMAKE_CXX_STANDARD=20) if(PORT MATCHES "onnx") list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS "-DONNX_DISABLE_STATIC_REGISTRATION=ON" diff --git a/cmake/vcpkg-triplets/asan_nortti/x64-linux.cmake b/cmake/vcpkg-triplets/asan_nortti/x64-linux.cmake index b53e668a64c09..d7103ff2508bf 100644 --- a/cmake/vcpkg-triplets/asan_nortti/x64-linux.cmake +++ b/cmake/vcpkg-triplets/asan_nortti/x64-linux.cmake @@ -3,12 +3,15 @@ set(VCPKG_TARGET_ARCHITECTURE x64) set(VCPKG_CRT_LINKAGE dynamic) set(VCPKG_LIBRARY_LINKAGE static) -set(VCPKG_C_FLAGS "-fsanitize=address -DEMSCRIPTEN_HAS_UNBOUND_TYPE_NAMES=0") -set(VCPKG_CXX_FLAGS "-fsanitize=address -DEMSCRIPTEN_HAS_UNBOUND_TYPE_NAMES=0 -fno-rtti") +set(VCPKG_C_FLAGS "-g -fsanitize=address -DEMSCRIPTEN_HAS_UNBOUND_TYPE_NAMES=0") +set(VCPKG_CXX_FLAGS "-g -fsanitize=address -DEMSCRIPTEN_HAS_UNBOUND_TYPE_NAMES=0 -fno-rtti") +set(VCPKG_C_FLAGS_RELEASE "-DNDEBUG -O3") +set(VCPKG_CXX_FLAGS_RELEASE "-DNDEBUG -O3") set(VCPKG_CMAKE_SYSTEM_NAME Linux) set(CMAKE_POSITION_INDEPENDENT_CODE ON) list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS --compile-no-warning-as-error -DBENCHMARK_ENABLE_WERROR=OFF) -set(VCPKG_LINKER_FLAGS "-fsanitize=address") +set(VCPKG_LINKER_FLAGS "-fsanitize=address -g") +list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS -DCMAKE_CXX_STANDARD=17) if(PORT MATCHES "onnx") list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS "-DONNX_DISABLE_STATIC_REGISTRATION=ON" diff --git a/cmake/vcpkg-triplets/asan_nortti/x64-osx.cmake b/cmake/vcpkg-triplets/asan_nortti/x64-osx.cmake index 9f4adb513edd4..191dfb3d35d10 100644 --- a/cmake/vcpkg-triplets/asan_nortti/x64-osx.cmake +++ b/cmake/vcpkg-triplets/asan_nortti/x64-osx.cmake @@ -3,13 +3,16 @@ set(VCPKG_TARGET_ARCHITECTURE x64) set(VCPKG_CRT_LINKAGE dynamic) set(VCPKG_LIBRARY_LINKAGE static) -set(VCPKG_C_FLAGS "-fsanitize=address -DEMSCRIPTEN_HAS_UNBOUND_TYPE_NAMES=0") -set(VCPKG_CXX_FLAGS "-fsanitize=address -DEMSCRIPTEN_HAS_UNBOUND_TYPE_NAMES=0 -fno-rtti") +set(VCPKG_C_FLAGS "-g -fsanitize=address -DEMSCRIPTEN_HAS_UNBOUND_TYPE_NAMES=0") +set(VCPKG_CXX_FLAGS "-g -fsanitize=address -DEMSCRIPTEN_HAS_UNBOUND_TYPE_NAMES=0 -fno-rtti") +set(VCPKG_C_FLAGS_RELEASE "-DNDEBUG -O3") +set(VCPKG_CXX_FLAGS_RELEASE "-DNDEBUG -O3") set(VCPKG_CMAKE_SYSTEM_NAME Darwin) set(VCPKG_OSX_ARCHITECTURES "x86_64") set(CMAKE_POSITION_INDEPENDENT_CODE ON) list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS --compile-no-warning-as-error -DBENCHMARK_ENABLE_WERROR=OFF) -set(VCPKG_LINKER_FLAGS "-fsanitize=address") +set(VCPKG_LINKER_FLAGS "-fsanitize=address -g") +list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS -DCMAKE_CXX_STANDARD=20) if(PORT MATCHES "onnx") list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS "-DONNX_DISABLE_STATIC_REGISTRATION=ON" diff --git a/cmake/vcpkg-triplets/asan_nortti/x64-windows-static-md.cmake b/cmake/vcpkg-triplets/asan_nortti/x64-windows-static-md.cmake index 2812ed9419e43..ae3f00b851145 100644 --- a/cmake/vcpkg-triplets/asan_nortti/x64-windows-static-md.cmake +++ b/cmake/vcpkg-triplets/asan_nortti/x64-windows-static-md.cmake @@ -5,7 +5,7 @@ set(VCPKG_CRT_LINKAGE dynamic) set(VCPKG_LIBRARY_LINKAGE static) set(VCPKG_C_FLAGS "/MP /DWIN32 /D_WINDOWS /DWINAPI_FAMILY=100 /DWINVER=0x0A00 /D_WIN32_WINNT=0x0A00 /DNTDDI_VERSION=0x0A000000 /fsanitize=address") set(VCPKG_CXX_FLAGS "/MP /DWIN32 /D_WINDOWS /DWINAPI_FAMILY=100 /DWINVER=0x0A00 /D_WIN32_WINNT=0x0A00 /DNTDDI_VERSION=0x0A000000 /fsanitize=address /Zc:__cplusplus /GR- /we4541") -list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS --compile-no-warning-as-error) +list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS --compile-no-warning-as-error -DCMAKE_CXX_STANDARD=17) if(PORT MATCHES "onnx") list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS "-DONNX_DISABLE_STATIC_REGISTRATION=ON" diff --git a/cmake/vcpkg-triplets/asan_nortti/x64-windows-static.cmake b/cmake/vcpkg-triplets/asan_nortti/x64-windows-static.cmake index ccdb919b3e3ee..d64f20d3ce7f6 100644 --- a/cmake/vcpkg-triplets/asan_nortti/x64-windows-static.cmake +++ b/cmake/vcpkg-triplets/asan_nortti/x64-windows-static.cmake @@ -5,7 +5,7 @@ set(VCPKG_CRT_LINKAGE static) set(VCPKG_LIBRARY_LINKAGE static) set(VCPKG_C_FLAGS "/MP /DWIN32 /D_WINDOWS /DWINAPI_FAMILY=100 /DWINVER=0x0A00 /D_WIN32_WINNT=0x0A00 /DNTDDI_VERSION=0x0A000000 /fsanitize=address") set(VCPKG_CXX_FLAGS "/MP /DWIN32 /D_WINDOWS /DWINAPI_FAMILY=100 /DWINVER=0x0A00 /D_WIN32_WINNT=0x0A00 /DNTDDI_VERSION=0x0A000000 /fsanitize=address /Zc:__cplusplus /GR- /we4541") -list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS --compile-no-warning-as-error) +list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS --compile-no-warning-as-error -DCMAKE_CXX_STANDARD=17) if(PORT MATCHES "onnx") list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS "-DONNX_DISABLE_STATIC_REGISTRATION=ON" diff --git a/cmake/vcpkg-triplets/asan_nortti/x86-windows-static-md.cmake b/cmake/vcpkg-triplets/asan_nortti/x86-windows-static-md.cmake index 7a6b45666a924..24ddfa43c0f59 100644 --- a/cmake/vcpkg-triplets/asan_nortti/x86-windows-static-md.cmake +++ b/cmake/vcpkg-triplets/asan_nortti/x86-windows-static-md.cmake @@ -5,7 +5,7 @@ set(VCPKG_CRT_LINKAGE dynamic) set(VCPKG_LIBRARY_LINKAGE static) set(VCPKG_C_FLAGS "/MP /DWIN32 /D_WINDOWS /DWINAPI_FAMILY=100 /DWINVER=0x0A00 /D_WIN32_WINNT=0x0A00 /DNTDDI_VERSION=0x0A000000 /fsanitize=address") set(VCPKG_CXX_FLAGS "/MP /DWIN32 /D_WINDOWS /DWINAPI_FAMILY=100 /DWINVER=0x0A00 /D_WIN32_WINNT=0x0A00 /DNTDDI_VERSION=0x0A000000 /fsanitize=address /Zc:__cplusplus /GR- /we4541") -list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS --compile-no-warning-as-error) +list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS --compile-no-warning-as-error -DCMAKE_CXX_STANDARD=17) if(PORT MATCHES "onnx") list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS "-DONNX_DISABLE_STATIC_REGISTRATION=ON" diff --git a/cmake/vcpkg-triplets/asan_nortti/x86-windows-static.cmake b/cmake/vcpkg-triplets/asan_nortti/x86-windows-static.cmake index 96b2a2ad749b8..53fcb44313c26 100644 --- a/cmake/vcpkg-triplets/asan_nortti/x86-windows-static.cmake +++ b/cmake/vcpkg-triplets/asan_nortti/x86-windows-static.cmake @@ -5,7 +5,7 @@ set(VCPKG_CRT_LINKAGE static) set(VCPKG_LIBRARY_LINKAGE static) set(VCPKG_C_FLAGS "/MP /DWIN32 /D_WINDOWS /DWINAPI_FAMILY=100 /DWINVER=0x0A00 /D_WIN32_WINNT=0x0A00 /DNTDDI_VERSION=0x0A000000 /fsanitize=address") set(VCPKG_CXX_FLAGS "/MP /DWIN32 /D_WINDOWS /DWINAPI_FAMILY=100 /DWINVER=0x0A00 /D_WIN32_WINNT=0x0A00 /DNTDDI_VERSION=0x0A000000 /fsanitize=address /Zc:__cplusplus /GR- /we4541") -list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS --compile-no-warning-as-error) +list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS --compile-no-warning-as-error -DCMAKE_CXX_STANDARD=17) if(PORT MATCHES "onnx") list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS "-DONNX_DISABLE_STATIC_REGISTRATION=ON" diff --git a/cmake/vcpkg-triplets/binskim/arm64-linux.cmake b/cmake/vcpkg-triplets/binskim/arm64-linux.cmake index 4b738553e0fbc..8a3cf645d7f5f 100644 --- a/cmake/vcpkg-triplets/binskim/arm64-linux.cmake +++ b/cmake/vcpkg-triplets/binskim/arm64-linux.cmake @@ -3,12 +3,15 @@ set(VCPKG_TARGET_ARCHITECTURE arm64) set(VCPKG_CRT_LINKAGE dynamic) set(VCPKG_LIBRARY_LINKAGE static) -set(VCPKG_C_FLAGS "-Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong") -set(VCPKG_CXX_FLAGS "-Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong") +set(VCPKG_C_FLAGS "-g") +set(VCPKG_CXX_FLAGS "-g") +set(VCPKG_C_FLAGS_RELEASE "-DNDEBUG -O3 -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong") +set(VCPKG_CXX_FLAGS_RELEASE "-DNDEBUG -O3 -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong") set(VCPKG_CMAKE_SYSTEM_NAME Linux) set(CMAKE_POSITION_INDEPENDENT_CODE ON) list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS --compile-no-warning-as-error -DBENCHMARK_ENABLE_WERROR=OFF) -set(VCPKG_LINKER_FLAGS "-Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,now -Wl,-z,noexecstack") +set(VCPKG_LINKER_FLAGS "-Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,now -Wl,-z,noexecstack -g") +list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS -DCMAKE_CXX_STANDARD=17) if(PORT MATCHES "onnx") list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS "-DONNX_DISABLE_STATIC_REGISTRATION=ON" diff --git a/cmake/vcpkg-triplets/binskim/arm64-osx.cmake b/cmake/vcpkg-triplets/binskim/arm64-osx.cmake index 4b6999874b111..9892a3eac80e8 100644 --- a/cmake/vcpkg-triplets/binskim/arm64-osx.cmake +++ b/cmake/vcpkg-triplets/binskim/arm64-osx.cmake @@ -3,12 +3,16 @@ set(VCPKG_TARGET_ARCHITECTURE arm64) set(VCPKG_CRT_LINKAGE dynamic) set(VCPKG_LIBRARY_LINKAGE static) -set(VCPKG_C_FLAGS "-Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong") -set(VCPKG_CXX_FLAGS "-Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong") +set(VCPKG_C_FLAGS "-g") +set(VCPKG_CXX_FLAGS "-g") +set(VCPKG_C_FLAGS_RELEASE "-DNDEBUG -O3 -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong") +set(VCPKG_CXX_FLAGS_RELEASE "-DNDEBUG -O3 -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong") set(VCPKG_CMAKE_SYSTEM_NAME Darwin) set(VCPKG_OSX_ARCHITECTURES "arm64") set(CMAKE_POSITION_INDEPENDENT_CODE ON) list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS --compile-no-warning-as-error -DBENCHMARK_ENABLE_WERROR=OFF) +set(VCPKG_LINKER_FLAGS "-g") +list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS -DCMAKE_CXX_STANDARD=20) if(PORT MATCHES "onnx") list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS "-DONNX_DISABLE_STATIC_REGISTRATION=ON" diff --git a/cmake/vcpkg-triplets/binskim/arm64-windows-static-md.cmake b/cmake/vcpkg-triplets/binskim/arm64-windows-static-md.cmake index 89dfae4bcbf26..3818356b5c0ce 100644 --- a/cmake/vcpkg-triplets/binskim/arm64-windows-static-md.cmake +++ b/cmake/vcpkg-triplets/binskim/arm64-windows-static-md.cmake @@ -5,7 +5,7 @@ set(VCPKG_CRT_LINKAGE dynamic) set(VCPKG_LIBRARY_LINKAGE static) set(VCPKG_C_FLAGS "/MP /DWIN32 /D_WINDOWS /DWINAPI_FAMILY=100 /DWINVER=0x0A00 /D_WIN32_WINNT=0x0A00 /DNTDDI_VERSION=0x0A000000 /guard:cf /Qspectre") set(VCPKG_CXX_FLAGS "/MP /DWIN32 /D_WINDOWS /DWINAPI_FAMILY=100 /DWINVER=0x0A00 /D_WIN32_WINNT=0x0A00 /DNTDDI_VERSION=0x0A000000 /guard:cf /Qspectre /Zc:__cplusplus") -list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS --compile-no-warning-as-error) +list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS --compile-no-warning-as-error -DCMAKE_CXX_STANDARD=17) set(VCPKG_LINKER_FLAGS "/profile /DYNAMICBASE") if(PORT MATCHES "onnx") list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS diff --git a/cmake/vcpkg-triplets/binskim/arm64-windows-static.cmake b/cmake/vcpkg-triplets/binskim/arm64-windows-static.cmake index 28ef65c4d1227..ab38e9f9a9f18 100644 --- a/cmake/vcpkg-triplets/binskim/arm64-windows-static.cmake +++ b/cmake/vcpkg-triplets/binskim/arm64-windows-static.cmake @@ -5,7 +5,7 @@ set(VCPKG_CRT_LINKAGE static) set(VCPKG_LIBRARY_LINKAGE static) set(VCPKG_C_FLAGS "/MP /DWIN32 /D_WINDOWS /DWINAPI_FAMILY=100 /DWINVER=0x0A00 /D_WIN32_WINNT=0x0A00 /DNTDDI_VERSION=0x0A000000 /guard:cf /Qspectre") set(VCPKG_CXX_FLAGS "/MP /DWIN32 /D_WINDOWS /DWINAPI_FAMILY=100 /DWINVER=0x0A00 /D_WIN32_WINNT=0x0A00 /DNTDDI_VERSION=0x0A000000 /guard:cf /Qspectre /Zc:__cplusplus") -list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS --compile-no-warning-as-error) +list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS --compile-no-warning-as-error -DCMAKE_CXX_STANDARD=17) set(VCPKG_LINKER_FLAGS "/profile /DYNAMICBASE") if(PORT MATCHES "onnx") list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS diff --git a/cmake/vcpkg-triplets/binskim/arm64ec-windows-static-md.cmake b/cmake/vcpkg-triplets/binskim/arm64ec-windows-static-md.cmake index 0c087aa1b59f7..6937aea847a8a 100644 --- a/cmake/vcpkg-triplets/binskim/arm64ec-windows-static-md.cmake +++ b/cmake/vcpkg-triplets/binskim/arm64ec-windows-static-md.cmake @@ -5,7 +5,7 @@ set(VCPKG_CRT_LINKAGE dynamic) set(VCPKG_LIBRARY_LINKAGE static) set(VCPKG_C_FLAGS "/MP /DWIN32 /D_WINDOWS /DWINAPI_FAMILY=100 /DWINVER=0x0A00 /D_WIN32_WINNT=0x0A00 /DNTDDI_VERSION=0x0A000000 /guard:cf /Qspectre") set(VCPKG_CXX_FLAGS "/MP /DWIN32 /D_WINDOWS /DWINAPI_FAMILY=100 /DWINVER=0x0A00 /D_WIN32_WINNT=0x0A00 /DNTDDI_VERSION=0x0A000000 /guard:cf /Qspectre /Zc:__cplusplus") -list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS --compile-no-warning-as-error) +list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS --compile-no-warning-as-error -DCMAKE_CXX_STANDARD=17) set(VCPKG_LINKER_FLAGS "/profile /DYNAMICBASE") if(PORT MATCHES "onnx") list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS diff --git a/cmake/vcpkg-triplets/binskim/arm64ec-windows-static.cmake b/cmake/vcpkg-triplets/binskim/arm64ec-windows-static.cmake index 8c7de3b8a97f9..84c0531033699 100644 --- a/cmake/vcpkg-triplets/binskim/arm64ec-windows-static.cmake +++ b/cmake/vcpkg-triplets/binskim/arm64ec-windows-static.cmake @@ -5,7 +5,7 @@ set(VCPKG_CRT_LINKAGE static) set(VCPKG_LIBRARY_LINKAGE static) set(VCPKG_C_FLAGS "/MP /DWIN32 /D_WINDOWS /DWINAPI_FAMILY=100 /DWINVER=0x0A00 /D_WIN32_WINNT=0x0A00 /DNTDDI_VERSION=0x0A000000 /guard:cf /Qspectre") set(VCPKG_CXX_FLAGS "/MP /DWIN32 /D_WINDOWS /DWINAPI_FAMILY=100 /DWINVER=0x0A00 /D_WIN32_WINNT=0x0A00 /DNTDDI_VERSION=0x0A000000 /guard:cf /Qspectre /Zc:__cplusplus") -list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS --compile-no-warning-as-error) +list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS --compile-no-warning-as-error -DCMAKE_CXX_STANDARD=17) set(VCPKG_LINKER_FLAGS "/profile /DYNAMICBASE") if(PORT MATCHES "onnx") list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS diff --git a/cmake/vcpkg-triplets/binskim/universal2-osx.cmake b/cmake/vcpkg-triplets/binskim/universal2-osx.cmake index 60826f1ede770..da4c6abb39000 100644 --- a/cmake/vcpkg-triplets/binskim/universal2-osx.cmake +++ b/cmake/vcpkg-triplets/binskim/universal2-osx.cmake @@ -3,12 +3,16 @@ set(VCPKG_TARGET_ARCHITECTURE x64) set(VCPKG_CRT_LINKAGE dynamic) set(VCPKG_LIBRARY_LINKAGE static) -set(VCPKG_C_FLAGS "-Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong") -set(VCPKG_CXX_FLAGS "-Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong") +set(VCPKG_C_FLAGS "-g") +set(VCPKG_CXX_FLAGS "-g") +set(VCPKG_C_FLAGS_RELEASE "-DNDEBUG -O3 -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong") +set(VCPKG_CXX_FLAGS_RELEASE "-DNDEBUG -O3 -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong") set(VCPKG_CMAKE_SYSTEM_NAME Darwin) set(VCPKG_OSX_ARCHITECTURES "x86_64;arm64") set(CMAKE_POSITION_INDEPENDENT_CODE ON) list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS --compile-no-warning-as-error -DBENCHMARK_ENABLE_WERROR=OFF) +set(VCPKG_LINKER_FLAGS "-g") +list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS -DCMAKE_CXX_STANDARD=20) if(PORT MATCHES "onnx") list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS "-DONNX_DISABLE_STATIC_REGISTRATION=ON" diff --git a/cmake/vcpkg-triplets/binskim/x64-linux.cmake b/cmake/vcpkg-triplets/binskim/x64-linux.cmake index 8d7aeb2342e26..e3d4d34326409 100644 --- a/cmake/vcpkg-triplets/binskim/x64-linux.cmake +++ b/cmake/vcpkg-triplets/binskim/x64-linux.cmake @@ -3,12 +3,15 @@ set(VCPKG_TARGET_ARCHITECTURE x64) set(VCPKG_CRT_LINKAGE dynamic) set(VCPKG_LIBRARY_LINKAGE static) -set(VCPKG_C_FLAGS "-Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -fstack-clash-protection -fcf-protection") -set(VCPKG_CXX_FLAGS "-Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -fstack-clash-protection -fcf-protection") +set(VCPKG_C_FLAGS "-g") +set(VCPKG_CXX_FLAGS "-g") +set(VCPKG_C_FLAGS_RELEASE "-DNDEBUG -O3 -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -fstack-clash-protection -fcf-protection") +set(VCPKG_CXX_FLAGS_RELEASE "-DNDEBUG -O3 -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -fstack-clash-protection -fcf-protection") set(VCPKG_CMAKE_SYSTEM_NAME Linux) set(CMAKE_POSITION_INDEPENDENT_CODE ON) list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS --compile-no-warning-as-error -DBENCHMARK_ENABLE_WERROR=OFF) -set(VCPKG_LINKER_FLAGS "-Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,now -Wl,-z,noexecstack") +set(VCPKG_LINKER_FLAGS "-Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,now -Wl,-z,noexecstack -g") +list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS -DCMAKE_CXX_STANDARD=17) if(PORT MATCHES "onnx") list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS "-DONNX_DISABLE_STATIC_REGISTRATION=ON" diff --git a/cmake/vcpkg-triplets/binskim/x64-osx.cmake b/cmake/vcpkg-triplets/binskim/x64-osx.cmake index e391ab9eaee6d..426a35e33f747 100644 --- a/cmake/vcpkg-triplets/binskim/x64-osx.cmake +++ b/cmake/vcpkg-triplets/binskim/x64-osx.cmake @@ -3,12 +3,16 @@ set(VCPKG_TARGET_ARCHITECTURE x64) set(VCPKG_CRT_LINKAGE dynamic) set(VCPKG_LIBRARY_LINKAGE static) -set(VCPKG_C_FLAGS "-Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -fstack-clash-protection -fcf-protection") -set(VCPKG_CXX_FLAGS "-Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -fstack-clash-protection -fcf-protection") +set(VCPKG_C_FLAGS "-g") +set(VCPKG_CXX_FLAGS "-g") +set(VCPKG_C_FLAGS_RELEASE "-DNDEBUG -O3 -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -fstack-clash-protection -fcf-protection") +set(VCPKG_CXX_FLAGS_RELEASE "-DNDEBUG -O3 -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -fstack-clash-protection -fcf-protection") set(VCPKG_CMAKE_SYSTEM_NAME Darwin) set(VCPKG_OSX_ARCHITECTURES "x86_64") set(CMAKE_POSITION_INDEPENDENT_CODE ON) list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS --compile-no-warning-as-error -DBENCHMARK_ENABLE_WERROR=OFF) +set(VCPKG_LINKER_FLAGS "-g") +list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS -DCMAKE_CXX_STANDARD=20) if(PORT MATCHES "onnx") list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS "-DONNX_DISABLE_STATIC_REGISTRATION=ON" diff --git a/cmake/vcpkg-triplets/binskim/x64-windows-static-md.cmake b/cmake/vcpkg-triplets/binskim/x64-windows-static-md.cmake index ef67223cd0cd3..0f600d7931076 100644 --- a/cmake/vcpkg-triplets/binskim/x64-windows-static-md.cmake +++ b/cmake/vcpkg-triplets/binskim/x64-windows-static-md.cmake @@ -5,7 +5,7 @@ set(VCPKG_CRT_LINKAGE dynamic) set(VCPKG_LIBRARY_LINKAGE static) set(VCPKG_C_FLAGS "/MP /DWIN32 /D_WINDOWS /DWINAPI_FAMILY=100 /DWINVER=0x0A00 /D_WIN32_WINNT=0x0A00 /DNTDDI_VERSION=0x0A000000 /guard:cf /Qspectre") set(VCPKG_CXX_FLAGS "/MP /DWIN32 /D_WINDOWS /DWINAPI_FAMILY=100 /DWINVER=0x0A00 /D_WIN32_WINNT=0x0A00 /DNTDDI_VERSION=0x0A000000 /guard:cf /Qspectre /Zc:__cplusplus") -list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS --compile-no-warning-as-error) +list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS --compile-no-warning-as-error -DCMAKE_CXX_STANDARD=17) set(VCPKG_LINKER_FLAGS "/profile /DYNAMICBASE") if(PORT MATCHES "onnx") list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS diff --git a/cmake/vcpkg-triplets/binskim/x64-windows-static.cmake b/cmake/vcpkg-triplets/binskim/x64-windows-static.cmake index 62948a156c911..17d41775c9d06 100644 --- a/cmake/vcpkg-triplets/binskim/x64-windows-static.cmake +++ b/cmake/vcpkg-triplets/binskim/x64-windows-static.cmake @@ -5,7 +5,7 @@ set(VCPKG_CRT_LINKAGE static) set(VCPKG_LIBRARY_LINKAGE static) set(VCPKG_C_FLAGS "/MP /DWIN32 /D_WINDOWS /DWINAPI_FAMILY=100 /DWINVER=0x0A00 /D_WIN32_WINNT=0x0A00 /DNTDDI_VERSION=0x0A000000 /guard:cf /Qspectre") set(VCPKG_CXX_FLAGS "/MP /DWIN32 /D_WINDOWS /DWINAPI_FAMILY=100 /DWINVER=0x0A00 /D_WIN32_WINNT=0x0A00 /DNTDDI_VERSION=0x0A000000 /guard:cf /Qspectre /Zc:__cplusplus") -list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS --compile-no-warning-as-error) +list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS --compile-no-warning-as-error -DCMAKE_CXX_STANDARD=17) set(VCPKG_LINKER_FLAGS "/profile /DYNAMICBASE") if(PORT MATCHES "onnx") list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS diff --git a/cmake/vcpkg-triplets/binskim/x86-windows-static-md.cmake b/cmake/vcpkg-triplets/binskim/x86-windows-static-md.cmake index 8ac022c7eee4c..cb981c264a2f1 100644 --- a/cmake/vcpkg-triplets/binskim/x86-windows-static-md.cmake +++ b/cmake/vcpkg-triplets/binskim/x86-windows-static-md.cmake @@ -5,7 +5,7 @@ set(VCPKG_CRT_LINKAGE dynamic) set(VCPKG_LIBRARY_LINKAGE static) set(VCPKG_C_FLAGS "/MP /DWIN32 /D_WINDOWS /DWINAPI_FAMILY=100 /DWINVER=0x0A00 /D_WIN32_WINNT=0x0A00 /DNTDDI_VERSION=0x0A000000 /guard:cf /Qspectre") set(VCPKG_CXX_FLAGS "/MP /DWIN32 /D_WINDOWS /DWINAPI_FAMILY=100 /DWINVER=0x0A00 /D_WIN32_WINNT=0x0A00 /DNTDDI_VERSION=0x0A000000 /guard:cf /Qspectre /Zc:__cplusplus") -list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS --compile-no-warning-as-error) +list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS --compile-no-warning-as-error -DCMAKE_CXX_STANDARD=17) set(VCPKG_LINKER_FLAGS "/profile /DYNAMICBASE") if(PORT MATCHES "onnx") list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS diff --git a/cmake/vcpkg-triplets/binskim/x86-windows-static.cmake b/cmake/vcpkg-triplets/binskim/x86-windows-static.cmake index 8fd2d29dc3d99..53342263d5ada 100644 --- a/cmake/vcpkg-triplets/binskim/x86-windows-static.cmake +++ b/cmake/vcpkg-triplets/binskim/x86-windows-static.cmake @@ -5,7 +5,7 @@ set(VCPKG_CRT_LINKAGE static) set(VCPKG_LIBRARY_LINKAGE static) set(VCPKG_C_FLAGS "/MP /DWIN32 /D_WINDOWS /DWINAPI_FAMILY=100 /DWINVER=0x0A00 /D_WIN32_WINNT=0x0A00 /DNTDDI_VERSION=0x0A000000 /guard:cf /Qspectre") set(VCPKG_CXX_FLAGS "/MP /DWIN32 /D_WINDOWS /DWINAPI_FAMILY=100 /DWINVER=0x0A00 /D_WIN32_WINNT=0x0A00 /DNTDDI_VERSION=0x0A000000 /guard:cf /Qspectre /Zc:__cplusplus") -list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS --compile-no-warning-as-error) +list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS --compile-no-warning-as-error -DCMAKE_CXX_STANDARD=17) set(VCPKG_LINKER_FLAGS "/profile /DYNAMICBASE") if(PORT MATCHES "onnx") list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS diff --git a/cmake/vcpkg-triplets/binskim_nortti/arm64-linux.cmake b/cmake/vcpkg-triplets/binskim_nortti/arm64-linux.cmake index c9787f460b78d..203c85fa3a59e 100644 --- a/cmake/vcpkg-triplets/binskim_nortti/arm64-linux.cmake +++ b/cmake/vcpkg-triplets/binskim_nortti/arm64-linux.cmake @@ -3,12 +3,15 @@ set(VCPKG_TARGET_ARCHITECTURE arm64) set(VCPKG_CRT_LINKAGE dynamic) set(VCPKG_LIBRARY_LINKAGE static) -set(VCPKG_C_FLAGS "-Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -DEMSCRIPTEN_HAS_UNBOUND_TYPE_NAMES=0") -set(VCPKG_CXX_FLAGS "-Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -DEMSCRIPTEN_HAS_UNBOUND_TYPE_NAMES=0 -fno-rtti") +set(VCPKG_C_FLAGS "-g -DEMSCRIPTEN_HAS_UNBOUND_TYPE_NAMES=0") +set(VCPKG_CXX_FLAGS "-g -DEMSCRIPTEN_HAS_UNBOUND_TYPE_NAMES=0 -fno-rtti") +set(VCPKG_C_FLAGS_RELEASE "-DNDEBUG -O3 -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong") +set(VCPKG_CXX_FLAGS_RELEASE "-DNDEBUG -O3 -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong") set(VCPKG_CMAKE_SYSTEM_NAME Linux) set(CMAKE_POSITION_INDEPENDENT_CODE ON) list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS --compile-no-warning-as-error -DBENCHMARK_ENABLE_WERROR=OFF) -set(VCPKG_LINKER_FLAGS "-Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,now -Wl,-z,noexecstack") +set(VCPKG_LINKER_FLAGS "-Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,now -Wl,-z,noexecstack -g") +list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS -DCMAKE_CXX_STANDARD=17) if(PORT MATCHES "onnx") list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS "-DONNX_DISABLE_STATIC_REGISTRATION=ON" diff --git a/cmake/vcpkg-triplets/binskim_nortti/arm64-osx.cmake b/cmake/vcpkg-triplets/binskim_nortti/arm64-osx.cmake index f5866d6863cb7..c57a2401e4c0f 100644 --- a/cmake/vcpkg-triplets/binskim_nortti/arm64-osx.cmake +++ b/cmake/vcpkg-triplets/binskim_nortti/arm64-osx.cmake @@ -3,12 +3,16 @@ set(VCPKG_TARGET_ARCHITECTURE arm64) set(VCPKG_CRT_LINKAGE dynamic) set(VCPKG_LIBRARY_LINKAGE static) -set(VCPKG_C_FLAGS "-Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -DEMSCRIPTEN_HAS_UNBOUND_TYPE_NAMES=0") -set(VCPKG_CXX_FLAGS "-Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -DEMSCRIPTEN_HAS_UNBOUND_TYPE_NAMES=0 -fno-rtti") +set(VCPKG_C_FLAGS "-g -DEMSCRIPTEN_HAS_UNBOUND_TYPE_NAMES=0") +set(VCPKG_CXX_FLAGS "-g -DEMSCRIPTEN_HAS_UNBOUND_TYPE_NAMES=0 -fno-rtti") +set(VCPKG_C_FLAGS_RELEASE "-DNDEBUG -O3 -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong") +set(VCPKG_CXX_FLAGS_RELEASE "-DNDEBUG -O3 -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong") set(VCPKG_CMAKE_SYSTEM_NAME Darwin) set(VCPKG_OSX_ARCHITECTURES "arm64") set(CMAKE_POSITION_INDEPENDENT_CODE ON) list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS --compile-no-warning-as-error -DBENCHMARK_ENABLE_WERROR=OFF) +set(VCPKG_LINKER_FLAGS "-g") +list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS -DCMAKE_CXX_STANDARD=20) if(PORT MATCHES "onnx") list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS "-DONNX_DISABLE_STATIC_REGISTRATION=ON" diff --git a/cmake/vcpkg-triplets/binskim_nortti/arm64-windows-static-md.cmake b/cmake/vcpkg-triplets/binskim_nortti/arm64-windows-static-md.cmake index 927b110c98d45..9963cfb66f4b1 100644 --- a/cmake/vcpkg-triplets/binskim_nortti/arm64-windows-static-md.cmake +++ b/cmake/vcpkg-triplets/binskim_nortti/arm64-windows-static-md.cmake @@ -5,7 +5,7 @@ set(VCPKG_CRT_LINKAGE dynamic) set(VCPKG_LIBRARY_LINKAGE static) set(VCPKG_C_FLAGS "/MP /DWIN32 /D_WINDOWS /DWINAPI_FAMILY=100 /DWINVER=0x0A00 /D_WIN32_WINNT=0x0A00 /DNTDDI_VERSION=0x0A000000 /guard:cf /Qspectre") set(VCPKG_CXX_FLAGS "/MP /DWIN32 /D_WINDOWS /DWINAPI_FAMILY=100 /DWINVER=0x0A00 /D_WIN32_WINNT=0x0A00 /DNTDDI_VERSION=0x0A000000 /guard:cf /Qspectre /Zc:__cplusplus /GR- /we4541") -list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS --compile-no-warning-as-error) +list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS --compile-no-warning-as-error -DCMAKE_CXX_STANDARD=17) set(VCPKG_LINKER_FLAGS "/profile /DYNAMICBASE") if(PORT MATCHES "onnx") list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS diff --git a/cmake/vcpkg-triplets/binskim_nortti/arm64-windows-static.cmake b/cmake/vcpkg-triplets/binskim_nortti/arm64-windows-static.cmake index b0419c9a0d0e0..0f4948ff076f1 100644 --- a/cmake/vcpkg-triplets/binskim_nortti/arm64-windows-static.cmake +++ b/cmake/vcpkg-triplets/binskim_nortti/arm64-windows-static.cmake @@ -5,7 +5,7 @@ set(VCPKG_CRT_LINKAGE static) set(VCPKG_LIBRARY_LINKAGE static) set(VCPKG_C_FLAGS "/MP /DWIN32 /D_WINDOWS /DWINAPI_FAMILY=100 /DWINVER=0x0A00 /D_WIN32_WINNT=0x0A00 /DNTDDI_VERSION=0x0A000000 /guard:cf /Qspectre") set(VCPKG_CXX_FLAGS "/MP /DWIN32 /D_WINDOWS /DWINAPI_FAMILY=100 /DWINVER=0x0A00 /D_WIN32_WINNT=0x0A00 /DNTDDI_VERSION=0x0A000000 /guard:cf /Qspectre /Zc:__cplusplus /GR- /we4541") -list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS --compile-no-warning-as-error) +list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS --compile-no-warning-as-error -DCMAKE_CXX_STANDARD=17) set(VCPKG_LINKER_FLAGS "/profile /DYNAMICBASE") if(PORT MATCHES "onnx") list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS diff --git a/cmake/vcpkg-triplets/binskim_nortti/arm64ec-windows-static-md.cmake b/cmake/vcpkg-triplets/binskim_nortti/arm64ec-windows-static-md.cmake index aa8b7a5f0e96b..6a5c8b9f1058a 100644 --- a/cmake/vcpkg-triplets/binskim_nortti/arm64ec-windows-static-md.cmake +++ b/cmake/vcpkg-triplets/binskim_nortti/arm64ec-windows-static-md.cmake @@ -5,7 +5,7 @@ set(VCPKG_CRT_LINKAGE dynamic) set(VCPKG_LIBRARY_LINKAGE static) set(VCPKG_C_FLAGS "/MP /DWIN32 /D_WINDOWS /DWINAPI_FAMILY=100 /DWINVER=0x0A00 /D_WIN32_WINNT=0x0A00 /DNTDDI_VERSION=0x0A000000 /guard:cf /Qspectre") set(VCPKG_CXX_FLAGS "/MP /DWIN32 /D_WINDOWS /DWINAPI_FAMILY=100 /DWINVER=0x0A00 /D_WIN32_WINNT=0x0A00 /DNTDDI_VERSION=0x0A000000 /guard:cf /Qspectre /Zc:__cplusplus /GR- /we4541") -list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS --compile-no-warning-as-error) +list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS --compile-no-warning-as-error -DCMAKE_CXX_STANDARD=17) set(VCPKG_LINKER_FLAGS "/profile /DYNAMICBASE") if(PORT MATCHES "onnx") list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS diff --git a/cmake/vcpkg-triplets/binskim_nortti/arm64ec-windows-static.cmake b/cmake/vcpkg-triplets/binskim_nortti/arm64ec-windows-static.cmake index 96da5d9b1372f..668d4fb4dc420 100644 --- a/cmake/vcpkg-triplets/binskim_nortti/arm64ec-windows-static.cmake +++ b/cmake/vcpkg-triplets/binskim_nortti/arm64ec-windows-static.cmake @@ -5,7 +5,7 @@ set(VCPKG_CRT_LINKAGE static) set(VCPKG_LIBRARY_LINKAGE static) set(VCPKG_C_FLAGS "/MP /DWIN32 /D_WINDOWS /DWINAPI_FAMILY=100 /DWINVER=0x0A00 /D_WIN32_WINNT=0x0A00 /DNTDDI_VERSION=0x0A000000 /guard:cf /Qspectre") set(VCPKG_CXX_FLAGS "/MP /DWIN32 /D_WINDOWS /DWINAPI_FAMILY=100 /DWINVER=0x0A00 /D_WIN32_WINNT=0x0A00 /DNTDDI_VERSION=0x0A000000 /guard:cf /Qspectre /Zc:__cplusplus /GR- /we4541") -list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS --compile-no-warning-as-error) +list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS --compile-no-warning-as-error -DCMAKE_CXX_STANDARD=17) set(VCPKG_LINKER_FLAGS "/profile /DYNAMICBASE") if(PORT MATCHES "onnx") list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS diff --git a/cmake/vcpkg-triplets/binskim_nortti/universal2-osx.cmake b/cmake/vcpkg-triplets/binskim_nortti/universal2-osx.cmake index f4ef6f0c659d8..1956daf30e6d9 100644 --- a/cmake/vcpkg-triplets/binskim_nortti/universal2-osx.cmake +++ b/cmake/vcpkg-triplets/binskim_nortti/universal2-osx.cmake @@ -3,12 +3,16 @@ set(VCPKG_TARGET_ARCHITECTURE x64) set(VCPKG_CRT_LINKAGE dynamic) set(VCPKG_LIBRARY_LINKAGE static) -set(VCPKG_C_FLAGS "-Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -DEMSCRIPTEN_HAS_UNBOUND_TYPE_NAMES=0") -set(VCPKG_CXX_FLAGS "-Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -DEMSCRIPTEN_HAS_UNBOUND_TYPE_NAMES=0 -fno-rtti") +set(VCPKG_C_FLAGS "-g -DEMSCRIPTEN_HAS_UNBOUND_TYPE_NAMES=0") +set(VCPKG_CXX_FLAGS "-g -DEMSCRIPTEN_HAS_UNBOUND_TYPE_NAMES=0 -fno-rtti") +set(VCPKG_C_FLAGS_RELEASE "-DNDEBUG -O3 -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong") +set(VCPKG_CXX_FLAGS_RELEASE "-DNDEBUG -O3 -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong") set(VCPKG_CMAKE_SYSTEM_NAME Darwin) set(VCPKG_OSX_ARCHITECTURES "x86_64;arm64") set(CMAKE_POSITION_INDEPENDENT_CODE ON) list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS --compile-no-warning-as-error -DBENCHMARK_ENABLE_WERROR=OFF) +set(VCPKG_LINKER_FLAGS "-g") +list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS -DCMAKE_CXX_STANDARD=20) if(PORT MATCHES "onnx") list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS "-DONNX_DISABLE_STATIC_REGISTRATION=ON" diff --git a/cmake/vcpkg-triplets/binskim_nortti/x64-linux.cmake b/cmake/vcpkg-triplets/binskim_nortti/x64-linux.cmake index 8fe977fb86e56..da17e0073980f 100644 --- a/cmake/vcpkg-triplets/binskim_nortti/x64-linux.cmake +++ b/cmake/vcpkg-triplets/binskim_nortti/x64-linux.cmake @@ -3,12 +3,15 @@ set(VCPKG_TARGET_ARCHITECTURE x64) set(VCPKG_CRT_LINKAGE dynamic) set(VCPKG_LIBRARY_LINKAGE static) -set(VCPKG_C_FLAGS "-Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -fstack-clash-protection -fcf-protection -DEMSCRIPTEN_HAS_UNBOUND_TYPE_NAMES=0") -set(VCPKG_CXX_FLAGS "-Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -fstack-clash-protection -fcf-protection -DEMSCRIPTEN_HAS_UNBOUND_TYPE_NAMES=0 -fno-rtti") +set(VCPKG_C_FLAGS "-g -DEMSCRIPTEN_HAS_UNBOUND_TYPE_NAMES=0") +set(VCPKG_CXX_FLAGS "-g -DEMSCRIPTEN_HAS_UNBOUND_TYPE_NAMES=0 -fno-rtti") +set(VCPKG_C_FLAGS_RELEASE "-DNDEBUG -O3 -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -fstack-clash-protection -fcf-protection") +set(VCPKG_CXX_FLAGS_RELEASE "-DNDEBUG -O3 -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -fstack-clash-protection -fcf-protection") set(VCPKG_CMAKE_SYSTEM_NAME Linux) set(CMAKE_POSITION_INDEPENDENT_CODE ON) list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS --compile-no-warning-as-error -DBENCHMARK_ENABLE_WERROR=OFF) -set(VCPKG_LINKER_FLAGS "-Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,now -Wl,-z,noexecstack") +set(VCPKG_LINKER_FLAGS "-Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,now -Wl,-z,noexecstack -g") +list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS -DCMAKE_CXX_STANDARD=17) if(PORT MATCHES "onnx") list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS "-DONNX_DISABLE_STATIC_REGISTRATION=ON" diff --git a/cmake/vcpkg-triplets/binskim_nortti/x64-osx.cmake b/cmake/vcpkg-triplets/binskim_nortti/x64-osx.cmake index 196018d7cf442..c74e60bc7c206 100644 --- a/cmake/vcpkg-triplets/binskim_nortti/x64-osx.cmake +++ b/cmake/vcpkg-triplets/binskim_nortti/x64-osx.cmake @@ -3,12 +3,16 @@ set(VCPKG_TARGET_ARCHITECTURE x64) set(VCPKG_CRT_LINKAGE dynamic) set(VCPKG_LIBRARY_LINKAGE static) -set(VCPKG_C_FLAGS "-Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -fstack-clash-protection -fcf-protection -DEMSCRIPTEN_HAS_UNBOUND_TYPE_NAMES=0") -set(VCPKG_CXX_FLAGS "-Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -fstack-clash-protection -fcf-protection -DEMSCRIPTEN_HAS_UNBOUND_TYPE_NAMES=0 -fno-rtti") +set(VCPKG_C_FLAGS "-g -DEMSCRIPTEN_HAS_UNBOUND_TYPE_NAMES=0") +set(VCPKG_CXX_FLAGS "-g -DEMSCRIPTEN_HAS_UNBOUND_TYPE_NAMES=0 -fno-rtti") +set(VCPKG_C_FLAGS_RELEASE "-DNDEBUG -O3 -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -fstack-clash-protection -fcf-protection") +set(VCPKG_CXX_FLAGS_RELEASE "-DNDEBUG -O3 -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fstack-protector-strong -fstack-clash-protection -fcf-protection") set(VCPKG_CMAKE_SYSTEM_NAME Darwin) set(VCPKG_OSX_ARCHITECTURES "x86_64") set(CMAKE_POSITION_INDEPENDENT_CODE ON) list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS --compile-no-warning-as-error -DBENCHMARK_ENABLE_WERROR=OFF) +set(VCPKG_LINKER_FLAGS "-g") +list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS -DCMAKE_CXX_STANDARD=20) if(PORT MATCHES "onnx") list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS "-DONNX_DISABLE_STATIC_REGISTRATION=ON" diff --git a/cmake/vcpkg-triplets/binskim_nortti/x64-windows-static-md.cmake b/cmake/vcpkg-triplets/binskim_nortti/x64-windows-static-md.cmake index 38b5cbdde2d65..6491d31ae469b 100644 --- a/cmake/vcpkg-triplets/binskim_nortti/x64-windows-static-md.cmake +++ b/cmake/vcpkg-triplets/binskim_nortti/x64-windows-static-md.cmake @@ -5,7 +5,7 @@ set(VCPKG_CRT_LINKAGE dynamic) set(VCPKG_LIBRARY_LINKAGE static) set(VCPKG_C_FLAGS "/MP /DWIN32 /D_WINDOWS /DWINAPI_FAMILY=100 /DWINVER=0x0A00 /D_WIN32_WINNT=0x0A00 /DNTDDI_VERSION=0x0A000000 /guard:cf /Qspectre") set(VCPKG_CXX_FLAGS "/MP /DWIN32 /D_WINDOWS /DWINAPI_FAMILY=100 /DWINVER=0x0A00 /D_WIN32_WINNT=0x0A00 /DNTDDI_VERSION=0x0A000000 /guard:cf /Qspectre /Zc:__cplusplus /GR- /we4541") -list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS --compile-no-warning-as-error) +list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS --compile-no-warning-as-error -DCMAKE_CXX_STANDARD=17) set(VCPKG_LINKER_FLAGS "/profile /DYNAMICBASE") if(PORT MATCHES "onnx") list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS diff --git a/cmake/vcpkg-triplets/binskim_nortti/x64-windows-static.cmake b/cmake/vcpkg-triplets/binskim_nortti/x64-windows-static.cmake index bea970b669f4f..011999df2ac99 100644 --- a/cmake/vcpkg-triplets/binskim_nortti/x64-windows-static.cmake +++ b/cmake/vcpkg-triplets/binskim_nortti/x64-windows-static.cmake @@ -5,7 +5,7 @@ set(VCPKG_CRT_LINKAGE static) set(VCPKG_LIBRARY_LINKAGE static) set(VCPKG_C_FLAGS "/MP /DWIN32 /D_WINDOWS /DWINAPI_FAMILY=100 /DWINVER=0x0A00 /D_WIN32_WINNT=0x0A00 /DNTDDI_VERSION=0x0A000000 /guard:cf /Qspectre") set(VCPKG_CXX_FLAGS "/MP /DWIN32 /D_WINDOWS /DWINAPI_FAMILY=100 /DWINVER=0x0A00 /D_WIN32_WINNT=0x0A00 /DNTDDI_VERSION=0x0A000000 /guard:cf /Qspectre /Zc:__cplusplus /GR- /we4541") -list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS --compile-no-warning-as-error) +list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS --compile-no-warning-as-error -DCMAKE_CXX_STANDARD=17) set(VCPKG_LINKER_FLAGS "/profile /DYNAMICBASE") if(PORT MATCHES "onnx") list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS diff --git a/cmake/vcpkg-triplets/binskim_nortti/x86-windows-static-md.cmake b/cmake/vcpkg-triplets/binskim_nortti/x86-windows-static-md.cmake index e75d0c645c6a1..bf843c3e950e2 100644 --- a/cmake/vcpkg-triplets/binskim_nortti/x86-windows-static-md.cmake +++ b/cmake/vcpkg-triplets/binskim_nortti/x86-windows-static-md.cmake @@ -5,7 +5,7 @@ set(VCPKG_CRT_LINKAGE dynamic) set(VCPKG_LIBRARY_LINKAGE static) set(VCPKG_C_FLAGS "/MP /DWIN32 /D_WINDOWS /DWINAPI_FAMILY=100 /DWINVER=0x0A00 /D_WIN32_WINNT=0x0A00 /DNTDDI_VERSION=0x0A000000 /guard:cf /Qspectre") set(VCPKG_CXX_FLAGS "/MP /DWIN32 /D_WINDOWS /DWINAPI_FAMILY=100 /DWINVER=0x0A00 /D_WIN32_WINNT=0x0A00 /DNTDDI_VERSION=0x0A000000 /guard:cf /Qspectre /Zc:__cplusplus /GR- /we4541") -list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS --compile-no-warning-as-error) +list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS --compile-no-warning-as-error -DCMAKE_CXX_STANDARD=17) set(VCPKG_LINKER_FLAGS "/profile /DYNAMICBASE") if(PORT MATCHES "onnx") list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS diff --git a/cmake/vcpkg-triplets/binskim_nortti/x86-windows-static.cmake b/cmake/vcpkg-triplets/binskim_nortti/x86-windows-static.cmake index 6de6f80d9705c..21e0858066ab8 100644 --- a/cmake/vcpkg-triplets/binskim_nortti/x86-windows-static.cmake +++ b/cmake/vcpkg-triplets/binskim_nortti/x86-windows-static.cmake @@ -5,7 +5,7 @@ set(VCPKG_CRT_LINKAGE static) set(VCPKG_LIBRARY_LINKAGE static) set(VCPKG_C_FLAGS "/MP /DWIN32 /D_WINDOWS /DWINAPI_FAMILY=100 /DWINVER=0x0A00 /D_WIN32_WINNT=0x0A00 /DNTDDI_VERSION=0x0A000000 /guard:cf /Qspectre") set(VCPKG_CXX_FLAGS "/MP /DWIN32 /D_WINDOWS /DWINAPI_FAMILY=100 /DWINVER=0x0A00 /D_WIN32_WINNT=0x0A00 /DNTDDI_VERSION=0x0A000000 /guard:cf /Qspectre /Zc:__cplusplus /GR- /we4541") -list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS --compile-no-warning-as-error) +list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS --compile-no-warning-as-error -DCMAKE_CXX_STANDARD=17) set(VCPKG_LINKER_FLAGS "/profile /DYNAMICBASE") if(PORT MATCHES "onnx") list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS diff --git a/cmake/vcpkg-triplets/default/arm64-linux.cmake b/cmake/vcpkg-triplets/default/arm64-linux.cmake index 581367931ba5e..120865a5b0b57 100644 --- a/cmake/vcpkg-triplets/default/arm64-linux.cmake +++ b/cmake/vcpkg-triplets/default/arm64-linux.cmake @@ -3,11 +3,15 @@ set(VCPKG_TARGET_ARCHITECTURE arm64) set(VCPKG_CRT_LINKAGE dynamic) set(VCPKG_LIBRARY_LINKAGE static) -set(VCPKG_C_FLAGS "") -set(VCPKG_CXX_FLAGS "") +set(VCPKG_C_FLAGS "-g") +set(VCPKG_CXX_FLAGS "-g") +set(VCPKG_C_FLAGS_RELEASE "-DNDEBUG -O3") +set(VCPKG_CXX_FLAGS_RELEASE "-DNDEBUG -O3") set(VCPKG_CMAKE_SYSTEM_NAME Linux) set(CMAKE_POSITION_INDEPENDENT_CODE ON) list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS --compile-no-warning-as-error -DBENCHMARK_ENABLE_WERROR=OFF) +set(VCPKG_LINKER_FLAGS "-g") +list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS -DCMAKE_CXX_STANDARD=17) if(PORT MATCHES "onnx") list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS "-DONNX_DISABLE_STATIC_REGISTRATION=ON" diff --git a/cmake/vcpkg-triplets/default/arm64-osx.cmake b/cmake/vcpkg-triplets/default/arm64-osx.cmake index 4d74306ba4e6a..02e8a3430475f 100644 --- a/cmake/vcpkg-triplets/default/arm64-osx.cmake +++ b/cmake/vcpkg-triplets/default/arm64-osx.cmake @@ -3,12 +3,16 @@ set(VCPKG_TARGET_ARCHITECTURE arm64) set(VCPKG_CRT_LINKAGE dynamic) set(VCPKG_LIBRARY_LINKAGE static) -set(VCPKG_C_FLAGS "") -set(VCPKG_CXX_FLAGS "") +set(VCPKG_C_FLAGS "-g") +set(VCPKG_CXX_FLAGS "-g") +set(VCPKG_C_FLAGS_RELEASE "-DNDEBUG -O3") +set(VCPKG_CXX_FLAGS_RELEASE "-DNDEBUG -O3") set(VCPKG_CMAKE_SYSTEM_NAME Darwin) set(VCPKG_OSX_ARCHITECTURES "arm64") set(CMAKE_POSITION_INDEPENDENT_CODE ON) list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS --compile-no-warning-as-error -DBENCHMARK_ENABLE_WERROR=OFF) +set(VCPKG_LINKER_FLAGS "-g") +list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS -DCMAKE_CXX_STANDARD=20) if(PORT MATCHES "onnx") list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS "-DONNX_DISABLE_STATIC_REGISTRATION=ON" diff --git a/cmake/vcpkg-triplets/default/arm64-windows-static-md.cmake b/cmake/vcpkg-triplets/default/arm64-windows-static-md.cmake index 135dc6ed6f3b5..6d5cf67665f4f 100644 --- a/cmake/vcpkg-triplets/default/arm64-windows-static-md.cmake +++ b/cmake/vcpkg-triplets/default/arm64-windows-static-md.cmake @@ -5,7 +5,7 @@ set(VCPKG_CRT_LINKAGE dynamic) set(VCPKG_LIBRARY_LINKAGE static) set(VCPKG_C_FLAGS "/MP /DWIN32 /D_WINDOWS /DWINAPI_FAMILY=100 /DWINVER=0x0A00 /D_WIN32_WINNT=0x0A00 /DNTDDI_VERSION=0x0A000000") set(VCPKG_CXX_FLAGS "/MP /DWIN32 /D_WINDOWS /DWINAPI_FAMILY=100 /DWINVER=0x0A00 /D_WIN32_WINNT=0x0A00 /DNTDDI_VERSION=0x0A000000 /Zc:__cplusplus") -list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS --compile-no-warning-as-error) +list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS --compile-no-warning-as-error -DCMAKE_CXX_STANDARD=17) if(PORT MATCHES "onnx") list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS "-DONNX_DISABLE_STATIC_REGISTRATION=ON" diff --git a/cmake/vcpkg-triplets/default/arm64-windows-static.cmake b/cmake/vcpkg-triplets/default/arm64-windows-static.cmake index 56e1aebfe620b..19ca6f16cd890 100644 --- a/cmake/vcpkg-triplets/default/arm64-windows-static.cmake +++ b/cmake/vcpkg-triplets/default/arm64-windows-static.cmake @@ -5,7 +5,7 @@ set(VCPKG_CRT_LINKAGE static) set(VCPKG_LIBRARY_LINKAGE static) set(VCPKG_C_FLAGS "/MP /DWIN32 /D_WINDOWS /DWINAPI_FAMILY=100 /DWINVER=0x0A00 /D_WIN32_WINNT=0x0A00 /DNTDDI_VERSION=0x0A000000") set(VCPKG_CXX_FLAGS "/MP /DWIN32 /D_WINDOWS /DWINAPI_FAMILY=100 /DWINVER=0x0A00 /D_WIN32_WINNT=0x0A00 /DNTDDI_VERSION=0x0A000000 /Zc:__cplusplus") -list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS --compile-no-warning-as-error) +list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS --compile-no-warning-as-error -DCMAKE_CXX_STANDARD=17) if(PORT MATCHES "onnx") list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS "-DONNX_DISABLE_STATIC_REGISTRATION=ON" diff --git a/cmake/vcpkg-triplets/default/arm64ec-windows-static-md.cmake b/cmake/vcpkg-triplets/default/arm64ec-windows-static-md.cmake index 9256f07f5451d..d7982158f390c 100644 --- a/cmake/vcpkg-triplets/default/arm64ec-windows-static-md.cmake +++ b/cmake/vcpkg-triplets/default/arm64ec-windows-static-md.cmake @@ -5,7 +5,7 @@ set(VCPKG_CRT_LINKAGE dynamic) set(VCPKG_LIBRARY_LINKAGE static) set(VCPKG_C_FLAGS "/MP /DWIN32 /D_WINDOWS /DWINAPI_FAMILY=100 /DWINVER=0x0A00 /D_WIN32_WINNT=0x0A00 /DNTDDI_VERSION=0x0A000000") set(VCPKG_CXX_FLAGS "/MP /DWIN32 /D_WINDOWS /DWINAPI_FAMILY=100 /DWINVER=0x0A00 /D_WIN32_WINNT=0x0A00 /DNTDDI_VERSION=0x0A000000 /Zc:__cplusplus") -list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS --compile-no-warning-as-error) +list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS --compile-no-warning-as-error -DCMAKE_CXX_STANDARD=17) if(PORT MATCHES "onnx") list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS "-DONNX_DISABLE_STATIC_REGISTRATION=ON" diff --git a/cmake/vcpkg-triplets/default/arm64ec-windows-static.cmake b/cmake/vcpkg-triplets/default/arm64ec-windows-static.cmake index bbdfed06fb2bc..fb14ad71c1d91 100644 --- a/cmake/vcpkg-triplets/default/arm64ec-windows-static.cmake +++ b/cmake/vcpkg-triplets/default/arm64ec-windows-static.cmake @@ -5,7 +5,7 @@ set(VCPKG_CRT_LINKAGE static) set(VCPKG_LIBRARY_LINKAGE static) set(VCPKG_C_FLAGS "/MP /DWIN32 /D_WINDOWS /DWINAPI_FAMILY=100 /DWINVER=0x0A00 /D_WIN32_WINNT=0x0A00 /DNTDDI_VERSION=0x0A000000") set(VCPKG_CXX_FLAGS "/MP /DWIN32 /D_WINDOWS /DWINAPI_FAMILY=100 /DWINVER=0x0A00 /D_WIN32_WINNT=0x0A00 /DNTDDI_VERSION=0x0A000000 /Zc:__cplusplus") -list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS --compile-no-warning-as-error) +list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS --compile-no-warning-as-error -DCMAKE_CXX_STANDARD=17) if(PORT MATCHES "onnx") list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS "-DONNX_DISABLE_STATIC_REGISTRATION=ON" diff --git a/cmake/vcpkg-triplets/default/universal2-osx.cmake b/cmake/vcpkg-triplets/default/universal2-osx.cmake index 64b19451dd64d..57386c423cf99 100644 --- a/cmake/vcpkg-triplets/default/universal2-osx.cmake +++ b/cmake/vcpkg-triplets/default/universal2-osx.cmake @@ -3,12 +3,16 @@ set(VCPKG_TARGET_ARCHITECTURE x64) set(VCPKG_CRT_LINKAGE dynamic) set(VCPKG_LIBRARY_LINKAGE static) -set(VCPKG_C_FLAGS "") -set(VCPKG_CXX_FLAGS "") +set(VCPKG_C_FLAGS "-g") +set(VCPKG_CXX_FLAGS "-g") +set(VCPKG_C_FLAGS_RELEASE "-DNDEBUG -O3") +set(VCPKG_CXX_FLAGS_RELEASE "-DNDEBUG -O3") set(VCPKG_CMAKE_SYSTEM_NAME Darwin) set(VCPKG_OSX_ARCHITECTURES "x86_64;arm64") set(CMAKE_POSITION_INDEPENDENT_CODE ON) list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS --compile-no-warning-as-error -DBENCHMARK_ENABLE_WERROR=OFF) +set(VCPKG_LINKER_FLAGS "-g") +list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS -DCMAKE_CXX_STANDARD=20) if(PORT MATCHES "onnx") list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS "-DONNX_DISABLE_STATIC_REGISTRATION=ON" diff --git a/cmake/vcpkg-triplets/default/x64-linux.cmake b/cmake/vcpkg-triplets/default/x64-linux.cmake index 57114dd5fcb76..30c7b1b786302 100644 --- a/cmake/vcpkg-triplets/default/x64-linux.cmake +++ b/cmake/vcpkg-triplets/default/x64-linux.cmake @@ -3,11 +3,15 @@ set(VCPKG_TARGET_ARCHITECTURE x64) set(VCPKG_CRT_LINKAGE dynamic) set(VCPKG_LIBRARY_LINKAGE static) -set(VCPKG_C_FLAGS "") -set(VCPKG_CXX_FLAGS "") +set(VCPKG_C_FLAGS "-g") +set(VCPKG_CXX_FLAGS "-g") +set(VCPKG_C_FLAGS_RELEASE "-DNDEBUG -O3") +set(VCPKG_CXX_FLAGS_RELEASE "-DNDEBUG -O3") set(VCPKG_CMAKE_SYSTEM_NAME Linux) set(CMAKE_POSITION_INDEPENDENT_CODE ON) list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS --compile-no-warning-as-error -DBENCHMARK_ENABLE_WERROR=OFF) +set(VCPKG_LINKER_FLAGS "-g") +list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS -DCMAKE_CXX_STANDARD=17) if(PORT MATCHES "onnx") list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS "-DONNX_DISABLE_STATIC_REGISTRATION=ON" diff --git a/cmake/vcpkg-triplets/default/x64-osx.cmake b/cmake/vcpkg-triplets/default/x64-osx.cmake index dd50e622677b7..7af622e1354b9 100644 --- a/cmake/vcpkg-triplets/default/x64-osx.cmake +++ b/cmake/vcpkg-triplets/default/x64-osx.cmake @@ -3,12 +3,16 @@ set(VCPKG_TARGET_ARCHITECTURE x64) set(VCPKG_CRT_LINKAGE dynamic) set(VCPKG_LIBRARY_LINKAGE static) -set(VCPKG_C_FLAGS "") -set(VCPKG_CXX_FLAGS "") +set(VCPKG_C_FLAGS "-g") +set(VCPKG_CXX_FLAGS "-g") +set(VCPKG_C_FLAGS_RELEASE "-DNDEBUG -O3") +set(VCPKG_CXX_FLAGS_RELEASE "-DNDEBUG -O3") set(VCPKG_CMAKE_SYSTEM_NAME Darwin) set(VCPKG_OSX_ARCHITECTURES "x86_64") set(CMAKE_POSITION_INDEPENDENT_CODE ON) list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS --compile-no-warning-as-error -DBENCHMARK_ENABLE_WERROR=OFF) +set(VCPKG_LINKER_FLAGS "-g") +list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS -DCMAKE_CXX_STANDARD=20) if(PORT MATCHES "onnx") list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS "-DONNX_DISABLE_STATIC_REGISTRATION=ON" diff --git a/cmake/vcpkg-triplets/default/x64-windows-static-md.cmake b/cmake/vcpkg-triplets/default/x64-windows-static-md.cmake index 5339a033715bb..bec5f2724da13 100644 --- a/cmake/vcpkg-triplets/default/x64-windows-static-md.cmake +++ b/cmake/vcpkg-triplets/default/x64-windows-static-md.cmake @@ -5,7 +5,7 @@ set(VCPKG_CRT_LINKAGE dynamic) set(VCPKG_LIBRARY_LINKAGE static) set(VCPKG_C_FLAGS "/MP /DWIN32 /D_WINDOWS /DWINAPI_FAMILY=100 /DWINVER=0x0A00 /D_WIN32_WINNT=0x0A00 /DNTDDI_VERSION=0x0A000000") set(VCPKG_CXX_FLAGS "/MP /DWIN32 /D_WINDOWS /DWINAPI_FAMILY=100 /DWINVER=0x0A00 /D_WIN32_WINNT=0x0A00 /DNTDDI_VERSION=0x0A000000 /Zc:__cplusplus") -list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS --compile-no-warning-as-error) +list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS --compile-no-warning-as-error -DCMAKE_CXX_STANDARD=17) if(PORT MATCHES "onnx") list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS "-DONNX_DISABLE_STATIC_REGISTRATION=ON" diff --git a/cmake/vcpkg-triplets/default/x64-windows-static.cmake b/cmake/vcpkg-triplets/default/x64-windows-static.cmake index 579740efb6ab7..3f62418071583 100644 --- a/cmake/vcpkg-triplets/default/x64-windows-static.cmake +++ b/cmake/vcpkg-triplets/default/x64-windows-static.cmake @@ -5,7 +5,7 @@ set(VCPKG_CRT_LINKAGE static) set(VCPKG_LIBRARY_LINKAGE static) set(VCPKG_C_FLAGS "/MP /DWIN32 /D_WINDOWS /DWINAPI_FAMILY=100 /DWINVER=0x0A00 /D_WIN32_WINNT=0x0A00 /DNTDDI_VERSION=0x0A000000") set(VCPKG_CXX_FLAGS "/MP /DWIN32 /D_WINDOWS /DWINAPI_FAMILY=100 /DWINVER=0x0A00 /D_WIN32_WINNT=0x0A00 /DNTDDI_VERSION=0x0A000000 /Zc:__cplusplus") -list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS --compile-no-warning-as-error) +list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS --compile-no-warning-as-error -DCMAKE_CXX_STANDARD=17) if(PORT MATCHES "onnx") list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS "-DONNX_DISABLE_STATIC_REGISTRATION=ON" diff --git a/cmake/vcpkg-triplets/default/x86-windows-static-md.cmake b/cmake/vcpkg-triplets/default/x86-windows-static-md.cmake index 34223c67e8f44..d93d87b3289f3 100644 --- a/cmake/vcpkg-triplets/default/x86-windows-static-md.cmake +++ b/cmake/vcpkg-triplets/default/x86-windows-static-md.cmake @@ -5,7 +5,7 @@ set(VCPKG_CRT_LINKAGE dynamic) set(VCPKG_LIBRARY_LINKAGE static) set(VCPKG_C_FLAGS "/MP /DWIN32 /D_WINDOWS /DWINAPI_FAMILY=100 /DWINVER=0x0A00 /D_WIN32_WINNT=0x0A00 /DNTDDI_VERSION=0x0A000000") set(VCPKG_CXX_FLAGS "/MP /DWIN32 /D_WINDOWS /DWINAPI_FAMILY=100 /DWINVER=0x0A00 /D_WIN32_WINNT=0x0A00 /DNTDDI_VERSION=0x0A000000 /Zc:__cplusplus") -list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS --compile-no-warning-as-error) +list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS --compile-no-warning-as-error -DCMAKE_CXX_STANDARD=17) if(PORT MATCHES "onnx") list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS "-DONNX_DISABLE_STATIC_REGISTRATION=ON" diff --git a/cmake/vcpkg-triplets/default/x86-windows-static.cmake b/cmake/vcpkg-triplets/default/x86-windows-static.cmake index fc95d409f890e..727b35cd1f7cc 100644 --- a/cmake/vcpkg-triplets/default/x86-windows-static.cmake +++ b/cmake/vcpkg-triplets/default/x86-windows-static.cmake @@ -5,7 +5,7 @@ set(VCPKG_CRT_LINKAGE static) set(VCPKG_LIBRARY_LINKAGE static) set(VCPKG_C_FLAGS "/MP /DWIN32 /D_WINDOWS /DWINAPI_FAMILY=100 /DWINVER=0x0A00 /D_WIN32_WINNT=0x0A00 /DNTDDI_VERSION=0x0A000000") set(VCPKG_CXX_FLAGS "/MP /DWIN32 /D_WINDOWS /DWINAPI_FAMILY=100 /DWINVER=0x0A00 /D_WIN32_WINNT=0x0A00 /DNTDDI_VERSION=0x0A000000 /Zc:__cplusplus") -list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS --compile-no-warning-as-error) +list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS --compile-no-warning-as-error -DCMAKE_CXX_STANDARD=17) if(PORT MATCHES "onnx") list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS "-DONNX_DISABLE_STATIC_REGISTRATION=ON" diff --git a/cmake/vcpkg-triplets/gen.py b/cmake/vcpkg-triplets/gen.py index 615ca66fc8f64..bec1a87a0a20e 100644 --- a/cmake/vcpkg-triplets/gen.py +++ b/cmake/vcpkg-triplets/gen.py @@ -88,9 +88,11 @@ def add_copyright_header(f): # Disable RTTI and turn usage of dynamic_cast and typeid into errors cxxflags += ["/GR-", "/we4541"] # TODO: should it be a cmake list separated by semicolons? - f.write('set(VCPKG_C_FLAGS "{}")\n'.format(" ".join(cflags))) - f.write('set(VCPKG_CXX_FLAGS "{}")\n'.format(" ".join(cxxflags))) - f.write("list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS --compile-no-warning-as-error)\n") + if len(cflags) >= 1: + f.write('set(VCPKG_C_FLAGS "{}")\n'.format(" ".join(cflags))) + if len(cxxflags) >= 1: + f.write('set(VCPKG_CXX_FLAGS "{}")\n'.format(" ".join(cxxflags))) + f.write("list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS --compile-no-warning-as-error -DCMAKE_CXX_STANDARD=17)\n") if ldflags: f.write('set(VCPKG_LINKER_FLAGS "{}")\n'.format(" ".join(ldflags))) add_port_configs(f) @@ -135,27 +137,34 @@ def add_copyright_header(f): f.write(f"set(VCPKG_TARGET_ARCHITECTURE {target_abi})\n") f.write(f"set(VCPKG_CRT_LINKAGE {crt_linkage})\n") f.write("set(VCPKG_LIBRARY_LINKAGE static)\n") + + if enable_binskim and os_name == "linux": ldflags = [ "-Wl,-Bsymbolic-functions", "-Wl,-z,relro", "-Wl,-z,now", - "-Wl,-z,noexecstack", + "-Wl,-z,noexecstack" ] else: ldflags = [] - cflags = [] + # Enable debug info for all build configs + cflags = ["-g"] + cflags_release = ["-DNDEBUG", "-O3"] if enable_binskim: - cflags += [ + # A warning may be generated from include/features.h if the _FORTIFY_SOURCE flag was used in a debug build + cflags_release += [ "-Wp,-D_FORTIFY_SOURCE=2", "-Wp,-D_GLIBCXX_ASSERTIONS", "-fstack-protector-strong", ] if target_abi == "x64": - cflags += ["-fstack-clash-protection", "-fcf-protection"] + cflags_release += ["-fstack-clash-protection", "-fcf-protection"] elif enable_asan: cflags += ["-fsanitize=address"] ldflags += ["-fsanitize=address"] + # Enable debug info for all build configs + ldflags.append('-g') # Avoid unboundTypeError for WebNN EP since unbound type names are illegal with RTTI disabled # in Embind API, relevant issue: https://github.com/emscripten-core/emscripten/issues/7001 if not enable_rtti: @@ -163,8 +172,13 @@ def add_copyright_header(f): cxxflags = cflags.copy() if not enable_rtti: cxxflags.append("-fno-rtti") - f.write('set(VCPKG_C_FLAGS "{}")\n'.format(" ".join(cflags))) - f.write('set(VCPKG_CXX_FLAGS "{}")\n'.format(" ".join(cxxflags))) + if len(cflags) >= 1: + f.write('set(VCPKG_C_FLAGS "{}")\n'.format(" ".join(cflags))) + if len(cxxflags) >= 1: + f.write('set(VCPKG_CXX_FLAGS "{}")\n'.format(" ".join(cxxflags))) + if len(cflags_release) >= 1: + f.write('set(VCPKG_C_FLAGS_RELEASE "{}")\n'.format(" ".join(cflags_release))) + f.write('set(VCPKG_CXX_FLAGS_RELEASE "{}")\n'.format(" ".join(cflags_release))) if os_name == "linux": f.write("set(VCPKG_CMAKE_SYSTEM_NAME Linux)\n") else: @@ -184,4 +198,8 @@ def add_copyright_header(f): if ldflags: f.write('set(VCPKG_LINKER_FLAGS "{}")\n'.format(" ".join(ldflags))) + if os_name == 'osx': + f.write('list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS -DCMAKE_CXX_STANDARD=20)\n') + else: + f.write('list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS -DCMAKE_CXX_STANDARD=17)\n') add_port_configs(f) diff --git a/cmake/vcpkg-triplets/nortti/arm64-linux.cmake b/cmake/vcpkg-triplets/nortti/arm64-linux.cmake index 4bd974a112125..f9035fc299ce5 100644 --- a/cmake/vcpkg-triplets/nortti/arm64-linux.cmake +++ b/cmake/vcpkg-triplets/nortti/arm64-linux.cmake @@ -3,11 +3,15 @@ set(VCPKG_TARGET_ARCHITECTURE arm64) set(VCPKG_CRT_LINKAGE dynamic) set(VCPKG_LIBRARY_LINKAGE static) -set(VCPKG_C_FLAGS "-DEMSCRIPTEN_HAS_UNBOUND_TYPE_NAMES=0") -set(VCPKG_CXX_FLAGS "-DEMSCRIPTEN_HAS_UNBOUND_TYPE_NAMES=0 -fno-rtti") +set(VCPKG_C_FLAGS "-g -DEMSCRIPTEN_HAS_UNBOUND_TYPE_NAMES=0") +set(VCPKG_CXX_FLAGS "-g -DEMSCRIPTEN_HAS_UNBOUND_TYPE_NAMES=0 -fno-rtti") +set(VCPKG_C_FLAGS_RELEASE "-DNDEBUG -O3") +set(VCPKG_CXX_FLAGS_RELEASE "-DNDEBUG -O3") set(VCPKG_CMAKE_SYSTEM_NAME Linux) set(CMAKE_POSITION_INDEPENDENT_CODE ON) list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS --compile-no-warning-as-error -DBENCHMARK_ENABLE_WERROR=OFF) +set(VCPKG_LINKER_FLAGS "-g") +list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS -DCMAKE_CXX_STANDARD=17) if(PORT MATCHES "onnx") list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS "-DONNX_DISABLE_STATIC_REGISTRATION=ON" diff --git a/cmake/vcpkg-triplets/nortti/arm64-osx.cmake b/cmake/vcpkg-triplets/nortti/arm64-osx.cmake index fd8be60b7158a..d8971e8122f9d 100644 --- a/cmake/vcpkg-triplets/nortti/arm64-osx.cmake +++ b/cmake/vcpkg-triplets/nortti/arm64-osx.cmake @@ -3,12 +3,16 @@ set(VCPKG_TARGET_ARCHITECTURE arm64) set(VCPKG_CRT_LINKAGE dynamic) set(VCPKG_LIBRARY_LINKAGE static) -set(VCPKG_C_FLAGS "-DEMSCRIPTEN_HAS_UNBOUND_TYPE_NAMES=0") -set(VCPKG_CXX_FLAGS "-DEMSCRIPTEN_HAS_UNBOUND_TYPE_NAMES=0 -fno-rtti") +set(VCPKG_C_FLAGS "-g -DEMSCRIPTEN_HAS_UNBOUND_TYPE_NAMES=0") +set(VCPKG_CXX_FLAGS "-g -DEMSCRIPTEN_HAS_UNBOUND_TYPE_NAMES=0 -fno-rtti") +set(VCPKG_C_FLAGS_RELEASE "-DNDEBUG -O3") +set(VCPKG_CXX_FLAGS_RELEASE "-DNDEBUG -O3") set(VCPKG_CMAKE_SYSTEM_NAME Darwin) set(VCPKG_OSX_ARCHITECTURES "arm64") set(CMAKE_POSITION_INDEPENDENT_CODE ON) list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS --compile-no-warning-as-error -DBENCHMARK_ENABLE_WERROR=OFF) +set(VCPKG_LINKER_FLAGS "-g") +list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS -DCMAKE_CXX_STANDARD=20) if(PORT MATCHES "onnx") list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS "-DONNX_DISABLE_STATIC_REGISTRATION=ON" diff --git a/cmake/vcpkg-triplets/nortti/arm64-windows-static-md.cmake b/cmake/vcpkg-triplets/nortti/arm64-windows-static-md.cmake index 45b24baa2c94b..9d3c86ce644d0 100644 --- a/cmake/vcpkg-triplets/nortti/arm64-windows-static-md.cmake +++ b/cmake/vcpkg-triplets/nortti/arm64-windows-static-md.cmake @@ -5,7 +5,7 @@ set(VCPKG_CRT_LINKAGE dynamic) set(VCPKG_LIBRARY_LINKAGE static) set(VCPKG_C_FLAGS "/MP /DWIN32 /D_WINDOWS /DWINAPI_FAMILY=100 /DWINVER=0x0A00 /D_WIN32_WINNT=0x0A00 /DNTDDI_VERSION=0x0A000000") set(VCPKG_CXX_FLAGS "/MP /DWIN32 /D_WINDOWS /DWINAPI_FAMILY=100 /DWINVER=0x0A00 /D_WIN32_WINNT=0x0A00 /DNTDDI_VERSION=0x0A000000 /Zc:__cplusplus /GR- /we4541") -list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS --compile-no-warning-as-error) +list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS --compile-no-warning-as-error -DCMAKE_CXX_STANDARD=17) if(PORT MATCHES "onnx") list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS "-DONNX_DISABLE_STATIC_REGISTRATION=ON" diff --git a/cmake/vcpkg-triplets/nortti/arm64-windows-static.cmake b/cmake/vcpkg-triplets/nortti/arm64-windows-static.cmake index 947fe9b61bd6c..238f7405ec492 100644 --- a/cmake/vcpkg-triplets/nortti/arm64-windows-static.cmake +++ b/cmake/vcpkg-triplets/nortti/arm64-windows-static.cmake @@ -5,7 +5,7 @@ set(VCPKG_CRT_LINKAGE static) set(VCPKG_LIBRARY_LINKAGE static) set(VCPKG_C_FLAGS "/MP /DWIN32 /D_WINDOWS /DWINAPI_FAMILY=100 /DWINVER=0x0A00 /D_WIN32_WINNT=0x0A00 /DNTDDI_VERSION=0x0A000000") set(VCPKG_CXX_FLAGS "/MP /DWIN32 /D_WINDOWS /DWINAPI_FAMILY=100 /DWINVER=0x0A00 /D_WIN32_WINNT=0x0A00 /DNTDDI_VERSION=0x0A000000 /Zc:__cplusplus /GR- /we4541") -list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS --compile-no-warning-as-error) +list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS --compile-no-warning-as-error -DCMAKE_CXX_STANDARD=17) if(PORT MATCHES "onnx") list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS "-DONNX_DISABLE_STATIC_REGISTRATION=ON" diff --git a/cmake/vcpkg-triplets/nortti/arm64ec-windows-static-md.cmake b/cmake/vcpkg-triplets/nortti/arm64ec-windows-static-md.cmake index ea5741fa42fbe..da314824ca7cc 100644 --- a/cmake/vcpkg-triplets/nortti/arm64ec-windows-static-md.cmake +++ b/cmake/vcpkg-triplets/nortti/arm64ec-windows-static-md.cmake @@ -5,7 +5,7 @@ set(VCPKG_CRT_LINKAGE dynamic) set(VCPKG_LIBRARY_LINKAGE static) set(VCPKG_C_FLAGS "/MP /DWIN32 /D_WINDOWS /DWINAPI_FAMILY=100 /DWINVER=0x0A00 /D_WIN32_WINNT=0x0A00 /DNTDDI_VERSION=0x0A000000") set(VCPKG_CXX_FLAGS "/MP /DWIN32 /D_WINDOWS /DWINAPI_FAMILY=100 /DWINVER=0x0A00 /D_WIN32_WINNT=0x0A00 /DNTDDI_VERSION=0x0A000000 /Zc:__cplusplus /GR- /we4541") -list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS --compile-no-warning-as-error) +list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS --compile-no-warning-as-error -DCMAKE_CXX_STANDARD=17) if(PORT MATCHES "onnx") list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS "-DONNX_DISABLE_STATIC_REGISTRATION=ON" diff --git a/cmake/vcpkg-triplets/nortti/arm64ec-windows-static.cmake b/cmake/vcpkg-triplets/nortti/arm64ec-windows-static.cmake index 2b354ba511303..0c7fb60401f1d 100644 --- a/cmake/vcpkg-triplets/nortti/arm64ec-windows-static.cmake +++ b/cmake/vcpkg-triplets/nortti/arm64ec-windows-static.cmake @@ -5,7 +5,7 @@ set(VCPKG_CRT_LINKAGE static) set(VCPKG_LIBRARY_LINKAGE static) set(VCPKG_C_FLAGS "/MP /DWIN32 /D_WINDOWS /DWINAPI_FAMILY=100 /DWINVER=0x0A00 /D_WIN32_WINNT=0x0A00 /DNTDDI_VERSION=0x0A000000") set(VCPKG_CXX_FLAGS "/MP /DWIN32 /D_WINDOWS /DWINAPI_FAMILY=100 /DWINVER=0x0A00 /D_WIN32_WINNT=0x0A00 /DNTDDI_VERSION=0x0A000000 /Zc:__cplusplus /GR- /we4541") -list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS --compile-no-warning-as-error) +list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS --compile-no-warning-as-error -DCMAKE_CXX_STANDARD=17) if(PORT MATCHES "onnx") list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS "-DONNX_DISABLE_STATIC_REGISTRATION=ON" diff --git a/cmake/vcpkg-triplets/nortti/universal2-osx.cmake b/cmake/vcpkg-triplets/nortti/universal2-osx.cmake index 7111bb87c910b..febc002c0488e 100644 --- a/cmake/vcpkg-triplets/nortti/universal2-osx.cmake +++ b/cmake/vcpkg-triplets/nortti/universal2-osx.cmake @@ -3,12 +3,16 @@ set(VCPKG_TARGET_ARCHITECTURE x64) set(VCPKG_CRT_LINKAGE dynamic) set(VCPKG_LIBRARY_LINKAGE static) -set(VCPKG_C_FLAGS "-DEMSCRIPTEN_HAS_UNBOUND_TYPE_NAMES=0") -set(VCPKG_CXX_FLAGS "-DEMSCRIPTEN_HAS_UNBOUND_TYPE_NAMES=0 -fno-rtti") +set(VCPKG_C_FLAGS "-g -DEMSCRIPTEN_HAS_UNBOUND_TYPE_NAMES=0") +set(VCPKG_CXX_FLAGS "-g -DEMSCRIPTEN_HAS_UNBOUND_TYPE_NAMES=0 -fno-rtti") +set(VCPKG_C_FLAGS_RELEASE "-DNDEBUG -O3") +set(VCPKG_CXX_FLAGS_RELEASE "-DNDEBUG -O3") set(VCPKG_CMAKE_SYSTEM_NAME Darwin) set(VCPKG_OSX_ARCHITECTURES "x86_64;arm64") set(CMAKE_POSITION_INDEPENDENT_CODE ON) list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS --compile-no-warning-as-error -DBENCHMARK_ENABLE_WERROR=OFF) +set(VCPKG_LINKER_FLAGS "-g") +list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS -DCMAKE_CXX_STANDARD=20) if(PORT MATCHES "onnx") list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS "-DONNX_DISABLE_STATIC_REGISTRATION=ON" diff --git a/cmake/vcpkg-triplets/nortti/x64-linux.cmake b/cmake/vcpkg-triplets/nortti/x64-linux.cmake index 34fcc968e6c0e..c1dac19d33f2c 100644 --- a/cmake/vcpkg-triplets/nortti/x64-linux.cmake +++ b/cmake/vcpkg-triplets/nortti/x64-linux.cmake @@ -3,11 +3,15 @@ set(VCPKG_TARGET_ARCHITECTURE x64) set(VCPKG_CRT_LINKAGE dynamic) set(VCPKG_LIBRARY_LINKAGE static) -set(VCPKG_C_FLAGS "-DEMSCRIPTEN_HAS_UNBOUND_TYPE_NAMES=0") -set(VCPKG_CXX_FLAGS "-DEMSCRIPTEN_HAS_UNBOUND_TYPE_NAMES=0 -fno-rtti") +set(VCPKG_C_FLAGS "-g -DEMSCRIPTEN_HAS_UNBOUND_TYPE_NAMES=0") +set(VCPKG_CXX_FLAGS "-g -DEMSCRIPTEN_HAS_UNBOUND_TYPE_NAMES=0 -fno-rtti") +set(VCPKG_C_FLAGS_RELEASE "-DNDEBUG -O3") +set(VCPKG_CXX_FLAGS_RELEASE "-DNDEBUG -O3") set(VCPKG_CMAKE_SYSTEM_NAME Linux) set(CMAKE_POSITION_INDEPENDENT_CODE ON) list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS --compile-no-warning-as-error -DBENCHMARK_ENABLE_WERROR=OFF) +set(VCPKG_LINKER_FLAGS "-g") +list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS -DCMAKE_CXX_STANDARD=17) if(PORT MATCHES "onnx") list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS "-DONNX_DISABLE_STATIC_REGISTRATION=ON" diff --git a/cmake/vcpkg-triplets/nortti/x64-osx.cmake b/cmake/vcpkg-triplets/nortti/x64-osx.cmake index 0a7fcc08e0c69..242d34a358170 100644 --- a/cmake/vcpkg-triplets/nortti/x64-osx.cmake +++ b/cmake/vcpkg-triplets/nortti/x64-osx.cmake @@ -3,12 +3,16 @@ set(VCPKG_TARGET_ARCHITECTURE x64) set(VCPKG_CRT_LINKAGE dynamic) set(VCPKG_LIBRARY_LINKAGE static) -set(VCPKG_C_FLAGS "-DEMSCRIPTEN_HAS_UNBOUND_TYPE_NAMES=0") -set(VCPKG_CXX_FLAGS "-DEMSCRIPTEN_HAS_UNBOUND_TYPE_NAMES=0 -fno-rtti") +set(VCPKG_C_FLAGS "-g -DEMSCRIPTEN_HAS_UNBOUND_TYPE_NAMES=0") +set(VCPKG_CXX_FLAGS "-g -DEMSCRIPTEN_HAS_UNBOUND_TYPE_NAMES=0 -fno-rtti") +set(VCPKG_C_FLAGS_RELEASE "-DNDEBUG -O3") +set(VCPKG_CXX_FLAGS_RELEASE "-DNDEBUG -O3") set(VCPKG_CMAKE_SYSTEM_NAME Darwin) set(VCPKG_OSX_ARCHITECTURES "x86_64") set(CMAKE_POSITION_INDEPENDENT_CODE ON) list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS --compile-no-warning-as-error -DBENCHMARK_ENABLE_WERROR=OFF) +set(VCPKG_LINKER_FLAGS "-g") +list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS -DCMAKE_CXX_STANDARD=20) if(PORT MATCHES "onnx") list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS "-DONNX_DISABLE_STATIC_REGISTRATION=ON" diff --git a/cmake/vcpkg-triplets/nortti/x64-windows-static-md.cmake b/cmake/vcpkg-triplets/nortti/x64-windows-static-md.cmake index 5c62c4263f8eb..a8d2441583d0f 100644 --- a/cmake/vcpkg-triplets/nortti/x64-windows-static-md.cmake +++ b/cmake/vcpkg-triplets/nortti/x64-windows-static-md.cmake @@ -5,7 +5,7 @@ set(VCPKG_CRT_LINKAGE dynamic) set(VCPKG_LIBRARY_LINKAGE static) set(VCPKG_C_FLAGS "/MP /DWIN32 /D_WINDOWS /DWINAPI_FAMILY=100 /DWINVER=0x0A00 /D_WIN32_WINNT=0x0A00 /DNTDDI_VERSION=0x0A000000") set(VCPKG_CXX_FLAGS "/MP /DWIN32 /D_WINDOWS /DWINAPI_FAMILY=100 /DWINVER=0x0A00 /D_WIN32_WINNT=0x0A00 /DNTDDI_VERSION=0x0A000000 /Zc:__cplusplus /GR- /we4541") -list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS --compile-no-warning-as-error) +list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS --compile-no-warning-as-error -DCMAKE_CXX_STANDARD=17) if(PORT MATCHES "onnx") list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS "-DONNX_DISABLE_STATIC_REGISTRATION=ON" diff --git a/cmake/vcpkg-triplets/nortti/x64-windows-static.cmake b/cmake/vcpkg-triplets/nortti/x64-windows-static.cmake index deceefcd95910..688ed230fd17c 100644 --- a/cmake/vcpkg-triplets/nortti/x64-windows-static.cmake +++ b/cmake/vcpkg-triplets/nortti/x64-windows-static.cmake @@ -5,7 +5,7 @@ set(VCPKG_CRT_LINKAGE static) set(VCPKG_LIBRARY_LINKAGE static) set(VCPKG_C_FLAGS "/MP /DWIN32 /D_WINDOWS /DWINAPI_FAMILY=100 /DWINVER=0x0A00 /D_WIN32_WINNT=0x0A00 /DNTDDI_VERSION=0x0A000000") set(VCPKG_CXX_FLAGS "/MP /DWIN32 /D_WINDOWS /DWINAPI_FAMILY=100 /DWINVER=0x0A00 /D_WIN32_WINNT=0x0A00 /DNTDDI_VERSION=0x0A000000 /Zc:__cplusplus /GR- /we4541") -list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS --compile-no-warning-as-error) +list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS --compile-no-warning-as-error -DCMAKE_CXX_STANDARD=17) if(PORT MATCHES "onnx") list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS "-DONNX_DISABLE_STATIC_REGISTRATION=ON" diff --git a/cmake/vcpkg-triplets/nortti/x86-windows-static-md.cmake b/cmake/vcpkg-triplets/nortti/x86-windows-static-md.cmake index cb1b3cd887932..1d3de9c1420c4 100644 --- a/cmake/vcpkg-triplets/nortti/x86-windows-static-md.cmake +++ b/cmake/vcpkg-triplets/nortti/x86-windows-static-md.cmake @@ -5,7 +5,7 @@ set(VCPKG_CRT_LINKAGE dynamic) set(VCPKG_LIBRARY_LINKAGE static) set(VCPKG_C_FLAGS "/MP /DWIN32 /D_WINDOWS /DWINAPI_FAMILY=100 /DWINVER=0x0A00 /D_WIN32_WINNT=0x0A00 /DNTDDI_VERSION=0x0A000000") set(VCPKG_CXX_FLAGS "/MP /DWIN32 /D_WINDOWS /DWINAPI_FAMILY=100 /DWINVER=0x0A00 /D_WIN32_WINNT=0x0A00 /DNTDDI_VERSION=0x0A000000 /Zc:__cplusplus /GR- /we4541") -list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS --compile-no-warning-as-error) +list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS --compile-no-warning-as-error -DCMAKE_CXX_STANDARD=17) if(PORT MATCHES "onnx") list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS "-DONNX_DISABLE_STATIC_REGISTRATION=ON" diff --git a/cmake/vcpkg-triplets/nortti/x86-windows-static.cmake b/cmake/vcpkg-triplets/nortti/x86-windows-static.cmake index 032021745099a..3a856c26797a4 100644 --- a/cmake/vcpkg-triplets/nortti/x86-windows-static.cmake +++ b/cmake/vcpkg-triplets/nortti/x86-windows-static.cmake @@ -5,7 +5,7 @@ set(VCPKG_CRT_LINKAGE static) set(VCPKG_LIBRARY_LINKAGE static) set(VCPKG_C_FLAGS "/MP /DWIN32 /D_WINDOWS /DWINAPI_FAMILY=100 /DWINVER=0x0A00 /D_WIN32_WINNT=0x0A00 /DNTDDI_VERSION=0x0A000000") set(VCPKG_CXX_FLAGS "/MP /DWIN32 /D_WINDOWS /DWINAPI_FAMILY=100 /DWINVER=0x0A00 /D_WIN32_WINNT=0x0A00 /DNTDDI_VERSION=0x0A000000 /Zc:__cplusplus /GR- /we4541") -list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS --compile-no-warning-as-error) +list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS --compile-no-warning-as-error -DCMAKE_CXX_STANDARD=17) if(PORT MATCHES "onnx") list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS "-DONNX_DISABLE_STATIC_REGISTRATION=ON"