Skip to content

Commit 8a5e3de

Browse files
committed
fix: drop unused code in _osx_support.py
Signed-off-by: yihong0618 <[email protected]>
1 parent cf9ef73 commit 8a5e3de

File tree

1 file changed

+0
-26
lines changed

1 file changed

+0
-26
lines changed

Lib/_osx_support.py

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -149,32 +149,6 @@ def _save_modified_value(_config_vars, cv, newvalue):
149149
_config_vars[cv] = newvalue
150150

151151

152-
_cache_default_sysroot = None
153-
def _default_sysroot(cc):
154-
""" Returns the root of the default SDK for this system, or '/' """
155-
global _cache_default_sysroot
156-
157-
if _cache_default_sysroot is not None:
158-
return _cache_default_sysroot
159-
160-
contents = _read_output('%s -c -E -v - </dev/null' % (cc,), True)
161-
in_incdirs = False
162-
for line in contents.splitlines():
163-
if line.startswith("#include <...>"):
164-
in_incdirs = True
165-
elif line.startswith("End of search list"):
166-
in_incdirs = False
167-
elif in_incdirs:
168-
line = line.strip()
169-
if line == '/usr/include':
170-
_cache_default_sysroot = '/'
171-
elif line.endswith(".sdk/usr/include"):
172-
_cache_default_sysroot = line[:-12]
173-
if _cache_default_sysroot is None:
174-
_cache_default_sysroot = '/'
175-
176-
return _cache_default_sysroot
177-
178152
def _supports_universal_builds():
179153
"""Returns True if universal builds are supported on this system"""
180154
# As an approximation, we assume that if we are running on 10.4 or above,

0 commit comments

Comments
 (0)