This commit is contained in:
Scott McKay 2025-01-18 11:24:02 +10:00
parent e915f01b41
commit 04ff0ceeed
801 changed files with 31038 additions and 8816 deletions

View file

@ -105,7 +105,7 @@ jobs:
--use_xnnpack \
--use_binskim_compliant_compile_flags \
--ios \
--apple_deploy_target=13.0 \
--apple_deploy_target=15.1 \
--apple_sysroot=iphonesimulator \
--osx_arch=${{ matrix.target_arch }}
@ -117,17 +117,21 @@ jobs:
with:
python-version: ${{ env.python_version }}
- name: "Run Homebrew"
run: brew install autoconf automake autoconf-archive
- name: "Run vcpkg(x64-osx)"
uses: lukka/run-vcpkg@v11
with:
vcpkgDirectory: "${{ runner.temp }}/vcpkg"
vcpkgGitCommitId: "1de2026f28ead93ff1773e6e680387643e914ea1" # 2024.07.12
runVcpkgInstall: true
vcpkgGitCommitId: "b322364f06308bdd24823f9d8f03fe0cc86fd46f" # 2024.12.16
runVcpkgInstall: true # vcpkg install --x-manifest-root cmake --x-install-root .build --overlay-triplets cmake/vcpkg-triplets/default
vcpkgJsonGlob: "cmake/vcpkg.json"
vcpkgConfigurationJsonGlob: "cmake/vcpkg-configuration.json"
env:
VCPKG_INSTALLED_DIR: "${{ github.workspace }}/.build"
VCPKG_DEFAULT_TRIPLET: "x64-osx"
VCPKG_OVERLAY_TRIPLETS: "${{ github.workspace }}/cmake/vcpkg-triplets/default"
# VCPKG_BINARY_SOURCES: "default" # https://learn.microsoft.com/en-us/vcpkg/reference/binarycaching
- name: "Run compile_schema.py"
@ -163,19 +167,22 @@ jobs:
--cmake_extra_defines "VCPKG_TARGET_TRIPLET=x64-osx" \
--cmake_extra_defines "VCPKG_INSTALLED_DIR:PATH=${{ github.workspace }}/.build" \
--cmake_extra_defines "VCPKG_INSTALL_OPTIONS=--x-feature=tests"
env:
VCPKG_OVERLAY_TRIPLETS: "${{ github.workspace }}/cmake/vcpkg-triplets/default"
shell: bash
- name: "Run vcpkg(arm64-osx)"
uses: lukka/run-vcpkg@v11
with:
vcpkgDirectory: "${{ runner.temp }}/vcpkg"
vcpkgGitCommitId: "1de2026f28ead93ff1773e6e680387643e914ea1" # 2024.07.12
runVcpkgInstall: true
doNotUpdateVcpkg: true
runVcpkgInstall: true # vcpkg install --x-manifest-root cmake --x-install-root .build --overlay-triplets cmake/vcpkg-triplets/default
vcpkgJsonGlob: "cmake/vcpkg.json"
vcpkgConfigurationJsonGlob: "cmake/vcpkg-configuration.json"
env:
VCPKG_INSTALLED_DIR: "${{ github.workspace }}/.build"
VCPKG_DEFAULT_TRIPLET: "arm64-osx"
VCPKG_OVERLAY_TRIPLETS: "${{ github.workspace }}/cmake/vcpkg-triplets/default"
# VCPKG_BINARY_SOURCES: "default" # https://learn.microsoft.com/en-us/vcpkg/reference/binarycaching
- name: "Run build.py(arm64-osx)"
@ -193,6 +200,8 @@ jobs:
--cmake_extra_defines "VCPKG_TARGET_TRIPLET=arm64-osx" \
--cmake_extra_defines "VCPKG_INSTALLED_DIR:PATH=${{ github.workspace }}/.build" \
--cmake_extra_defines "VCPKG_INSTALL_OPTIONS=--x-feature=tests"
env:
VCPKG_OVERLAY_TRIPLETS: "${{ github.workspace }}/cmake/vcpkg-triplets/default"
shell: bash
Objective-C-StaticAnalysis:

View file

@ -56,12 +56,14 @@ jobs:
uses: lukka/run-vcpkg@v11
with:
vcpkgDirectory: "C:/vcpkg" # use VCPKG_INSTALLATION_ROOT of the image
runVcpkgInstall: true
vcpkgGitCommitId: "b322364f06308bdd24823f9d8f03fe0cc86fd46f" # 2024.12.16
runVcpkgInstall: true # vcpkg install --x-manifest-root cmake --x-install-root .build --overlay-triplets cmake/vcpkg-triplets/default
vcpkgJsonGlob: "cmake/vcpkg.json"
vcpkgConfigurationJsonGlob: "cmake/vcpkg-configuration.json"
env:
VCPKG_INSTALLED_DIR: "${{ github.workspace }}/.build"
VCPKG_DEFAULT_TRIPLET: "x64-windows"
VCPKG_OVERLAY_TRIPLETS: "${{ github.workspace }}/cmake/vcpkg-triplets/default"
# VCPKG_BINARY_SOURCES: "default" # https://learn.microsoft.com/en-us/vcpkg/reference/binarycaching
- name: "Run compile_schema.py"
@ -99,6 +101,8 @@ jobs:
--cmake_extra_defines "VCPKG_TARGET_TRIPLET=x64-windows" `
--cmake_extra_defines "VCPKG_INSTALLED_DIR:PATH=${{ github.workspace }}/.build" `
--cmake_extra_defines "VCPKG_INSTALL_OPTIONS=--x-feature=tests"
env:
VCPKG_OVERLAY_TRIPLETS: "${{ github.workspace }}/cmake/vcpkg-triplets/default"
shell: pwsh
- name: "Run vcpkg(arm64-windows)"
@ -106,12 +110,13 @@ jobs:
with:
vcpkgDirectory: "C:/vcpkg" # use VCPKG_INSTALLATION_ROOT of the image
doNotUpdateVcpkg: true
runVcpkgInstall: true
runVcpkgInstall: true # vcpkg install --x-manifest-root cmake --x-install-root .build --overlay-triplets cmake/vcpkg-triplets/default
vcpkgJsonGlob: "cmake/vcpkg.json"
vcpkgConfigurationJsonGlob: "cmake/vcpkg-configuration.json"
env:
VCPKG_INSTALLED_DIR: "${{ github.workspace }}/.build"
VCPKG_DEFAULT_TRIPLET: "arm64-windows"
VCPKG_OVERLAY_TRIPLETS: "${{ github.workspace }}/cmake/vcpkg-triplets/default"
# VCPKG_BINARY_SOURCES: "default" # https://learn.microsoft.com/en-us/vcpkg/reference/binarycaching
- name: "Run build.py(arm64-windows)"
@ -128,4 +133,6 @@ jobs:
--cmake_extra_defines "VCPKG_TARGET_TRIPLET=arm64-windows" `
--cmake_extra_defines "VCPKG_INSTALLED_DIR:PATH=${{ github.workspace }}/.build" `
--cmake_extra_defines "VCPKG_INSTALL_OPTIONS=--x-feature=tests"
env:
VCPKG_OVERLAY_TRIPLETS: "${{ github.workspace }}/cmake/vcpkg-triplets/default"
shell: pwsh

View file

@ -61,7 +61,7 @@ is_formatter = true
[[linter]]
code = 'BLACK-ISORT'
code = 'RUFF-FORMAT'
include_patterns = [
'**/*.py',
]
@ -76,7 +76,7 @@ command = [
'-m',
'lintrunner_adapters',
'run',
'black_isort_linter',
'ruff_format_linter',
'--',
'@{{PATHSFILE}}'
]

View file

