Skip to content

Commit

Permalink
scripts: Move to ClangBuiltLinux's tc-build repo for building Clang
Browse files Browse the repository at this point in the history
((Python is Snake))

Basically no point to keep maintaining Bash build-clang script
especially since I'm going to move to Zsh in the future.

**

Temporarily tracks nathanchance's python-bringup branch until scripts
are actually made a way to the actual repo, so expect some weird stuffs
to happen while they're on hold for revisions.

(ClangBuiltLinux/tc-build#2)

Signed-off-by: Albert I <krascgq@outlook.co.id>
  • Loading branch information
krasCGQ committed Apr 21, 2019
1 parent 17c5463 commit 8458d4f
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 317 deletions.
7 changes: 4 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
[submodule "telegram"]
path = telegram
url = git://github.com/fabianonline/telegram.sh
[submodule "patches"]
path = patches
url = git://github.com/krasCGQ/patches
[submodule "clang"]
path = clang
url = git://github.com/nathanchance/tc-build
branch = python-bringup
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ Enjoy!

## Standalone Shell Scripts List

* `build-clang`: Clang build script (mostly modified for my local environment and changes adjusted from [khusika/build-tools-clang](https://github.com/khusika/build-tools-clang))
* `killswitch`: VPN kill switch enabler/disabler for UFW (requires `sudo` privileges as `ufw` is only visible to `root` user); only supports VPN connected through `tun0`
* `kudbuild`: KudKernel build script; only supports mido (treble) and X00T

Expand Down
312 changes: 0 additions & 312 deletions build-clang

This file was deleted.

1 change: 1 addition & 0 deletions clang
Submodule clang added at ebc14d
26 changes: 26 additions & 0 deletions env/common
Original file line number Diff line number Diff line change
Expand Up @@ -100,3 +100,29 @@ zipsigner() {
korg_merge() {
git pull git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux v"${1}" --signoff
}

# ClangBuiltLinux's build-llvm.py wrapper
build-clang() {
local ARCH BUILD_DIR CURRENT_DIR INSTALL_DIR WORK_DIR
ARCH="AArch64;ARM;X86"
BUILD_DIR=${HOME}/build/clang
CURRENT_DIR=$(pwd)
INSTALL_DIR=/opt/kud/clang
WORK_DIR=${SCRIPTDIR}/clang

[[ ! -f ${WORK_DIR}/.git ]] && { warn "Please init the submodule before continuing."; return 1; }

cd "${WORK_DIR}" || return 1

[[ ! -d ${BUILD_DIR} ]] && mkdir -p "${BUILD_DIR}"
[[ ! -L build ]] && { rm -rf build; ln -sf "${BUILD_DIR}" build; }

./build-llvm.py -I ${INSTALL_DIR} -t ${ARCH}

cd "${CURRENT_DIR}" || return 1
}

# ClangBuiltLinux's build-binutils.py wrapper
build-binutils() {
"${SCRIPTDIR}"/clang/build-binutils.py -I /opt/kud/binutils -t x86_64
}
1 change: 0 additions & 1 deletion patches
Submodule patches deleted from 966f78

0 comments on commit 8458d4f

Please sign in to comment.