From 079c3b02a86aa73d0d070876612ed889dc187354 Mon Sep 17 00:00:00 2001 From: Graydon Hoare Date: Mon, 30 Apr 2012 15:40:04 -0700 Subject: [PATCH] Update llvm and integrate clang and compiler-rt. --- configure | 49 ++++++++++++++++-------------------- src/llvm | 2 +- src/rustllvm/RustWrapper.cpp | 2 +- 3 files changed, 23 insertions(+), 30 deletions(-) diff --git a/configure b/configure index 513ea261406..7ee140e6069 100755 --- a/configure +++ b/configure @@ -259,9 +259,9 @@ esac DEFAULT_HOST_TRIPLE="${CFG_CPUTYPE}-${CFG_OSTYPE}" -CFG_SELF=$(echo $0 | tr '\\' '/') -CFG_SRC_DIR="$(dirname $CFG_SELF)/" -CFG_BUILD_DIR="$(echo $PWD | tr '\\' '/')/" +CFG_SRC_DIR="$(cd $(dirname $0) && pwd)/" +CFG_BUILD_DIR="$(pwd)/" +CFG_SELF=${CFG_SRC_DIR}$(basename $0) CFG_CONFIGURE_ARGS="$@" OPTIONS="" @@ -509,32 +509,25 @@ step_msg "configuring submodules" if [ -z $CFG_DISABLE_MANAGE_SUBMODULES ] then cd ${CFG_SRC_DIR} + msg "git: submodule sync" - "${CFG_GIT}" submodule sync --quiet - SUBMODULES=$("${CFG_GIT}" submodule status | awk '{print $2}') - for s in $SUBMODULES - do - msg "git: submodule status ${s}" - status=$("${CFG_GIT}" submodule status ${s} | awk '{print $1}') - case ${status} in - -*) - msg "${s} is not initialized, initializing" - "${CFG_GIT}" submodule init --quiet ${s} - need_ok "git failed" - msg "${s} updating" - "${CFG_GIT}" submodule update --quiet ${s} - need_ok "git failed" - ;; - +*) - msg "${s} is not up to date, updating" - "${CFG_GIT}" submodule update --quiet ${s} - need_ok "git failed" - ;; - *) - msg "${s} is clean" - ;; - esac - done + "${CFG_GIT}" submodule --quiet sync + + # NB: this is just for the sake of getting the submodule SHA1 values + # and status written into the build log. + msg "git: submodule status" + "${CFG_GIT}" submodule status --recursive + + msg "git: submodule update" + "${CFG_GIT}" submodule --quiet update --init --recursive + need_ok "git failed" + + msg "git: submodule clobber" + "${CFG_GIT}" submodule --quiet foreach --recursive git clean -dxf + need_ok "git failed" + "${CFG_GIT}" submodule --quiet foreach --recursive git checkout . + need_ok "git failed" + cd ${CFG_BUILD_DIR} fi diff --git a/src/llvm b/src/llvm index 8b035b5fe83..3a57b672f89 160000 --- a/src/llvm +++ b/src/llvm @@ -1 +1 @@ -Subproject commit 8b035b5fe83ca15df171e581681bbc9cbd7e2ae0 +Subproject commit 3a57b672f89adcb2d2d06adc564dc15ca4e276d6 diff --git a/src/rustllvm/RustWrapper.cpp b/src/rustllvm/RustWrapper.cpp index ed6fdaa6dc5..bdf16266d2e 100644 --- a/src/rustllvm/RustWrapper.cpp +++ b/src/rustllvm/RustWrapper.cpp @@ -97,7 +97,7 @@ LLVMRustWriteOutputFile(LLVMPassManagerRef PMR, const Target *TheTarget = TargetRegistry::lookupTarget(triple, Err); std::string FeaturesStr; std::string Trip(triple); - std::string CPUStr = llvm::sys::getHostCPUName(); + std::string CPUStr("generic"); TargetMachine *Target = TheTarget->createTargetMachine(Trip, CPUStr, FeaturesStr, Options, Reloc::PIC_, -- GitLab