Skip to content

Commit 5d84067

Browse files
committed
Initial commit
0 parents  commit 5d84067

File tree

4,640 files changed

+2750254
-0
lines changed

Some content is hidden

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

4,640 files changed

+2750254
-0
lines changed

.gitattributes

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
*.baseline -crlf
2+
*.cmd -crlf
3+
test/*.js -crlf

.gitignore

+29
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
*.log
2+
*.sdf
3+
*.suo
4+
*.opensdf
5+
*.opendb
6+
*.user
7+
*.i
8+
Build/VCBuild/
9+
Build/ipch/
10+
Build/.vs/
11+
build_*.log
12+
build_*.wrn
13+
build_*.err
14+
buildchk.*
15+
buildfre.*
16+
Build/swum-cache.txt
17+
*.tlog/
18+
.*.swp
19+
sd.ini
20+
*.vcxproj.user
21+
test/*/*.baseline.rebase
22+
testout*
23+
*.dpl.*
24+
profile.dpl.*
25+
*.bc
26+
*.err
27+
Build/Chakra.Core.VC.opendb
28+
test/benchmarks/*.txt
29+
test/benchmarks/*.dpl

Build/Chakra.Build.Default.props

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<Import Project="Common.Build.Default.props"/>
4+
<PropertyGroup>
5+
<WindowsTargetPlatformVersion Condition="'$(Platform)'=='ARM'">10.0.10240.0</WindowsTargetPlatformVersion>
6+
7+
<!-- Always use Platform SDK for core builds -->
8+
<EventManifestXmlPath>$(WindowsSDK80Path)Include\um</EventManifestXmlPath>
9+
10+
</PropertyGroup>
11+
</Project>

Build/Chakra.Build.Paths.props

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<PropertyGroup>
4+
<ChakraCoreRootDirectory>$(MSBuildThisFileDirectory)..\</ChakraCoreRootDirectory>
5+
6+
<!-- ChakraCore -->
7+
<BuildConfig_ARMASM_Path>$(MSBuildThisFileDirectory)</BuildConfig_ARMASM_Path>
8+
<BuildConfigPropsPath>$(MSBuildThisFileDirectory)</BuildConfigPropsPath>
9+
10+
<ChakraBuildPathImported>true</ChakraBuildPathImported>
11+
12+
</PropertyGroup>
13+
</Project>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<Import Project="Common.Build.ProjectConfiguration.props" />
4+
</Project>
5+

Build/Chakra.Build.props

+45
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<Import Project="Common.Build.props"/>
4+
<PropertyGroup>
5+
<Win32_WinNTVersion Condition="'$(NtTargetVersion)'=='$(NtTargetVersion_Win7)'">0x0601</Win32_WinNTVersion>
6+
<Win32_WinNTVersion Condition="'$(NtTargetVersion)'=='$(NtTargetVersion_Win8)'">0x0602</Win32_WinNTVersion>
7+
<Win32_WinNTVersion Condition="'$(NtTargetVersion)'=='$(NtTargetVersion_Win10)'">0x0A00</Win32_WinNTVersion>
8+
</PropertyGroup>
9+
<PropertyGroup>
10+
<NoThrowNewLib>nothrownew.obj</NoThrowNewLib>
11+
</PropertyGroup>
12+
<PropertyGroup Condition="'$(RunCodeAnalysis)'=='' AND '$(Configuration)'=='Release'">
13+
<RunCodeAnalysis>$(BuildWithCodeAnalysis)</RunCodeAnalysis>
14+
</PropertyGroup>
15+
<ItemDefinitionGroup>
16+
<ClCompile>
17+
<PreprocessorDefinitions>
18+
%(PreprocessorDefinitions);
19+
_WIN32_WINNT=$(Win32_WinNTVersion);
20+
WINVER=$(Win32_WinNTVersion);
21+
WIN32_LEAN_AND_MEAN=1
22+
</PreprocessorDefinitions>
23+
<!-- REVIEW: These are warning are introduced when moving to VS2015 tools, may want to clean these up -->
24+
<DisableSpecificWarnings>
25+
%(DisableSpecificWarnings);
26+
4456; <!-- declaration of '' hides previous local declaration -->
27+
4457; <!-- declaration of '' hides function parameter -->
28+
4458; <!-- declaration of '' hides class memeber -->
29+
4091; <!-- '': ignore on lef of 'type' when no variable is declared -->
30+
4838; <!-- conversion from 'unsigned int' to 'int requires a narrowing conversion -->
31+
4499; <!-- explicit specialization cannot have a storage class (ignored) -->
32+
4463; <!-- overflow; assigning 1 to bit-field that can only hold values from -1 to 0 -->
33+
4311; <!-- 'type cast': pointer truncation from '' to '' -->
34+
4312; <!-- 'type cast': conversion from '' to '' of greater size -->
35+
</DisableSpecificWarnings>
36+
<!-- Use the debug CRT in debug build -->
37+
<RuntimeLibrary Condition="'$(Configuration)'=='Debug' AND '$(RuntimeLib)'!='static_library'">MultiThreadedDebugDLL</RuntimeLibrary>
38+
<RuntimeLibrary Condition="'$(Configuration)'=='Debug' AND '$(RuntimeLib)'=='static_library'">MultiThreadedDebug</RuntimeLibrary>
39+
<AdditionalIncludeDirectories>
40+
$(ChakraCoreRootDirectory)\lib\common\placeholder;
41+
%(AdditionalIncludeDirectories)
42+
</AdditionalIncludeDirectories>
43+
</ClCompile>
44+
</ItemDefinitionGroup>
45+
</Project>

Build/Chakra.Core.sln

+482
Large diffs are not rendered by default.

Build/Common.Build.Default.props

+75
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<!-- Constants -->
4+
<PropertyGroup>
5+
<NtTargetVersion_Win7 >0x601</NtTargetVersion_Win7>
6+
<NtTargetVersion_Win8 >0x602</NtTargetVersion_Win8>
7+
<NtTargetVersion_Win10>0xA00</NtTargetVersion_Win10>
8+
</PropertyGroup>
9+
10+
<!-- Auto tool set selection -->
11+
<PropertyGroup>
12+
<PlatformToolset Condition="'$(VisualStudioVersion)'=='11.0'">v110</PlatformToolset>
13+
<PlatformToolset Condition="'$(VisualStudioVersion)'=='12.0'">v120</PlatformToolset>
14+
<PlatformToolset Condition="'$(VisualStudioVersion)'=='14.0'">v140</PlatformToolset>
15+
</PropertyGroup>
16+
17+
<!-- Default ChakraDevConfigDir -->
18+
<PropertyGroup>
19+
<ChakraDevConfigDir Condition="'$(ChakraDevConfigDir)'==''">$(USERPROFILE)\ChakraDevConfig</ChakraDevConfigDir>
20+
</PropertyGroup>
21+
22+
<!-- Import user settings, can be used to override OutBaseDir/IntBaseDir-->
23+
<ImportGroup>
24+
<Import Project="$(ChakraDevConfigDir)\Chakra.Build.user.props" Condition="exists('$(ChakraDevConfigDir)\Chakra.Build.user.props')"/>
25+
</ImportGroup>
26+
27+
<!-- Common build settings -->
28+
<PropertyGroup>
29+
<OptimizedBuild />
30+
<OptimizedBuild Condition="'$(Configuration)'=='Release' or '$(Configuration)'=='Test'">true</OptimizedBuild>
31+
<NtTargetVersion>$(NtTargetVersion_Win7)</NtTargetVersion>
32+
33+
<!-- On ARM we depend an API that was added in Win8 timeframe, specifically GetCurrentThreadLimits.
34+
Note that for ARM we don't need to support running on Win7, so it's fine to require Win8 as minimum. -->
35+
<NtTargetVersion Condition="'$(Platform)'=='ARM' or '$(Platform)'=='Arm64'">$(NtTargetVersion_Win8)</NtTargetVersion>
36+
37+
<WindowsSDKDesktopARMSupport Condition="'$(Platform)'=='ARM'">true</WindowsSDKDesktopARMSupport>
38+
</PropertyGroup>
39+
<PropertyGroup Label="Configuration">
40+
<CharacterSet>Unicode</CharacterSet>
41+
</PropertyGroup>
42+
43+
<!-- Alternate platform names-->
44+
<PropertyGroup>
45+
<!-- PlatformPathName is used in OutDir/IntDir name-->
46+
<PlatformPathName>$(Platform)</PlatformPathName>
47+
<PlatformPathName Condition="'$(Platform)'=='Win32'">x86</PlatformPathName>
48+
<!-- PlatformPathNameAlt is used by Backend for architecture directory -->
49+
<PlatformPathNameAlt>$(Platform)</PlatformPathNameAlt>
50+
<PlatformPathNameAlt Condition="'$(Platform)'=='Win32'">i386</PlatformPathNameAlt>
51+
<PlatformPathNameAlt Condition="'$(Platform)'=='x64'">amd64</PlatformPathNameAlt>
52+
</PropertyGroup>
53+
54+
55+
<!-- Default output directories -->
56+
<PropertyGroup>
57+
<OutBaseDir Condition="'$(OutBaseDir)'!=''">$(OutBaseDir)\$(SolutionName)</OutBaseDir>
58+
<OutBaseDir Condition="'$(OutBaseDir)'==''">$(SolutionDir)VcBuild</OutBaseDir>
59+
<IntBaseDir Condition="'$(IntBaseDir)'==''">$(OutBaseDir)</IntBaseDir>
60+
</PropertyGroup>
61+
62+
<!-- Import generated build info -->
63+
<Import Project="$(TF_BUILD_BUILDDIRECTORY)\Chakra.Generated.BuildInfo.props" Condition="'$(TF_BUILD_BUILDDIRECTORY)' != '' AND exists('$(TF_BUILD_BUILDDIRECTORY)\Chakra.Generated.BuildInfo.props')" />
64+
65+
<!-- Output directories -->
66+
<PropertyGroup>
67+
<OutDirName Condition="'$(OutDirName)'==''">$(Configuration.ToLower())</OutDirName>
68+
<OutDir>$(OutBaseDir)\bin\$(PlatformPathName.ToLower())_$(OutDirName)\</OutDir>
69+
<IntDir>$(IntBaseDir)\obj\$(PlatformPathName.ToLower())_$(Configuration.ToLower())\$(MSBuildProjectName)\</IntDir>
70+
<OutDir Condition="'$(ConfigurationType)'=='StaticLibrary'">$(IntDir)</OutDir>
71+
<OutputPath>$(OutDir)</OutputPath>
72+
73+
<ChakraParserIntDir>$(IntDir)..\Chakra.Parser</ChakraParserIntDir>
74+
</PropertyGroup>
75+
</Project>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<ItemGroup Label="ProjectConfigurations">
4+
<ProjectConfiguration Include="Debug|Win32">
5+
<Configuration>Debug</Configuration>
6+
<Platform>Win32</Platform>
7+
</ProjectConfiguration>
8+
<ProjectConfiguration Include="Test|Win32">
9+
<Configuration>Test</Configuration>
10+
<Platform>Win32</Platform>
11+
</ProjectConfiguration>
12+
<ProjectConfiguration Include="Release|Win32">
13+
<Configuration>Release</Configuration>
14+
<Platform>Win32</Platform>
15+
</ProjectConfiguration>
16+
</ItemGroup>
17+
<ItemGroup Label="ProjectConfigurations">
18+
<ProjectConfiguration Include="Debug|x64">
19+
<Configuration>Debug</Configuration>
20+
<Platform>x64</Platform>
21+
</ProjectConfiguration>
22+
<ProjectConfiguration Include="Test|x64">
23+
<Configuration>Test</Configuration>
24+
<Platform>x64</Platform>
25+
</ProjectConfiguration>
26+
<ProjectConfiguration Include="Release|x64">
27+
<Configuration>Release</Configuration>
28+
<Platform>x64</Platform>
29+
</ProjectConfiguration>
30+
</ItemGroup>
31+
<ItemGroup Label="ProjectConfigurations">
32+
<ProjectConfiguration Include="Debug|ARM">
33+
<Configuration>Debug</Configuration>
34+
<Platform>ARM</Platform>
35+
</ProjectConfiguration>
36+
<ProjectConfiguration Include="Test|ARM">
37+
<Configuration>Test</Configuration>
38+
<Platform>ARM</Platform>
39+
</ProjectConfiguration>
40+
<ProjectConfiguration Include="Release|ARM">
41+
<Configuration>Release</Configuration>
42+
<Platform>ARM</Platform>
43+
</ProjectConfiguration>
44+
</ItemGroup>
45+
</Project>
46+

Build/Common.Build.props

+106
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<ItemDefinitionGroup>
4+
<ClCompile>
5+
<PreprocessorDefinitions>%(PreprocessorDefinitions);NOMINMAX;USE_EDGEMODE_JSRT</PreprocessorDefinitions>
6+
<!-- Some of our STDMETHOD can throw
7+
TODO: Code review STDMETHOD and separate out API that can throw and those that can't -->
8+
<PreprocessorDefinitions>%(PreprocessorDefinitions);COM_STDMETHOD_CAN_THROW</PreprocessorDefinitions>
9+
10+
<PreprocessorDefinitions Condition="'$(RuntimeLib)'=='static_library'">%(PreprocessorDefinitions);USE_STATIC_RUNTIMELIB</PreprocessorDefinitions>
11+
12+
<!-- /W4 -->
13+
<WarningLevel>Level4</WarningLevel>
14+
<!-- /WX -->
15+
<TreatWarningAsError>true</TreatWarningAsError>
16+
<!-- /GR- -->
17+
<RuntimeTypeInfo>false</RuntimeTypeInfo>
18+
<!-- /Zi -->
19+
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
20+
<!-- /EHsc- -->
21+
<ExceptionHandling>SyncCThrow</ExceptionHandling>
22+
<!-- /Gz -->
23+
<CallingConvention Condition="'$(Platform)'=='Win32'">StdCall</CallingConvention>
24+
<!-- /Zp8 -->
25+
<StructMemberAlignment>8Bytes</StructMemberAlignment>
26+
<!-- /GS -->
27+
<BufferSecurityCheck>true</BufferSecurityCheck>
28+
<!-- /Gy -->
29+
<FunctionLevelLinking>true</FunctionLevelLinking>
30+
<!-- /GF -->
31+
<StringPooling>true</StringPooling>
32+
<!-- /MD -->
33+
<RuntimeLibrary Condition="'$(RuntimeLib)'!='static_library'">MultiThreadedDLL</RuntimeLibrary>
34+
<RuntimeLibrary Condition="'$(RuntimeLib)'=='static_library'">MultiThreaded</RuntimeLibrary>
35+
36+
<!-- We don't use any metadata -->
37+
<AdditionalUsingDirectories />
38+
39+
<AdditionalOptions>%(AdditionalOptions) /Zm125</AdditionalOptions>
40+
<AdditionalOptions>%(AdditionalOptions) /Yl$(TargetName)</AdditionalOptions>
41+
<!-- Separate global variable for linker -->
42+
<AdditionalOptions>%(AdditionalOptions) /Gw</AdditionalOptions>
43+
44+
<ProgramDataBaseFileName Condition="'$(ConfigurationType)'=='StaticLibrary'">$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName>
45+
<ProgramDataBaseFileName Condition="'$(ConfigurationType)'!='StaticLibrary'">$(IntDir)</ProgramDataBaseFileName>
46+
</ClCompile>
47+
<ResourceCompile>
48+
<PreprocessorDefinitions Condition="'$(ChakraVersionBuildNumber)'!=''">%(PreprocessorDefinitions);CHAKRA_VERSION_BUILD_NUMBER=$(ChakraVersionBuildNumber)</PreprocessorDefinitions>
49+
<PreprocessorDefinitions Condition="'$(ChakraVersionBuildQFENumber)'!=''">%(PreprocessorDefinitions);CHAKRA_VERSION_BUILD_QFE=$(ChakraVersionBuildQFENumber)</PreprocessorDefinitions>
50+
<PreprocessorDefinitions Condition="'$(ChakraVersionBuildCommit)'!=''">%(PreprocessorDefinitions);CHAKRA_VERSION_BUILD_COMMIT=$(ChakraVersionBuildCommit)</PreprocessorDefinitions>
51+
<PreprocessorDefinitions Condition="'$(ChakraVersionBuildDate)'!=''">%(PreprocessorDefinitions);CHAKRA_VERSION_BUILD_DATE=$(ChakraVersionBuildDate)</PreprocessorDefinitions>
52+
</ResourceCompile>
53+
<MASM>
54+
<!-- /Cx -->
55+
<PreserveIdentifierCase>3</PreserveIdentifierCase>
56+
</MASM>
57+
<Link>
58+
<TreatLinkerWarningAsErrors>true</TreatLinkerWarningAsErrors>
59+
<GenerateDebugInformation>true</GenerateDebugInformation>
60+
<EnableCOMDATFolding Condition="'$(OptimizedBuild)'=='true'">true</EnableCOMDATFolding>
61+
<OptimizeReferences Condition="'$(OptimizedBuild)'=='true'">true</OptimizeReferences>
62+
63+
<MinimumRequiredVersion Condition="'$(NtTargetVersion)'=='$(NtTargetVersion_Win7)'" >6.1</MinimumRequiredVersion>
64+
<MinimumRequiredVersion Condition="'$(NtTargetVersion)'=='$(NtTargetVersion_Win8)'" >6.2</MinimumRequiredVersion>
65+
<MinimumRequiredVersion Condition="'$(NtTargetVersion)'=='$(NtTargetVersion_Win10)'" >10.00</MinimumRequiredVersion>
66+
67+
<!-- Always set the checksum -->
68+
<AdditionalOptions>%(AdditionalOptions) /release</AdditionalOptions>
69+
</Link>
70+
</ItemDefinitionGroup>
71+
<!-- chk build flags -->
72+
<ItemDefinitionGroup Condition="'$(OptimizedBuild)'!='true'">
73+
<ClCompile>
74+
<Optimization>Disabled</Optimization>
75+
<PreprocessorDefinitions>%(PreprocessorDefinitions);_DEBUG;DBG;DBG_DUMP</PreprocessorDefinitions>
76+
</ClCompile>
77+
<ResourceCompile>
78+
<PreprocessorDefinitions>%(PreprocessorDefinitions);DBG;ENABLE_DEBUG_CONFIG_OPTIONS=1</PreprocessorDefinitions>
79+
</ResourceCompile>
80+
</ItemDefinitionGroup>
81+
<!-- fre and fretest build flags -->
82+
<ItemDefinitionGroup Condition="'$(OptimizedBuild)'=='true'">
83+
<ClCompile>
84+
<PreprocessorDefinitions>%(PreprocessorDefinitions);NDEBUG</PreprocessorDefinitions>
85+
<PreprocessorDefinitions Condition="'$(Configuration)'=='Test'">%(PreprocessorDefinitions);ENABLE_DEBUG_CONFIG_OPTIONS=1</PreprocessorDefinitions>
86+
<Optimization>MaxSpeed</Optimization>
87+
<WholeProgramOptimization>true</WholeProgramOptimization>
88+
</ClCompile>
89+
<ResourceCompile>
90+
<PreprocessorDefinitions Condition="'$(Configuration)'=='Test'">%(PreprocessorDefinitions);ENABLE_DEBUG_CONFIG_OPTIONS=1</PreprocessorDefinitions>
91+
</ResourceCompile>
92+
<Link>
93+
<LinkTimeCodeGeneration Condition="'$(PlatformToolset)'=='v120' OR '$(TF_BUILD)'!=''">UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
94+
<LinkTimeCodeGeneration Condition="'$(PlatformToolset)'!='v120'">UseFastLinkTimeCodeGeneration</LinkTimeCodeGeneration>
95+
</Link>
96+
<Lib>
97+
<LinkTimeCodeGeneration>true</LinkTimeCodeGeneration>
98+
</Lib>
99+
</ItemDefinitionGroup>
100+
<ItemGroup Condition="'$(ConfigurationType)'=='DynamicLibrary' OR '$(ConfigurationType)'=='Application'">
101+
<Clean Include="$(OutDir)$(TargetName).lib" />
102+
<Clean Include="$(OutDir)$(TargetName).exp" />
103+
<Clean Include="$(OutDir)$(TargetName).ipdb" />
104+
<Clean Include="$(OutDir)$(TargetName).iobj" />
105+
</ItemGroup>
106+
</Project>

Build/armasm.props

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<PropertyGroup
4+
Condition="'$(ARMASMBeforeTargets)' == '' and '$(ARMASMAfterTargets)' == '' and '$(ConfigurationType)' != 'Makefile'">
5+
<ARMASMBeforeTargets>Midl</ARMASMBeforeTargets>
6+
<ARMASMAfterTargets>CustomBuild</ARMASMAfterTargets>
7+
</PropertyGroup>
8+
<ItemDefinitionGroup>
9+
<ARMASM>
10+
<GenerateDebugInformation>true</GenerateDebugInformation>
11+
<ObjectFileName>$(IntDir)%(FileName).obj</ObjectFileName>
12+
<PPFileName>$(IntDir)%(FileName).i</PPFileName>
13+
<ErrorReporting>0</ErrorReporting>
14+
<CommandLineTemplate Condition="'$(Platform)' == 'Arm'">armasm.exe [AllOptions] [AdditionalOptions] [Inputs]</CommandLineTemplate>
15+
<CommandLineTemplate Condition="'$(Platform)' == 'Arm64'">armasm64.exe [AllOptions] [AdditionalOptions] [Inputs]</CommandLineTemplate>
16+
<CommandLineTemplate Condition="'$(Platform)' != 'Arm' AND '$(Platform)' != 'Arm64'">
17+
echo ARMASM not supported on this platform
18+
exit 1
19+
</CommandLineTemplate>
20+
<ExecutionDescription>Assembling %(Identity)...</ExecutionDescription>
21+
</ARMASM>
22+
</ItemDefinitionGroup>
23+
</Project>

0 commit comments

Comments
 (0)