Skip to content

Commit

Permalink
Update llvm and integrate clang and compiler-rt.
Browse files Browse the repository at this point in the history
  • Loading branch information
graydon committed May 1, 2012
1 parent 5b98000 commit 079c3b0
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 30 deletions.
49 changes: 21 additions & 28 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -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=""
Expand Down Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion src/llvm
Submodule llvm updated 1153 files
2 changes: 1 addition & 1 deletion src/rustllvm/RustWrapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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_,
Expand Down

0 comments on commit 079c3b0

Please sign in to comment.