@ -136,7 +136,7 @@
"component": {
"type": "git",
"git": {
"commitHash": "309b75c9e56e0a674bf78d59872ce131f814dfb6",
"commitHash": "fe98e0b93565382648129271381c14d6205255e3",
"repositoryUrl": "https://github.com/google/XNNPACK.git"
},
"comments": "googlexnnpack"
@ -226,8 +226,8 @@
"component": {
"type": "git",
"git": {
"commitHash": "4fe0e1e183925bf8cfa6aae24237e724a96479b8",
"repositoryUrl": "https://github.com/Maratyszcza/pthreadpool.git"
"commitHash": "4e80ca24521aa0fb3a746f9ea9c3eaa20e9afbb0",
"repositoryUrl": "https://github.com/google/pthreadpool.git"
},
"comments": "pthreadpool"
}
@ -246,7 +246,7 @@
"component": {
"type": "git",
"git": {
"commitHash": "ca678952a9a8eaa6de112d154e8e104b22f9ab3f",
"commitHash": "8a1772a0c5c447df2d18edf33ec4603a8c9c04a6",
"repositoryUrl": "https://github.com/pytorch/cpuinfo.git"
},
"comments": "pytorch_cpuinfo"
@ -306,7 +306,7 @@
"component": {
"type": "git",
"git": {
"commitHash": "94142d8391c9791ec71c38336436319a2d4ac7a0",
"commitHash": "f3f6caa6e8adb420e005ec41c6fefc8d75affb6e",
"repositoryUrl": "https://github.com/microsoft/onnxruntime-extensions.git"
},
"comments": "extensions"

View file

@ -371,6 +371,70 @@ if (onnxruntime_USE_ROCM)
set(onnxruntime_HIPIFY_PERL ${HIPIFY_PERL_PATH}/hipify-perl)
endif()
# replicate strategy used by pytorch to get ROCM_VERSION
# https://github.com/pytorch/pytorch/blob/1a10751731784942dcbb9c0524c1369a29d45244/cmake/public/LoadHIP.cmake#L45-L109
# with modification
set(ROCM_INCLUDE_DIRS "${onnxruntime_ROCM_HOME}/include")
set(PROJECT_RANDOM_BINARY_DIR "${CMAKE_BINARY_DIR}")
set(file "${CMAKE_BINARY_DIR}/detect_rocm_version.cc")
# Find ROCM version for checks
# ROCM 5.0 and later will have header api for version management
if(EXISTS ${ROCM_INCLUDE_DIRS}/rocm_version.h)
file(WRITE ${file} ""
"#include <rocm_version.h>\n"
)
elseif(EXISTS ${ROCM_INCLUDE_DIRS}/rocm-core/rocm_version.h)
file(WRITE ${file} ""
"#include <rocm-core/rocm_version.h>\n"
)
else()
message(FATAL_ERROR "********************* rocm_version.h couldnt be found ******************\n")
endif()
file(APPEND ${file} ""
"#include <cstdio>\n"
"#ifndef ROCM_VERSION_PATCH\n"
"#define ROCM_VERSION_PATCH 0\n"
"#endif\n"
"#define STRINGIFYHELPER(x) #x\n"
"#define STRINGIFY(x) STRINGIFYHELPER(x)\n"
"int main() {\n"
" printf(\"%d.%d.%s\", ROCM_VERSION_MAJOR, ROCM_VERSION_MINOR, STRINGIFY(ROCM_VERSION_PATCH));\n"
" return 0;\n"
"}\n"
)
try_run(run_result compile_result ${PROJECT_RANDOM_BINARY_DIR} ${file}
CMAKE_FLAGS "-DINCLUDE_DIRECTORIES=${ROCM_INCLUDE_DIRS}"
RUN_OUTPUT_VARIABLE rocm_version_from_header
COMPILE_OUTPUT_VARIABLE output_var
)
# We expect the compile to be successful if the include directory exists.
if(NOT compile_result)
message(FATAL_ERROR "ROCM: Couldn't determine version from header: " ${output_var})
endif()
message(STATUS "ROCM: Header version is: " ${rocm_version_from_header})
set(ROCM_VERSION_DEV_RAW ${rocm_version_from_header})
string(REGEX MATCH "^([0-9]+)\.([0-9]+)\.([0-9]+).*$" ROCM_VERSION_DEV_MATCH ${ROCM_VERSION_DEV_RAW})
if (ROCM_VERSION_DEV_MATCH)
set(ROCM_VERSION_DEV_MAJOR ${CMAKE_MATCH_1})
set(ROCM_VERSION_DEV_MINOR ${CMAKE_MATCH_2})
set(ROCM_VERSION_DEV_PATCH ${CMAKE_MATCH_3})
set(ROCM_VERSION_DEV "${ROCM_VERSION_DEV_MAJOR}.${ROCM_VERSION_DEV_MINOR}.${ROCM_VERSION_DEV_PATCH}")
math(EXPR ROCM_VERSION_DEV_INT "(${ROCM_VERSION_DEV_MAJOR}*10000) + (${ROCM_VERSION_DEV_MINOR}*100) + ${ROCM_VERSION_DEV_PATCH}")
else()
message(FATAL_ERROR "Cannot determine ROCm version string")
endif()
message("\n***** ROCm version from rocm_version.h ****\n")
message("ROCM_VERSION_DEV: ${ROCM_VERSION_DEV}")
message("ROCM_VERSION_DEV_MAJOR: ${ROCM_VERSION_DEV_MAJOR}")
message("ROCM_VERSION_DEV_MINOR: ${ROCM_VERSION_DEV_MINOR}")
message("ROCM_VERSION_DEV_PATCH: ${ROCM_VERSION_DEV_PATCH}")
message("ROCM_VERSION_DEV_INT: ${ROCM_VERSION_DEV_INT}")
message("\n***** HIP LANGUAGE CONFIG INFO ****\n")
message("CMAKE_HIP_COMPILER: ${CMAKE_HIP_COMPILER}")
message("CMAKE_HIP_ARCHITECTURES: ${CMAKE_HIP_ARCHITECTURES}")
@ -534,6 +598,11 @@ if (onnxruntime_EXTENDED_MINIMAL_BUILD AND NOT onnxruntime_MINIMAL_BUILD)
set(onnxruntime_MINIMAL_BUILD ON)
endif()
set(REPO_ROOT ${PROJECT_SOURCE_DIR}/..)
set(ONNXRUNTIME_ROOT ${PROJECT_SOURCE_DIR}/../onnxruntime)
set(ORTTRAINING_ROOT ${PROJECT_SOURCE_DIR}/../orttraining)
set(ORTTRAINING_SOURCE_DIR ${ORTTRAINING_ROOT}/orttraining)
include(adjust_global_compile_flags.cmake)
if (APPLE)
@ -565,10 +634,6 @@ if (NOT MSVC AND NOT (CMAKE_SYSTEM_NAME STREQUAL "iOS"))
set(CMAKE_REQUIRED_FLAGS ${OLD_CMAKE_REQUIRED_FLAGS})
endif()
set(REPO_ROOT ${PROJECT_SOURCE_DIR}/..)
set(ONNXRUNTIME_ROOT ${PROJECT_SOURCE_DIR}/../onnxruntime)
set(ORTTRAINING_ROOT ${PROJECT_SOURCE_DIR}/../orttraining)
set(ORTTRAINING_SOURCE_DIR ${ORTTRAINING_ROOT}/orttraining)
file (STRINGS "${REPO_ROOT}/VERSION_NUMBER" ORT_VERSION)
@ -679,6 +744,7 @@ else()
check_cxx_compiler_flag(-Wdeprecated-builtins HAS_DEPRECATED_BUILTINS)
check_cxx_compiler_flag(-Wdeprecated-copy HAS_DEPRECATED_COPY)
check_cxx_compiler_flag(-Wdeprecated-declarations HAS_DEPRECATED_DECLARATIONS)
check_cxx_compiler_flag(-Wdeprecated-literal-operator HAS_DEPRECATED_LITERAL_OPERATOR)
check_cxx_compiler_flag(-Wdeprecated-this-capture HAS_DEPRECATED_THIS_CAPTURE)
check_cxx_compiler_flag(-Wenum-constexpr-conversion HAS_ENUM_CONSTEXPR_CONVERSION)
check_cxx_compiler_flag(-Wformat-truncation HAS_FORMAT_TRUNCATION)
@ -735,6 +801,9 @@ else()
if (HAS_DEPRECATED_BUILTINS)
list(APPEND ORT_WARNING_FLAGS -Wno-deprecated-builtins)
endif()
if (HAS_DEPRECATED_LITERAL_OPERATOR)
list(APPEND ORT_WARNING_FLAGS -Wno-deprecated-literal-operator)
endif()
#see:https://reviews.llvm.org/D131307
#It was intended that the 'enum-constexpr-conversion' type warnings can not be silenced by -w
if(HAS_ENUM_CONSTEXPR_CONVERSION AND NOT Protobuf_FOUND)
@ -1138,6 +1207,8 @@ function(onnxruntime_set_compile_flags target_name)
# because we may mix gcc and hipclang
set(ORT_HIP_WARNING_FLAGS ${ORT_WARNING_FLAGS})
list(REMOVE_ITEM ORT_HIP_WARNING_FLAGS -Wno-nonnull-compare)
# Unsupported by Clang 18 yet.
list(REMOVE_ITEM ORT_HIP_WARNING_FLAGS -Wno-dangling-reference)
# float16.h:90:12: error: tmp is used uninitialized
list(APPEND ORT_HIP_WARNING_FLAGS -Wno-uninitialized)

View file

@ -14,6 +14,7 @@
"VCPKG_INSTALLED_DIR": "${sourceParentDir}/.build"
},
"environment": {
"VCPKG_OVERLAY_TRIPLETS": "${sourceDir}/vcpkg-triplets",
"VCPKG_FEATURE_FLGAS": "manifests,versions"
}
},

View file

@ -12,15 +12,6 @@ if (ANDROID)
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-z,max-page-size=16384")
endif()
# Suggested by https://gitlab.kitware.com/cmake/cmake/-/issues/20132
# MacCatalyst is not well supported in CMake
# The error that can emerge without this flag can look like:
# "clang : error : overriding '-mmacosx-version-min=11.0' option with '-target x86_64-apple-ios14.0-macabi' [-Werror,-Woverriding-t-option]"
if (PLATFORM_NAME STREQUAL "macabi")
add_compile_options(-Wno-overriding-t-option)
add_link_options(-Wno-overriding-t-option)
endif()
# Enable space optimization for gcc/clang
# Cannot use "-ffunction-sections -fdata-sections" if we enable bitcode (iOS)
if (NOT MSVC AND NOT onnxruntime_ENABLE_BITCODE)
@ -338,6 +329,10 @@ else()
# suppress warnings from flatbuffers
string(APPEND CMAKE_CXX_FLAGS " -Wno-restrict ")
string(APPEND CMAKE_C_FLAGS " -Wno-restrict ")
if(onnxruntime_USE_XNNPACK)
# https://github.com/google/XNNPACK/issues/7650
string(APPEND CMAKE_C_FLAGS " -Wno-incompatible-pointer-types ")
endif()
endif()
# Check support for AVX and f16c.
include(CheckCXXCompilerFlag)
@ -374,3 +369,7 @@ if (WIN32)
elseif(LINUX)
add_compile_definitions("_GNU_SOURCE")
endif()
if (onnxruntime_USE_EXTENSIONS)
include_directories(${REPO_ROOT}/include/onnxruntime/core/session)
endif()

View file

@ -29,7 +29,7 @@ fxdiv;https://github.com/Maratyszcza/FXdiv/archive/63058eff77e11aa15bf531df5dd34
google_benchmark;https://github.com/google/benchmark/archive/refs/tags/v1.8.5.zip;cd47d3d272faf353600c8cc2fdec2b52d6f69177
googletest;https://github.com/google/googletest/archive/refs/tags/v1.15.0.zip;9d2d0af8d77ac726ea55d44a8fa727ec98311349
#xnnpack 2024.09.04
googlexnnpack;https://github.com/google/XNNPACK/archive/309b75c9e56e0a674bf78d59872ce131f814dfb6.zip;39FA5259EAEACE0547284B63D5CEDC4F05553F5A
googlexnnpack;https://github.com/google/XNNPACK/archive/fe98e0b93565382648129271381c14d6205255e3.zip;14f61dcf17cec2cde34ba2dcf61d6f24bf6059f3
json;https://github.com/nlohmann/json/archive/refs/tags/v3.10.5.zip;f257f8dc27c5b8c085dc887b40cddd18ae1f725c
microsoft_gsl;https://github.com/microsoft/GSL/archive/refs/tags/v4.0.0.zip;cf368104cd22a87b4dd0c80228919bb2df3e2a14
microsoft_wil;https://github.com/microsoft/wil/archive/refs/tags/v1.0.230629.1.zip;e4a542a323c070376f7c2d1973d0f7ddbc1d2fa5
@ -46,17 +46,17 @@ protoc_linux_x86;https://github.com/protocolbuffers/protobuf/releases/download/v
protoc_linux_aarch64;https://github.com/protocolbuffers/protobuf/releases/download/v21.12/protoc-21.12-linux-aarch_64.zip;df9d45470b0b8cf939dd2f0ec6b88e9cafc4d617
protoc_mac_universal;https://github.com/protocolbuffers/protobuf/releases/download/v21.12/protoc-21.12-osx-universal_binary.zip;23710c3d1c2036d8d65a6a22234372fa2d7af9ef
psimd;https://github.com/Maratyszcza/psimd/archive/072586a71b55b7f8c584153d223e95687148a900.zip;1f5454b01f06f9656b77e4a5e2e31d7422487013
pthreadpool;https://github.com/Maratyszcza/pthreadpool/archive/4fe0e1e183925bf8cfa6aae24237e724a96479b8.zip;07a0aa91dd9bf86f31b95497e00f31d8a261a4bd
pthreadpool;https://github.com/google/pthreadpool/archive/4e80ca24521aa0fb3a746f9ea9c3eaa20e9afbb0.zip;bd4ea65c8292801e9555b527a0ecbb2e0092c917
pybind11;https://github.com/pybind/pybind11/archive/refs/tags/v2.13.1.zip;9255d5c8568debcc329dd42ed8f410ee139ac7b1
pytorch_cpuinfo;https://github.com/pytorch/cpuinfo/archive/ca678952a9a8eaa6de112d154e8e104b22f9ab3f.zip;138bf57d2a110935330d1048dce6d7b82d17d377
pytorch_cpuinfo;https://github.com/pytorch/cpuinfo/archive/8a1772a0c5c447df2d18edf33ec4603a8c9c04a6.zip;85bf8a60dae026b99b6ccd78606c85ed83bfb2cd
re2;https://github.com/google/re2/archive/refs/tags/2024-07-02.zip;646e1728269cde7fcef990bf4a8e87b047882e88
safeint;https://github.com/dcleblanc/SafeInt/archive/refs/tags/3.0.28.zip;23f252040ff6cb9f1fd18575b32fa8fb5928daac
tensorboard;https://github.com/tensorflow/tensorboard/archive/373eb09e4c5d2b3cc2493f0949dc4be6b6a45e81.zip;67b833913605a4f3f499894ab11528a702c2b381
cutlass;https://github.com/NVIDIA/cutlass/archive/refs/tags/v3.5.1.zip;e49b2b964163d27765a5002d210a2f3c73771835
utf8_range;https://github.com/protocolbuffers/utf8_range/archive/72c943dea2b9240cd09efde15191e144bc7c7d38.zip;9925739c9debc0efa2adcb194d371a35b6a03156
extensions;https://github.com/microsoft/onnxruntime-extensions/archive/94142d8391c9791ec71c38336436319a2d4ac7a0.zip;4365ac5140338b4cb75a39944a4be276e3829b3c
extensions;https://github.com/microsoft/onnxruntime-extensions/archive/f3f6caa6e8adb420e005ec41c6fefc8d75affb6e.zip;cec2e164f1a00e7d80fd94df65e4e8d2daead70d
composable_kernel;https://github.com/ROCmSoftwarePlatform/composable_kernel/archive/204da9c522cebec5220bba52cd3542ebcaf99e7a.zip;1827348efd47831c13074245274d41b7cae8a557
directx_headers;https://github.com/microsoft/DirectX-Headers/archive/refs/tags/v1.613.1.zip;47653509a3371eabb156360f42faf582f314bf2e
cudnn_frontend;https://github.com/NVIDIA/cudnn-frontend/archive/refs/tags/v1.7.0.zip;d0753d8d5b39947ca0729d7773cb84653a129eb1
dawn;https://github.com/google/dawn/archive/12a3b24c456cebd9fd11f23ac0164f78129b00c6.zip;ad428f6dc16f1336d584f7bad5714e1097dafc43
kleidiai;https://gitlab.arm.com/kleidi/kleidiai/-/archive/v0.2.0/kleidiai-v0.2.0.zip;B1E3173992FD91F20DB904AB77D6E901778C2681
kleidiai;https://gitlab.arm.com/kleidi/kleidiai/-/archive/d15722976120710080ca098fe8ddabf4556cb40f/kleidiai-d15722976120710080ca098fe8ddabf4556cb40f.zip;d6c840d00c3b05aedf06e957ddaece1013d1f40b

View file

@ -631,78 +631,99 @@ if (onnxruntime_USE_WEBGPU)
URL_HASH SHA1=${DEP_SHA1_dawn}
# All previous patches are merged into the upstream dawn project. We don't need to apply any patches right now.
# if we need to apply patches in the future, we can uncomment the following line.
# PATCH_COMMAND ${Patch_EXECUTABLE} --binary --ignore-whitespace -p1 < ${PROJECT_SOURCE_DIR}/patches/dawn/dawn.patch
PATCH_COMMAND ${Patch_EXECUTABLE} --binary --ignore-whitespace -p1 < ${PROJECT_SOURCE_DIR}/patches/dawn/dawn.patch
)
endif()
if (onnxruntime_BUILD_DAWN_MONOLITHIC_LIBRARY)
set(DAWN_BUILD_MONOLITHIC_LIBRARY ON CACHE BOOL "" FORCE)
set(DAWN_ENABLE_INSTALL ON CACHE BOOL "" FORCE)
if (onnxruntime_USE_EXTERNAL_DAWN)
message(FATAL_ERROR "onnxruntime_USE_EXTERNAL_DAWN and onnxruntime_BUILD_DAWN_MONOLITHIC_LIBRARY cannot be enabled at the same time.")
endif()
else()
# use dawn::dawn_native and dawn::dawn_proc instead of the monolithic dawn::webgpu_dawn to minimize binary size
set(DAWN_BUILD_MONOLITHIC_LIBRARY OFF CACHE BOOL "" FORCE)
set(DAWN_ENABLE_INSTALL OFF CACHE BOOL "" FORCE)
endif()
set(DAWN_BUILD_SAMPLES OFF CACHE BOOL "" FORCE)
set(DAWN_ENABLE_NULL OFF CACHE BOOL "" FORCE)
set(DAWN_FETCH_DEPENDENCIES ON CACHE BOOL "" FORCE)
# disable things we don't use
set(DAWN_DXC_ENABLE_ASSERTS_IN_NDEBUG OFF)
set(DAWN_ENABLE_DESKTOP_GL OFF CACHE BOOL "" FORCE)
set(DAWN_ENABLE_OPENGLES OFF CACHE BOOL "" FORCE)
set(DAWN_SUPPORTS_GLFW_FOR_WINDOWING OFF CACHE BOOL "" FORCE)
set(DAWN_USE_GLFW OFF CACHE BOOL "" FORCE)
set(DAWN_USE_WINDOWS_UI OFF CACHE BOOL "" FORCE)
set(DAWN_USE_X11 OFF CACHE BOOL "" FORCE)
if (CMAKE_SYSTEM_NAME STREQUAL "Emscripten")
set(DAWN_EMSCRIPTEN_TOOLCHAIN "${REPO_ROOT}/cmake/external/emsdk/upstream/emscripten" CACHE STRING "" FORCE)
set(TINT_BUILD_TESTS OFF CACHE BOOL "" FORCE)
set(TINT_BUILD_CMD_TOOLS OFF CACHE BOOL "" FORCE)
set(TINT_BUILD_GLSL_WRITER OFF CACHE BOOL "" FORCE)
set(TINT_BUILD_GLSL_VALIDATOR OFF CACHE BOOL "" FORCE)
set(TINT_BUILD_IR_BINARY OFF CACHE BOOL "" FORCE)
set(TINT_BUILD_SPV_READER OFF CACHE BOOL "" FORCE) # don't need. disabling is a large binary size saving
set(TINT_BUILD_WGSL_WRITER ON CACHE BOOL "" FORCE) # needed to create cache key. runtime error if not enabled.
# Add the missing files from the emsdk installation
#
# For a "standard" emscripten build, the folder "${DAWN_EMSCRIPTEN_TOOLCHAIN}/tools/maint/" is not used. This is the
# reason why EMSDK installation does not include it.
# However, currently the WebGPU support in Emscripten is still being developed and the Dawn project is maintaining
# a fork of the Emscripten toolchain. As an extra build step, Dawn needs to generate some files using the file
# "${DAWN_EMSCRIPTEN_TOOLCHAIN}/tools/maint/gen_struct_info.py" from emscripten, which is missing in the emscripten
# installed by emsdk.
#
# We keep a copy of the missing file(s) in ${PROJECT_SOURCE_DIR}/patches/emscripten/, and now we extract them to the
# emscripten toolchain folder.
execute_process(COMMAND ${CMAKE_COMMAND} -E tar x "${PROJECT_SOURCE_DIR}/patches/emscripten/patch_3.1.74.tgz"
WORKING_DIRECTORY ${DAWN_EMSCRIPTEN_TOOLCHAIN})
else()
if (onnxruntime_BUILD_DAWN_MONOLITHIC_LIBRARY)
set(DAWN_BUILD_MONOLITHIC_LIBRARY ON CACHE BOOL "" FORCE)
set(DAWN_ENABLE_INSTALL ON CACHE BOOL "" FORCE)
# SPIR-V validation shouldn't be required given we're using Tint to create the SPIR-V.
set(DAWN_ENABLE_SPIRV_VALIDATION OFF CACHE BOOL "" FORCE)
if (WIN32)
# building this requires the HLSL writer to be enabled in Tint. TBD if that we need either of these to be ON.
set(DAWN_USE_BUILT_DXC ON CACHE BOOL "" FORCE)
set(TINT_BUILD_HLSL_WRITER ON CACHE BOOL "" FORCE)
if ((NOT onnxruntime_ENABLE_DAWN_BACKEND_VULKAN) AND (NOT onnxruntime_ENABLE_DAWN_BACKEND_D3D12))
message(FATAL_ERROR "At least one of onnxruntime_ENABLE_DAWN_BACKEND_VULKAN or onnxruntime_ENABLE_DAWN_BACKEND_D3D12 must be enabled when using Dawn on Windows.")
endif()
if (onnxruntime_ENABLE_DAWN_BACKEND_VULKAN)
set(DAWN_ENABLE_VULKAN ON CACHE BOOL "" FORCE)
set(TINT_BUILD_SPV_WRITER ON CACHE BOOL "" FORCE)
if (onnxruntime_USE_EXTERNAL_DAWN)
message(FATAL_ERROR "onnxruntime_USE_EXTERNAL_DAWN and onnxruntime_BUILD_DAWN_MONOLITHIC_LIBRARY cannot be enabled at the same time.")
endif()
else()
set(DAWN_ENABLE_VULKAN OFF CACHE BOOL "" FORCE)
# use dawn::dawn_native and dawn::dawn_proc instead of the monolithic dawn::webgpu_dawn to minimize binary size
set(DAWN_BUILD_MONOLITHIC_LIBRARY OFF CACHE BOOL "" FORCE)
set(DAWN_ENABLE_INSTALL OFF CACHE BOOL "" FORCE)
endif()
if (onnxruntime_ENABLE_DAWN_BACKEND_D3D12)
set(DAWN_ENABLE_D3D12 ON CACHE BOOL "" FORCE)
else()
set(DAWN_ENABLE_D3D12 OFF CACHE BOOL "" FORCE)
# disable things we don't use
set(DAWN_DXC_ENABLE_ASSERTS_IN_NDEBUG OFF)
set(DAWN_ENABLE_DESKTOP_GL OFF CACHE BOOL "" FORCE)
set(DAWN_ENABLE_OPENGLES OFF CACHE BOOL "" FORCE)
set(DAWN_SUPPORTS_GLFW_FOR_WINDOWING OFF CACHE BOOL "" FORCE)
set(DAWN_USE_GLFW OFF CACHE BOOL "" FORCE)
set(DAWN_USE_WINDOWS_UI OFF CACHE BOOL "" FORCE)
set(DAWN_USE_X11 OFF CACHE BOOL "" FORCE)
set(TINT_BUILD_TESTS OFF CACHE BOOL "" FORCE)
set(TINT_BUILD_CMD_TOOLS OFF CACHE BOOL "" FORCE)
set(TINT_BUILD_GLSL_WRITER OFF CACHE BOOL "" FORCE)
set(TINT_BUILD_GLSL_VALIDATOR OFF CACHE BOOL "" FORCE)
set(TINT_BUILD_IR_BINARY OFF CACHE BOOL "" FORCE)
set(TINT_BUILD_SPV_READER OFF CACHE BOOL "" FORCE) # don't need. disabling is a large binary size saving
set(TINT_BUILD_WGSL_WRITER ON CACHE BOOL "" FORCE) # needed to create cache key. runtime error if not enabled.
# SPIR-V validation shouldn't be required given we're using Tint to create the SPIR-V.
set(DAWN_ENABLE_SPIRV_VALIDATION OFF CACHE BOOL "" FORCE)
if (WIN32)
# building this requires the HLSL writer to be enabled in Tint. TBD if that we need either of these to be ON.
set(DAWN_USE_BUILT_DXC ON CACHE BOOL "" FORCE)
set(TINT_BUILD_HLSL_WRITER ON CACHE BOOL "" FORCE)
if ((NOT onnxruntime_ENABLE_DAWN_BACKEND_VULKAN) AND (NOT onnxruntime_ENABLE_DAWN_BACKEND_D3D12))
message(FATAL_ERROR "At least one of onnxruntime_ENABLE_DAWN_BACKEND_VULKAN or onnxruntime_ENABLE_DAWN_BACKEND_D3D12 must be enabled when using Dawn on Windows.")
endif()
if (onnxruntime_ENABLE_DAWN_BACKEND_VULKAN)
set(DAWN_ENABLE_VULKAN ON CACHE BOOL "" FORCE)
set(TINT_BUILD_SPV_WRITER ON CACHE BOOL "" FORCE)
else()
set(DAWN_ENABLE_VULKAN OFF CACHE BOOL "" FORCE)
endif()
if (onnxruntime_ENABLE_DAWN_BACKEND_D3D12)
set(DAWN_ENABLE_D3D12 ON CACHE BOOL "" FORCE)
else()
set(DAWN_ENABLE_D3D12 OFF CACHE BOOL "" FORCE)
endif()
# We are currently always using the D3D12 backend.
set(DAWN_ENABLE_D3D11 OFF CACHE BOOL "" FORCE)
endif()
# We are currently always using the D3D12 backend.
set(DAWN_ENABLE_D3D11 OFF CACHE BOOL "" FORCE)
endif()
onnxruntime_fetchcontent_makeavailable(dawn)
if (onnxruntime_BUILD_DAWN_MONOLITHIC_LIBRARY)
list(APPEND onnxruntime_EXTERNAL_LIBRARIES dawn::webgpu_dawn)
else()
if (NOT onnxruntime_USE_EXTERNAL_DAWN)
list(APPEND onnxruntime_EXTERNAL_LIBRARIES dawn::dawn_native)
if (NOT CMAKE_SYSTEM_NAME STREQUAL "Emscripten")
if (onnxruntime_BUILD_DAWN_MONOLITHIC_LIBRARY)
list(APPEND onnxruntime_EXTERNAL_LIBRARIES dawn::webgpu_dawn)
else()
if (NOT onnxruntime_USE_EXTERNAL_DAWN)
list(APPEND onnxruntime_EXTERNAL_LIBRARIES dawn::dawn_native)
endif()
list(APPEND onnxruntime_EXTERNAL_LIBRARIES dawn::dawn_proc)
endif()
list(APPEND onnxruntime_EXTERNAL_LIBRARIES dawn::dawn_proc)
endif()
endif()

