Commit e1a42724 authored by Anton Kudinov's avatar Anton Kudinov
Browse files

added compile-only flag

parent 23a3d934
......@@ -106,7 +106,7 @@ def parse_args(args):
'''
Parse and verify command-line arguments (see --help for info)
'''
global QUIET_FLAG, VERBOSE_FLAG
global QUIET_FLAG, VERBOSE_FLAG, COMPILE_ONLY_FLAG
conf={}
cur=0
......@@ -116,6 +116,8 @@ def parse_args(args):
conf['CLEANUP']=True
conf['TIME']=False
VERBOSE_FLAG=False
COMPILE_ONLY_FLAG=False
while cur<len(args):
arg=args[cur]
......@@ -135,6 +137,9 @@ def parse_args(args):
QUIET_FLAG=True
elif arg=='--verbose':
VERBOSE_FLAG=True
elif arg=='--compile-only':
COMPILE_ONLY_FLAG=True
conf['CLEANUP']=False
elif arg in ['-O', '-O0']:
if 'OPTIMIZATION' in conf and conf['OPTIMIZATION']!=arg:
raise FatalError("conflicting optimization options: " \
......@@ -268,7 +273,7 @@ def generate_cpp_blocks(ja_in_path, headers_in_path, ja_ti_path, b_in_path,
def info(msg):
if QUIET_FLAG:
if QUIET_FLAG or COMPILE_ONLY_FLAG:
return
if VERBOSE_FLAG:
if msg is None:
......@@ -677,8 +682,10 @@ def main():
+ ':' + os.path.join(conf['LUNA_HOME'], 'lib')
if VERBOSE_FLAG:
if VERBOSE_FLAG or (COMPILE_ONLY_FLAG and not QUIET_FLAG):
print(' '.join(cmd))
if COMPILE_ONLY_FLAG:
exit(0)
t0=datetime.datetime.now()
p=subprocess.Popen(cmd, stderr=subprocess.PIPE, env=env)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment