| # Copyright 2017 The Fuchsia Authors. All rights reserved. | |
| # Use of this source code is governed by a BSD-style license that can be | |
| # found in the LICENSE file. | |
| assert(host_os == "mac") | |
| declare_args() { | |
| # Minimum supported version of Mac SDK. | |
| mac_sdk_min = "10.13" | |
| # Path to Mac SDK. | |
| mac_sdk_path = "" | |
| } | |
| _script = "//build/mac/find_sdk.py" | |
| _find_sdk_args = [ | |
| "-S", # https://bugs.fuchsia.dev/p/fuchsia/issues/detail?id=62771 | |
| rebase_path(_script, root_build_dir), | |
| "--print-sdk-path", | |
| mac_sdk_min, | |
| ] | |
| _find_sdk_lines = | |
| exec_script(python_exe_src, _find_sdk_args, "list lines", [ _script ]) | |
| mac_sdk_version = _find_sdk_lines[1] | |
| if (mac_sdk_path == "") { | |
| mac_sdk_path = _find_sdk_lines[0] | |
| } |