Skip to content
Merged
Show file tree
Hide file tree
Changes from 5 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
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
name = "rustc_codegen_gcc"
version = "0.1.0"
authors = ["Antoni Boucher <[email protected]>"]
edition = "2018"
edition = "2024"
license = "MIT OR Apache-2.0"

[lib]
Expand Down
2 changes: 1 addition & 1 deletion build_system/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "y"
version = "0.1.0"
edition = "2021"
edition = "2024"

[dependencies]
boml = "0.3.1"
Expand Down
4 changes: 3 additions & 1 deletion build_system/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,9 @@ pub enum Command {

fn main() {
if env::var("RUST_BACKTRACE").is_err() {
env::set_var("RUST_BACKTRACE", "1");
unsafe {
env::set_var("RUST_BACKTRACE", "1");
}
}

let command = match env::args().nth(1).as_deref() {
Expand Down
2 changes: 1 addition & 1 deletion build_system/src/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ use std::path::{Path, PathBuf};
use std::process::{Command, ExitStatus, Output};

#[cfg(unix)]
extern "C" {
unsafe extern "C" {
fn raise(signal: c_int) -> c_int;
}

Expand Down
2 changes: 1 addition & 1 deletion src/back/lto.rs
Original file line number Diff line number Diff line change
Expand Up @@ -589,7 +589,7 @@ fn thin_lto(
Ok((opt_jobs, copy_jobs))
}

pub unsafe fn optimize_thin_module(
pub fn optimize_thin_module(
thin_module: ThinModule<GccCodegenBackend>,
_cgcx: &CodegenContext<GccCodegenBackend>,
) -> Result<ModuleCodegen<GccContext>, FatalError> {
Expand Down
2 changes: 1 addition & 1 deletion src/back/write.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ use crate::base::add_pic_option;
use crate::errors::CopyBitcode;
use crate::{GccCodegenBackend, GccContext};

pub(crate) unsafe fn codegen(
pub(crate) fn codegen(
cgcx: &CodegenContext<GccCodegenBackend>,
dcx: DiagCtxtHandle<'_>,
module: ModuleCodegen<GccContext>,
Expand Down
4 changes: 2 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#![allow(internal_features)]
#![doc(rust_logo)]
#![feature(rustdoc_internals)]
#![feature(rustc_private, decl_macro, never_type, trusted_len, let_chains)]
#![feature(rustc_private, decl_macro, never_type, trusted_len)]
#![allow(broken_intra_doc_links)]
#![recursion_limit = "256"]
#![warn(rust_2018_idioms)]
Expand Down Expand Up @@ -454,7 +454,7 @@ impl WriteBackendMethods for GccCodegenBackend {
}

/// This is the entrypoint for a hot plugged rustc_codegen_gccjit
#[no_mangle]
#[unsafe(no_mangle)]
pub fn __rustc_codegen_backend() -> Box<dyn CodegenBackend> {
#[cfg(feature = "master")]
let info = {
Expand Down
4 changes: 3 additions & 1 deletion tests/lang_tests_common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,9 @@ pub fn main_inner(profile: Profile) {
.expect("failed to get absolute path of `gcc-path`")
.display()
.to_string();
env::set_var("LD_LIBRARY_PATH", gcc_path);
unsafe {
env::set_var("LD_LIBRARY_PATH", gcc_path);
}

fn rust_filter(path: &Path) -> bool {
path.is_file() && path.extension().expect("extension").to_str().expect("to_str") == "rs"
Expand Down
Loading