summaryrefslogtreecommitdiffstats
path: root/llvm/cmake
diff options
context:
space:
mode:
authorChris Bieneman <beanz@apple.com>2016-11-19 01:32:09 +0000
committerChris Bieneman <beanz@apple.com>2016-11-19 01:32:09 +0000
commit958edcbdd615c37e65e45e234112d17cdefcdbf3 (patch)
tree1f8f51da8a8007d943e1487d5bc76521da4a28be /llvm/cmake
parent19270f3438d1617c16ddeb421fd5ca5a31dff983 (diff)
downloadbcm5719-llvm-958edcbdd615c37e65e45e234112d17cdefcdbf3.tar.gz
bcm5719-llvm-958edcbdd615c37e65e45e234112d17cdefcdbf3.zip
[CMake] Apply sandbox profile to target not directory
When LLVM_DEPENDENCY_DEBUGGING=On we should apply the sandbox only on the target, not the directory. This is important for directories that create more than one target, or for nested directories. llvm-svn: 287415
Diffstat (limited to 'llvm/cmake')
-rw-r--r--llvm/cmake/modules/AddLLVM.cmake10
1 files changed, 5 insertions, 5 deletions
diff --git a/llvm/cmake/modules/AddLLVM.cmake b/llvm/cmake/modules/AddLLVM.cmake
index ef0dbf4d10d..2603f0765f9 100644
--- a/llvm/cmake/modules/AddLLVM.cmake
+++ b/llvm/cmake/modules/AddLLVM.cmake
@@ -377,8 +377,6 @@ function(llvm_add_library name)
endif()
endif()
- setup_dependency_debugging(${name} ${LLVM_COMMON_DEPENDS})
-
# Generate objlib
if((ARG_SHARED AND ARG_STATIC) OR ARG_OBJECT)
# Generate an obj library for both targets.
@@ -424,6 +422,8 @@ function(llvm_add_library name)
add_library(${name} STATIC ${ALL_FILES})
endif()
+ setup_dependency_debugging(${name} ${LLVM_COMMON_DEPENDS})
+
if(DEFINED windows_resource_file)
set_windows_version_resource_properties(${name} ${windows_resource_file})
set(windows_resource_file ${windows_resource_file} PARENT_SCOPE)
@@ -672,8 +672,6 @@ macro(add_llvm_executable name)
# it forces Xcode to properly link the static library.
list(APPEND ALL_FILES "${LLVM_MAIN_SRC_DIR}/cmake/dummy.cpp")
endif()
-
- setup_dependency_debugging(${name} ${LLVM_COMMON_DEPENDS})
if( EXCLUDE_FROM_ALL )
add_executable(${name} EXCLUDE_FROM_ALL ${ALL_FILES})
@@ -681,6 +679,8 @@ macro(add_llvm_executable name)
add_executable(${name} ${ALL_FILES})
endif()
+ setup_dependency_debugging(${name} ${LLVM_COMMON_DEPENDS})
+
if(NOT ARG_NO_INSTALL_RPATH)
llvm_setup_rpath(${name})
endif()
@@ -1397,5 +1397,5 @@ function(setup_dependency_debugging name)
set(deny_intrinsics_gen "(deny file* (literal \"${LLVM_BINARY_DIR}/include/llvm/IR/Intrinsics.gen\"))")
set(sandbox_command "sandbox-exec -p '(version 1) (allow default) ${deny_attributes_gen} ${deny_intrinsics_gen}'")
- set_property(DIRECTORY PROPERTY RULE_LAUNCH_COMPILE ${sandbox_command})
+ set_target_properties(${name} PROPERTIES RULE_LAUNCH_COMPILE ${sandbox_command})
endfunction()
OpenPOWER on IntegriCloud