View file

@ -1,8 +1,7 @@
set(XNNPACK_USE_SYSTEM_LIBS ON CACHE INTERNAL "")
set(XNNPACK_BUILD_TESTS OFF CACHE INTERNAL "")
set(XNNPACK_BUILD_BENCHMARKS OFF CACHE INTERNAL "")
set(FP16_BUILD_TESTS OFF CACHE INTERNAL "")
set(FP16_BUILD_BENCHMARKS OFF CACHE INTERNAL "")
set(PTHREADPOOL_BUILD_TESTS OFF CACHE INTERNAL "")
set(PTHREADPOOL_BUILD_BENCHMARKS OFF CACHE INTERNAL "")
set(KLEIDIAI_BUILD_TESTS OFF CACHE INTERNAL "")
@ -17,44 +16,6 @@ if(CMAKE_ANDROID_ARCH_ABI STREQUAL armeabi-v7a)
set(XNNPACK_ENABLE_ARM_BF16 OFF)
endif()
# fp16 depends on psimd
FetchContent_Declare(psimd URL ${DEP_URL_psimd} URL_HASH SHA1=${DEP_SHA1_psimd})
onnxruntime_fetchcontent_makeavailable(psimd)
set(PSIMD_SOURCE_DIR ${psimd_SOURCE_DIR})
block(PROPAGATE fp16_PATCH_COMMAND)
# only apply fp16 patch for Apple x86_64 targets
if(APPLE)
if(NOT "${CMAKE_OSX_ARCHITECTURES}" STREQUAL "")
if ("x86_64" IN_LIST CMAKE_OSX_ARCHITECTURES)
set(fp16_PATCH_REQUIRED 1)
endif()
else()
# CMAKE_OSX_ARCHITECTURES unspecified, check host
if(CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64")
set(fp16_PATCH_REQUIRED 1)
endif()
endif()
endif()
if(fp16_PATCH_REQUIRED)
message(STATUS "Applying fp16 patch.")
set(fp16_PATCH_FILE ${PROJECT_SOURCE_DIR}/patches/fp16/remove_math_h_dependency_from_fp16_h.patch)
set(fp16_PATCH_COMMAND ${Patch_EXECUTABLE} --binary --ignore-whitespace -p1 < ${fp16_PATCH_FILE})
else()
set(fp16_PATCH_COMMAND "")
endif()
endblock()
FetchContent_Declare(
fp16
URL ${DEP_URL_fp16}
URL_HASH SHA1=${DEP_SHA1_fp16}
PATCH_COMMAND ${fp16_PATCH_COMMAND}
)
onnxruntime_fetchcontent_makeavailable(fp16)
# pthreadpool depends on fxdiv
FetchContent_Declare(fxdiv URL ${DEP_URL_fxdiv} URL_HASH SHA1=${DEP_SHA1_fxdiv})
onnxruntime_fetchcontent_makeavailable(fxdiv)

View file

@ -9,6 +9,7 @@
#cmakedefine HAS_CLASS_MEMACCESS
#cmakedefine HAS_DEPRECATED_COPY
#cmakedefine HAS_DEPRECATED_DECLARATIONS
#cmakedefine HAS_DEPRECATED_LITERAL_OPERATOR
#cmakedefine HAS_DEPRECATED_THIS_CAPTURE
#cmakedefine HAS_FORMAT_TRUNCATION
#cmakedefine HAS_IGNORED_ATTRIBUTES

View file

@ -106,6 +106,9 @@ if (onnxruntime_EXTERNAL_TRANSFORMER_SRC_PATH)
file(GLOB onnxruntime_external_transformer_src ${onnxruntime_external_transformer_src_patterns})
list(APPEND onnxruntime_optimizer_srcs ${onnxruntime_external_transformer_src})
endif()
if(HAS_MAYBE_UNINITIALIZED)
set_source_files_properties("${ONNXRUNTIME_ROOT}/core/optimizer/selectors_actions/selector_action_transformer.cc" PROPERTIES COMPILE_FLAGS "-Wno-maybe-uninitialized")
endif()
onnxruntime_add_static_library(onnxruntime_optimizer ${onnxruntime_optimizer_srcs})

View file

@ -177,7 +177,7 @@ endif()
if (_enable_ML_PROGRAM)
# Setup coremltools fp16 and json dependencies for creating an mlpackage.
#
# These are also used by external/xnnpack.cmake. fp16 depends on psimd
# fp16 depends on psimd
FetchContent_Declare(psimd URL ${DEP_URL_psimd} URL_HASH SHA1=${DEP_SHA1_psimd})
onnxruntime_fetchcontent_makeavailable(psimd)
set(PSIMD_SOURCE_DIR ${psimd_SOURCE_DIR})

View file

@ -21,44 +21,72 @@
source_group(TREE ${REPO_ROOT} FILES ${onnxruntime_providers_webgpu_cc_srcs})
onnxruntime_add_static_library(onnxruntime_providers_webgpu ${onnxruntime_providers_webgpu_cc_srcs})
onnxruntime_add_include_to_target(onnxruntime_providers_webgpu
onnxruntime_common dawn::dawncpp_headers dawn::dawn_headers onnx onnx_proto flatbuffers::flatbuffers Boost::mp11 safeint_interface)
onnxruntime_common onnx onnx_proto flatbuffers::flatbuffers Boost::mp11 safeint_interface)
set(onnxruntime_providers_webgpu_dll_deps)
if (onnxruntime_BUILD_DAWN_MONOLITHIC_LIBRARY)
target_link_libraries(onnxruntime_providers_webgpu dawn::webgpu_dawn)
if (WIN32)
if (onnxruntime_ENABLE_DELAY_LOADING_WIN_DLLS)
list(APPEND onnxruntime_DELAYLOAD_FLAGS "/DELAYLOAD:webgpu_dawn.dll")
endif()
list(APPEND onnxruntime_providers_webgpu_dll_deps "$<TARGET_FILE:dawn::webgpu_dawn>")
if (CMAKE_SYSTEM_NAME STREQUAL "Emscripten")
# target "emdawnwebgpu_c" is created by Dawn, including "-fno-exceptions" in its compile options by default.
#
# in ONNX Runtime build, "-s DISABLE_EXCEPTION_CATCHING=0" is appended to CMAKE_CXX_FLAGS by default unless build flag
# "--disable_wasm_exception_catching" is specified. It is not compatible with "-fno-exceptions".
#
# if "-s DISABLE_EXCEPTION_CATCHING=0" is set, we need to remove "-fno-exceptions" from emdawnwebgpu_c
if (CMAKE_CXX_FLAGS MATCHES "DISABLE_EXCEPTION_CATCHING=0")
get_property(EM_DAWN_WEBGPU_C_COMPILE_OPTIONS TARGET emdawnwebgpu_c PROPERTY COMPILE_OPTIONS)
list(REMOVE_ITEM EM_DAWN_WEBGPU_C_COMPILE_OPTIONS "-fno-exceptions")
set_property(TARGET emdawnwebgpu_c PROPERTY COMPILE_OPTIONS ${EM_DAWN_WEBGPU_C_COMPILE_OPTIONS})
endif()
# target "emdawnwebgpu_cpp" is created by Dawn. When it is linked to onnxruntime_providers_webgpu as "PUBLIC"
# dependency, a few build/link flags will be set automatically to make sure emscripten can generate correct
# WebAssembly/JavaScript code for WebGPU support.
target_link_libraries(onnxruntime_providers_webgpu PUBLIC emdawnwebgpu_cpp)
# ASYNCIFY is required for WGPUFuture support (ie. async functions in WebGPU API)
target_link_options(onnxruntime_providers_webgpu PUBLIC
"SHELL:-s ASYNCIFY=1"
"SHELL:-s ASYNCIFY_STACK_SIZE=65536"
)
else()
if (NOT onnxruntime_USE_EXTERNAL_DAWN)
target_link_libraries(onnxruntime_providers_webgpu dawn::dawn_native)
onnxruntime_add_include_to_target(onnxruntime_providers_webgpu dawn::dawncpp_headers dawn::dawn_headers)
set(onnxruntime_providers_webgpu_dll_deps)
if (onnxruntime_BUILD_DAWN_MONOLITHIC_LIBRARY)
target_link_libraries(onnxruntime_providers_webgpu dawn::webgpu_dawn)
if (WIN32)
if (onnxruntime_ENABLE_DELAY_LOADING_WIN_DLLS)
list(APPEND onnxruntime_DELAYLOAD_FLAGS "/DELAYLOAD:webgpu_dawn.dll")
endif()
list(APPEND onnxruntime_providers_webgpu_dll_deps "$<TARGET_FILE:dawn::webgpu_dawn>")
endif()
else()
if (NOT onnxruntime_USE_EXTERNAL_DAWN)
target_link_libraries(onnxruntime_providers_webgpu dawn::dawn_native)
endif()
target_link_libraries(onnxruntime_providers_webgpu dawn::dawn_proc)
endif()
if (WIN32 AND onnxruntime_ENABLE_DAWN_BACKEND_D3D12)
# Ensure dxil.dll and dxcompiler.dll exist in the output directory $<TARGET_FILE_DIR:dxcompiler>
add_dependencies(onnxruntime_providers_webgpu copy_dxil_dll)
add_dependencies(onnxruntime_providers_webgpu dxcompiler)
list(APPEND onnxruntime_providers_webgpu_dll_deps "$<TARGET_FILE_DIR:dxcompiler>/dxil.dll")
list(APPEND onnxruntime_providers_webgpu_dll_deps "$<TARGET_FILE_DIR:dxcompiler>/dxcompiler.dll")
endif()
if (onnxruntime_providers_webgpu_dll_deps)
# Copy dependency DLLs to the output directory
add_custom_command(
TARGET onnxruntime_providers_webgpu
POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_if_different "${onnxruntime_providers_webgpu_dll_deps}" "$<TARGET_FILE_DIR:onnxruntime_providers_webgpu>"
COMMAND_EXPAND_LISTS
VERBATIM )
endif()
target_link_libraries(onnxruntime_providers_webgpu dawn::dawn_proc)
endif()
if (WIN32 AND onnxruntime_ENABLE_DAWN_BACKEND_D3D12)
# Ensure dxil.dll and dxcompiler.dll exist in the output directory $<TARGET_FILE_DIR:dxcompiler>
add_dependencies(onnxruntime_providers_webgpu copy_dxil_dll)
add_dependencies(onnxruntime_providers_webgpu dxcompiler)
list(APPEND onnxruntime_providers_webgpu_dll_deps "$<TARGET_FILE_DIR:dxcompiler>/dxil.dll")
list(APPEND onnxruntime_providers_webgpu_dll_deps "$<TARGET_FILE_DIR:dxcompiler>/dxcompiler.dll")
endif()
if (onnxruntime_providers_webgpu_dll_deps)
# Copy dependency DLLs to the output directory
add_custom_command(
TARGET onnxruntime_providers_webgpu
POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_if_different "${onnxruntime_providers_webgpu_dll_deps}" "$<TARGET_FILE_DIR:onnxruntime_providers_webgpu>"
COMMAND_EXPAND_LISTS
VERBATIM )
endif()
add_dependencies(onnxruntime_providers_webgpu ${onnxruntime_EXTERNAL_DEPENDENCIES})
set_target_properties(onnxruntime_providers_webgpu PROPERTIES FOLDER "ONNXRuntime")

