gen_join_srcs.py 686 B

12345678910111213141516171819
  1. import os, sys
  2. # Explicitly enable local imports
  3. # Don't forget to add imported scripts to inputs of the calling command!
  4. sys.path.append(os.path.dirname(os.path.abspath(__file__)))
  5. import process_command_files as pcf
  6. with open(sys.argv[1], 'w') as f:
  7. f.write('#if defined(__GNUC__)\n')
  8. f.write('#pragma GCC diagnostic ignored "-Wunknown-pragmas"\n')
  9. f.write('#if defined(__clang__)\n')
  10. f.write('#pragma GCC diagnostic ignored "-Wunknown-warning-option"\n')
  11. f.write('#endif\n')
  12. f.write('#pragma GCC diagnostic ignored "-Wsubobject-linkage"\n')
  13. f.write('#endif\n\n')
  14. for arg in pcf.iter_args(sys.argv[2:]):
  15. f.write('#include "' + arg + '"\n')