@jk i‘m using it and i love it actually
you can embed two files in a row by leaving the suffix directive off the first one and putting a comma! this rules!
#Tag
@jk i‘m using it and i love it actually
you can embed two files in a row by leaving the suffix directive off the first one and putting a comma! this rules!
the musl script gets worse the longer i look https://github.com/rust-lang/compiler-builtins/blob/82a32c6bd1b82b55de5aea0cddb707732b54855f/crates/musl-math-sys/build.rs#L82-L92
let target_features = env::var("CARGO_CFG_TARGET_FEATURE")
.map(|feats| feats.split(',').map(ToOwned::to_owned).collect())
.unwrap_or_default();
let musl_dir = manifest_dir.join("musl");
let target_arch = env::var("CARGO_CFG_TARGET_ARCH").unwrap();
let musl_arch = if target_arch == "x86" {
"i386".to_owned()
} else {
target_arch.clone()
};
this is a standard env var set from the standard configuration and it's splitting by string? matching against hardcoded literal strings? i could add a zero-width space and break the build. i could ruin everyone's week
honestly feeling super nihilistic https://github.com/rust-lang/compiler-builtins/blob/82a32c6bd1b82b55de5aea0cddb707732b54855f/compiler-builtins/build.rs#L652-L660
// The original compiler-rt build system compiles the same
// source file multiple times with different compiler
// options. Here we do something slightly different: we
// create multiple .S files with the proper #defines and
// then include the original file.
//
// This is needed because the cc crate doesn't allow us to
// override the name of object files and libtool requires
// all objects in an archive to have unique names.
let's work around how the crate we depend on to compile our shit is broken and instead do a ridiculously complex workaround within a build script which provides no record of what we've just done
but then! the top of the file has this incredible bit https://github.com/rust-lang/compiler-builtins/blob/82a32c6bd1b82b55de5aea0cddb707732b54855f/compiler-builtins/build.rs#L29
// OpenBSD provides compiler_rt by default, use it instead of rebuilding it from source
if target.os == "openbsd" {
println!("cargo:rustc-link-search=native=/usr/lib");
println!("cargo:rustc-link-lib=compiler_rt");
return;
}
A space for Bonfire maintainers and contributors to communicate