Skip to content

by default, mark this crate as the #![compiler_builtins] crate #124

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Dec 13, 2016
Merged
Show file tree
Hide file tree
Changes from all 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
4 changes: 4 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ compiler-rt = { path = "compiler-rt" }
[features]
# Build the missing intrinsics from compiler-rt C source code
c = []
# Mark this crate as the #![compiler_builtins] crate
compiler-builtins = []
default = ["compiler-builtins"]
rustbuild = ["compiler-builtins"]
weak = ["rlibc/weak"]

[workspace]
4 changes: 2 additions & 2 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ build: false
test_script:
- cargo build --target %TARGET%
- cargo build --release --target %TARGET%
- cargo test --target %TARGET%
- cargo test --release --target %TARGET%
- cargo test --no-default-features --target %TARGET%
- cargo test --no-default-features --release --target %TARGET%
14 changes: 7 additions & 7 deletions ci/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ case $1 in
xargo build --target $1 --release
;;
*)
cargo test --target $1
cargo test --target $1 --release
cargo test --no-default-features --target $1
cargo test --no-default-features --target $1 --release
;;
esac

Expand All @@ -18,20 +18,20 @@ case $1 in
xargo build --features c --target $1 --bin intrinsics
;;
*)
cargo build --features c --target $1 --bin intrinsics
cargo build --no-default-features --features c --target $1 --bin intrinsics
;;
esac

# Verify that there are no undefined symbols to `panic` within our implementations
# TODO(#79) fix the undefined references problem for debug-assertions+lto
case $1 in
thumb*)
RUSTFLAGS="-C debug-assertions=no -C link-arg=-nostartfiles" xargo rustc --features c --target $1 --bin intrinsics -- -C lto
xargo rustc --features c --target $1 --bin intrinsics --release -- -C lto
RUSTFLAGS="-C debug-assertions=no -C link-arg=-nostartfiles" xargo rustc --no-default-features --features c --target $1 --bin intrinsics -- -C lto
xargo rustc --no-default-features --features c --target $1 --bin intrinsics --release -- -C lto
;;
*)
RUSTFLAGS="-C debug-assertions=no" cargo rustc --features c --target $1 --bin intrinsics -- -C lto
cargo rustc --features c --target $1 --bin intrinsics --release -- -C lto
RUSTFLAGS="-C debug-assertions=no" cargo rustc --no-default-features --features c --target $1 --bin intrinsics -- -C lto
cargo rustc --no-default-features --features c --target $1 --bin intrinsics --release -- -C lto
;;
esac

Expand Down
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#![cfg_attr(not(stage0), deny(warnings))]
#![cfg_attr(not(test), no_std)]
#![cfg_attr(rustbuild, compiler_builtins)]
#![cfg_attr(feature = "compiler-builtins", compiler_builtins)]
#![crate_name = "compiler_builtins"]
#![crate_type = "rlib"]
#![doc(html_logo_url = "https://www.rust-lang.org/logos/rust-logo-128x128-blk.png",
Expand Down