Skip to content

Commit 4cbdf42

Browse files
authored
Fix output_dir requirement setting (#236)
Needs to be marked before `app.run` is executed.
1 parent ed032df commit 4cbdf42

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

compiler_opt/tools/extract_ir.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@
7474
'-mllvm -lto-embed-bitcode=post-merge-pre-opt passed in the distributed '
7575
'case, or -Wl,--save-temps=import and -Wl,--thinlto-emit-index-files '
7676
'passed in the local case.')
77+
flags.mark_flags_as_required(['output_dir'])
7778

7879
FLAGS = flags.FLAGS
7980

@@ -317,7 +318,6 @@ def extract_artifacts(obj: TrainingIRExtractor) -> Optional[str]:
317318
def main(argv):
318319
if len(argv) > 1:
319320
raise app.UsageError('Too many command-line arguments.')
320-
flags.mark_flags_as_required(['output_dir'])
321321

322322
objs = []
323323
if FLAGS.input is not None and FLAGS.thinlto_build == 'local':

0 commit comments

Comments
 (0)