Skip to content

configure: Fix LLVM output dir on MSVC #26004

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 5, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 15 additions & 10 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -1307,6 +1307,12 @@ CFG_LLVM_SRC_DIR=${CFG_SRC_DIR}src/llvm/
for t in $CFG_HOST
do
do_reconfigure=1
is_msvc=0
case "$t" in
(*-msvc)
is_msvc=1
;;
esac

if [ -z $CFG_LLVM_ROOT ]
then
Expand All @@ -1326,7 +1332,13 @@ do
LLVM_ASSERTION_OPTS="--disable-assertions"
else
LLVM_ASSERTION_OPTS="--enable-assertions"
LLVM_INST_DIR=${LLVM_INST_DIR}+Asserts

# Apparently even if we request assertions be enabled for MSVC,
# LLVM's CMake build system ignore this and outputs in `Release`
# anyway.
if [ ${is_msvc} -eq 0 ]; then
LLVM_INST_DIR=${LLVM_INST_DIR}+Asserts
fi
fi
else
msg "not reconfiguring LLVM, external LLVM root"
Expand Down Expand Up @@ -1356,14 +1368,7 @@ do
done
fi

use_cmake=0
case "$t" in
(*-msvc)
use_cmake=1
;;
esac

if [ ${do_reconfigure} -ne 0 ] && [ ${use_cmake} -ne 0 ]
if [ ${do_reconfigure} -ne 0 ] && [ ${is_msvc} -ne 0 ]
then
msg "configuring LLVM for $t with cmake"

Expand All @@ -1388,7 +1393,7 @@ do
need_ok "LLVM cmake configure failed"
fi

if [ ${do_reconfigure} -ne 0 ] && [ ${use_cmake} -eq 0 ]
if [ ${do_reconfigure} -ne 0 ] && [ ${is_msvc} -eq 0 ]
then
# LLVM's configure doesn't recognize the new Windows triples yet
gnu_t=$(to_gnu_triple $t)
Expand Down