File tree Expand file tree Collapse file tree 5 files changed +39
-1
lines changed
Expand file tree Collapse file tree 5 files changed +39
-1
lines changed Original file line number Diff line number Diff line change @@ -13,3 +13,22 @@ install(
1313 FILES_MATCHING
1414 PATTERN "*.h"
1515)
16+
17+ set (DSMIL_WRAPPER_TEMPLATES
18+ tools/dsmil-clang.in
19+ tools/dsmil-clang++.in
20+ tools/dsmil-opt.in
21+ )
22+
23+ set (DSMIL_WRAPPER_OUTPUTS "" )
24+ foreach (wrapper ${DSMIL_WRAPPER_TEMPLATES} )
25+ get_filename_component (wrapper_name ${wrapper} NAME_WE )
26+ set (configured_wrapper ${CMAKE_CURRENT_BINARY_DIR} /${wrapper_name} )
27+ configure_file (${wrapper} ${configured_wrapper} @ONLY)
28+ list (APPEND DSMIL_WRAPPER_OUTPUTS ${configured_wrapper} )
29+ endforeach ()
30+
31+ install (
32+ PROGRAMS ${DSMIL_WRAPPER_OUTPUTS}
33+ DESTINATION ${CMAKE_INSTALL_BINDIR}
34+ )
Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+ # Wrapper to invoke clang++ with DSMIL plugin and runtime paths preloaded.
3+ exec " @CMAKE_INSTALL_FULL_BINDIR@/clang++" \
4+ -fpass-plugin=" @CMAKE_INSTALL_FULL_LIBDIR@/DsmilPasses.so" \
5+ -I" @CMAKE_INSTALL_FULL_INCLUDEDIR@/dsmil" \
6+ -L" @CMAKE_INSTALL_FULL_LIBDIR@" -ldsmilrt \
7+ " $@ "
Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+ # Wrapper to invoke clang with DSMIL plugin and runtime paths preloaded.
3+ exec " @CMAKE_INSTALL_FULL_BINDIR@/clang" \
4+ -fpass-plugin=" @CMAKE_INSTALL_FULL_LIBDIR@/DsmilPasses.so" \
5+ -I" @CMAKE_INSTALL_FULL_INCLUDEDIR@/dsmil" \
6+ -L" @CMAKE_INSTALL_FULL_LIBDIR@" -ldsmilrt \
7+ " $@ "
Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+ # Wrapper to invoke opt with DSMIL plugin preloaded.
3+ exec " @CMAKE_INSTALL_FULL_BINDIR@/opt" \
4+ -load-pass-plugin " @CMAKE_INSTALL_FULL_LIBDIR@/DsmilPasses.so" \
5+ " $@ "
Original file line number Diff line number Diff line change @@ -862,7 +862,7 @@ option(LLVM_INCLUDE_EXAMPLES "Generate build targets for the LLVM examples" ON)
862862option (LLVM_BUILD_TESTS
863863 "Build LLVM unit tests. If OFF, just generate build targets." OFF )
864864option (LLVM_INCLUDE_TESTS "Generate build targets for the LLVM unit tests." ON )
865- option (LLVM_ENABLE_DSMIL "Build DSMIL pass plugin and runtime from ../dsmil" OFF )
865+ option (LLVM_ENABLE_DSMIL "Build DSMIL pass plugin and runtime from ../dsmil" ON )
866866
867867option (LLVM_INSTALL_GTEST
868868 "Install the llvm gtest library. This should be on if you want to do
You can’t perform that action at this time.
0 commit comments