When using exclusionary view mappings the label created changes the exclusion to an inclusion.
Example client view:
Example label produced:
This causes the label to contain more files ('//depot/Freestyle/main/sub*/...') than was included in the build.
(1) Create a freestyle job with exclusionary mappings in the client view (example above).
(2) Add the 'Post Build Action' called 'Perforce:label'.
(3) Save and run the job.
(4) Look at the label generated (p4 label -o LabelName).