View file

@ -221,19 +221,11 @@ function(AddTest)
)
else()
set(TEST_NODE_FLAGS)
if (onnxruntime_ENABLE_WEBASSEMBLY_THREADS)
list(APPEND TEST_NODE_FLAGS "--experimental-wasm-threads")
endif()
if (onnxruntime_ENABLE_WEBASSEMBLY_SIMD)
list(APPEND TEST_NODE_FLAGS "--experimental-wasm-simd")
endif()
# prefer Node from emsdk so the version is more deterministic
if (DEFINED ENV{EMSDK_NODE})
set(NODE_EXECUTABLE $ENV{EMSDK_NODE})
else()
# warning as we don't know what node version is being used and whether things like the TEST_NODE_FLAGS
# will be valid. e.g. "--experimental-wasm-simd" is not valid with node v20 or later.
message(WARNING "EMSDK_NODE environment variable was not set. Falling back to system `node`.")
set(NODE_EXECUTABLE node)
endif()

View file

@ -111,6 +111,7 @@ if (onnxruntime_BUILD_WEBASSEMBLY_STATIC_LIB)
${PROVIDERS_JS}
${PROVIDERS_XNNPACK}
${PROVIDERS_WEBNN}
${PROVIDERS_WEBGPU}
onnxruntime_session
onnxruntime_util
re2::re2
@ -188,6 +189,7 @@ else()
${PROVIDERS_JS}
${PROVIDERS_XNNPACK}
${PROVIDERS_WEBNN}
${PROVIDERS_WEBGPU}
onnxruntime_session
onnxruntime_util
re2::re2
@ -380,10 +382,19 @@ jsepDownload:_pp_")
"SHELL:--pre-js \"${ONNXRUNTIME_ROOT}/wasm/pre-jsep.js\""
"SHELL:-s ASYNCIFY=1"
"SHELL:-s ASYNCIFY_STACK_SIZE=65536"
"SHELL:-s ASYNCIFY_EXPORTS=['OrtRun']"
"SHELL:-s ASYNCIFY_IMPORTS=['Module.jsepCopy','Module.jsepCopyAsync','jsepDownload']"
)
set_target_properties(onnxruntime_webassembly PROPERTIES LINK_DEPENDS ${ONNXRUNTIME_ROOT}/wasm/pre-jsep.js)
if (onnxruntime_ENABLE_WEBASSEMBLY_MEMORY64)
target_link_options(onnxruntime_webassembly PRIVATE
"SHELL:-s ASYNCIFY_EXPORTS=['OrtRun']"
"SHELL:-s ASYNCIFY_IMPORTS=['Module.jsepCopy','Module.jsepCopyAsync','jsepDownload']"
)
endif()
endif()
if (onnxruntime_USE_WEBGPU)
target_compile_definitions(onnxruntime_webassembly PRIVATE USE_WEBGPU=1)
endif()
if (onnxruntime_EMSCRIPTEN_SETTINGS)

