Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 9 additions & 5 deletions BUILD.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,12 @@ Open Developer Command Prompt for Visual Studio version you are going to use. Th
The default Windows CMake Generator is Visual Studio 2017, but you can also use the newer Visual Studio 2019 by passing `--cmake_generator "Visual Studio 16 2019"` to `.\build.bat`


#### Linux
#### Linux/Mac OS X
```
./build.sh --config RelWithDebInfo --build_shared_lib --parallel
```
By default, ORT is configured to be built for a minimum target Mac OS X version of 10.12.
The shared library in the release Nuget(s) and the Python wheel may be installed on Mac OS X versions of 10.12+.

#### Notes

Expand Down Expand Up @@ -61,15 +63,17 @@ The default Windows CMake Generator is Visual Studio 2017, but you can also use
|Windows 10 | YES | YES | VS2019 through the latest VS2015 are supported |
|Windows 10 <br/> Subsystem for Linux | YES | NO | |
|Ubuntu 16.x | YES | YES | Also supported on ARM32v7 (experimental) |
|Mac OS X | YES | NO | |

* GCC 4.x and below are not supported.

### OS/Compiler Matrix:

| OS/Compiler | Supports VC | Supports GCC |
|-------------|:------------:|:----------------:|
|Windows 10 | YES | Not tested |
|Linux | NO | YES(gcc>=4.8) |
| OS/Compiler | Supports VC | Supports GCC | Supports Clang |
|-------------|:------------:|:----------------:|:----------------:|
|Windows 10 | YES | Not tested | Not tested |
|Linux | NO | YES(gcc>=4.8) | Not tested |
|Mac OS X | NO | Not tested | YES (Minimum version required not ascertained)|

## System Requirements
For other system requirements and other dependencies, please see [this section](./README.md#system-requirements-pre-requisite-dependencies).
Expand Down
4 changes: 4 additions & 0 deletions cmake/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ if (${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.15")
cmake_policy(SET CMP0092 NEW)
endif()

# Support OS X versions 10.12+
# This variable is ignored on non-Apple platforms and needs to be set prior to the first project(...) invocation
set(CMAKE_OSX_DEPLOYMENT_TARGET "10.12" CACHE STRING "Minimum OS X deployment version for ORT" FORCE)

# Project
project(onnxruntime C CXX)

Expand Down
13 changes: 11 additions & 2 deletions tools/ci_build/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
import hashlib
import itertools


logging.basicConfig(
format="%(asctime)s %(name)s [%(levelname)s] - %(message)s",
level=logging.DEBUG)
Expand Down Expand Up @@ -1357,6 +1356,16 @@ def build_python_wheel(
args = [sys.executable, os.path.join(source_dir, 'setup.py'),
'bdist_wheel']

# We explicitly override the platform tag in the name of the generated build wheel
# so that we can install the wheel on Mac OS X versions 10.12+.
# Without this explicit override, we will something like this while building on MacOS 10.14 -
# [WARNING] MACOSX_DEPLOYMENT_TARGET is set to a lower value (10.12)
# than the version on which the Python interpreter was compiled (10.14) and will be ignored.
# Since we need to support 10.12+, we explicitly override the platform tag.
# See PR #3626 for more details
if is_macOS():
args += ['-p', 'macosx_10_12_x86_64']

# Any combination of the following arguments can be applied
if nightly_build:
args.append('--nightly_build')
Expand Down Expand Up @@ -1731,4 +1740,4 @@ def main():
sys.exit(main())
except BaseError as e:
log.error(str(e))
sys.exit(1)
sys.exit(1)