Skip to content
This repository has been archived by the owner on Oct 15, 2020. It is now read-only.

Commit

Permalink
chakrashim: ChakraCore release/1.9@c6ae7416fb
Browse files Browse the repository at this point in the history
PR-URL: #449
Reviewed-By: Jimmy Thomson <jithomso@microsoft.com>
Reviewed-By: Hitesh Kanwathirtha <hiteshk@microsoft.com>
Reviewed-By: Taylor Woll <taylor.woll@microsoft.com>
  • Loading branch information
kfarnung committed Jan 16, 2018
1 parent 34a05e7 commit c642810
Show file tree
Hide file tree
Showing 1,317 changed files with 115,652 additions and 55,346 deletions.
11 changes: 10 additions & 1 deletion deps/chakrashim/core/Build/Chakra.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,14 @@
%(PreprocessorDefinitions);
DISABLE_JIT=1
</PreprocessorDefinitions>
<PreprocessorDefinitions Condition="'$(BuildScriptDebug)'=='false'">
%(PreprocessorDefinitions);
BUILD_WITHOUT_SCRIPT_DEBUG=1
</PreprocessorDefinitions>
<PreprocessorDefinitions Condition="'$(BuildLite)'=='true'">
%(PreprocessorDefinitions);
CHAKRACORE_LITE
</PreprocessorDefinitions>
<PreprocessorDefinitions Condition="'$(IntlICU)'=='true'">
%(PreprocessorDefinitions);
INTL_ICU=1
Expand All @@ -39,11 +47,12 @@
GLOBAL_ENABLE_WRITE_BARRIER=1
</PreprocessorDefinitions>
<PreprocessorDefinitions Condition="'$(NTDDIVersion)'!=''" >%(PreprocessorDefinitions);NTDDI_VERSION=$(NTDDIVersion)</PreprocessorDefinitions>
<!-- REVIEW: These are warning are introduced when moving to VS2015 tools, may want to clean these up -->
<!-- REVIEW: These warnings are introduced when moving to VS2015 tools, may want to clean these up -->
<DisableSpecificWarnings>
%(DisableSpecificWarnings);
4458; <!-- declaration of '' hides class member -->
4312; <!-- 'type cast': conversion from '' to '' of greater size -->
4800; <!-- type' : forcing value to bool 'true' or 'false' (performance warning) [always off in 2017 by default, but warns in 2015 -->
</DisableSpecificWarnings>
<!-- Use the debug CRT in debug build -->
<RuntimeLibrary Condition="'$(Configuration)'=='Debug' AND '$(RuntimeLib)'!='static_library'">MultiThreadedDebugDLL</RuntimeLibrary>
Expand Down
6 changes: 5 additions & 1 deletion deps/chakrashim/core/Build/Chakra.Core.sln
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.26228.4
MinimumVisualStudioVersion = 10.0.40219.1
MinimumVisualStudioVersion = 14.0.00000.0
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ChakraCore", "..\bin\ChakraCore\ChakraCore.vcxproj", "{EA882C8D-81FC-42FE-ABD5-2666DB933FDB}"
ProjectSection(ProjectDependencies) = postProject
{1876E800-AD77-48C4-A2F7-E5265F24AC38} = {1876E800-AD77-48C4-A2F7-E5265F24AC38}
Expand All @@ -11,6 +11,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ChakraCore", "..\bin\Chakra
{2F6A1847-BFAF-4B8A-9463-AC39FB46B96A} = {2F6A1847-BFAF-4B8A-9463-AC39FB46B96A}
{6979EC58-7A28-465C-A694-F3323A1F5401} = {6979EC58-7A28-465C-A694-F3323A1F5401}
{F6FAD160-5A4B-476A-93AC-33E0B3A18C0C} = {F6FAD160-5A4B-476A-93AC-33E0B3A18C0C}
{F48B3491-81DF-4F49-B35F-3308CBE6A379} = {F48B3491-81DF-4F49-B35F-3308CBE6A379}
{18CF279F-188D-4655-B03D-74F65388E7D1} = {18CF279F-188D-4655-B03D-74F65388E7D1}
{ABC904AD-9415-46F8-AA23-E33193F81F7C} = {ABC904AD-9415-46F8-AA23-E33193F81F7C}
{8C61E4E7-F0D6-420D-A352-3E6E50D406DD} = {8C61E4E7-F0D6-420D-A352-3E6E50D406DD}
Expand Down Expand Up @@ -755,4 +756,7 @@ Global
{02D4FD92-AD34-40CA-85DF-4D6C7E3A1F22} = {546172B2-F084-4363-BE35-06010663D319}
{F48B3491-81DF-4F49-B35F-3308CBE6A379} = {D8216B93-BD6E-4293-8D98-79CEF7CF66BC}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {1F6CA1BC-6C01-4C82-8505-6A7690EBD556}
EndGlobalSection
EndGlobal
9 changes: 8 additions & 1 deletion deps/chakrashim/core/Build/Common.Build.Default.props
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@
<Import Project="$(ChakraDevConfigDir)\Chakra.Build.user.props" Condition="exists('$(ChakraDevConfigDir)\Chakra.Build.user.props')"/>
</ImportGroup>

