b540d7e135
This change fixes the following problems when parsing DART_VM_OPTIONS environment variable: * Resize vm_options to accomodate for extra flags from DART_VM_OPTIONS. * Prepend executable name to the argv to be compatible with implementation of Platform.executableArguments. * Use strchr instead of strtok_r to avoid modifying value of DART_VM_OPTIONS environment variable in place. TEST=pkg/dartdev/test/commands/compile_test.dart Fixes https://github.com/dart-lang/sdk/issues/62957 Fixes https://github.com/dart-lang/sdk/issues/62958 Change-Id: I86e0ece20844888333b2a0765c82a5ad1fba54b6 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/491001 Commit-Queue: Alexander Markov <alexmarkov@google.com> Reviewed-by: Alexander Aprelev <aam@google.com>