packetkiller:
I think I get that the build options will cause problems if something else needs to use them. If other options are needed will they still be appended to these or will this be the only option used since it is the only line in the file?
I'm not sure I understand your question. What I'll do it provide a better explanation of what the problem is.
Your property definition in the global platform.txt overrides previous definitions of that property.
I'll use the Leonardo board definition I mentioned before as an example, but other boards use it for even more important purposes. The Leonardo board definition contains this line:
leonardo.build.extra_flags={build.usb_flags}
It's a little confusing because this property definition references another property, which references other properties, but all that is irrelevant to this discussion. You only need to understand that in the end this causes the build.extra_flags property to have this value when compiling for the Leonardo:
-DUSB_VID=0x2341 -DUSB_PID=0x8036 "-DUSB_MANUFACTURER=\"Unknown\"" "-DUSB_PRODUCT=\"Arduino Leonardo\""
Those flags are added to the compilation commands.
Now, when you add a definition of build.extra_flags to the global platform.txt, your definition overrides the definition that property was expected to have. So instead of the compilation commands containing this while compiling for the Leonardo:
-DUSB_VID=0x2341 -DUSB_PID=0x8036 "-DUSB_MANUFACTURER=\"Unknown\"" "-DUSB_PRODUCT=\"Arduino Leonardo\""
it contains this:
-DOSH_NOXMLNS
I used the Leonardo as an example, but many other boards use build.extra_flags for various purposes.
build.extra_flags could be used carefully on a case-by-case basis to inject custom flags into the compilation commands after checking to see if and how the specific board you're compiling for is already using that property. For example, if you're compiling for the Mega, you would find that it doesn't use build.extra_flags and feel free to use it as you like without the chance of overriding. In the case of the Leonardo, you could find the standard definition of the property and include that in your custom definition:
build.extra_flags={build.usb_flags} -DOSH_NOXMLNS
But it's not possible to do this with a global definition of the property.
This is why I recommended you to use the "extra flags" properties that are specifically intended for this use.