]> git.lizzy.rs Git - rust.git/commitdiff
Update llvm and integrate clang and compiler-rt.
authorGraydon Hoare <graydon@mozilla.com>
Mon, 30 Apr 2012 22:40:04 +0000 (15:40 -0700)
committerGraydon Hoare <graydon@mozilla.com>
Tue, 1 May 2012 00:48:38 +0000 (17:48 -0700)
configure
src/llvm
src/rustllvm/RustWrapper.cpp

index 513ea2614062529f12793037501d90e85d9b5ed9..7ee140e60692219d1b48015ac2b74123b8f6e7d4 100755 (executable)
--- 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
 
index 8b035b5fe83ca15df171e581681bbc9cbd7e2ae0..3a57b672f89adcb2d2d06adc564dc15ca4e276d6 160000 (submodule)
--- a/src/llvm
+++ b/src/llvm
@@ -1 +1 @@
-Subproject commit 8b035b5fe83ca15df171e581681bbc9cbd7e2ae0
+Subproject commit 3a57b672f89adcb2d2d06adc564dc15ca4e276d6
index ed6fdaa6dc5edbf247341b81a0a2924cb1d3fbab..bdf16266d2e681595ece8baa6a0f347680ad0892 100644 (file)
@@ -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_,