[libcxx] Make sure we pass -isysroot when linking AND when compiling

This commit is contained in:
Louis Dionne 2020-09-10 12:20:18 -04:00
parent 601557e9f9
commit b0ae5332dc
2 changed files with 3 additions and 1 deletions

View File

@ -289,6 +289,7 @@ class Configuration(object):
# Configure include paths
self.configure_compile_flags_header_includes()
self.target_info.add_cxx_compile_flags(self.cxx.compile_flags)
self.target_info.add_cxx_flags(self.cxx.flags)
# Configure feature flags.
enable_32bit = self.get_lit_bool('enable_32bit', False)
if enable_32bit:

View File

@ -30,6 +30,7 @@ class DefaultTargetInfo(object):
def is_darwin(self):
return self.platform() == 'darwin'
def add_cxx_flags(self, flags): pass
def add_cxx_compile_flags(self, flags): pass
def add_cxx_link_flags(self, flags): pass
def allow_cxxabi_link(self): return True
@ -73,7 +74,7 @@ class DarwinLocalTI(DefaultTargetInfo):
return re.sub(r'.*/[^0-9]+([0-9.]+)\.sdk', r'\1', out)
def add_cxx_compile_flags(self, flags):
def add_cxx_flags(self, flags):
out, err, exit_code = executeCommand(['xcrun', '--show-sdk-path'])
if exit_code != 0:
self.full_config.lit_config.warning("Could not determine macOS SDK path! stderr was " + err)