aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/environment.py
diff options
context:
space:
mode:
Diffstat (limited to 'mesonbuild/environment.py')
-rw-r--r--mesonbuild/environment.py14
1 files changed, 13 insertions, 1 deletions
diff --git a/mesonbuild/environment.py b/mesonbuild/environment.py
index 36aa94e..74bae32 100644
--- a/mesonbuild/environment.py
+++ b/mesonbuild/environment.py
@@ -838,7 +838,7 @@ class Environment:
def get_datadir(self) -> str:
return self.coredata.get_option(OptionKey('datadir'))
- def get_compiler_system_dirs(self, for_machine: MachineChoice):
+ def get_compiler_system_lib_dirs(self, for_machine: MachineChoice):
for comp in self.coredata.compilers[for_machine].values():
if comp.id == 'clang':
index = 1
@@ -857,6 +857,18 @@ class Environment:
out = out.split('\n')[index].lstrip('libraries: =').split(':')
return [os.path.normpath(p) for p in out]
+ def get_compiler_system_include_dirs(self, for_machine: MachineChoice):
+ for comp in self.coredata.compilers[for_machine].values():
+ if comp.id == 'clang':
+ break
+ elif comp.id == 'gcc':
+ break
+ else:
+ # This option is only supported by gcc and clang. If we don't get a
+ # GCC or Clang compiler return and empty list.
+ return []
+ return comp.get_default_include_dirs()
+
def need_exe_wrapper(self, for_machine: MachineChoice = MachineChoice.HOST):
value = self.properties[for_machine].get('needs_exe_wrapper', None)
if value is not None: