summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGaurav Khanna <gkhanna@microsoft.com>2016-08-22 09:45:43 -0700
committerGaurav Khanna <gkhanna@microsoft.com>2016-08-23 22:54:56 -0700
commitad7c799eb9a2ae1e7371c75655d4b244e196b239 (patch)
treec2277470b41fce032020eab4a85dbcda5ad82fdc
parentd7821eb792915fa64ff6219c7ce4b9abc195ab7e (diff)
downloadcoreclr-ad7c799eb9a2ae1e7371c75655d4b244e196b239.tar.gz
coreclr-ad7c799eb9a2ae1e7371c75655d4b244e196b239.tar.bz2
coreclr-ad7c799eb9a2ae1e7371c75655d4b244e196b239.zip
Initial commit to build Win32 Arm CoreCLR
-rw-r--r--CMakeLists.txt22
-rw-r--r--Documentation/building/windows-instructions.md8
-rw-r--r--build.cmd18
-rw-r--r--clrdefinitions.cmake4
-rw-r--r--dir.props5
-rw-r--r--functions.cmake31
-rw-r--r--src/.nuget/Microsoft.NETCore.ILAsm/Microsoft.NETCore.ILAsm.builds4
-rw-r--r--src/.nuget/Microsoft.NETCore.ILAsm/Microsoft.NETCore.ILAsm.pkgproj5
-rw-r--r--src/.nuget/Microsoft.NETCore.ILDAsm/Microsoft.NETCore.ILDAsm.builds4
-rw-r--r--src/.nuget/Microsoft.NETCore.ILDAsm/Microsoft.NETCore.ILDAsm.pkgproj5
-rw-r--r--src/.nuget/Microsoft.NETCore.Jit/Microsoft.NETCore.Jit.builds4
-rw-r--r--src/.nuget/Microsoft.NETCore.Jit/Microsoft.NETCore.Jit.pkgproj5
-rw-r--r--src/.nuget/Microsoft.NETCore.Runtime.CoreCLR/Microsoft.NETCore.Runtime.CoreCLR.builds4
-rw-r--r--src/.nuget/Microsoft.NETCore.Runtime.CoreCLR/Microsoft.NETCore.Runtime.CoreCLR.pkgproj9
-rw-r--r--src/.nuget/Microsoft.NETCore.TestHost/Microsoft.NETCore.TestHost.builds4
-rw-r--r--src/.nuget/Microsoft.NETCore.TestHost/Microsoft.NETCore.TestHost.pkgproj5
-rw-r--r--src/ToolBox/superpmi/superpmi-shared/compileresult.cpp4
-rw-r--r--src/debug/ee/wks/CMakeLists.txt56
-rw-r--r--src/gcinfo/CMakeLists.txt6
-rw-r--r--src/pal/tools/gen-buildsys-win.bat2
-rw-r--r--src/unwinder/CMakeLists.txt3
-rw-r--r--src/vm/CMakeLists.txt9
-rw-r--r--src/vm/arm/memcpy.asm2
-rw-r--r--src/vm/arm/patchedcode.asm4
-rw-r--r--src/vm/wks/CMakeLists.txt133
25 files changed, 269 insertions, 87 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 56c22838df..ab86511a0e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -11,6 +11,10 @@ project(CoreCLR)
# Include cmake functions
include(functions.cmake)
+message(STATUS "CMAKE_VS_PLATFORM_TOOLSET is ${CMAKE_VS_PLATFORM_TOOLSET}")
+message(STATUS "CMAKE_VS_PLATFORM_NAME is ${CMAKE_VS_PLATFORM_NAME}")
+message(STATUS "CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION is ${CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION}")
+
# Set commonly used directory names
set(CLR_DIR ${CMAKE_CURRENT_SOURCE_DIR})
set(VM_DIR ${CMAKE_CURRENT_SOURCE_DIR}/src/vm)
@@ -33,7 +37,19 @@ endif()
# Ensure other tools are present
if (WIN32)
- enable_language(ASM_MASM)
+ if(CLR_CMAKE_HOST_ARCH STREQUAL arm)
+ # Explicitly specify the assembler to be used for Arm32 compile
+ file(TO_CMAKE_PATH "$ENV{VCINSTALLDIR}\\bin\\x86_arm\\armasm.exe" CMAKE_ASM_COMPILER)
+
+ set(CMAKE_ASM_MASM_COMPILER ${CMAKE_ASM_COMPILER})
+ message(CMAKE_ASM_MASM_COMPILER explicitly set to: ${CMAKE_ASM_MASM_COMPILER})
+
+ # Enable generic assembly compilation to avoid CMake generate VS proj files that explicitly
+ # use ml[64].exe as the assembler.
+ enable_language(ASM)
+ else()
+ enable_language(ASM_MASM)
+ endif()
# Ensure that MC is present
find_program(MC mc)
@@ -186,6 +202,8 @@ elseif(WIN32)
set(CLR_CMAKE_PLATFORM_ARCH_AMD64 1)
elseif(CLR_CMAKE_HOST_ARCH STREQUAL x86)
set(CLR_CMAKE_PLATFORM_ARCH_I386 1)
+ elseif(CLR_CMAKE_HOST_ARCH STREQUAL arm)
+ set(CLR_CMAKE_PLATFORM_ARCH_ARM 1)
elseif(CLR_CMAKE_HOST_ARCH STREQUAL arm64)
set(CLR_CMAKE_PLATFORM_ARCH_ARM64 1)
else()
@@ -542,4 +560,4 @@ if(CLR_CMAKE_BUILD_TESTS)
add_subdirectory(tests)
endif(CLR_CMAKE_BUILD_TESTS)
-include(definitionsconsistencycheck.cmake)
+include(definitionsconsistencycheck.cmake) \ No newline at end of file
diff --git a/Documentation/building/windows-instructions.md b/Documentation/building/windows-instructions.md
index 4013649db5..f68ed2c8c7 100644
--- a/Documentation/building/windows-instructions.md
+++ b/Documentation/building/windows-instructions.md
@@ -15,16 +15,18 @@ Visual Studio must be installed. Supported versions:
- [Visual Studio 2015](https://www.visualstudio.com/downloads/visual-studio-2015-downloads-vs) (Community, Professional, Enterprise)
-To debug managed code, ensure you have installed atleast [Visual Studio 2015 Update 3](https://blogs.msdn.microsoft.com/visualstudio/2016/06/07/visual-studio-2015-update-3-rc/).
+To debug managed code, ensure you have installed atleast [Visual Studio 2015 Update 3](https://www.visualstudio.com/en-us/news/releasenotes/vs2015-update3-vs).
-Make sure that you install "VC++ Tools". By default they will not be installed.
+Make sure that you install "VC++ Tools". By default, they will not be installed.
+
+To build for Arm32, you need to have [Windows SDK for Windows 10](https://developer.microsoft.com/en-us/windows/downloads) installed.
Visual Studio Express is not supported.
CMake
-----
-The CoreCLR build relies on CMake for the build. We are currently using CMake 3.0.2, although later versions likely work.
+The CoreCLR repo build has been validated using CMake 3.5.2.
- Install [CMake](http://www.cmake.org/download) for Windows.
- Add it to the PATH environment variable.
diff --git a/build.cmd b/build.cmd
index 01b48deedb..2c870ea85a 100644
--- a/build.cmd
+++ b/build.cmd
@@ -122,7 +122,10 @@ if %__TotalSpecifiedBuildArch% GTR 1 (
if %__BuildArchX64%==1 set __BuildArch=x64
if %__BuildArchX86%==1 set __BuildArch=x86
-if %__BuildArchArm%==1 set __BuildArch=arm
+if %__BuildArchArm%==1 (
+ set __BuildArch=arm
+ set __CrossArch=x86
+)
if %__BuildArchArm64%==1 (
set __BuildArch=arm64
set __CrossArch=x64
@@ -207,6 +210,7 @@ if %__BuildNative% EQU 1 (
:: Set the environment for the native build
set __VCBuildArch=x86_amd64
if /i "%__BuildArch%" == "x86" ( set __VCBuildArch=x86 )
+ if /i "%__BuildArch%" == "arm" (set __VCBuildArch=x86_arm)
echo %__MsgPrefix%Using environment: "%__VSToolsRoot%\..\..\VC\vcvarsall.bat" !__VCBuildArch!
call "%__VSToolsRoot%\..\..\VC\vcvarsall.bat" !__VCBuildArch!
@if defined __echo @echo on
@@ -251,9 +255,15 @@ REM === Build Cross-Architecture Native Components (if applicable)
REM ===
REM =========================================================================================
-REM cross-arch build only enabled for arm64
-
if /i "%__BuildArch%"=="arm64" (
+ set __DoCrossArchBuild=1
+ )
+
+if /i "%__BuildArch%"=="arm" (
+ set __DoCrossArchBuild=1
+ )
+
+if /i "%__DoCrossArchBuild%"=="1" (
echo %__MsgPrefix%Commencing build of cross architecture native components for %__BuildOS%.%__BuildArch%.%__BuildType%
@@ -297,6 +307,7 @@ if /i "%__BuildArch%"=="arm64" (
)
:SkipCrossCompBuild
+
REM =========================================================================================
REM ===
REM === CoreLib and NuGet package build section.
@@ -355,7 +366,6 @@ if %__BuildNativeCoreLib% EQU 1 (
)
if %__BuildPackages% EQU 1 (
-
set __MsbuildLog=/flp:Verbosity=normal;LogFile="%__LogsDir%\Nuget_%__BuildOS%__%__BuildArch%__%__BuildType%.log"
set __MsbuildWrn=/flp1:WarningsOnly;LogFile="%__LogsDir%\Nuget_%__BuildOS%__%__BuildArch%__%__BuildType%.wrn"
set __MsbuildErr=/flp2:ErrorsOnly;LogFile="%__LogsDir%\Nuget_%__BuildOS%__%__BuildArch%__%__BuildType%.err"
diff --git a/clrdefinitions.cmake b/clrdefinitions.cmake
index 3520795a55..1622377099 100644
--- a/clrdefinitions.cmake
+++ b/clrdefinitions.cmake
@@ -31,6 +31,10 @@ elseif (CLR_CMAKE_TARGET_ARCH_ARM64)
elseif (CLR_CMAKE_TARGET_ARCH_ARM)
if (CLR_CMAKE_PLATFORM_UNIX)
add_definitions(-DDBG_TARGET_ARM_UNIX)
+ elseif (WIN32 AND NOT DEFINED CLR_CROSS_COMPONENTS_BUILD)
+ # Set this to ensure we can use Arm SDK for Desktop binary linkage when doing native (Arm32) build
+ add_definitions(-D_ARM_WINAPI_PARTITION_DESKTOP_SDK_AVAILABLE=1)
+ add_definitions(-D_ARM_WORKAROUND_)
endif (CLR_CMAKE_PLATFORM_UNIX)
add_definitions(-D_TARGET_ARM_=1)
add_definitions(-DDBG_TARGET_32BIT=1)
diff --git a/dir.props b/dir.props
index e5cac55a8f..cf42c794e1 100644
--- a/dir.props
+++ b/dir.props
@@ -164,9 +164,10 @@
<MinOSForArch Condition="'$(PackagePlatform)' == 'arm'">win8</MinOSForArch>
<MinOSForArch Condition="'$(PackagePlatform)' == 'arm64'">win10</MinOSForArch>
- <!-- Arm64 cross target components are x64 hosted -->
- <HasCrossTargetComponents Condition="'$(PackagePlatform)' =='arm64'">true</HasCrossTargetComponents>
+ <!-- Define packaging attributes for cross target components -->
+ <HasCrossTargetComponents Condition="'$(TargetsWindows)' == 'true' and ('$(PackagePlatform)' =='arm64' or '$(PackagePlatform)' =='arm')">true</HasCrossTargetComponents>
<CrossTargetComponentFolder Condition="'$(PackagePlatform)' == 'arm64'">x64</CrossTargetComponentFolder>
+ <CrossTargetComponentFolder Condition="'$(PackagePlatform)' == 'arm'">x86</CrossTargetComponentFolder>
<PackageOutputPath>$(PackagesBinDir)/pkg/</PackageOutputPath>
<SymbolPackageOutputPath>$(PackagesBinDir)/symbolpkg/</SymbolPackageOutputPath>
diff --git a/functions.cmake b/functions.cmake
index bbc571b46d..df2216c885 100644
--- a/functions.cmake
+++ b/functions.cmake
@@ -1,6 +1,6 @@
function(clr_unknown_arch)
if (WIN32)
- message(FATAL_ERROR "Only AMD64, ARM64 and I386 are supported")
+ message(FATAL_ERROR "Only AMD64, ARM64, ARM and I386 are supported")
else()
message(FATAL_ERROR "Only AMD64, ARM64 and ARM are supported")
endif()
@@ -24,15 +24,40 @@ function(get_compile_definitions DefinitionName)
set(${DefinitionName} ${DEFINITIONS} PARENT_SCOPE)
endfunction(get_compile_definitions)
-# Build a list of include directories by putting -I in front of each include dir.
+# Build a list of include directories
function(get_include_directories IncludeDirectories)
get_directory_property(dirs INCLUDE_DIRECTORIES)
foreach(dir IN LISTS dirs)
+
+ if (CLR_CMAKE_PLATFORM_ARCH_ARM AND WIN32)
+ list(APPEND INC_DIRECTORIES /I${dir})
+ else()
list(APPEND INC_DIRECTORIES -I${dir})
+ endif(CLR_CMAKE_PLATFORM_ARCH_ARM AND WIN32)
+
endforeach()
set(${IncludeDirectories} ${INC_DIRECTORIES} PARENT_SCOPE)
endfunction(get_include_directories)
+# Build a list of include directories for consumption by the assembler
+function(get_include_directories_asm IncludeDirectories)
+ get_directory_property(dirs INCLUDE_DIRECTORIES)
+
+ if (CLR_CMAKE_PLATFORM_ARCH_ARM AND WIN32)
+ list(APPEND INC_DIRECTORIES "-I ")
+ endif()
+
+ foreach(dir IN LISTS dirs)
+ if (CLR_CMAKE_PLATFORM_ARCH_ARM AND WIN32)
+ list(APPEND INC_DIRECTORIES ${dir};)
+ else()
+ list(APPEND INC_DIRECTORIES -I${dir})
+ endif()
+ endforeach()
+
+ set(${IncludeDirectories} ${INC_DIRECTORIES} PARENT_SCOPE)
+endfunction(get_include_directories_asm)
+
# Set the passed in RetSources variable to the list of sources with added current source directory
# to form absolute paths.
# The parameters after the RetSources are the input files.
@@ -52,7 +77,7 @@ function(preprocess_def_file inputFilename outputFilename)
OUTPUT ${outputFilename}
COMMAND ${CMAKE_CXX_COMPILER} ${ASM_INCLUDE_DIRECTORIES} /P /EP /TC ${PREPROCESS_DEFINITIONS} /Fi${outputFilename} ${inputFilename}
DEPENDS ${inputFilename}
- COMMENT "Preprocessing ${inputFilename}"
+ COMMENT "Preprocessing ${inputFilename} - ${CMAKE_CXX_COMPILER} ${ASM_INCLUDE_DIRECTORIES} /P /EP /TC ${PREPROCESS_DEFINITIONS} /Fi${outputFilename} ${inputFilename}"
)
set_source_files_properties(${outputFilename}
diff --git a/src/.nuget/Microsoft.NETCore.ILAsm/Microsoft.NETCore.ILAsm.builds b/src/.nuget/Microsoft.NETCore.ILAsm/Microsoft.NETCore.ILAsm.builds
index c98d876236..7ac4e3f469 100644
--- a/src/.nuget/Microsoft.NETCore.ILAsm/Microsoft.NETCore.ILAsm.builds
+++ b/src/.nuget/Microsoft.NETCore.ILAsm/Microsoft.NETCore.ILAsm.builds
@@ -23,6 +23,10 @@
<OSGroup>Windows_NT</OSGroup>
<Platform>x86</Platform>
</Project>
+ <Project Condition="'$(TargetsWindows)' == 'true'" Include="win/Microsoft.NETCore.ILAsm.pkgproj">
+ <OSGroup>Windows_NT</OSGroup>
+ <Platform>arm</Platform>
+ </Project>
<Project Condition="'$(TargetsLinux)' == 'true' and '$(DistroRid)' == 'debian.8-x64'" Include="debian/Microsoft.NETCore.ILAsm.pkgproj">
<OSGroup>Linux</OSGroup>
<Platform>amd64</Platform>
diff --git a/src/.nuget/Microsoft.NETCore.ILAsm/Microsoft.NETCore.ILAsm.pkgproj b/src/.nuget/Microsoft.NETCore.ILAsm/Microsoft.NETCore.ILAsm.pkgproj
index 9f837c404f..d1beacb15a 100644
--- a/src/.nuget/Microsoft.NETCore.ILAsm/Microsoft.NETCore.ILAsm.pkgproj
+++ b/src/.nuget/Microsoft.NETCore.ILAsm/Microsoft.NETCore.ILAsm.pkgproj
@@ -5,7 +5,7 @@
<Version>1.1.0</Version>
<SkipPackageFileCheck>true</SkipPackageFileCheck>
<SkipValidatePackage>true</SkipValidatePackage>
- <PackagePlatforms>x64;x86;arm64;arm</PackagePlatforms>
+ <PackagePlatforms>x64;x86;arm64;arm;</PackagePlatforms>
<OutputPath>$(PackagesOutputPath)</OutputPath>
<IncludeRuntimeJson>true</IncludeRuntimeJson>
</PropertyGroup>
@@ -20,6 +20,9 @@
<ProjectReference Include="win\Microsoft.NETCore.ILAsm.pkgproj">
<Platform>x86</Platform>
</ProjectReference>
+ <ProjectReference Include="win\Microsoft.NETCore.ILAsm.pkgproj">
+ <Platform>arm</Platform>
+ </ProjectReference>
<ProjectReference Include="debian\Microsoft.NETCore.ILAsm.pkgproj">
<Platform>amd64</Platform>
</ProjectReference>
diff --git a/src/.nuget/Microsoft.NETCore.ILDAsm/Microsoft.NETCore.ILDAsm.builds b/src/.nuget/Microsoft.NETCore.ILDAsm/Microsoft.NETCore.ILDAsm.builds
index 0152167fbb..fd9ced9b22 100644
--- a/src/.nuget/Microsoft.NETCore.ILDAsm/Microsoft.NETCore.ILDAsm.builds
+++ b/src/.nuget/Microsoft.NETCore.ILDAsm/Microsoft.NETCore.ILDAsm.builds
@@ -23,6 +23,10 @@
<OSGroup>Windows_NT</OSGroup>
<Platform>x86</Platform>
</Project>
+ <Project Condition="'$(TargetsWindows)' == 'true'" Include="win/Microsoft.NETCore.ILDAsm.pkgproj">
+ <OSGroup>Windows_NT</OSGroup>
+ <Platform>arm</Platform>
+ </Project>
<Project Condition="'$(TargetsLinux)' == 'true' and '$(DistroRid)' == 'debian.8-x64'" Include="debian/Microsoft.NETCore.ILDAsm.pkgproj">
<OSGroup>Linux</OSGroup>
<Platform>amd64</Platform>
diff --git a/src/.nuget/Microsoft.NETCore.ILDAsm/Microsoft.NETCore.ILDAsm.pkgproj b/src/.nuget/Microsoft.NETCore.ILDAsm/Microsoft.NETCore.ILDAsm.pkgproj
index b5d47a9152..bca9bf737b 100644
--- a/src/.nuget/Microsoft.NETCore.ILDAsm/Microsoft.NETCore.ILDAsm.pkgproj
+++ b/src/.nuget/Microsoft.NETCore.ILDAsm/Microsoft.NETCore.ILDAsm.pkgproj
@@ -5,7 +5,7 @@
<Version>1.1.0</Version>
<SkipPackageFileCheck>true</SkipPackageFileCheck>
<SkipValidatePackage>true</SkipValidatePackage>
- <PackagePlatforms>x64;x86;arm64;arm</PackagePlatforms>
+ <PackagePlatforms>x64;x86;arm64;arm;</PackagePlatforms>
<OutputPath>$(PackagesOutputPath)</OutputPath>
<IncludeRuntimeJson>true</IncludeRuntimeJson>
</PropertyGroup>
@@ -20,6 +20,9 @@
<ProjectReference Include="win\Microsoft.NETCore.ILDAsm.pkgproj">
<Platform>x86</Platform>
</ProjectReference>
+ <ProjectReference Include="win\Microsoft.NETCore.ILDAsm.pkgproj">
+ <Platform>arm</Platform>
+ </ProjectReference>
<ProjectReference Include="debian\Microsoft.NETCore.ILDAsm.pkgproj">
<Platform>amd64</Platform>
</ProjectReference>
diff --git a/src/.nuget/Microsoft.NETCore.Jit/Microsoft.NETCore.Jit.builds b/src/.nuget/Microsoft.NETCore.Jit/Microsoft.NETCore.Jit.builds
index 6e3ebfb7ba..0eca9976a4 100644
--- a/src/.nuget/Microsoft.NETCore.Jit/Microsoft.NETCore.Jit.builds
+++ b/src/.nuget/Microsoft.NETCore.Jit/Microsoft.NETCore.Jit.builds
@@ -23,6 +23,10 @@
<OSGroup>Windows_NT</OSGroup>
<Platform>x86</Platform>
</Project>
+ <Project Condition="'$(TargetsWindows)' == 'true'" Include="win/Microsoft.NETCore.Jit.pkgproj">
+ <OSGroup>Windows_NT</OSGroup>
+ <Platform>arm</Platform>
+ </Project>
<Project Condition="'$(TargetsLinux)' == 'true' and '$(DistroRid)' == 'debian.8-x64'" Include="debian/Microsoft.NETCore.Jit.pkgproj">
<OSGroup>Linux</OSGroup>
<Platform>amd64</Platform>
diff --git a/src/.nuget/Microsoft.NETCore.Jit/Microsoft.NETCore.Jit.pkgproj b/src/.nuget/Microsoft.NETCore.Jit/Microsoft.NETCore.Jit.pkgproj
index 02629bd37a..f3b539b998 100644
--- a/src/.nuget/Microsoft.NETCore.Jit/Microsoft.NETCore.Jit.pkgproj
+++ b/src/.nuget/Microsoft.NETCore.Jit/Microsoft.NETCore.Jit.pkgproj
@@ -5,7 +5,7 @@
<Version>1.1.0</Version>
<SkipPackageFileCheck>true</SkipPackageFileCheck>
<SkipValidatePackage>true</SkipValidatePackage>
- <PackagePlatforms>x64;x86;arm64;arm</PackagePlatforms>
+ <PackagePlatforms>x64;x86;arm64;arm;</PackagePlatforms>
<OutputPath>$(PackagesOutputPath)</OutputPath>
<IncludeRuntimeJson>true</IncludeRuntimeJson>
</PropertyGroup>
@@ -19,6 +19,9 @@
<ProjectReference Include="win\Microsoft.NETCore.Jit.pkgproj">
<Platform>x86</Platform>
</ProjectReference>
+ <ProjectReference Include="win\Microsoft.NETCore.Jit.pkgproj">
+ <Platform>arm</Platform>
+ </ProjectReference>
<ProjectReference Include="debian\Microsoft.NETCore.Jit.pkgproj">
<Platform>amd64</Platform>
</ProjectReference>
diff --git a/src/.nuget/Microsoft.NETCore.Runtime.CoreCLR/Microsoft.NETCore.Runtime.CoreCLR.builds b/src/.nuget/Microsoft.NETCore.Runtime.CoreCLR/Microsoft.NETCore.Runtime.CoreCLR.builds
index 39ace1a582..f4b5e18bf9 100644
--- a/src/.nuget/Microsoft.NETCore.Runtime.CoreCLR/Microsoft.NETCore.Runtime.CoreCLR.builds
+++ b/src/.nuget/Microsoft.NETCore.Runtime.CoreCLR/Microsoft.NETCore.Runtime.CoreCLR.builds
@@ -23,6 +23,10 @@
<OSGroup>Windows_NT</OSGroup>
<Platform>x86</Platform>
</Project>
+ <Project Condition="'$(TargetsWindows)' == 'true'" Include="win/Microsoft.NETCore.Runtime.CoreCLR.pkgproj">
+ <OSGroup>Windows_NT</OSGroup>
+ <Platform>arm</Platform>
+ </Project>
<Project Condition="'$(TargetsLinux)' == 'true' and '$(DistroRid)' == 'debian.8-x64'" Include="debian/Microsoft.NETCore.Runtime.CoreCLR.pkgproj">
<OSGroup>Linux</OSGroup>
<Platform>amd64</Platform>
diff --git a/src/.nuget/Microsoft.NETCore.Runtime.CoreCLR/Microsoft.NETCore.Runtime.CoreCLR.pkgproj b/src/.nuget/Microsoft.NETCore.Runtime.CoreCLR/Microsoft.NETCore.Runtime.CoreCLR.pkgproj
index 634af4fdc9..0af50e1776 100644
--- a/src/.nuget/Microsoft.NETCore.Runtime.CoreCLR/Microsoft.NETCore.Runtime.CoreCLR.pkgproj
+++ b/src/.nuget/Microsoft.NETCore.Runtime.CoreCLR/Microsoft.NETCore.Runtime.CoreCLR.pkgproj
@@ -5,12 +5,14 @@
<Version>1.1.0</Version>
<SkipPackageFileCheck>true</SkipPackageFileCheck>
<SkipValidatePackage>true</SkipValidatePackage>
- <PackagePlatforms>x64;x86;arm64;arm</PackagePlatforms>
+ <PackagePlatforms>x64;x86;arm64;arm;</PackagePlatforms>
<OutputPath>$(PackagesOutputPath)</OutputPath>
<IncludeRuntimeJson>true</IncludeRuntimeJson>
</PropertyGroup>
<ItemGroup>
- <!-- Declare a runtime dependency on the win8-arm CoreCLR built using the TFS builds -->
+ <!-- ARM32_TODO: Clean this up.
+ Declare a runtime dependency on the win8-arm CoreCLR built using the TFS builds
+ -->
<RuntimeDependency Include="runtime.win8-arm.Microsoft.NETCore.Runtime.CoreCLR">
<TargetRuntime>win8-arm</TargetRuntime>
<Version>1.1.0-$(ExternalExpectedPrerelease)</Version>
@@ -30,6 +32,9 @@
<ProjectReference Include="win\Microsoft.NETCore.Runtime.CoreCLR.pkgproj">
<Platform>x86</Platform>
</ProjectReference>
+ <ProjectReference Include="win\Microsoft.NETCore.Runtime.CoreCLR.pkgproj">
+ <Platform>arm</Platform>
+ </ProjectReference>
<ProjectReference Include="debian\Microsoft.NETCore.Runtime.CoreCLR.pkgproj">
<Platform>amd64</Platform>
</ProjectReference>
diff --git a/src/.nuget/Microsoft.NETCore.TestHost/Microsoft.NETCore.TestHost.builds b/src/.nuget/Microsoft.NETCore.TestHost/Microsoft.NETCore.TestHost.builds
index 1cfff1b615..54b52079f8 100644
--- a/src/.nuget/Microsoft.NETCore.TestHost/Microsoft.NETCore.TestHost.builds
+++ b/src/.nuget/Microsoft.NETCore.TestHost/Microsoft.NETCore.TestHost.builds
@@ -23,6 +23,10 @@
<OSGroup>Windows_NT</OSGroup>
<Platform>x86</Platform>
</Project>
+ <Project Condition="'$(TargetsWindows)' == 'true'" Include="win/Microsoft.NETCore.TestHost.pkgproj">
+ <OSGroup>Windows_NT</OSGroup>
+ <Platform>arm</Platform>
+ </Project>
<Project Condition="'$(TargetsLinux)' == 'true' and '$(DistroRid)' == 'debian.8-x64'" Include="debian/Microsoft.NETCore.TestHost.pkgproj">
<OSGroup>Linux</OSGroup>
<Platform>amd64</Platform>
diff --git a/src/.nuget/Microsoft.NETCore.TestHost/Microsoft.NETCore.TestHost.pkgproj b/src/.nuget/Microsoft.NETCore.TestHost/Microsoft.NETCore.TestHost.pkgproj
index fd9c9192fc..bf2013657b 100644
--- a/src/.nuget/Microsoft.NETCore.TestHost/Microsoft.NETCore.TestHost.pkgproj
+++ b/src/.nuget/Microsoft.NETCore.TestHost/Microsoft.NETCore.TestHost.pkgproj
@@ -5,7 +5,7 @@
<Version>1.1.0</Version>
<SkipPackageFileCheck>true</SkipPackageFileCheck>
<SkipValidatePackage>true</SkipValidatePackage>
- <PackagePlatforms>x64;x86;arm64;arm</PackagePlatforms>
+ <PackagePlatforms>x64;x86;arm64;arm;</PackagePlatforms>
<OutputPath>$(PackagesOutputPath)</OutputPath>
<IncludeRuntimeJson>true</IncludeRuntimeJson>
</PropertyGroup>
@@ -24,6 +24,9 @@
<ProjectReference Include="win\Microsoft.NETCore.TestHost.pkgproj">
<Platform>x86</Platform>
</ProjectReference>
+ <ProjectReference Include="win\Microsoft.NETCore.TestHost.pkgproj">
+ <Platform>arm</Platform>
+ </ProjectReference>
<ProjectReference Include="debian\Microsoft.NETCore.TestHost.pkgproj">
<Platform>amd64</Platform>
</ProjectReference>
diff --git a/src/ToolBox/superpmi/superpmi-shared/compileresult.cpp b/src/ToolBox/superpmi/superpmi-shared/compileresult.cpp
index 8b7961d664..b15c51f28a 100644
--- a/src/ToolBox/superpmi/superpmi-shared/compileresult.cpp
+++ b/src/ToolBox/superpmi/superpmi-shared/compileresult.cpp
@@ -729,7 +729,7 @@ void CompileResult::applyRelocs(unsigned char *block1, ULONG blocksize1, void *o
break;
#endif // _TARGET_X86_
- #if defined(_TARGET_X86_) || defined(_TARGET_AMD64_) || defined(_TARGET_ARM64_)
+ #if defined(_TARGET_X86_) || defined(_TARGET_AMD64_) || defined(_TARGET_ARM64_) || defined(_TARGET_ARM_)
case IMAGE_REL_BASED_REL32:
{
DWORDLONG target = tmp.target + tmp.addlDelta;
@@ -770,7 +770,7 @@ void CompileResult::applyRelocs(unsigned char *block1, ULONG blocksize1, void *o
}
}
break;
- #endif // defined(_TARGET_X86_) || defined(_TARGET_AMD64_) || defined(_TARGET_ARM64_)
+ #endif // defined(_TARGET_X86_) || defined(_TARGET_AMD64_) || defined(_TARGET_ARM64_) || defined(_TARGET_ARM_)
#if defined(_TARGET_AMD64_) || defined(_TARGET_ARM64_)
case IMAGE_REL_BASED_DIR64:
diff --git a/src/debug/ee/wks/CMakeLists.txt b/src/debug/ee/wks/CMakeLists.txt
index a3cb48324b..1f6d435d8a 100644
--- a/src/debug/ee/wks/CMakeLists.txt
+++ b/src/debug/ee/wks/CMakeLists.txt
@@ -12,24 +12,44 @@ endif (CLR_CMAKE_PLATFORM_ARCH_I386)
set(ASM_FILE ${CORDBEE_DIR}/${ARCH_SOURCES_DIR}/dbghelpers.asm)
# asm files require preprocessing using cl.exe on arm64
- if(CLR_CMAKE_PLATFORM_ARCH_ARM64)
- get_filename_component(name ${ASM_FILE} NAME_WE)
- set(ASM_PREPROCESSED_FILE ${CMAKE_CURRENT_BINARY_DIR}/${name}.asm)
- preprocess_def_file(${ASM_FILE} ${ASM_PREPROCESSED_FILE})
- set(CORDBEE_SOURCES_WKS_PREPROCESSED_ASM ${ASM_PREPROCESSED_FILE})
- set_property(SOURCE ${CORDBEE_SOURCES_WKS_PREPROCESSED_ASM} PROPERTY COMPILE_DEFINITIONS ${ASM_DEFINITIONS})
- set_property(SOURCE ${CORDBEE_SOURCES_WKS_PREPROCESSED_ASM} PROPERTY COMPILE_DEFINITIONS ${ASM_OPTIONS})
- add_library_clr(cordbee_wks ${CORDBEE_SOURCES_WKS} ${CORDBEE_SOURCES_WKS_PREPROCESSED_ASM})
- else ()
-
- # Need to compile asm file using custom command as include directories are not provided to asm compiler
- add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/dbghelpers.obj
- COMMAND ${CMAKE_ASM_MASM_COMPILER} ${ASM_INCLUDE_DIRECTORIES} ${ASM_DEFINITIONS} ${ASM_OPTIONS} /Fo${CMAKE_CURRENT_BINARY_DIR}/dbghelpers.obj /Ta${ASM_FILE}
- DEPENDS ${ASM_FILE}
- COMMENT "Compiling dbghelpers.asm")
-
- add_library_clr(cordbee_wks ${CORDBEE_SOURCES_WKS} ${CMAKE_CURRENT_BINARY_DIR}/dbghelpers.obj)
- endif(CLR_CMAKE_PLATFORM_ARCH_ARM64)
+if(CLR_CMAKE_PLATFORM_ARCH_ARM64)
+ get_filename_component(name ${ASM_FILE} NAME_WE)
+ set(ASM_PREPROCESSED_FILE ${CMAKE_CURRENT_BINARY_DIR}/${name}.asm)
+ preprocess_def_file(${ASM_FILE} ${ASM_PREPROCESSED_FILE})
+ set(CORDBEE_SOURCES_WKS_PREPROCESSED_ASM ${ASM_PREPROCESSED_FILE})
+ set_property(SOURCE ${CORDBEE_SOURCES_WKS_PREPROCESSED_ASM} PROPERTY COMPILE_DEFINITIONS ${ASM_DEFINITIONS})
+ set_property(SOURCE ${CORDBEE_SOURCES_WKS_PREPROCESSED_ASM} PROPERTY COMPILE_DEFINITIONS ${ASM_OPTIONS})
+ add_library_clr(cordbee_wks ${CORDBEE_SOURCES_WKS} ${CORDBEE_SOURCES_WKS_PREPROCESSED_ASM})
+elseif(CLR_CMAKE_PLATFORM_ARCH_ARM)
+
+ # On Arm32 for Windows, use C++ compiler to process the .asm since it includes C-style headers.
+ set(DBGHELPERS_ASM $ENV{__IntermediatesDir}/dbghelpers.asm)
+ set(ASM_OPTIONS " -g ")
+
+ preprocess_def_file(${ASM_FILE} ${DBGHELPERS_ASM})
+
+ # We do not pass any defines since we have already done pre-processing above
+ set (DBGHELPERS_ASM_CMDLINE "-o ${CMAKE_CURRENT_BINARY_DIR}/dbghelpers.obj ${DBGHELPERS_ASM}")
+
+ file(GENERATE OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/runasm.cmd"
+ CONTENT "\"${CMAKE_ASM_MASM_COMPILER}\" ${ASM_OPTIONS} ${DBGHELPERS_ASM_CMDLINE}")
+
+ # Need to compile asm file using custom command as include directories are not provided to asm compiler
+ add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/dbghelpers.obj
+ COMMAND ${CMAKE_CURRENT_BINARY_DIR}/runasm.cmd
+ DEPENDS ${DBGHELPERS_ASM}
+ COMMENT "Compiling dbghelpers.asm - ${CMAKE_CURRENT_BINARY_DIR}/runasm.cmd")
+ add_library_clr(cordbee_wks ${CORDBEE_SOURCES_WKS} ${CMAKE_CURRENT_BINARY_DIR}/dbghelpers.obj)
+else ()
+
+ # Need to compile asm file using custom command as include directories are not provided to asm compiler
+ add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/dbghelpers.obj
+ COMMAND ${CMAKE_ASM_MASM_COMPILER} ${ASM_INCLUDE_DIRECTORIES} ${ASM_DEFINITIONS} ${ASM_OPTIONS} /Fo${CMAKE_CURRENT_BINARY_DIR}/dbghelpers.obj /Ta${ASM_FILE}
+ DEPENDS ${ASM_FILE}
+ COMMENT "Compiling dbghelpers.asm")
+
+ add_library_clr(cordbee_wks ${CORDBEE_SOURCES_WKS} ${CMAKE_CURRENT_BINARY_DIR}/dbghelpers.obj)
+endif(CLR_CMAKE_PLATFORM_ARCH_ARM64)
else ()
diff --git a/src/gcinfo/CMakeLists.txt b/src/gcinfo/CMakeLists.txt
index 016e1e273f..e4730c69b3 100644
--- a/src/gcinfo/CMakeLists.txt
+++ b/src/gcinfo/CMakeLists.txt
@@ -5,12 +5,14 @@ set( GCINFO_SOURCES
gcinfoencoder.cpp
)
-if(CLR_CMAKE_PLATFORM_ARCH_I386)
+
+if(CLR_CMAKE_TARGET_ARCH_I386)
list(APPEND GCINFO_SOURCES
../gcdump/gcdump.cpp
../gcdump/${ARCH_SOURCES_DIR}/gcdumpx86.cpp
)
-endif(CLR_CMAKE_PLATFORM_ARCH_I386)
+endif(CLR_CMAKE_TARGET_ARCH_I386)
+
convert_to_absolute_path(GCINFO_SOURCES ${GCINFO_SOURCES})
diff --git a/src/pal/tools/gen-buildsys-win.bat b/src/pal/tools/gen-buildsys-win.bat
index 3e9e4c24c5..c2d8987a54 100644
--- a/src/pal/tools/gen-buildsys-win.bat
+++ b/src/pal/tools/gen-buildsys-win.bat
@@ -45,7 +45,7 @@ GOTO :DONE
echo "Usage..."
echo "gen-buildsys-win.bat <path to top level CMakeLists.txt> <VSVersion>"
echo "Specify the path to the top level CMake file - <ProjectK>/src/NDP"
- echo "Specify the VSVersion to be used - VS2013 or VS2015"
+ echo "Specify the VSVersion to be used - VS2015"
EXIT /B 1
:DONE
diff --git a/src/unwinder/CMakeLists.txt b/src/unwinder/CMakeLists.txt
index 5ddbf42a37..bf1cfa2938 100644
--- a/src/unwinder/CMakeLists.txt
+++ b/src/unwinder/CMakeLists.txt
@@ -11,7 +11,8 @@ set(UNWINDER_SOURCES
unwinder.cpp
)
-if(NOT DEFINED CLR_CMAKE_PLATFORM_ARCH_I386)
+# Include platform specific unwinder for applicable (native and cross-target) builds.
+if(NOT DEFINED CLR_CMAKE_TARGET_ARCH_I386)
include_directories(${ARCH_SOURCES_DIR})
list(APPEND UNWINDER_SOURCES
${ARCH_SOURCES_DIR}/unwinder_${ARCH_SOURCES_DIR}.cpp
diff --git a/src/vm/CMakeLists.txt b/src/vm/CMakeLists.txt
index 66fc6432af..6f17a90c1f 100644
--- a/src/vm/CMakeLists.txt
+++ b/src/vm/CMakeLists.txt
@@ -328,6 +328,15 @@ elseif(CLR_CMAKE_TARGET_ARCH_I386)
${ARCH_SOURCES_DIR}/gmsasm.asm
${ARCH_SOURCES_DIR}/jithelp.asm
)
+elseif(CLR_CMAKE_TARGET_ARCH_ARM)
+ set(VM_SOURCES_WKS_ARCH_ASM
+ ${ARCH_SOURCES_DIR}/asmhelpers.asm
+ ${ARCH_SOURCES_DIR}/CrtHelpers.asm
+ ${ARCH_SOURCES_DIR}/ehhelpers.asm
+ ${ARCH_SOURCES_DIR}/memcpy.asm
+ ${ARCH_SOURCES_DIR}/patchedcode.asm
+ ${ARCH_SOURCES_DIR}/PInvokeStubs.asm
+ )
elseif(CLR_CMAKE_TARGET_ARCH_ARM64)
set(VM_SOURCES_WKS_ARCH_ASM
${ARCH_SOURCES_DIR}/AsmHelpers.asm
diff --git a/src/vm/arm/memcpy.asm b/src/vm/arm/memcpy.asm
index 65c662c2d7..9a0e7d373f 100644
--- a/src/vm/arm/memcpy.asm
+++ b/src/vm/arm/memcpy.asm
@@ -31,7 +31,7 @@
pld [r1] ; preload the first cache line
cmp r2, #16 ; less than 16 bytes?
mov r3, r0 ; use r3 as our destination
- bhs __FCallMemcpy_large ; go to the large copy case directly
+ bhs.W __FCallMemcpy_large ; go to the large copy case directly. ".W" indicates encoding using 32bits
CpySmal tbb [pc, r2] ; branch to specialized bits for small copies
__SwitchTable1_Copy
diff --git a/src/vm/arm/patchedcode.asm b/src/vm/arm/patchedcode.asm
index 2ccda5810f..2ef175ea56 100644
--- a/src/vm/arm/patchedcode.asm
+++ b/src/vm/arm/patchedcode.asm
@@ -119,6 +119,8 @@ $label
; patchable location where the write-barriers are copied over at runtime
LEAF_ENTRY JIT_PatchedWriteBarrierStart
+ ; Cannot be empty function to prevent LNK1223
+ bx lr
LEAF_END
; These write barriers are overwritten on the fly
@@ -139,6 +141,8 @@ $label
LEAF_END_MARKED JIT_ByRefWriteBarrier
LEAF_ENTRY JIT_PatchedWriteBarrierLast
+ ; Cannot be empty function to prevent LNK1223
+ bx lr
LEAF_END
; JIT Allocation helpers when TLS Index for Thread is low enough for fast helpers
diff --git a/src/vm/wks/CMakeLists.txt b/src/vm/wks/CMakeLists.txt
index 0ff0ccb9a6..48ca6b0803 100644
--- a/src/vm/wks/CMakeLists.txt
+++ b/src/vm/wks/CMakeLists.txt
@@ -1,3 +1,4 @@
+
if (WIN32)
add_precompiled_header(common.h ../common.cpp VM_SOURCES_WKS)
# mscorlib.cpp does not compile with precompiled header file
@@ -5,63 +6,111 @@ if (WIN32)
# .c file cannot use cpp precompiled header
set_source_files_properties(../microsoft.comservices_i.c PROPERTIES COMPILE_FLAGS "/Y-")
- # asm files require preprocessing using cl.exe on arm64
+ # asm files require preprocessing using cl.exe on arm32 and arm64
if(CLR_CMAKE_PLATFORM_ARCH_ARM64)
+
foreach(ASM_FILE ${VM_SOURCES_WKS_ARCH_ASM})
+
+ # Preprocess each asm source file
get_filename_component(name ${ASM_FILE} NAME_WE)
set(ASM_PREPROCESSED_FILE ${CMAKE_CURRENT_BINARY_DIR}/${name}.asm)
preprocess_def_file(${ASM_FILE} ${ASM_PREPROCESSED_FILE})
+
set(VM_SOURCES_WKS_ARM64_PREPROCESSED_ASM ${VM_SOURCES_WKS_ARM64_PREPROCESSED_ASM} ${ASM_PREPROCESSED_FILE})
+
endforeach()
set(VM_SOURCES_WKS_ARCH_ASM ${VM_SOURCES_WKS_ARM64_PREPROCESSED_ASM})
+
+ elseif(CLR_CMAKE_PLATFORM_ARCH_ARM)
+
+ get_include_directories_asm(ASM_INCLUDE_DIRECTORIES)
+
+ foreach(ASM_FILE ${VM_SOURCES_WKS_ARCH_ASM})
+
+ # Inserts a custom command in CMake build to preprocess each asm source file
+ get_filename_component(name ${ASM_FILE} NAME_WE)
+ file(TO_CMAKE_PATH "$ENV{__IntermediatesDir}/${name}.asm" ASM_PREPROCESSED_FILE)
+ preprocess_def_file(${ASM_FILE} ${ASM_PREPROCESSED_FILE})
+
+ # On Arm32, compile the preprocessed binary to .obj
+ # We do not pass any defines since we have already done pre-processing above
+ set (ASM_CMDLINE "-o ${CMAKE_CURRENT_BINARY_DIR}/${name}.obj ${ASM_PREPROCESSED_FILE}")
+
+ # Generate the batch file that will invoke the assembler
+ file(TO_CMAKE_PATH "${CMAKE_CURRENT_BINARY_DIR}/runasm_${name}_${CMAKE_BUILD_TYPE}.cmd" ASM_SCRIPT_FILE)
+
+ # ARM32TODO: Set asm options global so that all invocations can use it.
+ file(GENERATE OUTPUT "${ASM_SCRIPT_FILE}"
+ CONTENT "\"${CMAKE_ASM_MASM_COMPILER}\" -g ${ASM_INCLUDE_DIRECTORIES} ${ASM_DEFINITIONS} ${ASM_CMDLINE}")
+
+ message("Generated - ${ASM_SCRIPT_FILE}")
+
+ # Need to compile asm file using custom command as include directories are not provided to asm compiler
+ add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${name}.obj
+ COMMAND ${ASM_SCRIPT_FILE}
+ DEPENDS ${ASM_PREPROCESSED_FILE}
+ COMMENT "Assembling ${ASM_PREPROCESSED_FILE} - ${ASM_SCRIPT_FILE}")
+
+ # mark obj as source that does not require compile
+ set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/${name}.obj PROPERTIES EXTERNAL_OBJECT TRUE)
+
+ # Add the generated OBJ in the dependency list so that it gets consumed during linkage
+ set(VM_SOURCES_WKS_ARCH_ASM ${VM_SOURCES_WKS_ARCH_ASM} ${CMAKE_CURRENT_BINARY_DIR}/${name}.obj)
+
+ endforeach()
+
endif(CLR_CMAKE_PLATFORM_ARCH_ARM64)
+
endif (WIN32)
add_library_clr(cee_wks ${VM_SOURCES_WKS} ${VM_SOURCES_WKS_ARCH_ASM})
if (WIN32)
-# Get the current list of definitions
-get_compile_definitions(DEFINITIONS)
-
-get_directory_property(COMPILE_DEFINITIONS_LIST COMPILE_DEFINITIONS)
-
-# Extract the definitions for the ASM code. Since there is a bug in the cmake that prevents us from
-# using the generator expressions, we split the definitions into lists based on the configuration.
-foreach(DEFINITION IN LISTS COMPILE_DEFINITIONS_LIST)
- if (${DEFINITION} MATCHES "^\\$<\\$<CONFIG:([^>]+)>:([^>]+)>$")
- # The entry contains generator expression, so insert the definition into a definitions list
- # corresponding to the config
- string(TOUPPER ${CMAKE_MATCH_1} CONFIG)
- set(ASM_DEFINITIONS_${CONFIG} ${ASM_DEFINITIONS_${CONFIG}} ${CMAKE_MATCH_2})
- else()
- list(APPEND ASM_DEFINITIONS ${DEFINITION})
+
+ if(NOT CLR_CMAKE_PLATFORM_ARCH_ARM)
+ # Get the current list of definitions
+ get_compile_definitions(DEFINITIONS)
+
+ get_directory_property(COMPILE_DEFINITIONS_LIST COMPILE_DEFINITIONS)
+
+ # Extract the definitions for the ASM code. Since there is a bug in the cmake that prevents us from
+ # using the generator expressions, we split the definitions into lists based on the configuration.
+ foreach(DEFINITION IN LISTS COMPILE_DEFINITIONS_LIST)
+ if (${DEFINITION} MATCHES "^\\$<\\$<CONFIG:([^>]+)>:([^>]+)>$")
+ # The entry contains generator expression, so insert the definition into a definitions list
+ # corresponding to the config
+ string(TOUPPER ${CMAKE_MATCH_1} CONFIG)
+ set(ASM_DEFINITIONS_${CONFIG} ${ASM_DEFINITIONS_${CONFIG}} ${CMAKE_MATCH_2})
+ else()
+ list(APPEND ASM_DEFINITIONS ${DEFINITION})
+ endif()
+ endforeach()
+
+ # Add defines for the ASM. Unfortunately setting it on the target is ignored for asm by the cmake, so we have
+ # to set it on the sources.
+ set_property(SOURCE ${VM_SOURCES_WKS_ARCH_ASM} PROPERTY COMPILE_DEFINITIONS ${ASM_DEFINITIONS})
+ foreach(CONFIG IN LISTS CMAKE_CONFIGURATION_TYPES)
+ string(TOUPPER ${CONFIG} CONFIG)
+ set_property(SOURCE ${VM_SOURCES_WKS_ARCH_ASM} PROPERTY COMPILE_DEFINITIONS_${CONFIG} ${ASM_DEFINITIONS_${CONFIG}})
+ endforeach()
+
+ if (CLR_CMAKE_PLATFORM_ARCH_I386)
+ set_source_files_properties(${VM_SOURCES_WKS_ARCH_ASM} PROPERTIES COMPILE_FLAGS "/Zm /safeseh")
+ endif (CLR_CMAKE_PLATFORM_ARCH_I386)
+
+ # Convert AsmConstants.h into AsmConstants.inc
+ find_program(POWERSHELL powershell)
+ if (POWERSHELL STREQUAL "POWERSHELL-NOTFOUND")
+ message(FATAL_ERROR "POWERSHELL not found")
endif()
-endforeach()
-
-# Add defines for the ASM. Unfortunately setting it on the target is ignored for asm by the cmake, so we have
-# to set it on the sources.
-set_property(SOURCE ${VM_SOURCES_WKS_ARCH_ASM} PROPERTY COMPILE_DEFINITIONS ${ASM_DEFINITIONS})
-foreach(CONFIG IN LISTS CMAKE_CONFIGURATION_TYPES)
- string(TOUPPER ${CONFIG} CONFIG)
- set_property(SOURCE ${VM_SOURCES_WKS_ARCH_ASM} PROPERTY COMPILE_DEFINITIONS_${CONFIG} ${ASM_DEFINITIONS_${CONFIG}})
-endforeach()
-
-if (CLR_CMAKE_PLATFORM_ARCH_I386)
- set_source_files_properties(${VM_SOURCES_WKS_ARCH_ASM} PROPERTIES COMPILE_FLAGS "/Zm /safeseh")
-endif (CLR_CMAKE_PLATFORM_ARCH_I386)
-
-# Convert AsmConstants.h into AsmConstants.inc
-find_program(POWERSHELL powershell)
-if (POWERSHELL STREQUAL "POWERSHELL-NOTFOUND")
- message(FATAL_ERROR "POWERSHELL not found")
-endif()
-
-add_custom_command(
- # The AsmConstants.inc will be built in the pre-build phase of the cee_wks build
- TARGET cee_wks PRE_BUILD
- COMMAND ${POWERSHELL} -NoProfile -ExecutionPolicy Bypass -NonInteractive \"& \"\"${VM_DIR}/h2inc.ps1\"\"\" \"\"\"${VM_DIR}/${ARCH_SOURCES_DIR}/asmconstants.h\"\"\" >"${CMAKE_CURRENT_BINARY_DIR}/AsmConstants.tmp"
- COMMAND ${CMAKE_CXX_COMPILER} ${DEFINITIONS} /EP "${CMAKE_CURRENT_BINARY_DIR}/AsmConstants.tmp" >"${CMAKE_CURRENT_BINARY_DIR}/AsmConstants.inc"
-)
+
+ add_custom_command(
+ # The AsmConstants.inc will be built in the pre-build phase of the cee_wks build
+ TARGET cee_wks PRE_BUILD
+ COMMAND ${POWERSHELL} -NoProfile -ExecutionPolicy Bypass -NonInteractive \"& \"\"${VM_DIR}/h2inc.ps1\"\"\" \"\"\"${VM_DIR}/${ARCH_SOURCES_DIR}/asmconstants.h\"\"\" >"${CMAKE_CURRENT_BINARY_DIR}/AsmConstants.tmp"
+ COMMAND ${CMAKE_CXX_COMPILER} ${DEFINITIONS} /EP "${CMAKE_CURRENT_BINARY_DIR}/AsmConstants.tmp" >"${CMAKE_CURRENT_BINARY_DIR}/AsmConstants.inc"
+ )
+ endif(NOT CLR_CMAKE_PLATFORM_ARCH_ARM)
endif (WIN32)