<!-- Configurations -->
<PropertyGroup Condition="'$(BuildLite)'=='true'">
<BuildJIT>false</BuildJIT>
<BuildScriptDebug>false</BuildScriptDebug>
</PropertyGroup>
<!-- Common build settings -->
<PropertyGroup>
<DebugBuild />
Expand Down Expand Up @@ -62,7 +67,9 @@
<OutBaseDir Condition="'$(OutBaseDir)'!=''">$(OutBaseDir)\$(SolutionName)</OutBaseDir>
<OutBaseDir Condition="'$(OutBaseDir)'==''">$(SolutionDir)VcBuild</OutBaseDir>
<OutBaseDir Condition="'$(Clang)'!=''">$(OutBaseDir).$(Clang)</OutBaseDir>
<OutBaseDir Condition="'$(BuildJIT)'=='false'">$(OutBaseDir).NoJIT</OutBaseDir>
<OutBaseDir Condition="'$(BuildLite)'=='true'">$(OutBaseDir).Lite</OutBaseDir>
<OutBaseDir Condition="'$(BuildLite)'!='true' and '$(BuildJIT)'=='false'">$(OutBaseDir).NoJIT</OutBaseDir>
<OutBaseDir Condition="'$(BuildLite)'!='true' and '$(BuildScriptDebug)'=='false'">$(OutBaseDir).NoScriptDebug</OutBaseDir>
<OutBaseDir Condition="'$(ForceSWB)'=='true'">$(OutBaseDir).SWB</OutBaseDir>
<IntBaseDir Condition="'$(IntBaseDir)'==''">$(OutBaseDir)</IntBaseDir>
</PropertyGroup>
Expand Down
14 changes: 14 additions & 0 deletions deps/chakrashim/core/Build/Common.Build.ProjectConfiguration.props
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,20 @@
<Platform>ARM</Platform>
</ProjectConfiguration>
</ItemGroup>
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|ARM64">
<Configuration>Debug</Configuration>
<Platform>ARM64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Test|ARM64">
<Configuration>Test</Configuration>
<Platform>ARM64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|ARM64">
<Configuration>Release</Configuration>
<Platform>ARM64</Platform>
</ProjectConfiguration>
</ItemGroup>
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|CHPE">
<Configuration>Debug</Configuration>
Expand Down
4 changes: 2 additions & 2 deletions deps/chakrashim/core/Build/Common.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@
<ProgramDataBaseFileName Condition="'$(ConfigurationType)'=='StaticLibrary'">$(IntDir)$(TargetName).pdb</ProgramDataBaseFileName>
<ProgramDataBaseFileName Condition="'$(ConfigurationType)'!='StaticLibrary'">$(IntDir)</ProgramDataBaseFileName>

<!-- ======== For Code Covearge ======== -->
<!-- ======== For Code Coverage ======== -->
<PreprocessorDefinitions Condition="'$(ENABLE_CODECOVERAGE)'=='true'">
%(PreprocessorDefinitions);
BYTECODE_TESTING=1
Expand Down Expand Up @@ -113,7 +113,7 @@
<AdditionalOptions>%(AdditionalOptions) /release</AdditionalOptions>
<!-- Ignore Linker warning: This object file does not define any previously undefined public symbols -->
<AdditionalOptions>%(AdditionalOptions) /ignore:4221</AdditionalOptions>
<!-- ======== For Code Covearge ======== -->
<!-- ======== For Code Coverage ======== -->
<AdditionalOptions Condition="'$(ENABLE_CODECOVERAGE)'=='true'">%(AdditionalOptions) /DEBUGTYPE:CV,FIXUP</AdditionalOptions>
</Link>
<Lib>
Expand Down
2 changes: 1 addition & 1 deletion deps/chakrashim/core/Build/NuGet/.pack-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.7.6
1.9.0
2 changes: 1 addition & 1 deletion deps/chakrashim/core/Build/scripts/finalize_build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

