def is_rc_supported_for_platform(taskgen):
	"""
	Check if the platform supports rc compiling, following these rules:

	1. MSVC base target platform
	2. Non static library

	:param tg:	The task generator to determine the platform and target type
	:return: True if windows rc compiling is supported, False if not
	"""
	
	platform = taskgen.bld.env['PLATFORM']
	
	if platform == 'project_generator':
		return False
	
	# Only non-static lib targets are supported (program, shlib)
	target_type = getattr(taskgen, '_type', None)
	if target_type not in ('program', 'shlib'):
		return False
	
	# Only msvc based compilers are supported
	rc_supported_platform = False
	if platform.startswith('win'):
		rc_supported_platform = True
	return rc_supported_platform