View file

@ -0,0 +1,118 @@
diff --git a/src/emdawnwebgpu/CMakeLists.txt b/src/emdawnwebgpu/CMakeLists.txt
index de673537d3..c98dc46de7 100644
--- a/src/emdawnwebgpu/CMakeLists.txt
+++ b/src/emdawnwebgpu/CMakeLists.txt
@@ -78,6 +78,7 @@ if (${DAWN_ENABLE_EMSCRIPTEN})
endif()
set(ARGS
+ ${Python3_EXECUTABLE}
"${DAWN_EMSCRIPTEN_TOOLCHAIN}/tools/maint/gen_struct_info.py"
-q
"${EM_BUILD_GEN_DIR}/struct_info_webgpu.json"
diff --git a/third_party/emdawnwebgpu/library_webgpu.js b/third_party/emdawnwebgpu/library_webgpu.js
index d1835cb090..df03ea2f94 100644
--- a/third_party/emdawnwebgpu/library_webgpu.js
+++ b/third_party/emdawnwebgpu/library_webgpu.js
@@ -16,10 +16,19 @@
throw new Error("To use Dawn's library_webgpu.js, disable -sUSE_WEBGPU and first include Dawn's library_webgpu_struct_info.js and library_webgpu_enum_tables.js (before library_webgpu.js)");
}
+ if (MEMORY64) {
+ throw new Error("The current implementation of Dawn's library_webgpu.js does not support MEMORY64 yet");
+ }
+
// Helper functions for code generation
globalThis.gpu = {
- convertSentinelToUndefined: function(name) {
- return `if (${name} == -1) ${name} = undefined;`;
+ convertSentinelToUndefined: function(name, isPtr = false) {
+ // When `CAN_ADDRESS_2GB` is true, value `-1` is normalized to `0xFFFFFFFF` for pointer.
+ if (CAN_ADDRESS_2GB && isPtr) {
+ return `if (${name} == 0xFFFFFFFF) ${name} = undefined;`;
+ } else {
+ return `if (${name} == -1) ${name} = undefined;`;
+ }
},
makeGetBool: function(struct, offset) {
@@ -700,6 +709,7 @@ var LibraryWebGPU = {
{{{ makeSetValue('info', C_STRUCTS.WGPUAdapterInfo.adapterType, 'adapterType', 'i32') }}};
{{{ makeSetValue('info', C_STRUCTS.WGPUAdapterInfo.vendorID, '0', 'i32') }}};
{{{ makeSetValue('info', C_STRUCTS.WGPUAdapterInfo.deviceID, '0', 'i32') }}};
+ return 1;
},
wgpuAdapterGetLimits: (adapterPtr, limitsOutPtr) => {
@@ -882,7 +892,7 @@ var LibraryWebGPU = {
if (size === 0) warnOnce('getMappedRange size=0 no longer means WGPU_WHOLE_MAP_SIZE');
- {{{ gpu.convertSentinelToUndefined('size') }}}
+ {{{ gpu.convertSentinelToUndefined('size', true) }}}
var mapped;
try {
@@ -909,7 +919,7 @@ var LibraryWebGPU = {
if (size === 0) warnOnce('getMappedRange size=0 no longer means WGPU_WHOLE_MAP_SIZE');
- {{{ gpu.convertSentinelToUndefined('size') }}}
+ {{{ gpu.convertSentinelToUndefined('size', true) }}}
var mapped;
try {
@@ -950,7 +960,7 @@ var LibraryWebGPU = {
var buffer = WebGPU.getJsObject(bufferPtr);
WebGPU.Internals.bufferOnUnmaps[bufferPtr] = [];
- {{{ gpu.convertSentinelToUndefined('size') }}}
+ {{{ gpu.convertSentinelToUndefined('size', true) }}}
{{{ runtimeKeepalivePush() }}}
WebGPU.Internals.futureInsert(futureId, buffer.mapAsync(mode, offset, size).then(() => {
@@ -1145,7 +1155,7 @@ var LibraryWebGPU = {
wgpuCommandEncoderClearBuffer: (encoderPtr, bufferPtr, offset, size) => {
var commandEncoder = WebGPU.getJsObject(encoderPtr);
- {{{ gpu.convertSentinelToUndefined('size') }}}
+ {{{ gpu.convertSentinelToUndefined('size', true) }}}
var buffer = WebGPU.getJsObject(bufferPtr);
commandEncoder.clearBuffer(buffer, offset, size);
@@ -2103,7 +2113,7 @@ var LibraryWebGPU = {
wgpuRenderBundleEncoderSetIndexBuffer: (passPtr, bufferPtr, format, offset, size) => {
var pass = WebGPU.getJsObject(passPtr);
var buffer = WebGPU.getJsObject(bufferPtr);
- {{{ gpu.convertSentinelToUndefined('size') }}}
+ {{{ gpu.convertSentinelToUndefined('size', true) }}}
pass.setIndexBuffer(buffer, WebGPU.IndexFormat[format], offset, size);
},
@@ -2116,7 +2126,7 @@ var LibraryWebGPU = {
wgpuRenderBundleEncoderSetVertexBuffer: (passPtr, slot, bufferPtr, offset, size) => {
var pass = WebGPU.getJsObject(passPtr);
var buffer = WebGPU.getJsObject(bufferPtr);
- {{{ gpu.convertSentinelToUndefined('size') }}}
+ {{{ gpu.convertSentinelToUndefined('size', true) }}}
pass.setVertexBuffer(slot, buffer, offset, size);
},
@@ -2211,7 +2221,7 @@ var LibraryWebGPU = {
wgpuRenderPassEncoderSetIndexBuffer: (passPtr, bufferPtr, format, offset, size) => {
var pass = WebGPU.getJsObject(passPtr);
var buffer = WebGPU.getJsObject(bufferPtr);
- {{{ gpu.convertSentinelToUndefined('size') }}}
+ {{{ gpu.convertSentinelToUndefined('size', true) }}}
pass.setIndexBuffer(buffer, WebGPU.IndexFormat[format], offset, size);
},
@@ -2234,7 +2244,7 @@ var LibraryWebGPU = {
wgpuRenderPassEncoderSetVertexBuffer: (passPtr, slot, bufferPtr, offset, size) => {
var pass = WebGPU.getJsObject(passPtr);
var buffer = WebGPU.getJsObject(bufferPtr);
- {{{ gpu.convertSentinelToUndefined('size') }}}
+ {{{ gpu.convertSentinelToUndefined('size', true) }}}
pass.setVertexBuffer(slot, buffer, offset, size);
},

Binary file not shown.

View file

@ -1,8 +1,8 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1ff85b538..c3ef2183f 100644
index f0b3410ae..1e3cb8178 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -253,7 +253,7 @@ ENDIF()
@@ -337,7 +337,7 @@ ENDIF()
# ---[ Build flags
IF(NOT CMAKE_SYSTEM_NAME)
MESSAGE(FATAL_ERROR "CMAKE_SYSTEM_NAME not defined")
@ -11,21 +11,21 @@ index 1ff85b538..c3ef2183f 100644
MESSAGE(FATAL_ERROR "Unrecognized CMAKE_SYSTEM_NAME value \"${CMAKE_SYSTEM_NAME}\"")
ENDIF()
IF(CMAKE_SYSTEM_NAME MATCHES "Windows")
@@ -763,7 +763,12 @@ IF(XNNPACK_BUILD_LIBRARY)
TARGET_LINK_LIBRARIES(operator-run PRIVATE xnnpack-base logging)
@@ -848,7 +848,12 @@ IF(XNNPACK_BUILD_LIBRARY)
TARGET_LINK_LIBRARIES(operator-utils PRIVATE xnnpack-base logging)
TARGET_LINK_LIBRARIES(subgraph PRIVATE xnnpack-base allocator logging memory mutex operators operator-run)
- TARGET_LINK_LIBRARIES(XNNPACK PRIVATE allocator cache hardware-config indirection logging memory microkernel-utils microparams-init mutex normalization operators operator-run operator-utils packing microkernels-prod subgraph)
TARGET_LINK_LIBRARIES(reference-ukernels PRIVATE xnnpack-base)
TARGET_LINK_LIBRARIES(subgraph PRIVATE xnnpack-base allocator logging memory mutex operators operator-run datatype)
- TARGET_LINK_LIBRARIES(XNNPACK PRIVATE xnnpack-base allocator cache hardware-config indirection memory microkernel-utils microparams-init mutex normalization operators operator-run operator-utils packing microkernels-prod subgraph datatype reference-ukernels)
+ IF(CMAKE_SYSTEM_NAME STREQUAL "Emscripten")
+ # omit microkernels-prod as the list is manually created by ORT in cmake/external/xnnpack.cmake
+ TARGET_LINK_LIBRARIES(XNNPACK PRIVATE allocator cache hardware-config indirection logging memory microkernel-utils microparams-init mutex normalization operators operator-run operator-utils packing subgraph)
+ # omit microkernels-prod as the list is manually created by ORT in cmake/external/xnnpack.cmake
+ TARGET_LINK_LIBRARIES(XNNPACK PRIVATE xnnpack-base allocator cache hardware-config indirection memory microkernel-utils microparams-init mutex normalization operators operator-run operator-utils packing subgraph datatype reference-ukernels)
+ ELSE()
+ TARGET_LINK_LIBRARIES(XNNPACK PRIVATE allocator cache hardware-config indirection logging memory microkernel-utils microparams-init mutex normalization operators operator-run operator-utils packing microkernels-prod subgraph)
+ ENDIF()
TARGET_LINK_LIBRARIES(XNNPACK PUBLIC xnnpack-base)
+ TARGET_LINK_LIBRARIES(XNNPACK PRIVATE xnnpack-base allocator cache hardware-config indirection memory microkernel-utils microparams-init mutex normalization operators operator-run operator-utils packing microkernels-prod subgraph datatype reference-ukernels)
+ ENDIF()
TARGET_LINK_LIBRARIES(XNNPACK PUBLIC pthreadpool logging)
SET_TARGET_PROPERTIES(XNNPACK PROPERTIES C_EXTENSIONS YES)
ENDIF()
@@ -772,7 +777,8 @@ IF(NOT MSVC)
@@ -857,7 +862,8 @@ IF(NOT MSVC)
ENDIF()
IF(XNNPACK_TARGET_PROCESSOR STREQUAL "arm")
SET_PROPERTY(SOURCE ${ALL_MICROKERNEL_SRCS} APPEND_STRING PROPERTY COMPILE_FLAGS " -marm ")

View file

@ -2,7 +2,7 @@
"default-registry": {
"kind": "git",
"repository": "https://github.com/Microsoft/vcpkg",
"baseline": "c82f74667287d3dc386bce81e44964370c91a289"
"baseline": "93570a28ecdf49d3d9676cec8aa0cc72935d43db"
},
"registries": []
}

View file

@ -0,0 +1,21 @@
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
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_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")
if(PORT MATCHES "onnx")
list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS
"-DONNX_DISABLE_STATIC_REGISTRATION=ON"
)
endif()
if(PORT MATCHES "benchmark")
list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS
"-DBENCHMARK_ENABLE_WERROR=OFF"
)
endif()

View file

@ -0,0 +1,22 @@
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
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_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")
if(PORT MATCHES "onnx")
list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS
"-DONNX_DISABLE_STATIC_REGISTRATION=ON"
)
endif()
if(PORT MATCHES "benchmark")
list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS
"-DBENCHMARK_ENABLE_WERROR=OFF"
)
endif()

View file

@ -0,0 +1,18 @@
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
set(VCPKG_TARGET_ARCHITECTURE arm64)
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)
if(PORT MATCHES "onnx")
list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS
"-DONNX_DISABLE_STATIC_REGISTRATION=ON"
)
endif()
if(PORT MATCHES "benchmark")
list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS
"-DBENCHMARK_ENABLE_WERROR=OFF"
)
endif()

View file

@ -0,0 +1,18 @@
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
set(VCPKG_TARGET_ARCHITECTURE arm64)
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)
if(PORT MATCHES "onnx")
list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS
"-DONNX_DISABLE_STATIC_REGISTRATION=ON"
)
endif()
if(PORT MATCHES "benchmark")
list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS
"-DBENCHMARK_ENABLE_WERROR=OFF"
)
endif()

View file

@ -0,0 +1,18 @@
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
set(VCPKG_TARGET_ARCHITECTURE arm64ec)
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)
if(PORT MATCHES "onnx")
list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS
"-DONNX_DISABLE_STATIC_REGISTRATION=ON"
)
endif()
if(PORT MATCHES "benchmark")
list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS
"-DBENCHMARK_ENABLE_WERROR=OFF"
)
endif()

View file

@ -0,0 +1,18 @@
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
set(VCPKG_TARGET_ARCHITECTURE arm64ec)
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)
if(PORT MATCHES "onnx")
list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS
"-DONNX_DISABLE_STATIC_REGISTRATION=ON"
)
endif()
if(PORT MATCHES "benchmark")
list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS
"-DBENCHMARK_ENABLE_WERROR=OFF"
)
endif()

View file

@ -0,0 +1,22 @@
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
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_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")
if(PORT MATCHES "onnx")
list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS
"-DONNX_DISABLE_STATIC_REGISTRATION=ON"
)
endif()
if(PORT MATCHES "benchmark")
list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS
"-DBENCHMARK_ENABLE_WERROR=OFF"
)
endif()

