Code Monkey home page Code Monkey logo

Comments (2)

graymalkin avatar graymalkin commented on August 15, 2024

It looks like x.py is hooked up to a non-CHERI LLVM through your config.toml. Can you share your config? Mine looks like this:

# Includes one of the default files in src/bootstrap/defaults
profile = "codegen"
changelog-seen = 2

[build]
# "aarch64-apple-darwin", 
target = ["aarch64-apple-darwin", "aarch64-unknown-freebsd", "aarch64-unknown-freebsd-purecap"]
docs = false

[install]
prefix = "./build/install-stage2-latest"
sysconfdir = "./build/install-stage2-latest"
# TODO: check if this is okay: docs = false

# Replace with whatever architecture you're building and running the compiler from.
[target.aarch64-apple-darwin]
# Use Morello build of LLVM, this seems to control what the compiler is linked with.
# The Morello fork seems to support all the normal architectures, plus Morello-specific options.
# We need the Morello-specific options so that we can cross compile.
# You'll need a Morello SDK build: `cheribuild.py cheribsd-morello-purecap`
llvm-config = "/Users/simon/cheri/output/morello-sdk/bin/llvm-config"

[target.x86_64-unknown-linux-gnu]
llvm-config = "/Users/simon/cheri/output/morello-sdk/bin/llvm-config"


[target.aarch64-unknown-freebsd]
# This doesn't appear to do anything, presumably only the one for the host has any effect?
# llvm-config = "/Users/simon/cheri/output/morello-sdk/bin/llvm-config"
# These wrappers force clang to use the right target and system libraries.
# Without it, the build system appears to default to host libc/libm/etc, which are the wrong arch.
# It'd be cleaner just to pass the extra flags, but I haven't found an option for that.
#
# Note that this requires having a FreeBSD build, which you can get like this:
# `cheribuild.py freebsd-aarch64`
#
# The path here is just a path, change it to match your home and cheribuild paths.
# The scripts will also need updating to match your home and cherbuild paths.
cc = "/Users/simon/github/rust/clang-freebsd.sh"
cxx = "/Users/simon/github/rust/clang++-freebsd.sh"
linker = "/Users/simon/github/rust/clang-freebsd.sh"
# Use Morello SDK's binutils for compilation.
# The host's binutils might be fine here, but may as well use the Morello tools for consistency.
# Leaving these options out entirely seems to confuse the build system somehow.
ar = "/Users/simon/cheri/output/morello-sdk/bin/ar"
ranlib = "/Users/simon/cheri/output/morello-sdk/bin/ranlib"

[target.aarch64-unknown-freebsd-purecap]
# This doesn't appear to do anything, presumably only the one for the host has any effect?
# llvm-config = "/Users/simon/cheri/output/morello-sdk/bin/llvm-config"
# Options needed for building the standard library, as and when that's supported.
cc = "/Users/simon/github/rust/clang-morello.sh"
cxx = "/Users/simon/github/rust/clang++-morello.sh"
ar = "/Users/simon/cheri/output/morello-sdk/bin/ar"
ranlib = "/Users/simon/cheri/output/morello-sdk/bin/ranlib"
linker = "/Users/simon/github/rust/clang-morello.sh"

# You can compile programs with the above targets like this:
# `build/aarch64-apple-darwin/stage1/bin/rustc --out-dir /tmp/build --target aarch64-unknown-freebsd -C linker=/home/rust-20211014/clang-freebsd.sh test.rs`
# Output appears in /tmp/build, which helps avoid splurging intermediate files about accidentally.

If you're on aarch64 macOS you can also grab a pre-built distribution from the releases page on this repo.

from rust.

Bromind avatar Bromind commented on August 15, 2024

Go it, I missed the:

[target.x86_64-unknown-linux-gnu]
llvm-config = "/HOME/cheri/output/morello-sdk/bin/llvm-config"

The Readme has it only for target.aarch64-apple-darwin, not for target.x86_64-unknown-linux-gnu. I now run into a different error, which I'll investigate this afternoon. I'll also propose an update of the README

Thanks :-)

from rust.

Related Issues (3)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.