[SDK] Adds .exe extension for Windows binaries in dart_sdk.py.

This fixes the current build breakage:
https://logs.chromium.org/logs/dart/buildbucket/cr-buildbucket.appspot.com/8917013092125339168/+/steps/upload_sdk/0/stdout

Bug: None
Change-Id: Ic47812a5f3ce0ab7f090a3f19429aa5d5e3cb279
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/98846
Reviewed-by: Alexander Thomas <athom@google.com>
Commit-Queue: Clement Skau <cskau@google.com>
This commit is contained in:
Clement Skau 2019-04-08 13:22:53 +00:00 committed by commit-bot@chromium.org
parent d75a49a44f
commit 26874860e3
2 changed files with 9 additions and 4 deletions

View file

@ -23,10 +23,10 @@ for %%i in ("%SDK_DIR%\..\") do set DART_ROOT=%%~fi
rem Remove trailing backslash if there is one
if %DART_ROOT:~-1%==\ set DART_ROOT=%DART_ROOT:~0,-1%
set DART=%BIN_DIR%\dart
set DART=%BIN_DIR%\dart.exe
set GEN_KERNEL=%BIN_DIR%\snapshots\gen_kernel.dart.snapshot
set VM_PLATFORM_STRONG=%SDK_DIR%\lib\_internal\vm_platform_strong.dill
set GEN_SNAPSHOT=%BIN_DIR%\utils\gen_snapshot
set GEN_SNAPSHOT=%BIN_DIR%\utils\gen_snapshot.exe
set SOURCE_FILE=%1
set SNAPSHOT_FILE=%2

View file

@ -76,8 +76,8 @@ def CreateUploadSDKZips():
# We don't support precompilation on ia32.
if arch != 'ia32':
# Patch in all the PRODUCT built AOT binaries.
CopyBetween(product_sdk_path, sdk_path, 'bin', 'utils', 'gen_snapshot')
CopyBetween(product_sdk_path, sdk_path, 'bin', 'dartaotruntime')
CopyBetween(product_sdk_path, sdk_path, 'bin', 'utils', GuessExtension('gen_snapshot'))
CopyBetween(product_sdk_path, sdk_path, 'bin', GuessExtension('dartaotruntime'))
# Zip it up.
CreateZip(sdk_path, sdk_zip)
DartArchiveUploadSDKs(BUILD_OS, arch, sdk_zip)
@ -205,6 +205,11 @@ def CopyBetween(src_path, dst_path, *relatives):
os.path.join(src_path, *relatives),
os.path.join(dst_path, *relatives[:-1]))
def GuessExtension(binary):
if 'win' in BUILD_OS:
return binary + '.exe'
return binary
def DartArchiveFile(local_path, remote_path, checksum_files=False):
gsutil = bot_utils.GSUtil()
gsutil.upload(local_path, remote_path, public=True)