View file

@ -0,0 +1,21 @@
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
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_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")
if(PORT MATCHES "onnx")
list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS
"-DONNX_DISABLE_STATIC_REGISTRATION=ON"
)
endif()
if(PORT MATCHES "benchmark")
list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS
"-DBENCHMARK_ENABLE_WERROR=OFF"
)
endif()

View file

@ -0,0 +1,22 @@
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
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_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")
if(PORT MATCHES "onnx")
list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS
"-DONNX_DISABLE_STATIC_REGISTRATION=ON"
)
endif()
if(PORT MATCHES "benchmark")
list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS
"-DBENCHMARK_ENABLE_WERROR=OFF"
)
endif()

View file

@ -0,0 +1,18 @@
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
set(VCPKG_TARGET_ARCHITECTURE x64)
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)
if(PORT MATCHES "onnx")
list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS
"-DONNX_DISABLE_STATIC_REGISTRATION=ON"
)
endif()
if(PORT MATCHES "benchmark")
list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS
"-DBENCHMARK_ENABLE_WERROR=OFF"
)
endif()

View file

@ -0,0 +1,18 @@
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
set(VCPKG_TARGET_ARCHITECTURE x64)
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)
if(PORT MATCHES "onnx")
list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS
"-DONNX_DISABLE_STATIC_REGISTRATION=ON"
)
endif()
if(PORT MATCHES "benchmark")
list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS
"-DBENCHMARK_ENABLE_WERROR=OFF"
)
endif()

View file

@ -0,0 +1,18 @@
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
set(VCPKG_TARGET_ARCHITECTURE x86)
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)
if(PORT MATCHES "onnx")
list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS
"-DONNX_DISABLE_STATIC_REGISTRATION=ON"
)
endif()
if(PORT MATCHES "benchmark")
list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS
"-DBENCHMARK_ENABLE_WERROR=OFF"
)
endif()

View file

@ -0,0 +1,18 @@
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
set(VCPKG_TARGET_ARCHITECTURE x86)
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)
if(PORT MATCHES "onnx")
list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS
"-DONNX_DISABLE_STATIC_REGISTRATION=ON"
)
endif()
if(PORT MATCHES "benchmark")
list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS
"-DBENCHMARK_ENABLE_WERROR=OFF"
)
endif()

View file

@ -0,0 +1,21 @@
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
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_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")
if(PORT MATCHES "onnx")
list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS
"-DONNX_DISABLE_STATIC_REGISTRATION=ON"
)
endif()
if(PORT MATCHES "benchmark")
list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS
"-DBENCHMARK_ENABLE_WERROR=OFF"
)
endif()

View file

@ -0,0 +1,22 @@
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
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_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")
if(PORT MATCHES "onnx")
list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS
"-DONNX_DISABLE_STATIC_REGISTRATION=ON"
)
endif()
if(PORT MATCHES "benchmark")
list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS
"-DBENCHMARK_ENABLE_WERROR=OFF"
)
endif()

View file

@ -0,0 +1,18 @@
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
set(VCPKG_TARGET_ARCHITECTURE arm64)
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)
if(PORT MATCHES "onnx")
list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS
"-DONNX_DISABLE_STATIC_REGISTRATION=ON"
)
endif()
if(PORT MATCHES "benchmark")
list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS
"-DBENCHMARK_ENABLE_WERROR=OFF"
)
endif()

View file

@ -0,0 +1,18 @@
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
set(VCPKG_TARGET_ARCHITECTURE arm64)
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)
if(PORT MATCHES "onnx")
list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS
"-DONNX_DISABLE_STATIC_REGISTRATION=ON"
)
endif()
if(PORT MATCHES "benchmark")
list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS
"-DBENCHMARK_ENABLE_WERROR=OFF"
)
endif()

View file

@ -0,0 +1,18 @@
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
set(VCPKG_TARGET_ARCHITECTURE arm64ec)
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)
if(PORT MATCHES "onnx")
list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS
"-DONNX_DISABLE_STATIC_REGISTRATION=ON"
)
endif()
if(PORT MATCHES "benchmark")
list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS
"-DBENCHMARK_ENABLE_WERROR=OFF"
)
endif()

View file

@ -0,0 +1,18 @@
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
set(VCPKG_TARGET_ARCHITECTURE arm64ec)
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)
if(PORT MATCHES "onnx")
list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS
"-DONNX_DISABLE_STATIC_REGISTRATION=ON"
)
endif()
if(PORT MATCHES "benchmark")
list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS
"-DBENCHMARK_ENABLE_WERROR=OFF"
)
endif()

View file

@ -0,0 +1,22 @@
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
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_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")
if(PORT MATCHES "onnx")
list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS
"-DONNX_DISABLE_STATIC_REGISTRATION=ON"
)
endif()
if(PORT MATCHES "benchmark")
list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS
"-DBENCHMARK_ENABLE_WERROR=OFF"
)
endif()

View file

@ -0,0 +1,21 @@
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
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_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")
if(PORT MATCHES "onnx")
list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS
"-DONNX_DISABLE_STATIC_REGISTRATION=ON"
)
endif()
if(PORT MATCHES "benchmark")
list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS
"-DBENCHMARK_ENABLE_WERROR=OFF"
)
endif()

View file

@ -0,0 +1,22 @@
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
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_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")
if(PORT MATCHES "onnx")
list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS
"-DONNX_DISABLE_STATIC_REGISTRATION=ON"
)
endif()
if(PORT MATCHES "benchmark")
list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS
"-DBENCHMARK_ENABLE_WERROR=OFF"
)
endif()

View file

@ -0,0 +1,18 @@
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
set(VCPKG_TARGET_ARCHITECTURE x64)
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)
if(PORT MATCHES "onnx")
list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS
"-DONNX_DISABLE_STATIC_REGISTRATION=ON"
)
endif()
if(PORT MATCHES "benchmark")
list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS
"-DBENCHMARK_ENABLE_WERROR=OFF"
)
endif()

View file

@ -0,0 +1,18 @@
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
set(VCPKG_TARGET_ARCHITECTURE x64)
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)
if(PORT MATCHES "onnx")
list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS
"-DONNX_DISABLE_STATIC_REGISTRATION=ON"
)
endif()
if(PORT MATCHES "benchmark")
list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS
"-DBENCHMARK_ENABLE_WERROR=OFF"
)
endif()

View file

@ -0,0 +1,18 @@
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
set(VCPKG_TARGET_ARCHITECTURE x86)
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)
if(PORT MATCHES "onnx")
list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS
"-DONNX_DISABLE_STATIC_REGISTRATION=ON"
)
endif()
if(PORT MATCHES "benchmark")
list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS
"-DBENCHMARK_ENABLE_WERROR=OFF"
)
endif()

View file

@ -0,0 +1,18 @@
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
set(VCPKG_TARGET_ARCHITECTURE x86)
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)
if(PORT MATCHES "onnx")
list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS
"-DONNX_DISABLE_STATIC_REGISTRATION=ON"
)
endif()
if(PORT MATCHES "benchmark")
list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS
"-DBENCHMARK_ENABLE_WERROR=OFF"
)
endif()

View file

@ -0,0 +1,21 @@
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
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_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")
if(PORT MATCHES "onnx")
list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS
"-DONNX_DISABLE_STATIC_REGISTRATION=ON"
)
endif()
if(PORT MATCHES "benchmark")
list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS
"-DBENCHMARK_ENABLE_WERROR=OFF"
)
endif()

View file

@ -0,0 +1,21 @@
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
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_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)
if(PORT MATCHES "onnx")
list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS
"-DONNX_DISABLE_STATIC_REGISTRATION=ON"
)
endif()
if(PORT MATCHES "benchmark")
list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS
"-DBENCHMARK_ENABLE_WERROR=OFF"
)
endif()

View file

@ -0,0 +1,19 @@
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
set(VCPKG_TARGET_ARCHITECTURE arm64)
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)
set(VCPKG_LINKER_FLAGS "/profile /DYNAMICBASE")
if(PORT MATCHES "onnx")
list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS
"-DONNX_DISABLE_STATIC_REGISTRATION=ON"
)
endif()
if(PORT MATCHES "benchmark")
list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS
"-DBENCHMARK_ENABLE_WERROR=OFF"
)
endif()

View file

@ -0,0 +1,19 @@
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
set(VCPKG_TARGET_ARCHITECTURE arm64)
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)
set(VCPKG_LINKER_FLAGS "/profile /DYNAMICBASE")
if(PORT MATCHES "onnx")
list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS
"-DONNX_DISABLE_STATIC_REGISTRATION=ON"
)
endif()
if(PORT MATCHES "benchmark")
list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS
"-DBENCHMARK_ENABLE_WERROR=OFF"
)
endif()

View file

@ -0,0 +1,19 @@
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
set(VCPKG_TARGET_ARCHITECTURE arm64ec)
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)
set(VCPKG_LINKER_FLAGS "/profile /DYNAMICBASE")
if(PORT MATCHES "onnx")
list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS
"-DONNX_DISABLE_STATIC_REGISTRATION=ON"
)
endif()
if(PORT MATCHES "benchmark")
list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS
"-DBENCHMARK_ENABLE_WERROR=OFF"
)
endif()

View file

@ -0,0 +1,19 @@
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
set(VCPKG_TARGET_ARCHITECTURE arm64ec)
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)
set(VCPKG_LINKER_FLAGS "/profile /DYNAMICBASE")
if(PORT MATCHES "onnx")
list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS
"-DONNX_DISABLE_STATIC_REGISTRATION=ON"
)
endif()
if(PORT MATCHES "benchmark")
list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS
"-DBENCHMARK_ENABLE_WERROR=OFF"
)
endif()

View file

