+ # Get target platform from annotation on annotation
+ var platform = ""
+
+ ## Is there an imported platform?
+ var target_platform = mmodule.target_platform
+ if target_platform != null then
+ platform = target_platform.name or else ""
+ end
+
+ ## Is the platform declared explicitly?
+ var annots = nat.n_annotations
+ if annots != null then
+ var items = annots.n_items
+ if items.length > 1 then
+ modelbuilder.error(annots, "Syntax Error: `{annotation_name}` accepts only a single annotation, the platform name.")
+ return
+ end
+ assert items.length == 1
+
+ var item = items.first
+ platform = item.name
+ end
+
+ # Store the flags in the module