Skip to content

Commit e55f726

Browse files
committed
Merge pull request #14863 from JuliaLang/tk/usrbin
RFC: Segregate binaries created by deps out of usr/bin
2 parents a6d5577 + 6539fd7 commit e55f726

File tree

18 files changed

+283
-26
lines changed

18 files changed

+283
-26
lines changed

Make.inc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,7 @@ sysconfdir := $(prefix)/etc
179179
build_prefix := $(BUILDROOT)/usr
180180
build_staging := $(build_prefix)-staging
181181
build_bindir := $(build_prefix)/bin
182+
build_depsbindir := $(build_prefix)/tools
182183
build_libdir := $(build_prefix)/lib
183184
build_libexecdir := $(build_prefix)/libexec
184185
build_datarootdir := $(build_prefix)/share
@@ -707,7 +708,7 @@ ifeq ($(origin LLVM_CONFIG), undefined)
707708
ifeq ($(USE_SYSTEM_LLVM), 1)
708709
LLVM_CONFIG := llvm-config$(EXE)
709710
else
710-
LLVM_CONFIG := $(build_bindir)/llvm-config$(EXE)
711+
LLVM_CONFIG := $(build_depsbindir)/llvm-config$(EXE)
711712
endif
712713
endif # LLVM_CONFIG undefined
713714

@@ -734,7 +735,7 @@ endif
734735
ifeq ($(USE_SYSTEM_PCRE), 1)
735736
PCRE_CONFIG := pcre2-config
736737
else
737-
PCRE_CONFIG := $(build_bindir)/pcre2-config
738+
PCRE_CONFIG := $(build_depsbindir)/pcre2-config
738739
endif
739740

740741
# Use ILP64 BLAS interface when building openblas from source on 64-bit architectures

Makefile

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ default: $(JULIA_BUILD_MODE) # contains either "debug" or "release"
1919
all: debug release
2020

2121
# sort is used to remove potential duplicates
22-
DIRS := $(sort $(build_bindir) $(build_libdir) $(build_private_libdir) $(build_libexecdir) $(build_sysconfdir)/julia $(build_datarootdir)/julia $(build_man1dir))
22+
DIRS := $(sort $(build_bindir) $(build_depsbindir) $(build_libdir) $(build_private_libdir) $(build_libexecdir) $(build_sysconfdir)/julia $(build_datarootdir)/julia $(build_man1dir))
2323
ifneq ($(BUILDROOT),$(JULIAHOME))
2424
BUILDDIRS := $(BUILDROOT) $(addprefix $(BUILDROOT)/,base src ui doc deps test test/perf)
2525
BUILDDIRMAKE := $(addsuffix /Makefile,$(BUILDDIRS))
@@ -229,8 +229,8 @@ endef
229229
$(eval $(call sysimg_builder,,-O3,$(JULIA_EXECUTABLE_release)))
230230
$(eval $(call sysimg_builder,-debug,-O0,$(JULIA_EXECUTABLE_debug)))
231231

232-
$(build_bindir)/stringreplace: $(JULIAHOME)/contrib/stringreplace.c | $(build_bindir)
233-
@$(call PRINT_CC, $(HOSTCC) -o $(build_bindir)/stringreplace $(JULIAHOME)/contrib/stringreplace.c)
232+
$(build_depsbindir)/stringreplace: $(JULIAHOME)/contrib/stringreplace.c | $(build_depsbindir)
233+
@$(call PRINT_CC, $(HOSTCC) -o $(build_depsbindir)/stringreplace $(JULIAHOME)/contrib/stringreplace.c)
234234

235235

236236
# public libraries, that are installed in $(prefix)/lib
@@ -297,9 +297,11 @@ endif
297297

