Skip to content

Commit 4c9b2e2

Browse files
author
Jianchun Xu
committed
Merge branch 'master' into swb
2 parents b945c00 + bc2fb21 commit 4c9b2e2

File tree

1,205 files changed

+22764
-69649
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,205 files changed

+22764
-69649
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,3 +93,4 @@ pal/src/config.h
9393
deps/
9494

9595
.DS_Store
96+
android-toolchain-arm/

Build/CMakeFeatureDetect.cmake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
include(CheckCXXSourceCompiles)
77
include(CheckCXXSourceRuns)
88

9-
if(CMAKE_SYSTEM_NAME STREQUAL Darwin)
9+
if(CC_TARGET_OS_OSX)
1010
# by default this is disabled for osx
1111
# enable temporarily
1212
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} \
@@ -33,7 +33,7 @@ else()
3333
set(CXX_DO_NOT_OPTIMIZE_SIBLING_CALLS "-fno-optimize-sibling-calls")
3434
endif()
3535

36-
if(CMAKE_SYSTEM_NAME STREQUAL Darwin)
36+
if(CC_TARGET_OS_OSX)
3737
# by default this is disabled for osx
3838
# disable back
3939
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} \

Build/Chakra.Core.sln

Lines changed: 25 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ChakraCore", "..\bin\Chakra
2828
EndProject
2929
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Lib", "Lib", "{D8216B93-BD6E-4293-8D98-79CEF7CF66BC}"
3030
EndProject
31-
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Chakra.Common.Codex", "..\lib\common\codex\Chakra.Common.Codex.vcxproj", "{1876E800-AD77-48C4-A2F7-E5265F24AC38}"
31+
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Chakra.Common.Codex", "..\lib\Common\Codex\Chakra.Common.Codex.vcxproj", "{1876E800-AD77-48C4-A2F7-E5265F24AC38}"
3232
EndProject
3333
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Chakra.Runtime.ByteCode", "..\lib\Runtime\ByteCode\Chakra.Runtime.ByteCode.vcxproj", "{706083F7-6AA4-4558-A153-6352EF9110F5}"
3434
ProjectSection(ProjectDependencies) = postProject
@@ -55,7 +55,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Chakra.Runtime.Types", "..\
5555
{2F6A1847-BFAF-4B8A-9463-AC39FB46B96A} = {2F6A1847-BFAF-4B8A-9463-AC39FB46B96A}
5656
EndProjectSection
5757
EndProject
58-
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Chakra.Common.Common", "..\lib\common\common\Chakra.Common.Common.vcxproj", "{BB4153FF-AC3E-4734-B562-CC23812DF31B}"
58+
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Chakra.Common.Common", "..\lib\Common\Common\Chakra.Common.Common.vcxproj", "{BB4153FF-AC3E-4734-B562-CC23812DF31B}"
5959
ProjectSection(ProjectDependencies) = postProject
6060
{2F6A1847-BFAF-4B8A-9463-AC39FB46B96A} = {2F6A1847-BFAF-4B8A-9463-AC39FB46B96A}
6161
EndProjectSection
@@ -64,16 +64,16 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Runtime", "Runtime", "{DDF4
6464
EndProject
6565
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Common", "Common", "{546172B2-F084-4363-BE35-06010663D319}"
6666
EndProject
67-
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Chakra.Common.Core", "..\lib\common\core\Chakra.Common.Core.vcxproj", "{CC4153FF-AC3E-4734-B562-CC23812DF31B}"
67+
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Chakra.Common.Core", "..\lib\Common\Core\Chakra.Common.Core.vcxproj", "{CC4153FF-AC3E-4734-B562-CC23812DF31B}"
6868
ProjectSection(ProjectDependencies) = postProject
6969
{2F6A1847-BFAF-4B8A-9463-AC39FB46B96A} = {2F6A1847-BFAF-4B8A-9463-AC39FB46B96A}
7070
EndProjectSection
7171
EndProject
72-
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Chakra.Common.DataStructures", "..\lib\common\DataStructures\Chakra.Common.DataStructures.vcxproj", "{5643D42A-C38D-4D82-9662-58470B3AC9F7}"
72+
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Chakra.Common.DataStructures", "..\lib\Common\DataStructures\Chakra.Common.DataStructures.vcxproj", "{5643D42A-C38D-4D82-9662-58470B3AC9F7}"
7373
EndProject
74-
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Chakra.Common.Exceptions", "..\lib\common\Exceptions\Chakra.Common.Exceptions.vcxproj", "{FD8EEC40-4141-448A-BF4B-1589FBE4F60D}"
74+
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Chakra.Common.Exceptions", "..\lib\Common\Exceptions\Chakra.Common.Exceptions.vcxproj", "{FD8EEC40-4141-448A-BF4B-1589FBE4F60D}"
7575
EndProject
76-
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Chakra.Common.Memory", "..\lib\common\Memory\Chakra.Common.Memory.vcxproj", "{BB4153FF-AC3E-4734-B562-FF23812DF31B}"
76+
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Chakra.Common.Memory", "..\lib\Common\Memory\Chakra.Common.Memory.vcxproj", "{BB4153FF-AC3E-4734-B562-FF23812DF31B}"
7777
ProjectSection(ProjectDependencies) = postProject
7878
{2F6A1847-BFAF-4B8A-9463-AC39FB46B96A} = {2F6A1847-BFAF-4B8A-9463-AC39FB46B96A}
7979
EndProjectSection
@@ -88,13 +88,13 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Chakra.Parser", "..\lib\Par
8888
{2F6A1847-BFAF-4B8A-9463-AC39FB46B96A} = {2F6A1847-BFAF-4B8A-9463-AC39FB46B96A}
8989
EndProjectSection
9090
EndProject
91-
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Chakra.Jsrt", "..\lib\jsrt\Chakra.Jsrt.vcxproj", "{706083F7-6AA4-4558-A153-6352EF9220F5}"
91+
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Chakra.Jsrt", "..\lib\Jsrt\Chakra.Jsrt.vcxproj", "{706083F7-6AA4-4558-A153-6352EF9220F5}"
9292
ProjectSection(ProjectDependencies) = postProject
9393
{2F6A1847-BFAF-4B8A-9463-AC39FB46B96A} = {2F6A1847-BFAF-4B8A-9463-AC39FB46B96A}
9494
{0DB5ECBC-9385-4A65-BE2C-4EF7C65CB719} = {0DB5ECBC-9385-4A65-BE2C-4EF7C65CB719}
9595
EndProjectSection
9696
EndProject
97-
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Chakra.Jsrt.Core", "..\lib\jsrt\core\Chakra.Jsrt.Core.vcxproj", "{706083F7-6AA4-4558-A153-6352EF9220EE}"
97+
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Chakra.Jsrt.Core", "..\lib\Jsrt\Core\Chakra.Jsrt.Core.vcxproj", "{706083F7-6AA4-4558-A153-6352EF9220EE}"
9898
ProjectSection(ProjectDependencies) = postProject
9999
{2F6A1847-BFAF-4B8A-9463-AC39FB46B96A} = {2F6A1847-BFAF-4B8A-9463-AC39FB46B96A}
100100
EndProjectSection
@@ -104,7 +104,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Chakra.Runtime.Math", "..\l
104104
{2F6A1847-BFAF-4B8A-9463-AC39FB46B96A} = {2F6A1847-BFAF-4B8A-9463-AC39FB46B96A}
105105
EndProjectSection
106106
EndProject
107-
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Chakra.Common.Util", "..\lib\common\util\Chakra.Common.Util.vcxproj", "{6979EC58-7A28-465C-A694-F3323A1F5401}"
107+
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Chakra.Common.Util", "..\lib\Common\Util\Chakra.Common.Util.vcxproj", "{6979EC58-7A28-465C-A694-F3323A1F5401}"
108108
EndProject
109109
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Core", "Core", "{158C8616-750C-4E0E-BD3D-5721D3C555E6}"
110110
EndProject
@@ -119,12 +119,15 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ch", "..\bin\ch\ch.vcxproj"
119119
EndProject
120120
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "rl", "..\bin\rl\rl.vcxproj", "{80A70F57-0F89-458F-AFD3-CE2159EB9BB1}"
121121
EndProject
122-
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Chakra.Runtime.Base", "..\lib\Runtime\base\Chakra.Runtime.Base.vcxproj", "{706083F7-6AA4-4558-A153-6352EF9110EE}"
122+
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Chakra.Runtime.Base", "..\lib\Runtime\Base\Chakra.Runtime.Base.vcxproj", "{706083F7-6AA4-4558-A153-6352EF9110EE}"
123123
ProjectSection(ProjectDependencies) = postProject
124124
{2F6A1847-BFAF-4B8A-9463-AC39FB46B96A} = {2F6A1847-BFAF-4B8A-9463-AC39FB46B96A}
125125
EndProjectSection
126126
EndProject
127127
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Chakra.WasmReader", "..\lib\WasmReader\Chakra.WasmReader.vcxproj", "{53D52B0B-86D9-4D31-AD09-0D6B3C063ADD}"
128+
ProjectSection(ProjectDependencies) = postProject
129+
{2F6A1847-BFAF-4B8A-9463-AC39FB46B96A} = {2F6A1847-BFAF-4B8A-9463-AC39FB46B96A}
130+
EndProjectSection
128131
EndProject
129132
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "GCStress", "..\bin\GCStress\GCStress.vcxproj", "{73CE5C59-E0BA-413D-A73C-3EECE067891B}"
130133
ProjectSection(ProjectDependencies) = postProject
@@ -148,6 +151,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Manifests", "Manifests", "{
148151
EndProject
149152
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CoreManifests", "..\manifests\CoreManifests.vcxproj", "{2F6A1847-BFAF-4B8A-9463-AC39FB46B96A}"
150153
EndProject
154+
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pal", "..\pal\pal.vcxproj", "{02D4FD92-AD34-40CA-85DF-4D6C7E3A1F22}"
155+
EndProject
151156
Global
152157
GlobalSection(SolutionConfigurationPlatforms) = preSolution
153158
Debug|ARM = Debug|ARM
@@ -683,6 +688,15 @@ Global
683688
{2F6A1847-BFAF-4B8A-9463-AC39FB46B96A}.Test|x64.Build.0 = Test|x64
684689
{2F6A1847-BFAF-4B8A-9463-AC39FB46B96A}.Test|x86.ActiveCfg = Test|Win32
685690
{2F6A1847-BFAF-4B8A-9463-AC39FB46B96A}.Test|x86.Build.0 = Test|Win32
691+
{02D4FD92-AD34-40CA-85DF-4D6C7E3A1F22}.Debug|ARM.ActiveCfg = Debug|Win32
692+
{02D4FD92-AD34-40CA-85DF-4D6C7E3A1F22}.Debug|x64.ActiveCfg = Debug|x64
693+
{02D4FD92-AD34-40CA-85DF-4D6C7E3A1F22}.Debug|x86.ActiveCfg = Debug|Win32
694+
{02D4FD92-AD34-40CA-85DF-4D6C7E3A1F22}.Release|ARM.ActiveCfg = Release|Win32
695+
{02D4FD92-AD34-40CA-85DF-4D6C7E3A1F22}.Release|x64.ActiveCfg = Release|x64
696+
{02D4FD92-AD34-40CA-85DF-4D6C7E3A1F22}.Release|x86.ActiveCfg = Release|Win32
697+
{02D4FD92-AD34-40CA-85DF-4D6C7E3A1F22}.Test|ARM.ActiveCfg = Release|x64
698+
{02D4FD92-AD34-40CA-85DF-4D6C7E3A1F22}.Test|x64.ActiveCfg = Release|x64
699+
{02D4FD92-AD34-40CA-85DF-4D6C7E3A1F22}.Test|x86.ActiveCfg = Release|Win32
686700
EndGlobalSection
687701
GlobalSection(SolutionProperties) = preSolution
688702
HideSolutionNode = FALSE
@@ -723,5 +737,6 @@ Global
723737
{EDEB02E2-F389-4CBF-AE7D-3041A934F86B} = {D3BA0BFC-4757-4B73-994F-3556950884A1}
724738
{984BE359-87F7-4BD7-A823-AD8A59739801} = {158C8616-750C-4E0E-BD3D-5721D3C555E6}
725739
{2F6A1847-BFAF-4B8A-9463-AC39FB46B96A} = {984BE359-87F7-4BD7-A823-AD8A59739801}
740+
{02D4FD92-AD34-40CA-85DF-4D6C7E3A1F22} = {546172B2-F084-4363-BE35-06010663D319}
726741
EndGlobalSection
727742
EndGlobal

Build/android_toolchain.sh

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
#!/bin/bash
2+
#-------------------------------------------------------------------------------------------------------
3+
# Copyright (C) Microsoft. All rights reserved.
4+
# Licensed under the MIT license. See LICENSE.txt file in the project root for full license information.
5+
#-------------------------------------------------------------------------------------------------------
6+
7+
if [ $# -eq 0 ]
8+
then
9+
echo "usage: android_toolchain <ndk_path>"
10+
exit
11+
fi
12+
13+
ANDROID_TARGET=android-21
14+
15+
export TOOLCHAIN=$PWD/android-toolchain-arm
16+
rm -rf $TOOLCHAIN
17+
mkdir -p $TOOLCHAIN
18+
$1/build/tools/make-standalone-toolchain.sh \
19+
--toolchain=arm-linux-androideabi-4.9 \
20+
--arch=arm \
21+
--install-dir=$TOOLCHAIN \
22+
--platform=$ANDROID_TARGET --force
23+
24+
rm $TOOLCHAIN/bin/python

Build/scripts/compose_build.ps1

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,15 +39,15 @@ $changeInfo = (Get-Content $changeJson) -join "`n" | ConvertFrom-Json
3939
# between the partially-composed root and the metadata directories.
4040
# Exclude change.json and build.json, the results of a previous composition already in the root.
4141
Get-ChildItem -Path $rootPath "*.json" -Recurse `
42-
| ? { -not ($_.Name -in @("change.json", "build.json")) } `
43-
| % { Move-Item -Verbose -Force -Path $_.FullName -Destination $rootPath }
42+
| Where-Object { -not ($_.Name -in @("change.json", "build.json")) } `
43+
| ForEach-Object { Move-Item -Verbose -Force -Path $_.FullName -Destination $rootPath }
4444

4545
# Determine the overall build status. Mark the build as "passed" until "failed" is encountered.
4646
$overallBuildStatus = "passed"
4747

4848
$files = Get-ChildItem -Path $rootPath "*.json" -Recurse `
49-
| ? { -not ($_.Name -in @("change.json", "build.json")) } `
50-
| % { $_.FullName }
49+
| Where-Object { -not ($_.Name -in @("change.json", "build.json")) } `
50+
| ForEach-Object { $_.FullName }
5151
$builds = New-Object System.Collections.ArrayList
5252
foreach ($file in $files) {
5353
$json = (Get-Content $file) -join "`n" | ConvertFrom-Json

Build/scripts/finalize_build.ps1

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,13 @@ param (
2323
$corePathSegment = "" # e.g. "core"
2424
)
2525

26-
$sourcesDir = $Env:BUILD_SOURCESDIRECTORY
27-
$coreSourcesDir = Join-Path $sourcesDir $corePathSegment
26+
. $PSScriptRoot\pre_post_util.ps1
27+
28+
$sourcesDir, $_, $_, $_ = `
29+
ComputePaths `
30+
-arch $arch -flavor $flavor -subtype $subtype -OuterScriptRoot $PSScriptRoot
2831

29-
$OuterScriptRoot = $PSScriptRoot
30-
. "$PSScriptRoot\pre_post_util.ps1"
32+
$coreSourcesDir = Join-Path $sourcesDir $corePathSegment
3133

3234
$buildName = ConstructBuildName -arch $arch -flavor $flavor -subtype $subtype
3335

@@ -118,7 +120,7 @@ Copy-Item -Verbose -Force $buildFlavorJsonFile $metadataDir
118120

119121
# Search for *.nuspec files and copy them to $metadataDir
120122
Get-ChildItem -Path (Join-Path $sourcesDir "Build") "*.nuspec" `
121-
| % { Copy-Item -Verbose -Force $_.FullName $metadataDir }
123+
| ForEach-Object { Copy-Item -Verbose -Force $_.FullName $metadataDir }
122124

123125
#
124126
# Copy POGO directory if present for this build

Build/scripts/init_build.ps1

Lines changed: 13 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,14 @@ param (
3636
[string]$oauth
3737
)
3838

39+
. $PSScriptRoot\pre_post_util.ps1
40+
3941
#
40-
# Define values for variables based on parameters and environment variables
41-
# with default values in case the environment variables are not defined.
42+
# Process build type parameters
4243
#
4344

44-
. $PSScriptRoot\util.ps1
45-
$gitExe = GetGitPath
45+
# Define values for variables based on parameters and environment variables
46+
# with default values in case the environment variables are not defined.
4647

4748
$BuildType = UseValueOrDefault $buildtype $Env:BuildType
4849
$BuildPlatform = UseValueOrDefault $arch $Env:BuildPlatform
@@ -85,34 +86,30 @@ if ($BuildType) {
8586
exit 1
8687
}
8788

88-
$CommitHash = UseValueOrDefault $Env:BUILD_SOURCEVERSION $(iex "${gitExe} rev-parse HEAD")
89+
$gitExe = GetGitPath
90+
91+
$CommitHash = UseValueOrDefault $Env:BUILD_SOURCEVERSION $(Invoke-Expression "${gitExe} rev-parse HEAD")
8992

90-
$branchFullName = UseValueOrDefault $Env:BUILD_SOURCEBRANCH $(iex "${gitExe} rev-parse --symbolic-full-name HEAD")
93+
$branchFullName = UseValueOrDefault $Env:BUILD_SOURCEBRANCH $(Invoke-Expression "${gitExe} rev-parse --symbolic-full-name HEAD")
9194

9295
$SourcesDirectory = UseValueOrDefault $Env:BUILD_SOURCESDIRECTORY $(GetRepoRoot)
9396
$BinariesDirectory = UseValueOrDefault (Join-Path $SourcesDirectory "Build\VcBuild")
9497
$ObjectDirectory = Join-Path $BinariesDirectory "obj\${BuildPlatform}_${BuildConfiguration}"
9598

9699
$DropRoot = UseValueOrDefault $dropRoot $Env:DROP_ROOT (Join-Path $(GetRepoRoot) "_DROP")
97100

98-
# set up required variables and import pre_post_util.ps1
99-
$arch = $BuildPlatform
100-
$flavor = $BuildConfiguration
101-
$OuterScriptRoot = $PSScriptRoot # Used in pre_post_util.ps1
102-
. "$PSScriptRoot\pre_post_util.ps1"
103-
104101
$BuildName = ConstructBuildName -arch $BuildPlatform -flavor $BuildConfiguration -subtype $BuildSubtype
105102

106103
$BranchName = $branchFullName.split('/',3)[2]
107104
$BranchPath = $BranchName.replace('/','\')
108105

109106
if (-not $CommitHash) {
110-
$CommitHash = iex "${gitExe} rev-parse HEAD"
107+
$CommitHash = Invoke-Expression "${gitExe} rev-parse HEAD"
111108
}
112-
$CommitShortHash = $(iex "${gitExe} rev-parse --short $CommitHash")
109+
$CommitShortHash = $(Invoke-Expression "${gitExe} rev-parse --short $CommitHash")
113110

114-
$Username = (iex "${gitExe} log $CommitHash -1 --pretty=%ae").split('@')[0]
115-
$CommitDateTime = [DateTime]$(iex "${gitExe} log $CommitHash -1 --pretty=%aD")
111+
$Username = (Invoke-Expression "${gitExe} log $CommitHash -1 --pretty=%ae").split('@')[0]
112+
$CommitDateTime = [DateTime]$(Invoke-Expression "${gitExe} log $CommitHash -1 --pretty=%aD")
116113
$CommitTime = Get-Date $CommitDateTime -Format yyMMdd.HHmm
117114

118115
#

Build/scripts/pgo/pogo_training.ps1

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,15 @@ param (
2121
[Parameter(Mandatory=$True)]
2222
[string]$arch,
2323

24-
[ValidateSet("default", "codecoverage", "pogo")]
25-
[string]$subtype = "default",
26-
2724
# force callers to specify this in case of future use
2825
[Parameter(Mandatory=$True)]
2926
[string]$flavor,
3027

28+
[ValidateSet("default", "codecoverage", "pogo")]
29+
[string]$subtype = "default",
30+
31+
[string]$pogoArgs = "",
32+
3133
[string]$vcinstallroot = ${Env:ProgramFiles(x86)},
3234
[string]$vcbinpath = "Microsoft Visual Studio 14.0\VC\bin",
3335
[string]$dllname = "pgort140.dll",
@@ -66,7 +68,7 @@ for ($i = 0; $i -lt $scenarios.Length; $i = $i + 1) {
6668

6769
for ($j = 0; $j -lt $items.Length; $j = $j + 1) {
6870
$testFile = $items[$j]
69-
Write-Host "$binary -oopjit- $testFile"
70-
iex "$binary -oopjit- $testFile"
71+
Write-Host "$binary $pogoArgs $testFile"
72+
iex "$binary $pogoArgs $testFile"
7173
}
7274
}

Build/scripts/post_build.ps1

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ param (
2323
[string]$subtype = "default",
2424

2525
[string]$srcpath = "",
26-
[string]$binpath = "",
26+
[string]$buildRoot = "",
2727
[string]$objpath = "",
2828

2929
[Parameter(Mandatory=$True)]
@@ -44,29 +44,31 @@ param (
4444
[switch]$skipTests # or set $Env:SKIP_TESTS before invoking build
4545
)
4646

47+
. $PSScriptRoot\pre_post_util.ps1
48+
49+
$srcpath, $buildRoot, $objpath, $_ = `
50+
ComputePaths `
51+
-arch $arch -flavor $flavor -subtype $subtype -OuterScriptRoot $PSScriptRoot `
52+
-srcpath $srcpath -buildRoot $buildRoot -objpath $objpath -binpath $_
53+
4754
$skipTests = $skipTests -or (Test-Path Env:\SKIP_TESTS)
4855

4956
$global:exitcode = 0
5057

5158
if ($arch -eq "*") {
5259

53-
. "$PSScriptRoot\util.ps1"
5460
foreach ($arch in ("x86", "x64", "arm")) {
55-
ExecuteCommand "$PSScriptRoot\post_build.ps1 -arch $arch -flavor $flavor -srcpath ""$srcpath"" -binpath ""$binpath"" -objpath ""$objpath"" -srcsrvcmdpath ""$srcsrvcmdpath"" -bvtcmdpath ""$bvtcmdpath"" -repo ""$repo""" -logFile ""$logFile""
61+
ExecuteCommand "$PSScriptRoot\post_build.ps1 -arch $arch -flavor $flavor -srcpath ""$srcpath"" -buildRoot ""$buildRoot"" -objpath ""$objpath"" -srcsrvcmdpath ""$srcsrvcmdpath"" -bvtcmdpath ""$bvtcmdpath"" -repo ""$repo""" -logFile ""$logFile""
5662
}
5763

5864
} elseif ($flavor -eq "*") {
5965

60-
. "$PSScriptRoot\util.ps1"
6166
foreach ($flavor in ("debug", "test", "release")) {
62-
ExecuteCommand "$PSScriptRoot\post_build.ps1 -arch $arch -flavor $flavor -srcpath ""$srcpath"" -binpath ""$binpath"" -objpath ""$objpath"" -srcsrvcmdpath ""$srcsrvcmdpath"" -bvtcmdpath ""$bvtcmdpath"" -repo ""$repo""" -logFile ""$logFile""
67+
ExecuteCommand "$PSScriptRoot\post_build.ps1 -arch $arch -flavor $flavor -srcpath ""$srcpath"" -buildRoot ""$buildRoot"" -objpath ""$objpath"" -srcsrvcmdpath ""$srcsrvcmdpath"" -bvtcmdpath ""$bvtcmdpath"" -repo ""$repo""" -logFile ""$logFile""
6368
}
6469

6570
} else {
6671

67-
$OuterScriptRoot = $PSScriptRoot
68-
. "$PSScriptRoot\pre_post_util.ps1"
69-
7072
$buildName = ConstructBuildName -arch $arch -flavor $flavor -subtype $subtype
7173

7274
if (($logFile -eq "") -and (Test-Path Env:\TF_BUILD_BINARIESDIRECTORY)) {
@@ -86,12 +88,12 @@ if ($arch -eq "*") {
8688
WriteMessage "BVT Command : $bvtcmdpath"
8789
WriteMessage ""
8890

89-
$srcsrvcmd = ("{0} {1} {2} {3}\bin\{4}\*.pdb" -f $srcsrvcmdpath, $repo, $srcpath, $binpath, $buildName)
90-
$prefastlog = ("{0}\logs\PrefastCheck.{1}.log" -f $binpath, $buildName)
91+
$srcsrvcmd = ("{0} {1} {2} {3}\bin\{4}\*.pdb" -f $srcsrvcmdpath, $repo, $srcpath, $buildRoot, $buildName)
92+
$prefastlog = ("{0}\logs\PrefastCheck.{1}.log" -f $buildRoot, $buildName)
9193
$prefastcmd = "$PSScriptRoot\check_prefast_error.ps1 -directory $objpath -logFile $prefastlog"
9294

9395
# generate srcsrv
94-
if ((Test-Path $srcsrvcmdpath) -and (Test-Path $srcpath) -and (Test-Path $binpath)) {
96+
if ((Test-Path $srcsrvcmdpath) -and (Test-Path $srcpath) -and (Test-Path $buildRoot)) {
9597
ExecuteCommand($srcsrvcmd)
9698
}
9799

0 commit comments

Comments
 (0)