Skip to content

Commit

Permalink
Allow embedding file content in jumbo
Browse files Browse the repository at this point in the history
  • Loading branch information
zcbenz committed May 4, 2020
1 parent 42a34e4 commit 0f3a572
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion build/config/merge_for_jumbo.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,11 @@ def write_jumbo_files(inputs, outputs, written_input_set, written_output_set):
while written_inputs < input_limit:
filename = inputs[written_inputs]
written_inputs += 1
out.write("#include \"%s\"\n" % filename)
if os.environ.get('JUMBO_INCLUDE_FILE_CONTENTS') == 'true':
with open(filename, 'r') as f:
out.write(f.read() + '\n')
else:
out.write("#include \"%s\"\n" % filename)
written_input_set.add(filename)
new_jumbo_file = out.getvalue()
out.close()
Expand Down

0 comments on commit 0f3a572

Please sign in to comment.