Browse Source

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

pull/897/head
Kitaiti Makoto 2 months ago
parent
commit
94ccbd6190
5 changed files with 16 additions and 7 deletions
  1. +10
    -0
      .cargo/config.toml
  2. +1
    -2
      .circleci/config.yml
  3. +2
    -2
      script/plume-front.sh
  4. +1
    -1
      script/prebuild.sh
  5. +2
    -2
      snap/snapcraft.yaml

+ 10
- 0
.cargo/config.toml View File

@@ -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",
]

+ 1
- 2
.circleci/config.yml View File

@@ -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 >>



+ 2
- 2
script/plume-front.sh View File

@@ -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

+ 1
- 1
script/prebuild.sh View File

@@ -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


+ 2
- 2
snap/snapcraft.yaml View File

@@ -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



Loading…
Cancel
Save