@ -0,0 +1,21 @@
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
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_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)
if(PORT MATCHES "onnx")
list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS
"-DONNX_DISABLE_STATIC_REGISTRATION=ON"
)
endif()
if(PORT MATCHES "benchmark")
list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS
"-DBENCHMARK_ENABLE_WERROR=OFF"
)
endif()

View file

@ -0,0 +1,21 @@
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
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_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")
if(PORT MATCHES "onnx")
list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS
"-DONNX_DISABLE_STATIC_REGISTRATION=ON"
)
endif()
if(PORT MATCHES "benchmark")
list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS
"-DBENCHMARK_ENABLE_WERROR=OFF"
)
endif()

View file

@ -0,0 +1,21 @@
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
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_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)
if(PORT MATCHES "onnx")
list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS
"-DONNX_DISABLE_STATIC_REGISTRATION=ON"
)
endif()
if(PORT MATCHES "benchmark")
list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS
"-DBENCHMARK_ENABLE_WERROR=OFF"
)
endif()

View file

@ -0,0 +1,19 @@
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
set(VCPKG_TARGET_ARCHITECTURE x64)
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)
set(VCPKG_LINKER_FLAGS "/profile /DYNAMICBASE")
if(PORT MATCHES "onnx")
list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS
"-DONNX_DISABLE_STATIC_REGISTRATION=ON"
)
endif()
if(PORT MATCHES "benchmark")
list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS
"-DBENCHMARK_ENABLE_WERROR=OFF"
)
endif()

View file

@ -0,0 +1,19 @@
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
set(VCPKG_TARGET_ARCHITECTURE x64)
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)
set(VCPKG_LINKER_FLAGS "/profile /DYNAMICBASE")
if(PORT MATCHES "onnx")
list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS
"-DONNX_DISABLE_STATIC_REGISTRATION=ON"
)
endif()
if(PORT MATCHES "benchmark")
list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS
"-DBENCHMARK_ENABLE_WERROR=OFF"
)
endif()

View file

@ -0,0 +1,19 @@
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
set(VCPKG_TARGET_ARCHITECTURE x86)
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)
set(VCPKG_LINKER_FLAGS "/profile /DYNAMICBASE")
if(PORT MATCHES "onnx")
list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS
"-DONNX_DISABLE_STATIC_REGISTRATION=ON"
)
endif()
if(PORT MATCHES "benchmark")
list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS
"-DBENCHMARK_ENABLE_WERROR=OFF"
)
endif()

View file

@ -0,0 +1,19 @@
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
set(VCPKG_TARGET_ARCHITECTURE x86)
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)
set(VCPKG_LINKER_FLAGS "/profile /DYNAMICBASE")
if(PORT MATCHES "onnx")
list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS
"-DONNX_DISABLE_STATIC_REGISTRATION=ON"
)
endif()
if(PORT MATCHES "benchmark")
list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS
"-DBENCHMARK_ENABLE_WERROR=OFF"
)
endif()

View file

@ -0,0 +1,21 @@
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
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_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")
if(PORT MATCHES "onnx")
list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS
"-DONNX_DISABLE_STATIC_REGISTRATION=ON"
)
endif()
if(PORT MATCHES "benchmark")
list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS
"-DBENCHMARK_ENABLE_WERROR=OFF"
)
endif()

View file

@ -0,0 +1,21 @@
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
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_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)
if(PORT MATCHES "onnx")
list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS
"-DONNX_DISABLE_STATIC_REGISTRATION=ON"
)
endif()
if(PORT MATCHES "benchmark")
list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS
"-DBENCHMARK_ENABLE_WERROR=OFF"
)
endif()

View file

@ -0,0 +1,19 @@
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
set(VCPKG_TARGET_ARCHITECTURE arm64)
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)
set(VCPKG_LINKER_FLAGS "/profile /DYNAMICBASE")
if(PORT MATCHES "onnx")
list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS
"-DONNX_DISABLE_STATIC_REGISTRATION=ON"
)
endif()
if(PORT MATCHES "benchmark")
list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS
"-DBENCHMARK_ENABLE_WERROR=OFF"
)
endif()

View file

@ -0,0 +1,19 @@
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
set(VCPKG_TARGET_ARCHITECTURE arm64)
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)
set(VCPKG_LINKER_FLAGS "/profile /DYNAMICBASE")
if(PORT MATCHES "onnx")
list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS
"-DONNX_DISABLE_STATIC_REGISTRATION=ON"
)
endif()
if(PORT MATCHES "benchmark")
list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS
"-DBENCHMARK_ENABLE_WERROR=OFF"
)
endif()

View file

@ -0,0 +1,19 @@
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
set(VCPKG_TARGET_ARCHITECTURE arm64ec)
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)
set(VCPKG_LINKER_FLAGS "/profile /DYNAMICBASE")
if(PORT MATCHES "onnx")
list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS
"-DONNX_DISABLE_STATIC_REGISTRATION=ON"
)
endif()
if(PORT MATCHES "benchmark")
list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS
"-DBENCHMARK_ENABLE_WERROR=OFF"
)
endif()

View file

@ -0,0 +1,19 @@
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
set(VCPKG_TARGET_ARCHITECTURE arm64ec)
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)
set(VCPKG_LINKER_FLAGS "/profile /DYNAMICBASE")
if(PORT MATCHES "onnx")
list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS
"-DONNX_DISABLE_STATIC_REGISTRATION=ON"
)
endif()
if(PORT MATCHES "benchmark")
list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS
"-DBENCHMARK_ENABLE_WERROR=OFF"
)
endif()

View file

@ -0,0 +1,21 @@
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
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_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)
if(PORT MATCHES "onnx")
list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS
"-DONNX_DISABLE_STATIC_REGISTRATION=ON"
)
endif()
if(PORT MATCHES "benchmark")
list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS
"-DBENCHMARK_ENABLE_WERROR=OFF"
)
endif()

View file

@ -0,0 +1,21 @@
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
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_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")
if(PORT MATCHES "onnx")
list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS
"-DONNX_DISABLE_STATIC_REGISTRATION=ON"
)
endif()
if(PORT MATCHES "benchmark")
list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS
"-DBENCHMARK_ENABLE_WERROR=OFF"
)
endif()

View file

@ -0,0 +1,21 @@
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
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_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)
if(PORT MATCHES "onnx")
list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS
"-DONNX_DISABLE_STATIC_REGISTRATION=ON"
)
endif()
if(PORT MATCHES "benchmark")
list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS
"-DBENCHMARK_ENABLE_WERROR=OFF"
)
endif()

View file

@ -0,0 +1,19 @@
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
set(VCPKG_TARGET_ARCHITECTURE x64)
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)
set(VCPKG_LINKER_FLAGS "/profile /DYNAMICBASE")
if(PORT MATCHES "onnx")
list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS
"-DONNX_DISABLE_STATIC_REGISTRATION=ON"
)
endif()
if(PORT MATCHES "benchmark")
list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS
"-DBENCHMARK_ENABLE_WERROR=OFF"
)
endif()

View file

@ -0,0 +1,19 @@
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
set(VCPKG_TARGET_ARCHITECTURE x64)
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)
set(VCPKG_LINKER_FLAGS "/profile /DYNAMICBASE")
if(PORT MATCHES "onnx")
list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS
"-DONNX_DISABLE_STATIC_REGISTRATION=ON"
)
endif()
if(PORT MATCHES "benchmark")
list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS
"-DBENCHMARK_ENABLE_WERROR=OFF"
)
endif()

View file

@ -0,0 +1,19 @@
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
set(VCPKG_TARGET_ARCHITECTURE x86)
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)
set(VCPKG_LINKER_FLAGS "/profile /DYNAMICBASE")
if(PORT MATCHES "onnx")
list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS
"-DONNX_DISABLE_STATIC_REGISTRATION=ON"
)
endif()
if(PORT MATCHES "benchmark")
list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS
"-DBENCHMARK_ENABLE_WERROR=OFF"
)
endif()

View file

@ -0,0 +1,19 @@
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
set(VCPKG_TARGET_ARCHITECTURE x86)
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)
set(VCPKG_LINKER_FLAGS "/profile /DYNAMICBASE")
if(PORT MATCHES "onnx")
list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS
"-DONNX_DISABLE_STATIC_REGISTRATION=ON"
)
endif()
if(PORT MATCHES "benchmark")
list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS
"-DBENCHMARK_ENABLE_WERROR=OFF"
)
endif()

View file

@ -0,0 +1,20 @@
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
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_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)
if(PORT MATCHES "onnx")
list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS
"-DONNX_DISABLE_STATIC_REGISTRATION=ON"
)
endif()
if(PORT MATCHES "benchmark")
list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS
"-DBENCHMARK_ENABLE_WERROR=OFF"
)
endif()

View file

@ -0,0 +1,21 @@
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
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_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)
if(PORT MATCHES "onnx")
list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS
"-DONNX_DISABLE_STATIC_REGISTRATION=ON"
)
endif()
if(PORT MATCHES "benchmark")
list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS
"-DBENCHMARK_ENABLE_WERROR=OFF"
)
endif()

View file

@ -0,0 +1,18 @@
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
set(VCPKG_TARGET_ARCHITECTURE arm64)
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)
if(PORT MATCHES "onnx")
list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS
"-DONNX_DISABLE_STATIC_REGISTRATION=ON"
)
endif()
if(PORT MATCHES "benchmark")
list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS
"-DBENCHMARK_ENABLE_WERROR=OFF"
)
endif()

View file

@ -0,0 +1,18 @@
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
set(VCPKG_TARGET_ARCHITECTURE arm64)
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)
if(PORT MATCHES "onnx")
list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS
"-DONNX_DISABLE_STATIC_REGISTRATION=ON"
)
endif()
if(PORT MATCHES "benchmark")
list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS
"-DBENCHMARK_ENABLE_WERROR=OFF"
)
endif()

View file

@ -0,0 +1,18 @@
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
set(VCPKG_TARGET_ARCHITECTURE arm64ec)
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)
if(PORT MATCHES "onnx")
list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS
"-DONNX_DISABLE_STATIC_REGISTRATION=ON"
)
endif()
if(PORT MATCHES "benchmark")
list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS
"-DBENCHMARK_ENABLE_WERROR=OFF"
)
endif()

View file

@ -0,0 +1,18 @@
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
set(VCPKG_TARGET_ARCHITECTURE arm64ec)
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)
if(PORT MATCHES "onnx")
list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS
"-DONNX_DISABLE_STATIC_REGISTRATION=ON"
)
endif()
if(PORT MATCHES "benchmark")
list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS
"-DBENCHMARK_ENABLE_WERROR=OFF"
)
endif()

View file

@ -0,0 +1,21 @@
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
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_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)
if(PORT MATCHES "onnx")
list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS
"-DONNX_DISABLE_STATIC_REGISTRATION=ON"
)
endif()
if(PORT MATCHES "benchmark")
list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS
"-DBENCHMARK_ENABLE_WERROR=OFF"
)
endif()

View file

@ -0,0 +1,20 @@
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
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_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)
if(PORT MATCHES "onnx")
list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS
"-DONNX_DISABLE_STATIC_REGISTRATION=ON"
)
endif()
if(PORT MATCHES "benchmark")
list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS
"-DBENCHMARK_ENABLE_WERROR=OFF"
)
endif()

View file

@ -0,0 +1,21 @@
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
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_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)
if(PORT MATCHES "onnx")
list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS
"-DONNX_DISABLE_STATIC_REGISTRATION=ON"
)
endif()
if(PORT MATCHES "benchmark")
list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS
"-DBENCHMARK_ENABLE_WERROR=OFF"
)
endif()

View file

@ -0,0 +1,18 @@
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
set(VCPKG_TARGET_ARCHITECTURE x64)
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)
if(PORT MATCHES "onnx")
list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS
"-DONNX_DISABLE_STATIC_REGISTRATION=ON"
)
endif()
if(PORT MATCHES "benchmark")
list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS
"-DBENCHMARK_ENABLE_WERROR=OFF"
)
endif()

View file

@ -0,0 +1,18 @@
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
set(VCPKG_TARGET_ARCHITECTURE x64)
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)
if(PORT MATCHES "onnx")
list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS
"-DONNX_DISABLE_STATIC_REGISTRATION=ON"
)
endif()
if(PORT MATCHES "benchmark")
list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS
"-DBENCHMARK_ENABLE_WERROR=OFF"
)
endif()

