aboutsummaryrefslogtreecommitdiffstats
path: root/build/scripts/gen_join_srcs.py
blob: e0c2df161a771b18b452ec265fe5b72bd86863ec (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
import sys

import process_command_files as pcf


with open(sys.argv[1], 'w') as f:
    f.write('#if defined(__GNUC__)\n')
    f.write('#pragma GCC diagnostic ignored "-Wunknown-pragmas"\n')
    f.write('#if defined(__clang__)\n')
    f.write('#pragma GCC diagnostic ignored "-Wunknown-warning-option"\n')
    f.write('#endif\n')
    f.write('#pragma GCC diagnostic ignored "-Wsubobject-linkage"\n')
    f.write('#endif\n\n')

    for arg in pcf.iter_args(sys.argv[2:]):
        f.write('#include "' + arg + '"\n')