Skip to content

Commit

Permalink
Enable fatal errors by default
Browse files Browse the repository at this point in the history
Add #![no_builtins] to all test programs; see
aya-rs/aya#698 for rationale.
  • Loading branch information
tamird committed Jul 27, 2023
1 parent 92b7410 commit 99a3623
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/bin/bpf-linker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ struct CommandLine {
export: Vec<String>,

/// Whether to treat LLVM errors as fatal.
#[clap(long, action = clap::ArgAction::Set, default_value_t = false)]
#[clap(long, action = clap::ArgAction::Set, default_value_t = true)]
fatal_errors: bool,

// The options below are for wasm-ld compatibility
Expand Down
2 changes: 1 addition & 1 deletion tests/assembly/auxiliary/dep.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@
#[no_mangle]
fn some_dep() -> u8 {
42
}
}
1 change: 0 additions & 1 deletion tests/assembly/auxiliary/loop-panic-handler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,3 @@
fn panic_impl(_: &core::panic::PanicInfo) -> ! {
loop {}
}

3 changes: 2 additions & 1 deletion tests/assembly/bin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@

// Same as bpf-sections.rs, but using bin as crate-type.

#![no_std]
#![no_builtins]
#![no_main]
#![no_std]

// aux-build: loop-panic-handler.rs
extern crate loop_panic_handler;
Expand Down
2 changes: 1 addition & 1 deletion tests/assembly/elf-sections.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ static mut COUNTER: u32 = 0;

// CHECK: .section "uprobe/connect","ax"
// CHECK: .section "uprobe/dep","ax"
// CHECK: .section "maps/counter","aw"
// CHECK: .section "maps/counter","aw"
2 changes: 1 addition & 1 deletion tests/assembly/re-export-symbols.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ fn connect() {
}

// CHECK: .globl connect
// CHECK: .globl some_dep
// CHECK: .globl some_dep

0 comments on commit 99a3623

Please sign in to comment.