Commits


Changming Sun authored and GitHub committed 1cd79816ae4
VCPKG improvements (#23688) ### Description 1. Enabling wasm build. 2. Because the above, I need to delete all the existing vcpkg triplet files and use build.py to generate on-the-fly. 3. Updated onnx vcpkg port, to align with the latest changes in the upstream vcpkg repo. 4. Disabling downloading protoc when onnxruntime_USE_VCPKG is true. 5. Added "-e SYSTEM_COLLECTIONURI" to all "docker run " commands, so that in the docker instance I can use this information to determine if the build is running in an ONNX Runtime's team ADO project. 6. Disable vcpkg asset caching if the build is not running in an ONNX Runtime's team ADO project. 7. Add coreml-ep and dml-ep as ONNX Runtime package's features to "cmake/vcpkg.json" 8. Add VCPKG to tools/ci_build/github/linux/docker/migraphx-ci-pipeline-env.Dockerfile , which is used by MIGRAPHX CI build pipeline. ### Motivation and Context This PR appears large because there were a lot of generated vcpkg triplet files checked in to this repo. This PR deletes them. Here are the reasons: The official vcpkg repository has about 80 different triplets. But ONNX Runtime has many more build variants. For example, in general, for each platform, we need to support builds with C++ exceptions, builds without C++ exceptions, builds with C++ RTTI, builds without C++ RTTI, linking to static C++ runtime, linking to dynamic (shared) C++ runtime, builds with address sanitizer, builds without address sanitizer, etc. Therefore, a script file was created to dynamically generate the triplet files on-the-fly. Originally, we tried to check in all the generated files into our repository so that people could build onnxruntime without using build.py or any other Python scripts in the "/tools" directory. However, we encountered an issue when adding support for WASM builds. VCPKG has a limitation that when doing cross-compiling, the triplet file must specify the full path of the chain-loaded toolchain file. The file needs to be located either via environment variables (like ANDROID_NDK_HOME) or via an absolute path. Since environment variables are hard to track, we chose the latter approach. So the generated triplet files may contain absolute file paths that are only valid on the current build machine.