def get_raw_flags(lines, identifier, include_extra):
    """Gathers raw flags before updating templates"""
    raw_flags = ''
    for line in lines:
        if 'compiler.' + identifier + '.flags=' in line:
            raw_flags += line[line.find('=') + 1:].strip(' ').strip('\n')
        elif include_extra and 'compiler.' + identifier + '.extra_flags=' in line:
            raw_flags += ' ' + line[line.find('=') + 1:].strip(' ').strip('\n')
    return raw_flags