298298
ifeq ($(OS),WINNT)
299299
define std_dll
300-
julia-deps: | $$(build_bindir)/lib$(1).dll
300+
julia-deps: | $$(build_bindir)/lib$(1).dll $$(build_depsbindir)/lib$(1).dll
301301
$$(build_bindir)/lib$(1).dll: | $$(build_bindir)
302-
cp $$(call pathsearch,lib$(1).dll,$$(STD_LIB_PATH)) $$(build_bindir) ;
302+
cp $$(call pathsearch,lib$(1).dll,$$(STD_LIB_PATH)) $$(build_bindir)
303+
$$(build_depsbindir)/lib$(1).dll: | $$(build_depsbindir)
304+
cp $$(call pathsearch,lib$(1).dll,$$(STD_LIB_PATH)) $$(build_depsbindir)
303305
JL_LIBS += $(1)
304306
endef
305307
$(eval $(call std_dll,gfortran-3))
@@ -313,10 +315,10 @@ endif
313315
$(eval $(call std_dll,ssp-0))
314316
endif
315317
define stringreplace
316-
$(build_bindir)/stringreplace $$(strings -t x - $1 | grep '$2' | awk '{print $$1;}') '$3' 255 "$(call cygpath_w,$1)"
318+
$(build_depsbindir)/stringreplace $$(strings -t x - $1 | grep '$2' | awk '{print $$1;}') '$3' 255 "$(call cygpath_w,$1)"
317319
endef
318320

