Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,10 @@ http_archive(
name = "llvm-raw",
build_file = "//:BUILD.llvm-raw",
patch_args = ["-p1"],
patches = ["//:llvm.patch"],
patches = [
"//:llvm.patch",
"//:llvm_extra_targets.patch",
],
sha256 = LLVM_SHA256,
strip_prefix = "llvm-project-" + LLVM_COMMIT,
urls = ["https://github.com/llvm/llvm-project/archive/{commit}.tar.gz".format(commit = LLVM_COMMIT)],
Expand Down
21 changes: 21 additions & 0 deletions add_rules_ll_targets.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
set -eux

LL_DIR="/tmp/rules_ll"
#git clone https://github.com/eomii/rules_ll.git "$LL_DIR"
#git clone https://github.com/llvm/llvm-project.git /tmp/llvm-project

cd "$LL_DIR/llvm-project-overlay"
FILES="$(find . -type f)"
for FILE in $FILES; do
mkdir -p /tmp/llvm-project/utils/bazel/llvm-project-overlay/"$(dirname $FILE)"
OUT="/tmp/llvm-project/utils/bazel/llvm-project-overlay/$FILE"
cp "$FILE" "$OUT"
sed -i 's/@rules_ll\/\/ll:defs.bzl/@@\/\/:rules_ll_compat.bzl/g' $OUT
done

cd /tmp/llvm-project/
# Not sure what to do with compiler-rt yet.
git checkout utils/bazel/llvm-project-overlay/compiler-rt/BUILD.bazel
git add .
git diff --staged > /static-clang/llvm_extra_targets.patch
git reset --hard
Loading