param (
[Parameter(Mandatory=$True)]
[ValidateSet("x86", "x64", "arm")]
[ValidateSet("x86", "x64", "arm", "arm64")]
[string]$arch,

[Parameter(Mandatory=$True)]
Expand Down
3 changes: 2 additions & 1 deletion deps/chakrashim/core/Build/scripts/init_build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# before running the Pre-Build script.

param (
[ValidateSet("x86", "x64", "arm", "")]
[ValidateSet("x86", "x64", "arm", "arm64", "")]
[string]$arch = "",
[ValidateSet("debug", "release", "test", "codecoverage", "")]
[string]$flavor = "",
Expand Down Expand Up @@ -178,6 +178,7 @@ New-Item -ItemType Directory -Force -Path (Join-Path $SourcesDirectory "test\log
New-Item -ItemType Directory -Force -Path (Join-Path $BinariesDirectory "buildlogs")
New-Item -ItemType Directory -Force -Path (Join-Path $BinariesDirectory "logs")

New-Item -ItemType Directory -Force -Path (Join-Path $DropPath "bin")
$FlavorBuildIncompleteFile = Join-Path $DropPath "${BuildType}.incomplete"

if (-not (Test-Path $FlavorBuildIncompleteFile)) {
Expand Down
4 changes: 2 additions & 2 deletions deps/chakrashim/core/Build/scripts/post_build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# Finalize Build Script, which should be invoked at the very end of the build.

param (
[ValidateSet("x86", "x64", "arm", "*")]
[ValidateSet("x86", "x64", "arm", "arm64", "*")]
[string]$arch = "*",

[ValidateSet("debug", "release", "test", "codecoverage", "*")]
Expand Down Expand Up @@ -59,7 +59,7 @@ $global:exitcode = 0

if ($arch -eq "*") {

foreach ($arch in ("x86", "x64", "arm")) {
foreach ($arch in ("x86", "x64", "arm", "arm64")) {
ExecuteCommand "$PSScriptRoot\post_build.ps1 -arch $arch -flavor $flavor -srcpath ""$srcpath"" -buildRoot ""$buildRoot"" -objpath ""$objpath"" -srcsrvcmdpath ""$srcsrvcmdpath"" -bvtcmdpath ""$bvtcmdpath"" -repo ""$repo""" -logFile ""$logFile""
}

Expand Down
2 changes: 1 addition & 1 deletion deps/chakrashim/core/Build/scripts/pre_build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

param (
[Parameter(Mandatory=$True)]
[ValidateSet("x86", "x64", "arm")]
[ValidateSet("x86", "x64", "arm", "arm64")]
[string]$arch,
[Parameter(Mandatory=$True)]
[ValidateSet("debug", "release", "test", "codecoverage")]
Expand Down
4 changes: 2 additions & 2 deletions deps/chakrashim/core/Build/scripts/run_build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
# Use this script to run a build for the given BuildType (arch, flavor, subtype)

param (
[ValidateSet("x86", "x64", "arm")]
[ValidateSet("x86", "x64", "arm", "arm64")]
[Parameter(Mandatory=$True)]
[string]$arch,
# We do not use ValidateSet here because this $flavor param is used to name the BuildConfuration
# We do not use ValidateSet here because this $flavor param is used to name the BuildConfiguration
# from the solution file. MsBuild will determine whether it is valid.
[Parameter(Mandatory=$True)]
[string]$flavor,
Expand Down
51 changes: 36 additions & 15 deletions deps/chakrashim/core/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -126,17 +126,17 @@ function(clr_unknown_arch)
message(FATAL_ERROR "Only AMD64, ARM and I386 are supported")
endfunction()

if(INTL_ICU_SH)
unset(INTL_ICU_SH CACHE) # don't cache
add_definitions(-DINTL_ICU=1)
set(ICU_INTL_ENABLED 1)
if(NOINTL_ICU_SH)
unset(NOINTL_ICU_SH CACHE) # don't cache
set(ICU_INTL_DISABLED 1)
endif()

if(ICU_INCLUDE_PATH)
add_definitions(-DHAS_REAL_ICU=1)
set(ICU_CC_PATH "${ICU_INCLUDE_PATH}/../lib/")
find_library(ICUUC icuuc PATHS ${ICU_CC_PATH} NO_DEFAULT_PATH)
if(ICU_INTL_ENABLED)
if(NOT ICU_INTL_DISABLED)
add_definitions(-DINTL_ICU=1)
find_library(ICU18 icui18n PATHS ${ICU_CC_PATH} NO_DEFAULT_PATH)
# icu header files are either located under the same folder or i18n is under a relative path
# TODO (unlikely): shall we add `--icu-intl` to build.sh ?
Expand All @@ -150,30 +150,25 @@ if(ICU_INCLUDE_PATH)
if (NOT ICUDATA)
set(ICUDATA "")
endif()
find_library(ICUTOOLS icutools PATHS ${ICU_CC_PATH} NO_DEFAULT_PATH)
if (NOT ICUTOOLS)
set(ICUTOOLS "")
endif()
set(ICULIB
${ICUUC}
${ICU18}
${ICUDATA}
${ICUTOOLS}
)
endif()
endif()

set(CLR_CMAKE_PLATFORM_XPLAT 1)
if(CC_TARGETS_AMD64)
add_definitions(-D_M_X64_OR_ARM64)
add_definitions(-DTARGET_64)
add_compile_options(-msse4.2)

if(NOT CMAKE_BUILD_TYPE STREQUAL Release)
set(CAN_BUILD_WABT 1)
endif()
elseif(CC_TARGETS_X86)
add_definitions(-D__i686__)
add_definitions(-D_M_IX86_OR_ARM32)
add_definitions(-DTARGET_32)
add_compile_options(-arch i386)
add_compile_options(-msse3)

Expand All @@ -182,7 +177,7 @@ elseif(CC_TARGETS_X86)
)
elseif(CC_TARGETS_ARM)
add_definitions(-D__arm__)
add_definitions(-D_M_IX86_OR_ARM32)
add_definitions(-DTARGET_32)
add_definitions(-D_M_ARM32_OR_ARM64)
if(CC_TARGET_OS_OSX)
add_compile_options(-arch arm)
Expand All @@ -203,7 +198,8 @@ if(CC_TARGET_OS_LINUX OR CC_TARGET_OS_ANDROID)
if(NOT NO_ICU_PATH_GIVEN)
if(NOT CC_EMBED_ICU)
set(ICULIB "icuuc")
if(ICU_INTL_ENABLED)
if(NOT ICU_INTL_DISABLED)
add_definitions(-DINTL_ICU=1)
set(ICULIB
"${ICULIB}"
"icui18n")
Expand Down Expand Up @@ -346,9 +342,18 @@ if(CLR_CMAKE_PLATFORM_XPLAT)
add_compile_options(
-fasm-blocks
-fms-extensions
-fwrapv # Treat signed integer overflow as two's complement
-fwrapv # Treat signed integer overflow as two's complement
)

# Only disable RTTI in release builds so that TrackAlloc works for debug and test builds
# Also disable RTTI when building a shared library
# TODO: why does the shared library break with rtti disabled?
if(CMAKE_BUILD_TYPE STREQUAL Release)
if(STATIC_LIBRARY OR ICU_INTL_DISABLED)
add_compile_options(-fno-rtti)
endif()
endif()

# Clang -fsanitize.
if (CLANG_SANITIZE_SH)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=${CLANG_SANITIZE_SH}")
Expand Down Expand Up @@ -486,5 +491,21 @@ add_definitions(
-DNO_PAL_MINMAX
-DPAL_STDCPP_COMPAT
)

if (ENABLE_JS_LTTNG_SH)
unset(ENABLE_JS_LTTNG_SH CACHE)
include_directories (
${CMAKE_CURRENT_SOURCE_DIR}/out/lttng
)
add_subdirectory ($ENV{TARGET_PATH}/lttng ${CMAKE_CURRENT_BINARY_DIR}/lttng)

add_definitions(
-DENABLE_JS_ETW
-DENABLE_JS_LTTNG
)
set(USE_LTTNG "1")
endif()

add_subdirectory (lib)

add_subdirectory (bin)
4 changes: 2 additions & 2 deletions deps/chakrashim/core/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ Changes that make it into our ChakraCore GitHub master branch have a short journ

## Issue Labels

- [`Accepting PRs`](https://github.com/Microsoft/ChakraCore/labels/Accepting%20PRs): these issues are specifically well suited for outside contributors.
- [`Your first PR`](https://github.com/Microsoft/ChakraCore/labels/Your%20first%20PR): these issues are small and appropriate for people who wish to familiarize themselves with GitHub pull requests and/or ChakraCore's contributor guidelines, build process, and running tests. We're here to help you get started in open source.
- [`help wanted`](https://github.com/Microsoft/ChakraCore/labels/help%20wanted): these issues are specifically well suited for outside contributors.
- [`good first issue`](https://github.com/Microsoft/ChakraCore/labels/good%20first%20issue): these issues are small and appropriate for people who wish to familiarize themselves with GitHub pull requests and/or ChakraCore's contributor guidelines, build process, and running tests. We're here to help you get started in open source.

You are welcome to work on issues that are not tagged with these labels. However, issues without these labels are often deeply involved with the requirements of the various components of ChakraCore. Therefore, please be sure to touch base with a maintainer via comments on the issue before attempting to solve it.

Expand Down
1 change: 0 additions & 1 deletion deps/chakrashim/core/LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
ChakraCore
The MIT License (MIT)

Copyright (c) Microsoft Corporation
Expand Down
2 changes: 1 addition & 1 deletion deps/chakrashim/core/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ If you believe you have found a security issue in ChakraCore, please share it wi

## [Building ChakraCore](https://github.com/Microsoft/ChakraCore/wiki/Building-ChakraCore)

You can build ChakraCore on Windows 7 SP1 or above, and Windows Server 2008 R2 or above, with either Visual Studio 2013 or 2015 with C++ support installed. Once you have Visual Studio installed:
You can build ChakraCore on Windows 7 SP1 or above, and Windows Server 2008 R2 or above, with either Visual Studio 2015 or 2017 with C++ support installed. Once you have Visual Studio installed:

* Clone ChakraCore through ```git clone https://github.com/Microsoft/ChakraCore.git```
* Open `Build\Chakra.Core.sln` in Visual Studio
Expand Down
17 changes: 17 additions & 0 deletions deps/chakrashim/core/RegenAllByteCode.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,14 @@ if %errorlevel% neq 0 (
)
popd

pushd lib\Runtime\Library\JsBuiltIn
call GenByteCode.cmd
if %errorlevel% neq 0 (
echo There was an error when regenerating bytecode header.
exit /b 1
)
popd

:: ch.exe x64_debug (NoJIT)
:: ch.exe x86_debug (NoJIT)
call jenkins\buildone.cmd x64 debug "/p:BuildJIT=false"
Expand All @@ -61,6 +69,15 @@ if %errorlevel% neq 0 (
)
popd

:: Generate BuiltIn NoJIT Bytecodes using ch.exe (NoJIT)
pushd lib\Runtime\Library\JsBuiltIn
call GenByteCode.cmd -nojit
if %errorlevel% neq 0 (
echo There was an error when regenerating bytecode header for NoJIT.
exit /b 1
)
popd

popd

endlocal
5 changes: 5 additions & 0 deletions deps/chakrashim/core/bin/ChakraCore/ChakraCore.def
Original file line number Diff line number Diff line change
Expand Up @@ -55,3 +55,8 @@ JsInitializeJITServer
JsCreateSharedArrayBufferWithSharedContent
JsGetSharedArrayBufferContent
JsReleaseSharedArrayBufferContentHandle

JsLessThan
JsLessThanOrEqual

JsCreateEnhancedFunction
2 changes: 1 addition & 1 deletion deps/chakrashim/core/bin/ChakraCore/ChakraCore.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@
<ProjectReference Include="..\..\lib\Runtime\ByteCode\Chakra.Runtime.ByteCode.vcxproj">
<Project>{706083f7-6aa4-4558-a153-6352ef9110f5}</Project>
</ProjectReference>
<ProjectReference Include="..\..\lib\Runtime\Debug\Chakra.Runtime.Debug.vcxproj">
<ProjectReference Include="..\..\lib\Runtime\Debug\Chakra.Runtime.Debug.vcxproj" Condition="'$(BuildScriptDebug)'!='false'">
<Project>{8C61E4E7-F0D6-420D-A352-3E6E50D406DD}</Project>
</ProjectReference>
<ProjectReference Include="..\..\lib\Runtime\Language\Chakra.Runtime.Language.vcxproj">
Expand Down
Loading

0 comments on commit c642810

Please sign in to comment.