Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/corert.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Vorlicek <janvorli@microsoft.com>2018-06-08 03:45:30 +0300
committerJan Kotas <jkotas@microsoft.com>2018-06-08 03:45:30 +0300
commita7049d5197447fa2a40b82ea82b541697c881ae3 (patch)
treef31fa4dd9e739c56695ba7f756f756710fda8556 /src/Native
parent43d51ff372a424ac52e2d78ac1d71ffbaf148d13 (diff)
Enable Alpine ARM/ARM64 cross build (#5911)
Also unify the cross build related files with coreclr and fix a bug in the build-native.sh
Diffstat (limited to 'src/Native')
-rw-r--r--src/Native/CMakeLists.txt22
1 files changed, 6 insertions, 16 deletions
diff --git a/src/Native/CMakeLists.txt b/src/Native/CMakeLists.txt
index 256cb8ad0..475bf7113 100644
--- a/src/Native/CMakeLists.txt
+++ b/src/Native/CMakeLists.txt
@@ -95,33 +95,23 @@ if (CLR_CMAKE_PLATFORM_UNIX)
add_compile_options(-Wno-null-arithmetic)
add_compile_options(-Wno-null-conversion)
- if (CLR_CMAKE_PLATFORM_ARCH_AMD64 OR CLR_CMAKE_PLATFORM_ARCH_I386)
+ if(CLR_CMAKE_PLATFORM_ARCH_AMD64 OR CLR_CMAKE_PLATFORM_ARCH_I386)
# Allow 16 byte compare-exchange
add_compile_options(-mcx16)
endif()
- if (CLR_CMAKE_PLATFORM_ARCH_ARM)
- # 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
+ if(CLR_CMAKE_PLATFORM_ARCH_ARM)
+ add_compile_options(-march=armv7-a)
if(TOOLCHAIN STREQUAL arm-linux-gnueabi)
- add_compile_options(-target armv7-linux-gnueabi)
add_compile_options(-mfloat-abi=softfp)
- else ()
- add_compile_options(-target armv7-linux-gnueabihf)
- endif ()
+ endif()
add_compile_options(-mthumb)
add_compile_options(-mfpu=vfpv3)
endif()
- if (CLR_CMAKE_PLATFORM_ARCH_ARM64)
- # 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 aarch64-linux-gnu)
- endif ()
-
- if (CLR_CMAKE_PLATFORM_ARCH_AMD64)
+ if(CLR_CMAKE_PLATFORM_ARCH_AMD64)
add_definitions(-DUNIX_AMD64_ABI)
- elseif (CLR_CMAKE_PLATFORM_ARCH_I386)
+ elseif(CLR_CMAKE_PLATFORM_ARCH_I386)
add_definitions(-DUNIX_X86_ABI)
endif()