Skip to content

Commit 8158a89

Browse files
author
Jason Mobarak
authored
Update README.md
1 parent 804135f commit 8158a89

File tree

1 file changed

+9
-47
lines changed

1 file changed

+9
-47
lines changed

README.md

Lines changed: 9 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -1,56 +1,18 @@
1-
# Overview of llvm-obfuscator-arm
1+
# Overview of Swift Toolchains
22

33
[![Build Status](https://travis-ci.org/swift-nav/llvm-obfuscator-arm.svg?branch=master)](https://travis-ci.org/swift-nav/llvm-obfuscator-arm)
44

5-
Obfuscating compiler for ARM using https://github.com/obfuscator-llvm/obfuscator.
5+
This collection of toolchains includes several things:
66

7-
This is designed to be integrated with buildroot in order to provide an
8-
obfuscating compiler for components that need it.
7+
- A build of LLVM 6 for ARM and x64 for use within Buildroot to run clang-tidy (and friends)
8+
- An abfuscating compiler for ARM using https://github.com/obfuscator-llvm/obfuscator
9+
- GCC arm-eabi-none toolchains for "bare metal" builds
910

10-
# Example usage
11+
# Example usage of LLVM packages in Buildroot
1112

12-
To integrate with with buildroot, a package.mk will look like this (the `*_SOURCE`
13-
var below is important, you'll need to interact with the GitHub API to find it
14-
when upgrading to a new release):
15-
16-
```make
17-
HOST_LLVM_OBFUSCATOR_VERSION = v7
18-
HOST_LLVM_OBFUSCATOR_SOURCE = $(HOST_LLVM_OBFUSCATOR_VERSION)/llvm-obfuscator-arm-x86.txz
19-
HOST_LLVM_OBFUSCATOR_SITE = https://github.com/swift-nav/llvm-obfuscator-arm/releases/download/
20-
HOST_LLVM_OBFUSCATOR_ACTUAL_SOURCE_TARBALL = llvm-obfuscator-$(HOST_LLVM_OBFUSCATOR_VERSION).tar.xz
21-
22-
HOST_LLVM_OBFUSCATOR_DEPENDENCIES = host-xz
23-
24-
define HOST_LLVM_OBFUSCATOR_PRE_EXTRACT_FIXUP
25-
if ! [ -e $(DL_DIR)/$(HOST_LLVM_OBFUSCATOR_ACTUAL_SOURCE_TARBALL) ]; then \
26-
mv -v $(DL_DIR)/$(shell basename $(HOST_LLVM_OBFUSCATOR_SOURCE)) $(DL_DIR)/$(HOST_LLVM_OBFUSCATOR_ACTUAL_SOURCE_TARBALL); fi
27-
$(eval HOST_LLVM_OBFUSCATOR_SOURCE=$(HOST_LLVM_OBFUSCATOR_ACTUAL_SOURCE_TARBALL))
28-
endef
29-
30-
HOST_LLVM_OBFUSCATOR_PRE_EXTRACT_HOOKS += HOST_LLVM_OBFUSCATOR_PRE_EXTRACT_FIXUP
31-
32-
define HOST_LLVM_OBFUSCATOR_INSTALL_CMDS
33-
mkdir -p $(HOST_DIR)/opt/llvm-obfuscator
34-
rsync -az $(@D)/opt/llvm-obfuscator/ $(HOST_DIR)/opt/llvm-obfuscator/
35-
endef
36-
37-
LLVM_OBF_CC = $(HOST_DIR)/opt/llvm-obfuscator/wrappers/bin/arm-linux-gnueabihf-clang
38-
LLVM_OBF_CXX = $(HOST_DIR)/opt/llvm-obfuscator/wrappers/bin/arm-linux-gnueabihf-clang++
39-
40-
$(eval $(host-generic-package))
41-
```
42-
43-
To upgrade to a new release of the compiler, use the GitHub API to find the
44-
new artifact ID (uses [jq](https://stedolan.github.io/jq/)):
45-
46-
```bash
47-
> export GITHUB_TOKEN=... # your GitHub auth token
48-
> curl -sSL -H "Authorization: token $GITHUB_TOKEN" -H "Accept: application/vnd.github.v3.raw" https://api.github.com/repos/swift-nav/llvm-obfuscator-arm/releases/latest | jq '.assets[0].id,.assets[0].name,.tag_name'
49-
50-
5086675
51-
"llvm-obfuscator-arm.txz"
52-
"v4"
53-
```
13+
To integrate with with Buildroot, see the examples in [piksi_buildroot](https://github.com/swift-nav/piksi_buildroot):
14+
- [llvm_obfuscator.mk](https://github.com/swift-nav/piksi_buildroot/blob/v2.2.0-release/package/llvm_obfuscator/llvm_obfuscator.mk)
15+
- [llvm_vanilla.mk](https://github.com/swift-nav/piksi_buildroot/blob/v2.2.0-release/package/llvm_vanilla/llvm_vanilla.mk)
5416

5517
# Copyright
5618

0 commit comments

Comments
 (0)