forked from OSchip/llvm-project
[libcxx] Make sure we pass -isysroot when linking AND when compiling
This commit is contained in:
parent
601557e9f9
commit
b0ae5332dc
|
@ -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:
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue