Skip to content

Commit

Permalink
Move rustflags to makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
richarddavison committed Jan 5, 2024
1 parent 50b92d8 commit cee066e
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 25 deletions.
36 changes: 13 additions & 23 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,38 +3,34 @@ rustflags = [
"-Zpre-link-args=-target aarch64-linux-musl",
"-Ctarget-feature=+lse,+crt-static",
"-Ctarget-cpu=neoverse-n1",
"-Cpanic=abort",
"-Zpanic_abort_tests",
]
linker = "./zigcc"
ar = "zig ar"


[target.x86_64-unknown-linux-musl]
rustflags = [
"-Zpre-link-args=-target x86_64-linux-musl",
"-Ctarget-feature=+crt-static",
"-Cpanic=abort",
"-Zpanic_abort_tests",
]
linker = "./zigcc"
ar = "zig ar"

[target.x86_64-apple-darwin]
rustflags = [
#"-Zpre-link-args=-target x86_64-macos",
"-Cpanic=abort",
"-Zpanic_abort_tests",
]

# [target.x86_64-apple-darwin]
# rustflags = [
# "-Zpre-link-args=-target x86_64-macos",
# "-Cpanic=abort",
# "-Zpanic_abort_tests",
# ]
# linker = "./zigcc"
# ar = "zig ar"

[target.aarch64-apple-darwin]
rustflags = [
#"-Zpre-link-args=-target aarch64-macos",
"-Cpanic=abort",
"-Zpanic_abort_tests",
]
# [target.aarch64-apple-darwin]
# rustflags = [
# "-Zpre-link-args=-target aarch64-macos",
# "-Cpanic=abort",
# "-Zpanic_abort_tests",
# ]
# linker = "./zigcc"
# ar = "zig ar"

Expand All @@ -55,9 +51,3 @@ CC_aarch64_unknown_linux_musl = "zig cc -target aarch64-linux-musl"
CXX_aarch64_unknown_linux_musl = "zig cc -target aarch64-linux-musl"
CC_x86_64_unknown_linux_musl = "zig cc -target x86_64-linux-musl"
CXX_x86_64_unknown_linux_musl = "zig cc -target x86_64-linux-musl"
# CC_x86_64-apple-darwin = "zig cc -target x86_64-macos -I/Users/ridaviso/Downloads/CommonCrypto-master/include"
# CCX_x86_64-apple-darwin = "zig cc -target x86_64-macos"
# CC_aarch64-apple-darwin = "zig cc -target aarch64-macos"
# CCX_aarch64-apple-darwin = "zig cc -target aarch64-macos"
# CC_x86_64-pc-windows-gnu = "zig cc -target x86_64-windows-gnu"
# CXX_x86_64-pc-windows-gnu = "zig cc -target x86_64-windows-gnu"
6 changes: 6 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,12 @@ codegen-units = 1
opt-level = 3
panic = "abort"

[profile.test]
opt-level = 3
strip = true
lto = true
codegen-units = 1

[[bin]]
name = "llrt"
path = "src/main.rs"
5 changes: 3 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -158,10 +158,11 @@ test: export JS_MINIFY = 0
test: js
cargo run -- test -d bundle

test-ci: export RUSTFLAGS = -Cpanic=abort -Zpanic_abort_tests
test-ci: export JS_MINIFY = 0
test-ci: toolchain js
cargo test --target $(CURRENT_TARGET)
cargo run -r --target $(CURRENT_TARGET) -- test -d bundle
cargo ${TOOLCHAIN} test --target $(CURRENT_TARGET)
cargo ${TOOLCHAIN} run -r --target $(CURRENT_TARGET) -- test -d bundle

libs: lib/zstd.h

Expand Down

0 comments on commit cee066e

Please sign in to comment.