llvm.org GIT mirror llvm / 0ae89f9
Let test-release.sh checkout subprojects directly into the target tree, instead of using symlinks Summary: In the past I have run into several problems with the way `test-release.sh` creates all the subproject directories as siblings, and then uses symlinks to stitch them all together. In some scenarios this leads to clang not being able to find header files, etc. This patch changes the script so it directly exports into the correct target locations for each subproject. Reviewers: hans Subscribers: emaste, llvm-commits Differential Revision: http://reviews.llvm.org/D16420 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258436 91177308-0d34-0410-b5e6-96231b3b80d8 Dimitry Andric 4 years ago
1 changed file(s) with 23 addition(s) and 43 deletion(s). Raw diff Collapse all Expand all
266266 check_valid_urls
267267
268268 for proj in $projects ; do
269 if [ -d $proj.src ]; then
270 echo "# Reusing $proj $Release-$RC sources"
269 case $proj in
270 llvm)
271 projsrc=$proj.src
272 ;;
273 cfe)
274 projsrc=llvm.src/tools/clang
275 ;;
276 clang-tools-extra)
277 projsrc=llvm.src/tools/clang/tools/extra
278 ;;
279 compiler-rt|libcxx|libcxxabi|libunwind|openmp|test-suite)
280 projsrc=llvm.src/projects/$proj
281 ;;
282 *)
283 echo "error: unknown project $proj"
284 exit 1
285 ;;
286 esac
287
288 if [ -d $projsrc ]; then
289 echo "# Reusing $proj $Release-$RC sources in $projsrc"
271290 continue
272291 fi
273 echo "# Exporting $proj $Release-$RC sources"
274 if ! svn export -q $Base_url/$proj/$ExportBranch $proj.src ; then
292 echo "# Exporting $proj $Release-$RC sources to $projsrc"
293 if ! svn export -q $Base_url/$proj/$ExportBranch $projsrc ; then
275294 echo "error: failed to export $proj project"
276295 exit 1
277296 fi
278297 done
279
280 echo "# Creating symlinks"
281 cd $BuildDir/llvm.src/tools
282 if [ ! -h clang ]; then
283 ln -s ../../cfe.src clang
284 fi
285
286 # The autoconf and CMake builds want different symlinks here:
287 if [ "$use_autoconf" = "yes" ]; then
288 cd $BuildDir/llvm.src/tools/clang/tools
289 if [ ! -h extra ]; then
290 ln -s ../../../../clang-tools-extra.src extra
291 fi
292 else
293 cd $BuildDir/cfe.src/tools
294 if [ ! -h extra ]; then
295 ln -s ../../clang-tools-extra.src extra
296 fi
297 fi
298
299 cd $BuildDir/llvm.src/projects
300 if [ -d $BuildDir/test-suite.src ] && [ ! -h test-suite ]; then
301 ln -s ../../test-suite.src test-suite
302 fi
303 if [ -d $BuildDir/compiler-rt.src ] && [ ! -h compiler-rt ]; then
304 ln -s ../../compiler-rt.src compiler-rt
305 fi
306 if [ -d $BuildDir/openmp.src ] && [ ! -h openmp ]; then
307 ln -s ../../openmp.src openmp
308 fi
309 if [ -d $BuildDir/libcxx.src ] && [ ! -h libcxx ]; then
310 ln -s ../../libcxx.src libcxx
311 fi
312 if [ -d $BuildDir/libcxxabi.src ] && [ ! -h libcxxabi ]; then
313 ln -s ../../libcxxabi.src libcxxabi
314 fi
315 if [ -d $BuildDir/libunwind.src ] && [ ! -h libunwind ]; then
316 ln -s ../../libunwind.src libunwind
317 fi
318298
319299 cd $BuildDir
320300 }