Skip to content

Commit

Permalink
Add configuration for build targets
Browse files Browse the repository at this point in the history
  • Loading branch information
martinthenth committed Dec 8, 2023
1 parent 20881f2 commit feafdf3
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 5 deletions.
26 changes: 21 additions & 5 deletions native/uuidv7/.cargo/config.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,26 @@
[target.'cfg(target_os = "macos")']
rustflags = ["-C", "link-arg=-undefined", "-C", "link-arg=dynamic_lookup"]
[target.x86_64-apple-darwin]
rustflags = [
"-C", "link-arg=-undefined",
"-C", "link-arg=dynamic_lookup",
]

[target.aarch64-apple-darwin]
rustflags = [
"-C", "link-arg=-undefined",
"-C", "link-arg=dynamic_lookup",
]

# See https://github.com/rust-lang/rust/issues/59302
[target.x86_64-unknown-linux-musl]
rustflags = ["-C", "target-feature=-crt-static"]
rustflags = [
"-C", "target-feature=-crt-static"
]

# See https://github.com/rust-lang/rust/issues/59302
[target.aarch64-unknown-linux-musl]
rustflags = [
"-C", "target-feature=-crt-static"
]

# Provides a small build size, but takes more time to build.
[profile.release]
lto = true
lto = true
4 changes: 4 additions & 0 deletions native/uuidv7/Cross.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[build.env]
passthrough = [
"RUSTLER_NIF_VERSION"
]

0 comments on commit feafdf3

Please sign in to comment.