File tree 1 file changed +14
-10
lines changed
1 file changed +14
-10
lines changed Original file line number Diff line number Diff line change @@ -546,22 +546,26 @@ CFG_TARGET=$(to_llvm_triple $CFG_TARGET)
546
546
# there's no rpath. This is where the build system itself puts libraries;
547
547
# --libdir is used to configure the installation directory.
548
548
# FIXME: This needs to parameterized over target triples. Do it in platform.mk
549
- CFG_LIBDIR_RELATIVE=lib
550
549
if [ " $CFG_OSTYPE " = " pc-windows-gnu" ]
551
550
then
552
551
CFG_LIBDIR_RELATIVE=bin
553
- CFG_LIBDIR=" ${CFG_PREFIX} /${CFG_LIBDIR_RELATIVE} "
554
552
else
555
- valopt libdir " ${CFG_PREFIX} /${CFG_LIBDIR_RELATIVE} " " install libraries (ignored on windows platform)"
553
+ CFG_LIBDIR_RELATIVE=lib
554
+ fi
556
555
557
- case " $CFG_LIBDIR " in
558
- " $CFG_PREFIX " /* ) CAT_INC=2;;
559
- " $CFG_PREFIX " * ) CAT_INC=1;;
560
- * )
561
- err " libdir must begin with the prefix. Use --prefix to set it accordingly." ;;
562
- esac
556
+ valopt libdir " ${CFG_PREFIX} /${CFG_LIBDIR_RELATIVE} " " install libraries (do not set it on windows platform)"
557
+
558
+ case " $CFG_LIBDIR " in
559
+ " $CFG_PREFIX " /* ) CAT_INC=2;;
560
+ " $CFG_PREFIX " * ) CAT_INC=1;;
561
+ * )
562
+ err " libdir must begin with the prefix. Use --prefix to set it accordingly." ;;
563
+ esac
564
+
565
+ CFG_LIBDIR_RELATIVE=` echo ${CFG_LIBDIR} | cut -c$(( ${# CFG_PREFIX} + ${CAT_INC} )) -`
563
566
564
- CFG_LIBDIR_RELATIVE=` echo ${CFG_LIBDIR} | cut -c$(( ${# CFG_PREFIX} + ${CAT_INC} )) -`
567
+ if [ " $CFG_OSTYPE " = " pc-windows-gnu" ] && [ " $CFG_LIBDIR_RELATIVE " != " bin" ]; then
568
+ err " libdir on windows should be set to 'bin'"
565
569
fi
566
570
567
571
if [ $HELP -eq 1 ]
You can’t perform that action at this time.
0 commit comments