Skip to content

Commit

Permalink
platform-independent build.rs (#59)
Browse files Browse the repository at this point in the history
  • Loading branch information
memoryleak47 authored Jan 30, 2025
1 parent 05ff9ee commit 6b9a0fe
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions Rust/Egg/build.rs
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
use std::process::Command;
use std::ffi::OsStr;
use std::os::unix::ffi::OsStrExt;

extern crate cc;

fn main() {
let mut cc = cc::Build::new();
cc.file("../../C/rev_ffi.c");
let bytes = Command::new("leanc").args(["--print-cflags"]).output().unwrap().stdout;
let s = OsStr::from_bytes(&bytes).to_str().unwrap();
let s = String::from_utf8(bytes).unwrap();
for flag in s.split(" ") {
let flag = flag.trim();
cc.flag(flag);
Expand Down

0 comments on commit 6b9a0fe

Please sign in to comment.