From 9fc84cfb5feafe7846307d76df2b9f85455b481a Mon Sep 17 00:00:00 2001 From: Jan Vorlicek Date: Wed, 13 Sep 2017 23:33:55 +0200 Subject: [PATCH] Fix setting PAX options for crossgen (#13950) In my previous PR that added marking executables with paxctl, I've made a mistake in the order of calling _add_library and add_dependencies. But that was hidden due to the fact that we have yet another copy of the add_library_clr and add_executable_clr functions in src/CMakeLists.txt. I have no idea how that happened. This one has overriden the other, which has hidden the problem, but also caused the crossgen to not to be modified by the paxctl. So I am fixing the order and removing the extra definitions of those functions. --- functions.cmake | 4 ++-- src/CMakeLists.txt | 26 -------------------------- 2 files changed, 2 insertions(+), 28 deletions(-) diff --git a/functions.cmake b/functions.cmake index 182a69b..3fb0e46 100644 --- a/functions.cmake +++ b/functions.cmake @@ -258,12 +258,12 @@ function(verify_dependencies targetName errorMessage) endfunction() function(add_library_clr) - add_dependencies(${ARGV0} GeneratedEventingFiles) _add_library(${ARGV}) + add_dependencies(${ARGV0} GeneratedEventingFiles) endfunction() function(add_executable_clr) - add_dependencies(${ARGV0} GeneratedEventingFiles) _add_executable(${ARGV}) + add_dependencies(${ARGV0} GeneratedEventingFiles) endfunction() diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 900ba96..4c999b1 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -75,32 +75,6 @@ add_custom_target( DEPENDS ${GeneratedEventFiles} ) -function(add_library_clr) - if(NOT WIN32) - add_library(${ARGV} ${VERSION_FILE_PATH}) - else() - add_library(${ARGV}) - endif(NOT WIN32) - add_dependencies(${ARGV0} GeneratedEventingFiles) - list(FIND CLR_CROSS_COMPONENTS_LIST ${ARGV0} INDEX) - if (DEFINED CLR_CROSS_COMPONENTS_LIST AND ${INDEX} EQUAL -1) - set_target_properties(${ARGV0} PROPERTIES EXCLUDE_FROM_ALL 1) - endif() -endfunction() - -function(add_executable_clr) - if(NOT WIN32) - add_executable(${ARGV} ${VERSION_FILE_PATH}) - else() - add_executable(${ARGV}) - endif(NOT WIN32) - add_dependencies(${ARGV0} GeneratedEventingFiles) - list(FIND CLR_CROSS_COMPONENTS_LIST ${ARGV0} INDEX) - if (DEFINED CLR_CROSS_COMPONENTS_LIST AND ${INDEX} EQUAL -1) - set_target_properties(${ARGV0} PROPERTIES EXCLUDE_FROM_ALL 1) - endif() -endfunction() - if(CLR_CMAKE_PLATFORM_UNIX) if(CLR_CMAKE_PLATFORM_LINUX) if(CLR_CMAKE_PLATFORM_UNIX_AMD64 OR CLR_CMAKE_PLATFORM_UNIX_ARM) -- 2.7.4