diff --git a/build_compiler_rt.sh b/build_compiler_rt.sh index ddff199..3cbc45b 100755 --- a/build_compiler_rt.sh +++ b/build_compiler_rt.sh @@ -77,8 +77,7 @@ export OSXCROSS_NO_10_5_DEPRECATION_WARNING=1 pushd $BUILD_DIR &>/dev/null -FULL_CLONE=1 \ - get_sources https://github.com/llvm/llvm-project.git $BRANCH "compiler-rt" +get_sources https://github.com/llvm/llvm-project.git $BRANCH "compiler-rt" if [ $f_res -eq 1 ]; then pushd "$CURRENT_BUILD_PROJECT_NAME/compiler-rt" &>/dev/null diff --git a/tools/tools.sh b/tools/tools.sh index 71562dc..50128b9 100644 --- a/tools/tools.sh +++ b/tools/tools.sh @@ -280,8 +280,14 @@ function git_clone_repository return fi + local git_extra_opts="" + + if [ -z "$FULL_CLONE" ]; then + git_extra_opts="--depth 1 " + fi + if [ ! -d $project_name ]; then - git clone $url $args $project_name --depth 1 + git clone $url $project_name $git_extra_opts fi pushd $project_name &>/dev/null @@ -292,7 +298,7 @@ function git_clone_repository if git show-ref refs/heads/$branch &>/dev/null; then git fetch origin $branch else - git fetch origin $branch:$branch --depth 1 + git fetch origin $branch:$branch $git_extra_opts fi git checkout $branch