You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
### 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.
Copy file name to clipboardExpand all lines: cmake/adjust_global_compile_flags.cmake
+3-33Lines changed: 3 additions & 33 deletions
Original file line number
Diff line number
Diff line change
@@ -1,12 +1,6 @@
1
-
# work around Android NDK bug which doesn't include -O flag for Release configuration
2
-
# https://github.com/android/ndk/issues/1740
3
-
# TODO: remove this when the NDK version(s) we support get fixed
4
-
if (ANDROID)
5
-
# NB: attempting to match the effects of this fix: https://android-review.googlesource.com/c/platform/ndk/+/2168845
6
-
string(APPEND CMAKE_C_FLAGS_RELEASE " -O3")
7
-
string(APPENDCMAKE_CXX_FLAGS_RELEASE" -O3")
8
-
string(APPEND CMAKE_ASM_FLAGS_RELEASE " -O3")
1
+
# The flags set by this file are applied to 3rd-party libraries(e.g. protobuf) as well. If you want to set something that is only for ORT's code, please put it in the main CMakeLists.txt file.
9
2
3
+
if (ANDROID)
10
4
# Build shared libraries with support for 16 KB ELF alignment
0 commit comments