Add docstring for new compile function.
Signed-off-by: David Horstmann <david.horstmann@arm.com>
This commit is contained in:
parent
6fcc77cf5e
commit
cf0b881803
1 changed files with 7 additions and 0 deletions
|
@ -90,6 +90,13 @@ int main(void)
|
||||||
''')
|
''')
|
||||||
|
|
||||||
def compile_c_file(c_filename, exe_filename, include_dirs):
|
def compile_c_file(c_filename, exe_filename, include_dirs):
|
||||||
|
"""Compile a C source file with the host compiler.
|
||||||
|
|
||||||
|
* ``c_filename``: the name of the source file to compile.
|
||||||
|
* ``exe_filename``: the name for the executable to be created.
|
||||||
|
* ``include_dirs``: a list of paths to include directories to be passed
|
||||||
|
with the -I switch.
|
||||||
|
"""
|
||||||
# Respect $HOSTCC if it is set
|
# Respect $HOSTCC if it is set
|
||||||
cc = os.getenv('HOSTCC', None)
|
cc = os.getenv('HOSTCC', None)
|
||||||
if cc is None:
|
if cc is None:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue