summaryrefslogtreecommitdiff
path: root/src/dlls/mscorrc/CMakeLists.txt
diff options
context:
space:
mode:
authorJan Vorlicek <janvorli@microsoft.com>2019-08-23 17:03:01 +0200
committer이형주/Common Platform Lab(SR)/Staff Engineer/삼성전자 <leee.lee@samsung.com>2020-04-16 07:36:05 +0900
commit4feb5cbcbeea277f7addb372b3c632e89f9ed1ae (patch)
tree1fa7f1dc31867a3872c7df4b46b970150da3f299 /src/dlls/mscorrc/CMakeLists.txt
parent9df87a133b0f29f4932f38b7307c87d09ab80d5d (diff)
downloadcoreclr-4feb5cbcbeea277f7addb372b3c632e89f9ed1ae.tar.gz
coreclr-4feb5cbcbeea277f7addb372b3c632e89f9ed1ae.tar.bz2
coreclr-4feb5cbcbeea277f7addb372b3c632e89f9ed1ae.zip
* Fix PIE options We were missing passing the -pie linker option. That means that while we were compiling our code as position independent, the executables (not shared libraries) were not marked as position independent and ASLR was not applied to them. They were always loaded to fixed addresses. This change adds the missing -pie option and also replaces all the individual settings of -fPIE / -fPIC on the targets we build by a centralized setting of CMAKE_POSITION_INDEPENDENT_CODE variable that causes cmake to add the appropriate compiler options everywhere. * Fix native parts of coreclr tests build The native parts of the tests are not built using the root CMakeLists.txt so I am moving enabling the position independent code to configurecompiler.cmake Change-Id: Ieafff8984ec23e5fdb00fb0c2fb017e53afbce88
Diffstat (limited to 'src/dlls/mscorrc/CMakeLists.txt')
-rw-r--r--src/dlls/mscorrc/CMakeLists.txt4
1 files changed, 0 insertions, 4 deletions
diff --git a/src/dlls/mscorrc/CMakeLists.txt b/src/dlls/mscorrc/CMakeLists.txt
index 8f67988a23..366ace4631 100644
--- a/src/dlls/mscorrc/CMakeLists.txt
+++ b/src/dlls/mscorrc/CMakeLists.txt
@@ -9,10 +9,6 @@ if(WIN32)
string(REPLACE "/guard:cf" "" CMAKE_SHARED_LINKER_FLAGS ${CMAKE_SHARED_LINKER_FLAGS})
endif(WIN32)
-if(CLR_CMAKE_PLATFORM_UNIX)
- add_compile_options(-fPIC)
-endif(CLR_CMAKE_PLATFORM_UNIX)
-
add_subdirectory(full)
# Only add the small version of the resources if the platform is Windows.