Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove xbuild and use build-std feature #1787

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 0 additions & 7 deletions artiq/firmware/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions artiq/firmware/bootloader/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ include $(MISOC_DIRECTORY)/software/common.mak

RUSTFLAGS += -Cpanic=abort

export XBUILD_SYSROOT_PATH=$(BUILDINC_DIRECTORY)/../sysroot

all:: bootloader.bin

cargo = cargo build -Z build-std=core

.PHONY: $(RUSTOUT)/libbootloader.a
$(RUSTOUT)/libbootloader.a:
$(cargo) --target-dir ./cargo \
Expand Down
4 changes: 2 additions & 2 deletions artiq/firmware/ksupport/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ LDFLAGS += --eh-frame-hdr \

RUSTFLAGS += -Cpanic=unwind

export XBUILD_SYSROOT_PATH=$(BUILDINC_DIRECTORY)/../sysroot

all:: ksupport.elf

cargo = cargo build -Z build-std=core,alloc

.PHONY: $(RUSTOUT)/libksupport.a
$(RUSTOUT)/libksupport.a:
$(cargo) --target-dir ./cargo \
Expand Down
3 changes: 1 addition & 2 deletions artiq/firmware/libeh/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,4 @@ path = "lib.rs"
[dependencies]
cslice = { version = "0.3" }
libc = { path = "../libc" }
unwind = { path = "../libunwind" }
compiler_builtins = "=0.1.39" # A dependency of alloc, libeh doesn't need it
unwind = { path = "../libunwind" }
4 changes: 2 additions & 2 deletions artiq/firmware/runtime/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ LDFLAGS += \

RUSTFLAGS += -Cpanic=unwind

export XBUILD_SYSROOT_PATH=$(BUILDINC_DIRECTORY)/../sysroot

all:: runtime.bin runtime.fbi

cargo = cargo build -Z build-std=core,alloc

.PHONY: $(RUSTOUT)/libruntime.a
$(RUSTOUT)/libruntime.a:
$(cargo) --target-dir ./cargo \
Expand Down
4 changes: 2 additions & 2 deletions artiq/firmware/satman/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ LDFLAGS += -L../libbase

RUSTFLAGS += -Cpanic=abort

export XBUILD_SYSROOT_PATH=$(BUILDINC_DIRECTORY)/../sysroot

all:: satman.bin satman.fbi

cargo = cargo build -Z build-std=core

.PHONY: $(RUSTOUT)/libsatman.a
$(RUSTOUT)/libsatman.a:
$(cargo) --target-dir ./cargo \
Expand Down
16 changes: 0 additions & 16 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -218,20 +218,6 @@
propagatedBuildInputs = with pkgs.python3Packages; [ pyserial prettytable msgpack migen ];
};

cargo-xbuild = rustPlatform.buildRustPackage rec {
pname = "cargo-xbuild";
version = "0.6.5";

src = pkgs.fetchFromGitHub {
owner = "rust-osdev";
repo = pname;
rev = "v${version}";
sha256 = "18djvygq9v8rmfchvi2hfj0i6fhn36m716vqndqnj56fiqviwxvf";
};

cargoSha256 = "13sj9j9kl6js75h9xq0yidxy63vixxm9q3f8jil6ymarml5wkhx8";
};

vivadoEnv = pkgs.buildFHSUserEnv {
name = "vivado-env";
targetPkgs = vivadoDeps;
Expand Down Expand Up @@ -262,7 +248,6 @@
pkgs.lld_11
vivado
rustPlatform.cargoSetupHook
cargo-xbuild
];
buildPhase =
''
Expand Down Expand Up @@ -375,7 +360,6 @@
(pkgs.python3.withPackages(ps: with packages.x86_64-linux; [ migen misoc jesd204b artiq ps.paramiko ps.jsonschema microscope ]))
rustPlatform.rust.rustc
rustPlatform.rust.cargo
cargo-xbuild
pkgs.llvmPackages_11.clang-unwrapped
pkgs.llvm_11
pkgs.lld_11
Expand Down