Bug 1537549 [wpt PR 15932] - Fix splitting of git ls-tree output, a=testonly
[gecko.git] / config / system_header_util.py
blob6e7b30318f23cf8849c99f82503db31db6480b44
1 import os
4 def find_in_path(file, searchpath):
5 for dir in searchpath.split(os.pathsep):
6 f = os.path.join(dir, file)
7 if os.path.exists(f):
8 return f
9 return ''
12 def header_path(header, compiler):
13 if compiler == 'gcc':
14 # we use include_next on gcc
15 return header
16 elif compiler == 'msvc':
17 return find_in_path(header, os.environ.get('INCLUDE', ''))
18 else:
19 # hope someone notices this ...
20 raise NotImplementedError(compiler)