319-
install: $(build_bindir)/stringreplace $(BUILDROOT)/doc/_build/html
321+
install: $(build_depsbindir)/stringreplace $(BUILDROOT)/doc/_build/html
320322
@$(MAKE) $(QUIET_MAKE) all
321323
@for subdir in $(bindir) $(libexecdir) $(datarootdir)/julia/site/$(VERSDIR) $(docdir) $(man1dir) $(includedir)/julia $(libdir) $(private_libdir) $(sysconfdir); do \
322324
mkdir -p $(DESTDIR)$$subdir; \
@@ -532,7 +534,7 @@ clean: | $(CLEAN_TARGETS)
532534
@-$(MAKE) -C $(BUILDROOT)/test clean
533535
-rm -f $(BUILDROOT)/julia
534536
-rm -f $(BUILDROOT)/*.tar.gz
535-
-rm -f $(build_bindir)/stringreplace \
537+
-rm -f $(build_depsbindir)/stringreplace \
536538
$(BUILDROOT)/light-source-dist.tmp $(BUILDROOT)/light-source-dist.tmp1 \
537539
$(BUILDROOT)/full-source-dist.tmp $(BUILDROOT)/full-source-dist.tmp1
538540
-rm -fr $(build_private_libdir)
@@ -637,7 +639,7 @@ endif
637639
ifeq ($(USE_SYSTEM_LLVM), 1)
638640
LLVM_SIZE := llvm-size$(EXE)
639641
else
640-
LLVM_SIZE := $(build_bindir)/llvm-size$(EXE)
642+
LLVM_SIZE := $(build_depsbindir)/llvm-size$(EXE)
641643
endif
642644
build-stats:
643645
@echo $(JULCOLOR)' ==> ./julia binary sizes'$(ENDCOLOR)

deps/Makefile

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ include $(SRCDIR)/llvm-ver.make
3232

3333
## Some shared configuration options ##
3434

35-
CONFIGURE_COMMON := --prefix=$(abspath $(build_prefix)) --build=$(BUILD_MACHINE) --libdir=$(abspath $(build_libdir)) $(CUSTOM_LD_LIBRARY_PATH)
35+
CONFIGURE_COMMON := --prefix=$(abspath $(build_prefix)) --build=$(BUILD_MACHINE) --libdir=$(abspath $(build_libdir)) --bindir=$(abspath $(build_depsbindir)) $(CUSTOM_LD_LIBRARY_PATH)
3636
ifneq ($(XC_HOST),)
3737
CONFIGURE_COMMON += --host=$(XC_HOST)
3838
endif
@@ -47,6 +47,7 @@ CMAKE_CC_ARG := $(CC_ARG) $(DEPS_CFLAGS)
4747
CMAKE_CXX_ARG := $(CXX_ARG) $(DEPS_CXXFLAGS)
4848

4949
CMAKE_COMMON := -DCMAKE_INSTALL_PREFIX:PATH=$(build_prefix)
50+
CMAKE_COMMON += -DCMAKE_INSTALL_BINDIR:PATH=$(shell $(JULIAHOME)/contrib/relative_path.sh $(build_prefix) $(build_depsbindir))
5051
ifneq ($(VERBOSE), 0)
5152
CMAKE_COMMON += -DCMAKE_VERBOSE_MAKEFILE=ON
5253
endif
@@ -79,7 +80,7 @@ endif
7980

8081
# If the top-level Makefile is called with environment variables,
8182
# they will override the values passed above to ./configure
82-
MAKE_COMMON := DESTDIR="" prefix=$(build_prefix) bindir=$(build_bindir) libdir=$(build_libdir) libexecdir=$(build_libexecdir) datarootdir=$(build_datarootdir) includedir=$(build_includedir) sysconfdir=$(build_sysconfdir) O=
83+
MAKE_COMMON := DESTDIR="" prefix=$(build_prefix) bindir=$(build_depsbindir) libdir=$(build_libdir) shlibdir=$(build_shlibdir) libexecdir=$(build_libexecdir) datarootdir=$(build_datarootdir) includedir=$(build_includedir) sysconfdir=$(build_sysconfdir) O=
8384

8485

8586
## Overall configuration of which rules exist and should be run by default ##
@@ -114,7 +115,7 @@ endif
114115
ifeq ($(OS), Linux)
115116
ifeq ($(USE_SYSTEM_PATCHELF), 0)
116117
STAGE1_DEPS += patchelf
117-
PATCHELF:=$(build_bindir)/patchelf
118+
PATCHELF:=$(build_depsbindir)/patchelf
118119
else
119120
PATCHELF:=patchelf
120121
endif
@@ -219,7 +220,7 @@ getall: get-llvm get-libuv get-pcre get-openlibm get-openspecfun get-dsfmt get-R
219220

220221
## PATHS ##
221222
# sort is used to remove potential duplicates
222-
DIRS := $(sort $(build_bindir) $(build_libdir) $(build_includedir) $(build_sysconfdir) $(build_datarootdir) $(build_staging))
223+
DIRS := $(sort $(build_bindir) $(build_depsbindir) $(build_libdir) $(build_includedir) $(build_sysconfdir) $(build_datarootdir) $(build_staging))
223224

224225
$(foreach dir,$(DIRS),$(eval $(call dir_target,$(dir))))
225226

deps/NATIVE.cmake

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@
22
# ref http://lists.llvm.org/pipermail/llvm-dev/2016-February/095366.html
33
set(CMAKE_C_COMPILER cc)
44
set(CMAKE_CXX_COMPILER c++)
5+
set(CMAKE_INSTALL_BINDIR tools)

deps/Versions.make

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ SUITESPARSE_VER = 4.4.5
99
UNWIND_VER = 1.1-julia2
1010
OSXUNWIND_VER = 0.0.3
1111
GMP_VER = 6.1.0
12-
MPFR_VER = 3.1.3
13-
PATCHELF_VER = 0.8
12+
MPFR_VER = 3.1.4
13+
PATCHELF_VER = 0.9
1414
GIT_VER = 1.8.5.6
1515
VIRTUALENV_VER = 15.0.0
1616
RMATH_JULIA_VER = 0.1

deps/checksums/mpfr-3.1.3.tar.bz2/md5

Lines changed: 0 additions & 1 deletion
This file was deleted.

deps/checksums/mpfr-3.1.3.tar.bz2/sha512

Lines changed: 0 additions & 1 deletion
This file was deleted.

deps/checksums/mpfr-3.1.4.tar.bz2/md5

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
b8a2f6b0e68bef46e53da2ac439e1cf4
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
51066066ff2c12ed2198605ecf68846b0c96b548adafa5b80e0c786d0df488411a5e8973358fce7192dc977ad4e68414cf14500e3c39746de62465eb145bb819

deps/checksums/patchelf-0.8.tar.gz/md5

Lines changed: 0 additions & 1 deletion
This file was deleted.

deps/checksums/patchelf-0.8.tar.gz/sha512

Lines changed: 0 additions & 1 deletion
This file was deleted.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
3c265508526760f233620f35d79c79fc
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
715db21156e6bd91cfa626f5201b32a6619e51532f5635ef52396da8193738ba66113485b61cc1e218b16737e66f72cc2e4bb3a7a33e73061ac2ef2c6330a299

deps/llvm-3.7.1_symlinks.patch

Lines changed: 213 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,213 @@
1+
commit f4dd81db3c617f22881446eb0ed6bfdc7d69e81e
2+
Author: Chris Bieneman <[email protected]>
3+
Date: Mon Sep 14 23:09:06 2015 +0000
4+
5+
[CMake] Refactor and cleanup generating and installing symlinks to tools.
6+
7+
Summary: This change generalizes symlink generation and makes symlinks to tools obey LLVM_TOOLCHAIN_TOOLS. It makes it so that if you exclude llvm-ar from LLVM_TOOLCHAIN_TOOLS you don't end up with broken symlinks to llvm-lib and llvm-ranlib in your install.
8+
9+
Reviewers: bogner, chapuni, rafael
10+
11+
Subscribers: llvm-commits
12+
13+
Differential Revision: http://reviews.llvm.org/D12864
14+
15+
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247632 91177308-0d34-0410-b5e6-96231b3b80d8
16+
(cherry picked from commit 2ec309f7d116b6f10cf7dc4ca481aa69ddbe1e5b)
17+
18+
Conflicts:
19+
cmake/modules/AddLLVM.cmake
20+
21+
[CMake] Rename target->dest as per feedback from Chapuni on http://reviews.llvm.org/D12864
22+
23+
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247658 91177308-0d34-0410-b5e6-96231b3b80d8
24+
(cherry picked from commit 5d1cac1aa28e02fda6be52b5ddf4940085df64d9)
25+
26+
[CMake] More refactoring of symlink creation.
27+
28+
This refactoring is to enable clang to re-use this code.
29+
30+
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@247850 91177308-0d34-0410-b5e6-96231b3b80d8
31+
(cherry picked from commit 2334ac1e4cc684bf1f68ac47b4486cf5d4dc8528)
32+
33+
[CMake] More cleanup of installing symlinks.
34+
35+
In order to support building clang out-of-tree the install_symlink script needs to be installed, and it needs to be found by searching the CMAKE_MODULE_PATH.
36+
37+
This change renames install_symlink -> LLVMInstallSymlink so it doesn't conflict with naming from other projects, and adds searching behavior in AddLLVM.cmake
38+
39+
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@248009 91177308-0d34-0410-b5e6-96231b3b80d8
40+
(cherry picked from commit f8d6e92d57aacf9388e8ed87cc43b22bd3367c4f)
41+
42+
[CMake] Adding ALWAYS_GENERATE option to symlink utility functions.
43+
44+
This implements the behavior required for clang symlinks which should be always generated.
45+
46+
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@248039 91177308-0d34-0410-b5e6-96231b3b80d8
47+
(cherry picked from commit 907451c6d653f5d0f4efa55fb42a84dae67a37cc)
48+
49+
[CMake] Cleaning up and generalizing the LLVMInstallSymlink script so that it can be used for libraries too.
50+
51+
In order to resolve PR25059, we're going to need to be able to generate symlinks to libraries manually, so I need this code to be reusable.
52+
53+
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@250573 91177308-0d34-0410-b5e6-96231b3b80d8
54+
(cherry picked from commit 26751e15750dbb733946c940e8a3bdfc5c446d8e)
55+
56+
diff --git a/cmake/modules/AddLLVM.cmake b/cmake/modules/AddLLVM.cmake
57+
index 45f6746..7f711ce 100644
58+
--- a/cmake/modules/AddLLVM.cmake
59+
+++ b/cmake/modules/AddLLVM.cmake
60+
@@ -602,9 +602,10 @@ function(export_executable_symbols target)
61+
endif()
62+
endfunction()
63+
64+
-
65+
set (LLVM_TOOLCHAIN_TOOLS
66+
llvm-ar
67+
+ llvm-ranlib
68+
+ llvm-lib
69+
llvm-objdump
70+
)
71+
72+
@@ -939,3 +940,77 @@ function(add_lit_testsuites project directory)
73+
endforeach()
74+
endif()
75+
endfunction()
76+
+
77+
+function(llvm_install_symlink name dest)
78+
+ cmake_parse_arguments(ARG "ALWAYS_GENERATE" "" "" ${ARGN})
79+
+ foreach(path ${CMAKE_MODULE_PATH})
80+
+ if(EXISTS ${path}/LLVMInstallSymlink.cmake)
81+
+ set(INSTALL_SYMLINK ${path}/LLVMInstallSymlink.cmake)
82+
+ break()
83+
+ endif()
84+
+ endforeach()
85+
+
86+
+ if(ARG_ALWAYS_GENERATE)
87+
+ set(component ${dest})
88+
+ else()
89+
+ set(component ${name})
90+
+ endif()
91+
+
92+
+ set(full_name ${name}${CMAKE_EXECUTABLE_SUFFIX})
93+
+ set(full_dest ${dest}${CMAKE_EXECUTABLE_SUFFIX})
94+
+
95+
+ install(SCRIPT ${INSTALL_SYMLINK}
96+
+ CODE "install_symlink(${full_name} ${full_dest} bin)"
97+
+ COMPONENT ${component})
98+
+
99+
+ if (NOT CMAKE_CONFIGURATION_TYPES AND NOT ARG_ALWAYS_GENERATE)
100+
+ add_custom_target(install-${name}
101+
+ DEPENDS ${name} ${dest} install-${dest}
102+
+ COMMAND "${CMAKE_COMMAND}"
103+
+ -DCMAKE_INSTALL_COMPONENT=${name}
104+
+ -P "${CMAKE_BINARY_DIR}/cmake_install.cmake")
105+
+ endif()
106+
+endfunction()
107+
+
108+
+function(add_llvm_tool_symlink name dest)
109+
+ cmake_parse_arguments(ARG "ALWAYS_GENERATE" "" "" ${ARGN})
110+
+ if(UNIX)
111+
+ set(LLVM_LINK_OR_COPY create_symlink)
112+
+ set(dest_binary "${dest}${CMAKE_EXECUTABLE_SUFFIX}")
113+
+ else()
114+
+ set(LLVM_LINK_OR_COPY copy)
115+
+ set(dest_binary "${LLVM_RUNTIME_OUTPUT_INTDIR}/${dest}${CMAKE_EXECUTABLE_SUFFIX}")
116+
+ endif()
117+
+
118+
+ set(output_path "${LLVM_RUNTIME_OUTPUT_INTDIR}/${name}${CMAKE_EXECUTABLE_SUFFIX}")
119+
+
120+
+ if(ARG_ALWAYS_GENERATE)
121+
+ set_property(DIRECTORY APPEND PROPERTY
122+
+ ADDITIONAL_MAKE_CLEAN_FILES ${dest_binary})
123+
+ add_custom_command(TARGET ${dest} POST_BUILD
124+
+ COMMAND ${CMAKE_COMMAND} -E ${LLVM_LINK_OR_COPY} "${dest_binary}" "${output_path}")
125+
+ else()
126+
+ add_custom_command(OUTPUT ${output_path}
127+
+ COMMAND ${CMAKE_COMMAND} -E ${LLVM_LINK_OR_COPY} "${dest_binary}" "${output_path}"
128+
+ DEPENDS ${dest})
129+
+ add_custom_target(${name} ALL DEPENDS ${output_path})
130+
+ set_target_properties(${name} PROPERTIES FOLDER Tools)
131+
+
132+
+ # Make sure the parent tool is a toolchain tool, otherwise exclude this tool
133+
+ list(FIND LLVM_TOOLCHAIN_TOOLS ${dest} LLVM_IS_${dest}_TOOLCHAIN_TOOL)
134+
+ if (NOT LLVM_IS_${dest}_TOOLCHAIN_TOOL GREATER -1)
135+
+ set(LLVM_IS_${name}_TOOLCHAIN_TOOL ${LLVM_IS_${dest}_TOOLCHAIN_TOOL})
136+
+ else()
137+
+ list(FIND LLVM_TOOLCHAIN_TOOLS ${name} LLVM_IS_${name}_TOOLCHAIN_TOOL)
138+
+ endif()
139+
+
140+
+ # LLVM_IS_${name}_TOOLCHAIN_TOOL will only be greater than -1 if both this
141+
+ # tool and its parent tool are in LLVM_TOOLCHAIN_TOOLS
142+
+ if (LLVM_IS_${name}_TOOLCHAIN_TOOL GREATER -1 OR NOT LLVM_INSTALL_TOOLCHAIN_ONLY)
143+
+ if( LLVM_BUILD_TOOLS )
144+
+ llvm_install_symlink(${name} ${dest})
145+
+ endif()
146+
+ endif()
147+
+ endif()
148+
+endfunction()
149+
+
150+
diff --git a/cmake/modules/LLVMInstallSymlink.cmake b/cmake/modules/LLVMInstallSymlink.cmake
151+
new file mode 100644
152+
index 0000000..482697b
153+
--- /dev/null
154+
+++ b/cmake/modules/LLVMInstallSymlink.cmake
155+
@@ -0,0 +1,21 @@
156+
+# We need to execute this script at installation time because the
157+
+# DESTDIR environment variable may be unset at configuration time.
158+
+# See PR8397.
159+
+
160+
+function(install_symlink name target outdir)
161+
+ if(UNIX)
162+
+ set(LINK_OR_COPY create_symlink)
163+
+ set(DESTDIR $ENV{DESTDIR})
164+
+ else()
165+
+ set(LINK_OR_COPY copy)
166+
+ endif()
167+
+
168+
+ set(bindir "${DESTDIR}${CMAKE_INSTALL_PREFIX}/${outdir}/")
169+
+
170+
+ message("Creating ${name}")
171+
+
172+
+ execute_process(
173+
+ COMMAND "${CMAKE_COMMAND}" -E ${LINK_OR_COPY} "${target}" "${name}"
174+
+ WORKING_DIRECTORY "${bindir}")
175+
+
176+
+endfunction()
177+
diff --git a/tools/llvm-ar/CMakeLists.txt b/tools/llvm-ar/CMakeLists.txt
178+
index 05ffe36..86233df 100644
179+
--- a/tools/llvm-ar/CMakeLists.txt
180+
+++ b/tools/llvm-ar/CMakeLists.txt
181+
@@ -10,30 +10,5 @@ add_llvm_tool(llvm-ar
182+
llvm-ar.cpp
183+
)
184+
185+
-if(UNIX)
186+
- set(LLVM_LINK_OR_COPY create_symlink)
187+
- set(llvm_ar_binary "llvm-ar${CMAKE_EXECUTABLE_SUFFIX}")
188+
-else()
189+
- set(LLVM_LINK_OR_COPY copy)
190+
- set(llvm_ar_binary "${LLVM_RUNTIME_OUTPUT_INTDIR}/llvm-ar${CMAKE_EXECUTABLE_SUFFIX}")
191+
-endif()
192+
-
193+
-set(llvm_ranlib "${LLVM_RUNTIME_OUTPUT_INTDIR}/llvm-ranlib${CMAKE_EXECUTABLE_SUFFIX}")
194+
-
195+
-add_custom_command(OUTPUT ${llvm_ranlib}
196+
- COMMAND ${CMAKE_COMMAND} -E ${LLVM_LINK_OR_COPY} "${llvm_ar_binary}" "${llvm_ranlib}"
197+
- DEPENDS llvm-ar)
198+
-
199+
-add_custom_target(llvm-ranlib ALL DEPENDS ${llvm_ranlib})
200+
-set_target_properties(llvm-ranlib PROPERTIES FOLDER Tools)
201+
-
202+
-set(llvm_lib "${LLVM_RUNTIME_OUTPUT_INTDIR}/llvm-lib${CMAKE_EXECUTABLE_SUFFIX}")
203+
-
204+
-add_custom_command(OUTPUT ${llvm_lib}
205+
- COMMAND ${CMAKE_COMMAND} -E ${LLVM_LINK_OR_COPY} "${llvm_ar_binary}" "${llvm_lib}"
206+
- DEPENDS llvm-ar)
207+
-
208+
-add_custom_target(llvm-lib ALL DEPENDS ${llvm_lib})
209+
-set_target_properties(llvm-lib PROPERTIES FOLDER Tools)
210+
-
211+
-install(SCRIPT install_symlink.cmake -DCMAKE_INSTALL_PREFIX=\"${CMAKE_INSTALL_PREFIX}\")
212+
+add_llvm_tool_symlink(llvm-ranlib llvm-ar)
213+
+add_llvm_tool_symlink(llvm-lib llvm-ar)

0 commit comments

Comments
 (0)