Skip to content
This repository has been archived by the owner on Jan 23, 2023. It is now read-only.
/ corefx Public archive

Commit

Permalink
Add Linux ARM target for Native libraries.
Browse files Browse the repository at this point in the history
  • Loading branch information
benpye committed Jul 25, 2015
1 parent 17a9de2 commit e16fbb7
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
7 changes: 7 additions & 0 deletions src/Native/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,13 @@ add_compile_options(-Wall -Werror -fPIC)

if (CMAKE_SYSTEM_PROCESSOR STREQUAL x86_64 OR CMAKE_SYSTEM_PROCESSOR STREQUAL amd64)
add_definitions(-DBIT64=1)
elseif (CMAKE_SYSTEM_PROCESSOR STREQUAL armv7l)
add_definitions(-DBIT32=1)
# Because we don't use CMAKE_C_COMPILER/CMAKE_CXX_COMPILER to use clang
# we have to set the triple by adding a compiler argument
add_compile_options(-target armv7-linux-gnueabihf)
add_compile_options(-mthumb)
add_compile_options(-mfpu=vfpv3)
endif ()

string(TOUPPER ${CMAKE_BUILD_TYPE} UPPERCASE_CMAKE_BUILD_TYPE)
Expand Down
8 changes: 6 additions & 2 deletions src/Native/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
usage()
{
echo "Usage: $0 [BuildArch] [BuildType] [clean] [verbose] [clangx.y]"
echo "BuildArch can be: x64"
echo "BuildArch can be: x64, arm"
echo "BuildType can be: Debug, Release"
echo "clean - optional argument to force a clean build."
echo "verbose - optional argument to enable verbose build output."
Expand Down Expand Up @@ -84,7 +84,7 @@ echo "Commencing CoreFX Native build"

# Argument types supported by this script:
#
# Build architecture - valid value is: x64.
# Build architecture - valid values are: x64, arm.
# Build Type - valid values are: Debug, Release
#
# Set the default arguments for build
Expand Down Expand Up @@ -148,6 +148,10 @@ for i in "$@"
__BuildArch=x64
__MSBuildBuildArch=x64
;;
arm)
__BuildArch=arm
__MSBuildBuildArch=arm
;;
debug)
__BuildType=Debug
;;
Expand Down

0 comments on commit e16fbb7

Please sign in to comment.