diff --git a/BUILD.md b/BUILD.md index 54b0f013c0..84ac601e8e 100644 --- a/BUILD.md +++ b/BUILD.md @@ -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 @@ -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
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). diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt index 43d6367777..5db7fbc4c2 100644 --- a/cmake/CMakeLists.txt +++ b/cmake/CMakeLists.txt @@ -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) diff --git a/tools/ci_build/build.py b/tools/ci_build/build.py index 20a5789c68..412502969c 100755 --- a/tools/ci_build/build.py +++ b/tools/ci_build/build.py @@ -15,7 +15,6 @@ import sys import hashlib import itertools - logging.basicConfig( format="%(asctime)s %(name)s [%(levelname)s] - %(message)s", level=logging.DEBUG) @@ -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') @@ -1731,4 +1740,4 @@ if __name__ == "__main__": sys.exit(main()) except BaseError as e: log.error(str(e)) - sys.exit(1) + sys.exit(1) \ No newline at end of file