summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSaleem Abdulrasool <compnerd@compnerd.org>2018-02-28 23:00:50 +0000
committerSaleem Abdulrasool <compnerd@compnerd.org>2018-02-28 23:00:50 +0000
commitf0b4d40d75eb96bca1a11ef42d2ed52ad134d55e (patch)
tree924cf39fede8fb5ff00ed545ce9672f587d8b210
parentc38756a992fee4be5cf1a394e1bd24457bb6b3d5 (diff)
downloadbcm5719-llvm-f0b4d40d75eb96bca1a11ef42d2ed52ad134d55e.tar.gz
bcm5719-llvm-f0b4d40d75eb96bca1a11ef42d2ed52ad134d55e.zip
build: add the ability to create a symlink for dsymutil
Add a `LLVM_INSTALL_CCTOOLS_SYMLINKS` to mirror `LLVM_INSTALL_BINUTILS_SYMLINKS`. For now, this allows us to create symlinks for `dsymutil` to `llvm-dsymutil`. This option is off by default, but the user can enable it. llvm-svn: 326381
-rw-r--r--llvm/CMakeLists.txt3
-rw-r--r--llvm/docs/CMake.rst4
-rw-r--r--llvm/tools/dsymutil/CMakeLists.txt9
3 files changed, 14 insertions, 2 deletions
diff --git a/llvm/CMakeLists.txt b/llvm/CMakeLists.txt
index 255f243786b..3e40d7e087a 100644
--- a/llvm/CMakeLists.txt
+++ b/llvm/CMakeLists.txt
@@ -194,6 +194,9 @@ set(CMAKE_EXPORT_COMPILE_COMMANDS 1)
option(LLVM_INSTALL_BINUTILS_SYMLINKS
"Install symlinks from the binutils tool names to the corresponding LLVM tools." OFF)
+option(LLVM_INSTALL_CCTOOLS_SYMLINKS
+ "Install symlinks from the cctools tool names to the corresponding LLVM tools." OFF)
+
option(LLVM_INSTALL_UTILS "Include utility binaries in the 'install' target." OFF)
option(LLVM_INSTALL_TOOLCHAIN_ONLY "Only include toolchain files in the 'install' target." OFF)
diff --git a/llvm/docs/CMake.rst b/llvm/docs/CMake.rst
index 5fea12801c5..5ac1289a86e 100644
--- a/llvm/docs/CMake.rst
+++ b/llvm/docs/CMake.rst
@@ -228,6 +228,10 @@ LLVM-specific variables
Install symlinks from the binutils tool names to the corresponding LLVM tools.
For example, ar will be symlinked to llvm-ar.
+**LLVM_INSTALL_CCTOOLS_SYMLINKS**:BOOL
+ Install symliks from the cctools tool names to the corresponding LLVM tools.
+ For example, dsymutil will be symlinked to llvm-dsymutil.
+
**LLVM_BUILD_EXAMPLES**:BOOL
Build LLVM examples. Defaults to OFF. Targets for building each example are
generated in any case. See documentation for *LLVM_BUILD_TOOLS* above for more
diff --git a/llvm/tools/dsymutil/CMakeLists.txt b/llvm/tools/dsymutil/CMakeLists.txt
index 1dcb2116f34..d002afb3dea 100644
--- a/llvm/tools/dsymutil/CMakeLists.txt
+++ b/llvm/tools/dsymutil/CMakeLists.txt
@@ -21,6 +21,11 @@ add_llvm_tool(llvm-dsymutil
intrinsics_gen
)
-IF(APPLE)
+if(APPLE)
target_link_libraries(llvm-dsymutil PRIVATE "-framework CoreFoundation")
-ENDIF(APPLE)
+endif(APPLE)
+
+if(LLVM_INSTALL_CCTOOLS_SYMLINKS)
+ add_llvm_tool_symlink(dsymutil llvm-dsymutil)
+endif()
+
OpenPOWER on IntegriCloud