Move Rust flag for plume-front to .cargo/config.toml from env var

pull/897/head
Kitaiti Makoto hace 3 años
padre 77edc4849f
commit 94ccbd6190

@ -0,0 +1,10 @@
[target.wasm32-unknown-unknown]
# required for clippy
rustflags = [
"--cfg", "web_sys_unstable_apis",
]
[target.x86_64-unknown-linux-gnu]
rustflags = [
"--cfg", "web_sys_unstable_apis",
]

@ -22,7 +22,6 @@ executors:
FEATURES: <<#parameters.postgres>>postgres<</ parameters.postgres>><<^parameters.postgres>>sqlite<</parameters.postgres>>
DATABASE_URL: <<#parameters.postgres>>postgres://postgres@localhost/plume<</parameters.postgres>><<^parameters.postgres>>plume.sqlite<</parameters.postgres>>
ROCKET_SECRET_KEY: VN5xV1DN7XdpATadOCYcuGeR/dV0hHfgx9mx9TarLdM=
RUSTFLAGS: --cfg=web_sys_unstable_apis
commands:
@ -73,7 +72,7 @@ commands:
type: string
steps:
- run: |
export RUSTFLAGS="-Zprofile -Zfewer-names -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off -Clink-arg=-Xlinker -Clink-arg=--no-keep-memory -Clink-arg=-Xlinker -Clink-arg=--reduce-memory-overheads $RUSTFLAGS"
export RUSTFLAGS="-Zprofile -Zfewer-names -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off -Clink-arg=-Xlinker -Clink-arg=--no-keep-memory -Clink-arg=-Xlinker -Clink-arg=--reduce-memory-overheads"
export CARGO_INCREMENTAL=0
<< parameters.cmd >>

@ -21,7 +21,7 @@ EOF
if [ $ARCH == "aarch64" -o $ARCH == "armv71" ] ; then
export PATH=/opt/local/llvm/bin:${PATH}
cd /app
RUSTFLAGS="-C linker=lld --cfg=web_sys_unstable_apis" wasm-pack build --target web --release plume-front
RUSTFLAGS="-C linker=lld" wasm-pack build --target web --release plume-front
else
RUSTFLAGS="--cfg=web_sys_unstable_apis" wasm-pack build --target web --release plume-front
wasm-pack build --target web --release plume-front
fi

@ -9,7 +9,7 @@ pkg="$4"
build () {
features="$1"
cargo clean
RUSTFLAGS="--cfg=web_sys_unstable_apis" wasm-pack build --target web --release plume-front
wasm-pack build --target web --release plume-front
cargo build --release --no-default-features --features="${features}" --package=plume-cli
cargo build --release --no-default-features --features="${features}"
./script/generate_artifact.sh

@ -45,10 +45,10 @@ parts:
# the system LLD we've installed earlier.
case ${SNAPCRAFT_ARCH_TRIPLET} in \
aarch64-linux-gnu|arm-linux-gnueabihf|powerpc64-linux-gnu|s390x-linux-gnu) \
RUSTFLAGS="-C linker=lld --cfg=web_sys_unstable_apis" wasm-pack build --target web --release plume-front \
RUSTFLAGS="-C linker=lld" wasm-pack build --target web --release plume-front \
;; \
*) \
RUSTFLAGS="--cfg=web_sys_unstable_apis" wasm-pack build --target web --release plume-front \
wasm-pack build --target web --release plume-front \
;; \
esac

Cargando…
Cancelar
Guardar