Common: Extract get_tag function

Signed-off-by: Anton Kolesov <Anton.Kolesov@synopsys.com>
fixup! Linux: Update build script