Skip to content

Commit 59de0cf

Browse files
committed
Review conf_macos.py: fix xcodebuild error handling and missing checking call.
- setup_universalsdk: use cmd_status instead of cmd_output for xcodebuild so that a missing or failing xcodebuild is silently ignored, matching configure.ac's use of 2>/dev/null. - _setup_darwin_flags: add missing pyconf.checking("which compiler should be used") to match configure.ac's AC_MSG_CHECKING before the MacOSX10.4u.sdk case. Assisted-by: Claude
1 parent b619088 commit 59de0cf

File tree

2 files changed

+173
-166
lines changed

2 files changed

+173
-166
lines changed

Tools/configure/conf_macos.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,9 @@ def setup_universalsdk(v):
101101
if usdk_raw is not None:
102102
if usdk_raw == "yes":
103103
# Locate the best usable SDK, see Mac/README for more information
104-
val = pyconf.cmd_output(
104+
# Use cmd_status so xcodebuild failure is ignored (matches
105+
# configure.ac: /usr/bin/xcodebuild ... 2>/dev/null).
106+
_, val = pyconf.cmd_status(
105107
["/usr/bin/xcodebuild", "-version", "-sdk", "macosx", "Path"]
106108
)
107109
if ".sdk" not in val:
@@ -471,6 +473,7 @@ def _setup_darwin_flags(v):
471473
"""Darwin-specific compiler flags, universal SDK, and deployment target."""
472474
# -Wno-long-double, -no-cpp-precomp, and -mno-fused-madd
473475
# used to be here, but non-Apple gcc doesn't accept them.
476+
pyconf.checking("which compiler should be used")
474477
if v.UNIVERSALSDK.endswith("/MacOSX10.4u.sdk"):
475478
# Build using 10.4 SDK, force usage of gcc when the compiler is gcc,
476479
# otherwise the user will get very confusing error messages when building on OSX 10.6

0 commit comments

Comments
 (0)