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

Commit

Permalink
feat(hooks): Implement toolchains support
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
yillkid committed Jun 18, 2019
1 parent 4cf6b1b commit 1c168c4
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 0 deletions.
1 change: 1 addition & 0 deletions .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,5 @@ build:ubsan --copt -fno-omit-frame-pointer
build:ubsan --linkopt -fsanitize=undefined
build:ubsan --linkopt -lubsan

import %workspace%/hooks/toolchains.rc
try-import %workspace%/user.bazelrc
14 changes: 14 additions & 0 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ git_repository(
remote = "https://github.com/iotaledger/rules_iota.git",
)

git_repository(
name = "iota_toolchains",
commit = "0f93f76fdff9f091dd3a99aa3f19b5d3f4f7f7fc",
remote = "https://github.com/iotaledger/toolchains.git",
)

git_repository(
name = "entangled",
commit = "6ad56514a8a13fb1bf01beb10934cb9e3fd1a8a4",
Expand All @@ -33,3 +39,11 @@ iota_deps()
third_party_deps()

_cc_image_repos()

load("@iota_toolchains//:toolchains.bzl", "setup_initial_deps")

setup_initial_deps()

load("@iota_toolchains//:defs.bzl", "setup_toolchains_repositories")

setup_toolchains_repositories()
20 changes: 20 additions & 0 deletions hooks/toolchains.rc
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@

build:aarch64 --crosstool_top=@iota_toolchains//tools/aarch64--glibc--bleeding-edge-2018.07-1:toolchain
build:aarch64 --cpu=aarch64
build:aarch64 --host_crosstool_top=@bazel_tools//tools/cpp:toolchain

build:armv7 --crosstool_top=@iota_toolchains//tools/armv7-eabihf--glibc--bleeding-edge-2018.07-1:toolchain
build:armv7 --cpu=armeabi-v7a
build:armv7 --host_crosstool_top=@bazel_tools//tools/cpp:toolchain

build:i686 --crosstool_top=@iota_toolchains//tools/x86-i686--glibc--bleeding-edge-2018.07-1:toolchain
build:i686 --cpu=i686
build:i686 --host_crosstool_top=@bazel_tools//tools/cpp:toolchain

build:x86_64 --crosstool_top=@iota_toolchains//tools/x86-64-core-i7--glibc--bleeding-edge-2018.07-1:toolchain
build:x86_64 --cpu=x86_64
build:x86_64 --host_crosstool_top=@bazel_tools//tools/cpp:toolchain

build:emscripten --crosstool_top=@iota_toolchains//tools/emscripten:toolchain
build:emscripten --cpu=emscripten
build:emscripten --host_crosstool_top=@bazel_tools//tools/cpp:toolchain

0 comments on commit 1c168c4

Please sign in to comment.