Switch to release mode, allow all optimizations

This commit is contained in:
Jeremy Soller 2016-11-02 21:46:34 -06:00
parent fe83400600
commit 4b57535c8d
2 changed files with 8 additions and 8 deletions

View file

@ -13,10 +13,10 @@ KCARGOFLAGS=--target $(KTARGET).json -- -C opt-level=s -C soft-float
TARGET=$(ARCH)-unknown-redox TARGET=$(ARCH)-unknown-redox
BUILD=build/userspace BUILD=build/userspace
RUSTC=./rustc.sh RUSTC=./rustc.sh
RUSTCFLAGS=--target $(TARGET).json -C opt-level=s --cfg redox RUSTCFLAGS=--target $(TARGET).json -C opt-level=2 -C debuginfo=0 --cfg redox
RUSTDOC=./rustdoc.sh RUSTDOC=./rustdoc.sh
CARGO=RUSTC="$(RUSTC)" RUSTDOC="$(RUSTDOC)" cargo CARGO=RUSTC="$(RUSTC)" RUSTDOC="$(RUSTDOC)" cargo
CARGOFLAGS=--target $(TARGET).json -- -C opt-level=s --cfg redox CARGOFLAGS=--target $(TARGET).json --release -- --cfg redox
# Default targets # Default targets
.PHONY: all clean doc update qemu bochs drivers schemes coreutils extrautils netutils userutils wireshark FORCE .PHONY: all clean doc update qemu bochs drivers schemes coreutils extrautils netutils userutils wireshark FORCE
@ -232,7 +232,7 @@ $(BUILD)/libopenlibm.a: libstd/openlibm/libopenlibm.a
$(BUILD)/libstd.rlib: libstd/Cargo.toml libstd/src/** $(BUILD)/libcore.rlib $(BUILD)/liballoc.rlib $(BUILD)/librustc_unicode.rlib $(BUILD)/libcollections.rlib $(BUILD)/librand.rlib $(BUILD)/libopenlibm.a $(BUILD)/libstd.rlib: libstd/Cargo.toml libstd/src/** $(BUILD)/libcore.rlib $(BUILD)/liballoc.rlib $(BUILD)/librustc_unicode.rlib $(BUILD)/libcollections.rlib $(BUILD)/librand.rlib $(BUILD)/libopenlibm.a
$(CARGO) rustc --verbose --manifest-path $< $(CARGOFLAGS) -o $@ $(CARGO) rustc --verbose --manifest-path $< $(CARGOFLAGS) -o $@
cp libstd/target/$(TARGET)/debug/deps/*.rlib $(BUILD) cp libstd/target/$(TARGET)/release/deps/*.rlib $(BUILD)
initfs/bin/%: drivers/%/Cargo.toml drivers/%/src/** $(BUILD)/libstd.rlib initfs/bin/%: drivers/%/Cargo.toml drivers/%/src/** $(BUILD)/libstd.rlib
mkdir -p initfs/bin mkdir -p initfs/bin
@ -435,8 +435,8 @@ $(BUILD)/filesystem.bin: \
rm -rf $@ $(BUILD)/filesystem/ rm -rf $@ $(BUILD)/filesystem/
echo exit | cargo run --manifest-path schemes/redoxfs/Cargo.toml --bin redoxfs-utility $@ 256 echo exit | cargo run --manifest-path schemes/redoxfs/Cargo.toml --bin redoxfs-utility $@ 256
mkdir -p $(BUILD)/filesystem/ mkdir -p $(BUILD)/filesystem/
cargo build --manifest-path schemes/redoxfs/Cargo.toml --bin redoxfs-fuse cargo build --manifest-path schemes/redoxfs/Cargo.toml --bin redoxfs-fuse --release
schemes/redoxfs/target/debug/redoxfs-fuse $@ $(BUILD)/filesystem/ & schemes/redoxfs/target/release/redoxfs-fuse $@ $(BUILD)/filesystem/ &
sleep 2 sleep 2
pgrep redoxfs-fuse pgrep redoxfs-fuse
cp -RL filesystem/* $(BUILD)/filesystem/ cp -RL filesystem/* $(BUILD)/filesystem/
@ -454,8 +454,8 @@ $(BUILD)/filesystem.bin: \
mount: $(BUILD)/filesystem.bin FORCE mount: $(BUILD)/filesystem.bin FORCE
mkdir -p $(BUILD)/filesystem/ mkdir -p $(BUILD)/filesystem/
cargo build --manifest-path schemes/redoxfs/Cargo.toml --bin redoxfs-fuse cargo build --manifest-path schemes/redoxfs/Cargo.toml --bin redoxfs-fuse --release
schemes/redoxfs/target/debug/redoxfs-fuse $< $(BUILD)/filesystem/ & schemes/redoxfs/target/release/redoxfs-fuse $< $(BUILD)/filesystem/ &
sleep 2 sleep 2
pgrep redoxfs-fuse pgrep redoxfs-fuse

View file

@ -10,7 +10,7 @@
"target-family": "redox", "target-family": "redox",
"pre-link-args": ["-m64", "-nostdlib", "-static"], "pre-link-args": ["-m64", "-nostdlib", "-static"],
"post-link-args": ["build/userspace/libopenlibm.a"], "post-link-args": ["build/userspace/libopenlibm.a"],
"features": "-sse3,-ssse3,-sse4.1,-sse4.2,-3dnow,-3dnowa,-avx,-avx2", "features": "",
"dynamic-linking": false, "dynamic-linking": false,
"executables": true, "executables": true,
"relocation-model": "static", "relocation-model": "static",