summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorAditya Mandaleeka <adityamandaleeka@users.noreply.github.com>2016-06-29 12:50:06 -0700
committerGitHub <noreply@github.com>2016-06-29 12:50:06 -0700
commit2f9e1c1e7271cee1ce126473534dabd3520aa67f (patch)
tree94fcc8f45a52cf0da5e270dda88ab6c1c26c2dbe /CMakeLists.txt
parent7a2c097b4bc53a67dce34559100658fe5cf177d9 (diff)
parentff5bebf77744910b7db1c3f590b178c95314acf3 (diff)
downloadcoreclr-2f9e1c1e7271cee1ce126473534dabd3520aa67f.tar.gz
coreclr-2f9e1c1e7271cee1ce126473534dabd3520aa67f.tar.bz2
coreclr-2f9e1c1e7271cee1ce126473534dabd3520aa67f.zip
Merge pull request #6041 from adityamandaleeka/fix_strip_logic
Fix platform logic in symbol stripping code
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt24
1 files changed, 14 insertions, 10 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index cf29308665..22433c8c5e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -32,7 +32,7 @@ if (PYTHON STREQUAL "PYTHON-NOTFOUND")
endif()
# Ensure other tools are present
-if(WIN32)
+if (WIN32)
enable_language(ASM_MASM)
# Ensure that MC is present
@@ -41,7 +41,7 @@ if(WIN32)
message(FATAL_ERROR "MC not found")
endif()
- if(CLR_CMAKE_HOST_ARCH STREQUAL arm64)
+ if (CLR_CMAKE_HOST_ARCH STREQUAL arm64)
# CMAKE_CXX_COMPILER will default to the compiler installed with
# Visual studio. Overwrite it to the compiler on the path.
# TODO, remove when cmake generator supports Arm64 as a target.
@@ -50,7 +50,8 @@ if(WIN32)
message("Overwriting the CMAKE_CXX_COMPILER.")
message(CMAKE_CXX_COMPILER found:${CMAKE_CXX_COMPILER})
endif()
-else()
+
+else (WIN32)
enable_language(ASM)
# Ensure that awk is present
@@ -61,21 +62,22 @@ else()
if (CMAKE_SYSTEM_NAME STREQUAL Darwin)
- # Ensure that dsymutil and strip is present
+ # Ensure that dsymutil and strip are present
find_program(DSYMUTIL dsymutil)
if (DSYMUTIL STREQUAL "DSYMUTIL-NOTFOUND")
message(FATAL_ERROR "dsymutil not found")
endif()
+
find_program(STRIP strip)
if (STRIP STREQUAL "STRIP-NOTFOUND")
message(FATAL_ERROR "strip not found")
endif()
- elseif (CMAKE_SYSTEM_NAME STREQUAL Linux)
+
+ else (CMAKE_SYSTEM_NAME STREQUAL Darwin)
+
# Ensure that objcopy is present
- if(DEFINED ENV{CROSSCOMPILE})
- if(CMAKE_SYSTEM_PROCESSOR STREQUAL armv7l)
- find_program(OBJCOPY ${TOOLCHAIN}-objcopy)
- elseif(CMAKE_SYSTEM_PROCESSOR STREQUAL aarch64)
+ if (DEFINED ENV{CROSSCOMPILE})
+ if (CMAKE_SYSTEM_PROCESSOR STREQUAL armv7l OR CMAKE_SYSTEM_PROCESSOR STREQUAL aarch64)
find_program(OBJCOPY ${TOOLCHAIN}-objcopy)
else()
clr_unknown_arch()
@@ -83,10 +85,12 @@ else()
else()
find_program(OBJCOPY objcopy)
endif()
+
if (OBJCOPY STREQUAL "OBJCOPY-NOTFOUND")
message(FATAL_ERROR "objcopy not found")
endif()
- endif ()
+
+ endif (CMAKE_SYSTEM_NAME STREQUAL Darwin)
endif(WIN32)
#----------------------------------------