View file

@ -0,0 +1,18 @@
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
set(VCPKG_TARGET_ARCHITECTURE x86)
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)
if(PORT MATCHES "onnx")
list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS
"-DONNX_DISABLE_STATIC_REGISTRATION=ON"
)
endif()
if(PORT MATCHES "benchmark")
list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS
"-DBENCHMARK_ENABLE_WERROR=OFF"
)
endif()

View file

@ -0,0 +1,18 @@
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
set(VCPKG_TARGET_ARCHITECTURE x86)
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)
if(PORT MATCHES "onnx")
list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS
"-DONNX_DISABLE_STATIC_REGISTRATION=ON"
)
endif()
if(PORT MATCHES "benchmark")
list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS
"-DBENCHMARK_ENABLE_WERROR=OFF"
)
endif()

187
cmake/vcpkg-triplets/gen.py Normal file
View file

@ -0,0 +1,187 @@
#!/usr/bin/python3
import os
# provide build options for vcpkg installed packages
def add_port_configs(f):
f.write(
r"""if(PORT MATCHES "onnx")
list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS
"-DONNX_DISABLE_STATIC_REGISTRATION=ON"
)
endif()
if(PORT MATCHES "benchmark")
list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS
"-DBENCHMARK_ENABLE_WERROR=OFF"
)
endif()
"""
)
# provide build options for vcpkg installed packages
def add_copyright_header(f):
f.write(
r"""# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
"""
)
# Gen Windows triplets
target_abis = ["x86", "x64", "arm64", "arm64ec"]
crt_linkages = ["static", "dynamic"]
for enable_rtti in [True, False]:
for enable_binskim in [True, False]:
for enable_asan in [True, False]:
for crt_linkage in crt_linkages:
# Address Sanitizer libs do not have a Qspectre version. So they two cannot be both enabled.
if enable_asan and enable_binskim:
continue
for target_abi in target_abis:
folder_name_parts = []
if enable_asan:
folder_name_parts.append("asan")
if enable_binskim:
folder_name_parts.append("binskim")
if not enable_rtti:
folder_name_parts.append("nortti")
if len(folder_name_parts) == 0:
folder_name = "default"
else:
folder_name = "_".join(folder_name_parts)
file_name_parts = [target_abi, "windows", "static"]
if crt_linkage == "dynamic":
file_name_parts.append("md")
file_name = "-".join(file_name_parts) + ".cmake"
dest_path = os.path.join(folder_name, file_name)
print(f"Creating file {dest_path}")
os.makedirs(folder_name, exist_ok=True)
with open(dest_path, "w", encoding="utf-8") as f:
add_copyright_header(f)
f.write(f"set(VCPKG_TARGET_ARCHITECTURE {target_abi})\n")
f.write(f"set(VCPKG_CRT_LINKAGE {crt_linkage})\n")
# we only support static. The default triplets use dynamic.
# The default triplets do not work with asan(protoc.exe crashes at startup). Therefore we do not override the default triplets and do not append asan to them.
# The default triplets are used for generating host dependencies(such as protoc.exe)
f.write("set(VCPKG_LIBRARY_LINKAGE static)\n")
cflags = ["/MP", "/DWIN32", "/D_WINDOWS"]
# TODO: if not gdk
cflags += [
"/DWINAPI_FAMILY=100",
"/DWINVER=0x0A00",
"/D_WIN32_WINNT=0x0A00",
"/DNTDDI_VERSION=0x0A000000",
]
cxxflags = None
ldflags = None
cflags += []
if enable_binskim:
cflags += ["/guard:cf", "/Qspectre"]
ldflags = ["/profile", "/DYNAMICBASE"]
elif enable_asan:
cflags.append("/fsanitize=address")
cxxflags = cflags.copy()
cxxflags.append("/Zc:__cplusplus")
if not enable_rtti:
# 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 ldflags:
f.write('set(VCPKG_LINKER_FLAGS "{}")\n'.format(" ".join(ldflags)))
add_port_configs(f)
# Gen Linux triplets
crt_linkages = ["static", "dynamic"]
for os_name in ["linux", "osx"]:
if os_name == "linux":
target_abis = ["x64", "arm64"]
else:
target_abis = ["x64", "arm64", "universal2"]
for enable_rtti in [True, False]:
for enable_binskim in [True, False]:
for enable_asan in [True, False]:
for crt_linkage in crt_linkages:
if enable_asan and enable_binskim:
continue
for target_abi in target_abis:
folder_name_parts = []
if enable_asan:
folder_name_parts.append("asan")
if enable_binskim:
folder_name_parts.append("binskim")
if not enable_rtti:
folder_name_parts.append("nortti")
if len(folder_name_parts) == 0:
folder_name = "default"
else:
folder_name = "_".join(folder_name_parts)
file_name_parts = [target_abi, os_name]
file_name = "-".join(file_name_parts) + ".cmake"
dest_path = os.path.join(folder_name, file_name)
print(f"Creating file {dest_path}")
os.makedirs(folder_name, exist_ok=True)
with open(dest_path, "w", encoding="utf-8") as f:
add_copyright_header(f)
if target_abi == "universal2":
# Assume the host machine is Intel based
f.write("set(VCPKG_TARGET_ARCHITECTURE x64)\n")
else:
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",
]
else:
ldflags = []
cflags = []
if enable_binskim:
cflags += [
"-Wp,-D_FORTIFY_SOURCE=2",
"-Wp,-D_GLIBCXX_ASSERTIONS",
"-fstack-protector-strong",
]
if target_abi == "x64":
cflags += ["-fstack-clash-protection", "-fcf-protection"]
elif enable_asan:
cflags += ["-fsanitize=address"]
ldflags += ["-fsanitize=address"]
# 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:
cflags.append("-DEMSCRIPTEN_HAS_UNBOUND_TYPE_NAMES=0")
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 os_name == "linux":
f.write("set(VCPKG_CMAKE_SYSTEM_NAME Linux)\n")
else:
f.write("set(VCPKG_CMAKE_SYSTEM_NAME Darwin)\n")
osx_abi = None
if target_abi == "x64":
osx_abi = "x86_64"
elif target_abi == "universal2":
osx_abi = "x86_64;arm64"
else:
osx_abi = target_abi
f.write(f'set(VCPKG_OSX_ARCHITECTURES "{osx_abi}")\n')
f.write("set(CMAKE_POSITION_INDEPENDENT_CODE ON)\n")
f.write(
"list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS --compile-no-warning-as-error -DBENCHMARK_ENABLE_WERROR=OFF)\n"
)
if ldflags:
f.write('set(VCPKG_LINKER_FLAGS "{}")\n'.format(" ".join(ldflags)))
add_port_configs(f)

View file

@ -0,0 +1,20 @@
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
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_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)
if(PORT MATCHES "onnx")
list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS
"-DONNX_DISABLE_STATIC_REGISTRATION=ON"
)
endif()
if(PORT MATCHES "benchmark")
list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS
"-DBENCHMARK_ENABLE_WERROR=OFF"
)
endif()

View file

@ -0,0 +1,21 @@
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
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_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)
if(PORT MATCHES "onnx")
list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS
"-DONNX_DISABLE_STATIC_REGISTRATION=ON"
)
endif()
if(PORT MATCHES "benchmark")
list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS
"-DBENCHMARK_ENABLE_WERROR=OFF"
)
endif()

View file

@ -0,0 +1,18 @@
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
set(VCPKG_TARGET_ARCHITECTURE arm64)
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)
if(PORT MATCHES "onnx")
list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS
"-DONNX_DISABLE_STATIC_REGISTRATION=ON"
)
endif()
if(PORT MATCHES "benchmark")
list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS
"-DBENCHMARK_ENABLE_WERROR=OFF"
)
endif()

View file

@ -0,0 +1,18 @@
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
set(VCPKG_TARGET_ARCHITECTURE arm64)
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)
if(PORT MATCHES "onnx")
list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS
"-DONNX_DISABLE_STATIC_REGISTRATION=ON"
)
endif()
if(PORT MATCHES "benchmark")
list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS
"-DBENCHMARK_ENABLE_WERROR=OFF"
)
endif()

View file

@ -0,0 +1,18 @@
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
set(VCPKG_TARGET_ARCHITECTURE arm64ec)
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)
if(PORT MATCHES "onnx")
list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS
"-DONNX_DISABLE_STATIC_REGISTRATION=ON"
)
endif()
if(PORT MATCHES "benchmark")
list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS
"-DBENCHMARK_ENABLE_WERROR=OFF"
)
endif()

View file

@ -0,0 +1,18 @@
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
set(VCPKG_TARGET_ARCHITECTURE arm64ec)
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)
if(PORT MATCHES "onnx")
list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS
"-DONNX_DISABLE_STATIC_REGISTRATION=ON"
)
endif()
if(PORT MATCHES "benchmark")
list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS
"-DBENCHMARK_ENABLE_WERROR=OFF"
)
endif()

View file

@ -0,0 +1,21 @@
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
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_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)
if(PORT MATCHES "onnx")
list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS
"-DONNX_DISABLE_STATIC_REGISTRATION=ON"
)
endif()
if(PORT MATCHES "benchmark")
list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS
"-DBENCHMARK_ENABLE_WERROR=OFF"
)
endif()

View file

@ -0,0 +1,20 @@
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
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_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)
if(PORT MATCHES "onnx")
list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS
"-DONNX_DISABLE_STATIC_REGISTRATION=ON"
)
endif()
if(PORT MATCHES "benchmark")
list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS
"-DBENCHMARK_ENABLE_WERROR=OFF"
)
endif()

View file

@ -0,0 +1,21 @@
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
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_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)
if(PORT MATCHES "onnx")
list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS
"-DONNX_DISABLE_STATIC_REGISTRATION=ON"
)
endif()
if(PORT MATCHES "benchmark")
list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS
"-DBENCHMARK_ENABLE_WERROR=OFF"
)
endif()

View file

@ -0,0 +1,18 @@
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
set(VCPKG_TARGET_ARCHITECTURE x64)
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)
if(PORT MATCHES "onnx")
list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS
"-DONNX_DISABLE_STATIC_REGISTRATION=ON"
)
endif()
if(PORT MATCHES "benchmark")
list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS
"-DBENCHMARK_ENABLE_WERROR=OFF"
)
endif()

View file

@ -0,0 +1,18 @@
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
set(VCPKG_TARGET_ARCHITECTURE x64)
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)
if(PORT MATCHES "onnx")
list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS
"-DONNX_DISABLE_STATIC_REGISTRATION=ON"
)
endif()
if(PORT MATCHES "benchmark")
list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS
"-DBENCHMARK_ENABLE_WERROR=OFF"
)
endif()

View file

@ -0,0 +1,18 @@
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
set(VCPKG_TARGET_ARCHITECTURE x86)
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)
if(PORT MATCHES "onnx")
list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS
"-DONNX_DISABLE_STATIC_REGISTRATION=ON"
)
endif()
if(PORT MATCHES "benchmark")
list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS
"-DBENCHMARK_ENABLE_WERROR=OFF"
)
endif()

View file

@ -0,0 +1,18 @@
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
set(VCPKG_TARGET_ARCHITECTURE x86)
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)
if(PORT MATCHES "onnx")
list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS
"-DONNX_DISABLE_STATIC_REGISTRATION=ON"
)
endif()
if(PORT MATCHES "benchmark")
list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS
"-DBENCHMARK_ENABLE_WERROR=OFF"
)
endif()

View file

@ -30,15 +30,15 @@
},
"ms-gsl",
"nlohmann-json",
{
"name": "nsync",
"platform": "!windows"
},
{
"name": "nsync",
"platform": "!windows",
"version>=": "1.26.0"
},
{
"name": "onnx",
"version>=": "1.16.2"
},
"optional-lite",
{
"name": "protobuf",
@ -66,12 +66,6 @@
"platform": "windows"
}
],
"overrides": [
{
"name": "flatbuffers",
"version": "23.5.26"
}
],
"features": {
"tests": {
"description": "Build ONNXRuntime unit tests",
@ -80,5 +74,15 @@
"gtest"
]
}
}
},
"overrides": [
{
"name": "protobuf",
"version": "3.21.12#4"
},
{
"name": "flatbuffers",
"version": "23.5.26"
}
]
}

Some files were not shown because too many files have changed in this diff Show more