[flutter_tools] switch dart defines to base64 to avoid windows control characters (#75027)

= gets escaped into %3D which seems to be tripping up cmake on windows since % is a control character. Switch to base64 encoding, since this does not have % nor , in the output character set.

This change is not trivially cherry pickable, and isn't tested on windows aside from my local, manual tests due to the planned CI work not being complete yet.

Fixes #75017
Fixes #74705
This commit is contained in:
Jonah Williams
2021-02-02 09:10:48 -08:00
committed by GitHub
parent aebf548436
commit 44d5950d27
17 changed files with 149 additions and 88 deletions

View File

@@ -58,7 +58,7 @@ Future<void> buildWeb(
if (serviceWorkerStrategy != null)
kServiceWorkerStrategy: serviceWorkerStrategy,
if (buildInfo.extraFrontEndOptions?.isNotEmpty ?? false)
kExtraFrontEndOptions: encodeDartDefines(buildInfo.extraFrontEndOptions),
kExtraFrontEndOptions: buildInfo.extraFrontEndOptions.join(','),
},
artifacts: globals.artifacts,
fileSystem: globals.fs,