mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-07-08 17:17:15 +00:00
Add '-DCMAKE_OSX_ARCHITECTURES=x86_64;arm64' when build protobuf from source on MacOS (#13720)
### Description Add '-DCMAKE_OSX_ARCHITECTURES=x86_64;arm64' when build protobuf from source on MacOS. Because later on we will the built library with the other parts of onnxruntime to generate libonnxruntime.dylib, and if the target CPU ARCH of libonnxruntime.dylib is not x86_64, it will fail. ### Motivation and Context To fix a packaging pipeline failure, which was introduced from #13694
This commit is contained in:
parent
8f3c6ea0df
commit
67e46a873a
2 changed files with 3 additions and 3 deletions
|
|
@ -80,7 +80,7 @@ jobs:
|
|||
set -e
|
||||
pushd .
|
||||
cd $(Build.SourcesDirectory)/cmake/external/protobuf
|
||||
cmake ./cmake -DCMAKE_INSTALL_PREFIX=$(Build.BinariesDirectory)/protobuf -DCMAKE_POSITION_INDEPENDENT_CODE=ON -Dprotobuf_BUILD_TESTS=OFF -DCMAKE_BUILD_TYPE=Relwithdebinfo
|
||||
cmake ./cmake -DCMAKE_INSTALL_PREFIX=$(Build.BinariesDirectory)/protobuf -DCMAKE_POSITION_INDEPENDENT_CODE=ON -Dprotobuf_BUILD_TESTS=OFF -DCMAKE_BUILD_TYPE=Relwithdebinfo '-DCMAKE_OSX_ARCHITECTURES=x86_64;arm64'
|
||||
make -j$(getconf _NPROCESSORS_ONLN)
|
||||
make install
|
||||
popd
|
||||
|
|
|
|||
|
|
@ -358,7 +358,7 @@ stages:
|
|||
set -e
|
||||
pushd .
|
||||
cd $(Build.SourcesDirectory)/cmake/external/protobuf
|
||||
cmake ./cmake -DCMAKE_INSTALL_PREFIX=$(Build.BinariesDirectory)/protobuf -DCMAKE_POSITION_INDEPENDENT_CODE=ON -Dprotobuf_BUILD_TESTS=OFF -DCMAKE_BUILD_TYPE=Relwithdebinfo
|
||||
cmake ./cmake -DCMAKE_INSTALL_PREFIX=$(Build.BinariesDirectory)/protobuf -DCMAKE_POSITION_INDEPENDENT_CODE=ON -Dprotobuf_BUILD_TESTS=OFF -DCMAKE_BUILD_TYPE=Relwithdebinfo '-DCMAKE_OSX_ARCHITECTURES=x86_64;arm64'
|
||||
make -j$(getconf _NPROCESSORS_ONLN)
|
||||
make install
|
||||
popd
|
||||
|
|
@ -425,7 +425,7 @@ stages:
|
|||
set -e
|
||||
pushd .
|
||||
cd $(Build.SourcesDirectory)/cmake/external/protobuf
|
||||
cmake ./cmake -DCMAKE_INSTALL_PREFIX=$(Build.BinariesDirectory)/protobuf -DCMAKE_POSITION_INDEPENDENT_CODE=ON -Dprotobuf_BUILD_TESTS=OFF -DCMAKE_BUILD_TYPE=Relwithdebinfo
|
||||
cmake ./cmake -DCMAKE_INSTALL_PREFIX=$(Build.BinariesDirectory)/protobuf -DCMAKE_POSITION_INDEPENDENT_CODE=ON -Dprotobuf_BUILD_TESTS=OFF -DCMAKE_BUILD_TYPE=Relwithdebinfo '-DCMAKE_OSX_ARCHITECTURES=x86_64;arm64'
|
||||
make -j$(getconf _NPROCESSORS_ONLN)
|
||||
make install
|
||||
popd
|
||||
|
|
|
|||
Loading…
Reference in a new issue