Skip to content
This repository has been archived by the owner on Jul 6, 2019. It is now read-only.

Adding an llvm target to zinc

Matt Coffin edited this page Jul 9, 2015 · 1 revision

Changes to multiple projects are required to add a new target (thumbv7m-none-eabi, thumbv7em-none-eabi, etc) to zinc. This is due to zinc's system for moving the compilation of rust's libcore in to tree.

The following steps are required for adding a new LLVM target to zinc:

  1. Add a target-specific libcore dependency to zinc's Cargo.toml
  2. Add the platform_target to the case statement in configure.ac and re-run autoconf.
  3. Add a target-specific libcore dependency to rlibc's Cargo.toml.

Code snippets

Here is a snippet for adding a target-specific libcore dependency to a Cargo.toml. Simply replace thumbv6-none-eabi with your target.

+[target.thumbv6-none-eabi.dependencies.core]
+git = "https://github.com/hackndev/rust-libcore"
+

Here is a snippet for adding a platform target to configure.ac.

 case $PLATFORM in
+lpc11xx)
+  platform_target=thumbv6-none-eabi
+  ;;