Skip to content
This repository was archived by the owner on Dec 26, 2022. It is now read-only.

Commit 1c168c4

Browse files
committed
feat(hooks): Implement toolchains support
Introduce several toolschains for x86 and arm system. Emscripten is also viewed as a toolchain which is impotrted this time for later JS binding usage.
1 parent 4cf6b1b commit 1c168c4

File tree

3 files changed

+35
-0
lines changed

3 files changed

+35
-0
lines changed

.bazelrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,4 +43,5 @@ build:ubsan --copt -fno-omit-frame-pointer
4343
build:ubsan --linkopt -fsanitize=undefined
4444
build:ubsan --linkopt -lubsan
4545

46+
import %workspace%/hooks/toolchains.rc
4647
try-import %workspace%/user.bazelrc

WORKSPACE

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@ git_repository(
77
remote = "https://github.com/iotaledger/rules_iota.git",
88
)
99

10+
git_repository(
11+
name = "iota_toolchains",
12+
commit = "0f93f76fdff9f091dd3a99aa3f19b5d3f4f7f7fc",
13+
remote = "https://github.com/iotaledger/toolchains.git",
14+
)
15+
1016
git_repository(
1117
name = "entangled",
1218
commit = "6ad56514a8a13fb1bf01beb10934cb9e3fd1a8a4",
@@ -33,3 +39,11 @@ iota_deps()
3339
third_party_deps()
3440

3541
_cc_image_repos()
42+
43+
load("@iota_toolchains//:toolchains.bzl", "setup_initial_deps")
44+
45+
setup_initial_deps()
46+
47+
load("@iota_toolchains//:defs.bzl", "setup_toolchains_repositories")
48+
49+
setup_toolchains_repositories()

hooks/toolchains.rc

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
2+
build:aarch64 --crosstool_top=@iota_toolchains//tools/aarch64--glibc--bleeding-edge-2018.07-1:toolchain
3+
build:aarch64 --cpu=aarch64
4+
build:aarch64 --host_crosstool_top=@bazel_tools//tools/cpp:toolchain
5+
6+
build:armv7 --crosstool_top=@iota_toolchains//tools/armv7-eabihf--glibc--bleeding-edge-2018.07-1:toolchain
7+
build:armv7 --cpu=armeabi-v7a
8+
build:armv7 --host_crosstool_top=@bazel_tools//tools/cpp:toolchain
9+
10+
build:i686 --crosstool_top=@iota_toolchains//tools/x86-i686--glibc--bleeding-edge-2018.07-1:toolchain
11+
build:i686 --cpu=i686
12+
build:i686 --host_crosstool_top=@bazel_tools//tools/cpp:toolchain
13+
14+
build:x86_64 --crosstool_top=@iota_toolchains//tools/x86-64-core-i7--glibc--bleeding-edge-2018.07-1:toolchain
15+
build:x86_64 --cpu=x86_64
16+
build:x86_64 --host_crosstool_top=@bazel_tools//tools/cpp:toolchain
17+
18+
build:emscripten --crosstool_top=@iota_toolchains//tools/emscripten:toolchain
19+
build:emscripten --cpu=emscripten
20+
build:emscripten --host_crosstool_top=@bazel_tools//tools/cpp:toolchain

0 commit comments

Comments
 (0)